|Subject:||Re: [Discuss-gnuradio] Integration of python's time.time() and work() calls|
|Date:||Fri, 29 May 2015 21:38:03 +0200|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0|
On 05/29/2015 09:07 PM, Anil Kumar Yerrapragada wrote:
well, you have the nitems_read() method, which, assuming you have a constant sampling rate coming from some ADC hardware is directly proportional to time.
Then you should make it clear that you need that many samples. Override the forecast() method to give GNU Radio a hint of how many samples you need.
Don't consume items until you processed them.
You've said that -- still, wall time has no meaning in GNU Radio, and you should just go by the number of samples.
you don't call forecast, you implement it.
No. GNU Radio calls your block's forecast to ask your block how much input it needs to produce a given amount of output. There's no data involved at this point.
not exactly. Forecast gets called as a question. Your block is asked "I'd like to ask you to produce 512 items. How much input do you need?". If your block then says "I need 400 items", no matter for how many items GNU Radio asks, GNU Radio will first try to reduce the number of items it asks for, and then just stop asking until it has more input items.
There's no imaginary array. Never wait anywhere in GNU Radio, especially not by 3ms "wall clock time". Let the scheduler decide when and whether to call your work function.
You don't limit the number, you tell GNU Radio to supply at least a specific amount of input items for a specific amount of output items.
Again, there's a guided tutorial chapter on this topic .
|[Prev in Thread]||Current Thread||[Next in Thread]|