On Sun, May 4, 2014 at 4:39 PM, Marcus Müller <marcus.muel...@ettus.com>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.
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to