Hi all!
I’m writing a custom sink block in Python with multiple input ports of
all
the same data type.
I’ve been reading Josh’s block coding guide, but I’m confused at one
point:
The value returned by a block should be the number of items produced by
that block.
Is this to say that if I have multiple ports, I may return the value of
input_items[0]?
Or is it correct to say that I must return the sum of all
input_items[i], i
= range(number of input ports)?
I would like to create a synchronous block where all ports consume and
produce an equal number of items every time the work function is called.
However, it appears that there are times when input_items[0] !=
input_items[1] != … != input_items[numPorts-1]
If I were to return input_items[0], I would assume that this would not
yield the results I expect!
Any help is greatly appreciated!
From,
Alex