Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-20 Thread Hasini Abeywickrama
Hi Nathan, Thank you very much for the suggestions. I will try them. Regards, Hasini On Tue, Sep 20, 2016 at 11:44 PM, West, Nathan wrote: > Do you really need the count, or do you just need some code to process > FFTs as the block computes them? I suspect a little bit more understanding > of

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-20 Thread West, Nathan
Do you really need the count, or do you just need some code to process FFTs as the block computes them? I suspect a little bit more understanding of GNU Radio will help you achieve what you want. Assuming that I have some DSP stuff I want to operate on an FFT output, I would go about this in one o

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-19 Thread Hasini Abeywickrama
Hi Nathan, That's not quite what I want. I do not want the file to have a certain number of FFTs. I want to have a counter which is dynamically updated as the FFTs are written to a file. Ideally I want to know when a new FFT is written to the file so I can trigger another function to process it. I

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-19 Thread West, Nathan
On Mon, Sep 19, 2016 at 6:57 AM, Hasini Abeywickrama wrote: > Hi Marcus, > > That's what I'm currently doing. It's not very efficient as I have to > constantly check the file size. If I can have a counter that is increments > each time an FFT is written to the file by the flow graph I would be ab

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-19 Thread Marcus Müller
But how would that triggering work, and what would be triggered? There's no other way than looking at the file itself to know how much has been written already; this boils down to the very Unix discussion of how atomic write() system calls should be in effect. Best regards, Marcus Am 19. Septem

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-19 Thread Hasini Abeywickrama
Hi Marcus, That's what I'm currently doing. It's not very efficient as I have to constantly check the file size. If I can have a counter that is increments each time an FFT is written to the file by the flow graph I would be able to trigger an event based on the counter value. That was my conce

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-18 Thread Marcus Müller
If you need to do that externally, I'd just watch the file size and divide it by the item size (4B per floating point number) and by the FFT length. Best regards, Marcus On 09/18/2016 11:21 PM, Hasini Abeywickrama wrote: > Hi Marcus, > > It's like I need to start reading and processing the fil

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-18 Thread Hasini Abeywickrama
Hi Marcus, It's like I need to start reading and processing the file after a certain number of FFTs are being written to the file. For that I would need to maintain a counter and I'm trying to figure out how to do it. Regards, Hasini On Mon, Sep 19, 2016 at 2:58 PM, Marcus Müller wrote: > What

Re: [Discuss-gnuradio] Getting the Count of FFTs

2016-09-18 Thread Marcus Müller
What would you need that counter for? There's the 1/(FFT length) fixed relation between samples processed and numbers of FFTs done, so this is pretty much a redundant piece of info, but maybe I'm just missing the use case. Best regards, Marcus On 09/18/2016 10:23 PM, Hasini Abeywickrama wrote:

[Discuss-gnuradio] Getting the Count of FFTs

2016-09-18 Thread Hasini Abeywickrama
Hi all, I have a GNU Radio flowgraph which uses a USRP to receive a signal, converts it to log power FFT and then writes the result to a file, using File Sink. I want to have a counter which increments with each FFT written to the file. Is there a way of maintaining and increasing count of the FF