[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] return value of gr::block::general_work
From: |
Michael Dickens |
Subject: |
Re: [Discuss-gnuradio] return value of gr::block::general_work |
Date: |
Sun, 21 Jan 2018 13:34:14 -0500 |
In theory, yes, you can call "produce()" for each output stream with a
different number of items (or, the same), then return
gr::block::WORK_CALLED_PRODUCE to tell the scheduler that produce was handled
inside "general_work()". I know of no blocks that actually do this, but I don't
know everything. That said, the GR runtime internals support my statement &
hence this is worth trying. If you do try & succeed, please do let the list
know. Cheers! - MLD
On Sun, Jan 21, 2018, at 1:19 PM, Dave NotTelling wrote:
> I found in the docs that general_work only supports outputting the same
> number of samples to each output port
> (https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/include/gnuradio/block.h#L47-L49)
> but the produce method seems to tell otherwise
> (https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/include/gnuradio/block.h#L241-L248)
> and even has its own return flag for general_work. So, question is: can
> general_work output different numbers of samples to each output port by use
> of the produce() function and returning -2 in general_work?