Comments (2)
Hello,
you probably want to save space, but typically, you would need a second queue for this, one xIFO to accumulate data for a day (or a simple buffer you're averaging on as you acquire new data) and the daily FIFO.
In a queue, once you put an item in it, there's no real reason to change the stored data.
I already had a use case where I needed to reformat the data from a queue; I used 2 queues for this, one to get the "raw" data, and the other one to store the reformated data.
Your q_delPrev()
function would act somewhat like a LIFO on a FIFO.
I understand your use case, and constraints you may have, but I'm not sure this functionality really belongs to the queue itself.
Let me know what you think,
And sorry for the delay in answering,
Regards,
SMFSW
from cqueue.
Hello,
you are right, a queue should rather not be overloaded with strange things. ;-)
I will store the current daily amount (which I already get from the sensor) in a separate variable until I finally push it into the FIFO.
Thanks again!
Regards,
Matthias
from cqueue.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cqueue.