discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] A question about function gr::block::set_history(


From: Martin Braun
Subject: Re: [Discuss-gnuradio] A question about function gr::block::set_history()
Date: Tue, 20 May 2014 11:08:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 19.05.2014 17:48, Kun Qian wrote:
Thank you for your quick answer!

I think I get how gnuradio works with history from your slides:
1. When flowgraph starts, the read pointer of input buffer is set
history()-1 items back.
2. After calling work()/general_work() function, gnuradio scheduler get the
number of consumed items of that input buffer and move the read pointer
forward by that number. Then scheduler wait until next time calling
work()/general_work() function.
Is it right?

And I think I find the error. In gr::block::general_work(), the parameter
ninput_items equals to the *sum* of *noutput_items of previous block* and
*history()-1*, isn't it? I thought ninput_items equals to noutput_items of
previous block when I built the block.

That's right. Everything in the input buffer is described by ninput_items, and that includes history.

M




reply via email to

[Prev in Thread] Current Thread [Next in Thread]