discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] gr_block::set_history()


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] gr_block::set_history()
Date: Mon, 1 Oct 2012 21:04:50 -0400

On Mon, Sep 24, 2012 at 12:47 PM, cjpatton <address@hidden> wrote:
> Hello Tom,
>
> I have a follow-up question about how history works in gnuradio. Making no
> assumptions about the input/output ratio of a gr_block, is it safe to assume
> that noutput_items is the number of new data given to the block? I.e., Does
> calling 'consume(noutput_items)' consume all the new data available when the
> work function is called? If this is is the case, what does ninput_items
> represent?
>
> Thanks again,
> Chris Patton

Chris,

By default, yes, an input will have at least noutput_items available
to it. This is due to the forecast function that defaults to say that
the required number of inputs is the number of outputs plus the
history. So unless you overload the forecast function, this is how it
works.

When you say consume(i, noutput_items), then you are just telling the
scheduler that that is how many items read from the input. But there
could be more items available; you just (probably) wouldn't process
them because you don't have the space on the output.

Tom



reply via email to

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