discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Custom Blocks and Number of Items Per Port


From: Alexander Olihovik
Subject: [Discuss-gnuradio] Custom Blocks and Number of Items Per Port
Date: Wed, 1 Aug 2012 15:46:14 -0400

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

reply via email to

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