discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Should return the number of input or the number o


From: Activecat
Subject: Re: [Discuss-gnuradio] Should return the number of input or the number of output?
Date: Sun, 4 May 2014 18:32:41 +0800


On Sun, May 4, 2014 at 4:39 PM, Marcus Müller <address@hidden> wrote:
Hi Activecat,
it's a sink. As Martin said, keep it a sync block. Overriding forecast doesn't even make sense; why should the scheduler ask the block "I'd like to have 2000 output items from you, how much input do you need" if it's guaranteed to never produce output.

Maybe I'm getting something wrong, so why would you want to costumize the forecast function?

Greetings,
Marcus


This sink block needs to produce an 8-bit integer from every 9 elements it receives.
The below two commands will be useful, but unfortunately not currently being supported on python sink block:

  self.set_min_ninput_items(9)
  self.set_input_multiple(9)

One workaround, if it works, will be using forecast():

    def forecast(self, noutput_items, ninput_items_required):
        ninput_items_required[0] = 9 * noutput_items

This elaborates why I try to customize the forecast() of a sink block.



reply via email to

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