Hi Nick - From the description of your flowgraph, I think you'll have to write your own custom block to handle the "consequent addition". In C/C++, you could declare an array during instantiation that would be a class variable, once you know the vector size of the addition (via an instantiation argument). Then your "work" function would just loop over all input vectors, adding each to this class array variable. Then, once the number of additions meets your requirements (another instantiation argument), then you output the class array variable which is handled downstream in the flowgraph (e.g., written to file). If the timeline for these additions is days, then async messages might be a better implementation model for the block than streaming -- though either should work. Hope this is useful ! - MLD
On Mon, Sep 17, 2018, at 11:17 PM, Nick Sukhov wrote: > Greetings! > > I need to implement following procedure in GNU Radio and I’m lost on how > to do it. I want to split a stream of data into a vectors, than add up > these vectors consequently for some time (1000 additions for instance) > and then store the information into file. I wanted to design a block for > that consequent addition, but I can’t find a standard way to create > temporary storage (like an array) in a block so every time GNU Radio > runs the block, I would have access to this storage and could change it. > I could probably define a global variable and manually write it in the > block, but that feels wrong and cannot be realized in GRC blocks alone. > I also tried redirecting a stream from the output of the block to it’s > input, but GNU Radio does not allow me to do that, and I don’t know if I > can bypass it. > > Do you know a nice way to design such block? I cannot simply store a lot > of data in a file and process it later, because I’m planning to record a > signal for days and I would definitely run out of memory. > > Thank you! > > Nick Sukhov > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio