discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: One Tagged Input Stream to Unequal Output Streams


From: Nicolas Buhr
Subject: Re: One Tagged Input Stream to Unequal Output Streams
Date: Wed, 31 May 2023 11:04:08 +0200

Hi Alon,

I‘m not sure about a Block with two stream outputs because I have no experience with that, but I can suggest a workaround that should definitely work:

-Make a block with two message outputs and package the samples from the stream into messages you send via these message outputs.
-Make a block that has a message input and a stream output, which turns inputs from a message back into a stream. (If a message comes in, store it to a buffer. In the work procedure, check whether there is something in the buffer to send or otherwise just return 0.)
-Make a hier block, in which you connect two instances of the second block to the outputs of the first block.

I know, it’s not perfect, but at least it should work.


Mit besten Grüßen,

Nicolas Buhr

Am 30.05.2023 um 22:30 schrieb Alon Simon Levin <asl2228@columbia.edu>:


Hi all,

I have a tagged stream block that takes in a fixed number of samples and outputs a subset onto a single stream. I want to extend this functionality to output two subsets of the input stream to two separate outputs, with an unequal number on each one.

For example, for an input stream of 5000 samples, I am currently routing samples 1000-1999 to the output. I would like to extend this so that I send samples 1000-1099 to Output 1 and samples 1100-1999 to Output 2.

Is there an easy way to do this? I've looked through the blocks coding guide but am very confused about how noutput_items works in this scenario. I would appreciate any help on this matter!

Best,
    Alon

--
Alon S. Levin
Ph.D. Student
Wireless & Mobile Networking Lab, Columbia University
alon.s.levin@columbia.edu | (347) 225-7433

reply via email to

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