Re: Should return the number of input or the number of output?

On Sun, May 4, 2014 at 4:39 PM, Marcus Müller
[email protected]wrote:

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.

Hi Activecat,

On 04.05.2014 12:32, Activecat wrote:

This sink block needs to produce an 8-bit integer from every 9 elements it
receives.
Ok, this explains where the mutual confusion stems from:
A sink block is a block that is a sample sink. Items go in, nothing
comes out.

What you’re describing is a decimator. Nothing special about that, just
use the decimator
block type, set the decimation to 9 and you’re set.

Greetings,
Marcus

On Mon, May 5, 2014 at 3:45 AM, Marcus Müller
[email protected]wrote:

Hi Activecat,

On 04.05.2014 12:32, Activecat wrote:

This sink block needs to produce an 8-bit integer from every 9 elements
it
receives.
Ok, this explains where the mutual confusion stems from:
A sink block is a block that is a sample sink. Items go in, nothing
comes out.

This block calculates 8-bit integers and show it on console, not to any
output port.
There is no output port.
Hence this is a sink block.