discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] set_output_multiple() and forecast() when there a


From: Andrej Rode
Subject: Re: [Discuss-gnuradio] set_output_multiple() and forecast() when there are multiple sources in a general block
Date: Fri, 16 Dec 2016 20:52:05 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Hey Tom,
On 16/12/16 14:30, Tom Early wrote:
> I am designing a general block that will split it's input into two
> outputs. 96 input items will become 9 items on one source and 3 items on
> another source. I have some questions:
> 
> Is it required to set both streams in forecast()?

Forecast just determines how many items the scheduler should provide on
each input port of your block to produce the requested number of output
items by a upstream block. I'd is you take the maximum number of items
you need at each input port to produce items on each output port.
> 
> How do I call set_output_multiple() where there are multiple sources,
> the larger stream, the first stream, the sum or what?

I would recommend you take the larger number of output items. The thing
is the scheduler will only request chunks of n*output_multiple items and
will give you a buffer with n*output_multiple for each output. (n>=1)
> 
> When general_work() is called, is noutput_items for one stream or
> something else?

noutput_items is basically the size of each of your output buffers. You
are free to produce 0 items or any number up to noutput_items items on
each of your outputs. For handling with multiple output streams with
different rates I'd recommend you take a look at [0], especially
forecast(), general_work(), consume() and produce() are interesting if
you work with multiple inputs and multiple outputs with different rates.
Maybe even history() if you want to retain a certain number of items for
the next call of general_work().

I hope I could help you with your question :)

Cheers,
Andrej

[0] http://gnuradio.org/doc/doxygen/classgr_1_1block.html

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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