I have a block which has two output ports in gnuradio. I need to return a single items to one output port and some specific n output items on another output port. Is this possible or always it returns same number of items on different ports
Asked
Active
Viewed 146 times
1 Answers
2
It's possible. gr::block
has a method called produce(int,int)
to allow you to do exactly that. You'll have to return WORK_CALLED_PRODUCE
instead of returning a number of samples.
Of course, not producing the same amount on all outputs means that you can't use sync_block
and quite likely will have to implement a forecast()
too.

Marcus Müller
- 34,677
- 4
- 53
- 94