Right, it's not in 3.8. Here's the implementation in C++ for more recent versions. You could translate this to Python if you want. Note that it's a block (not a sync block) so you implement general_work() rather than work().
https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/stream_demux_impl.cc On Sun, Dec 11, 2022 at 8:24 AM Sumit Agrawal (P19EE207) < agrawal...@iitj.ac.in> wrote: > Hi Jeff, > > I can't see any stream demux block in gnu radio 3.8. > Yes, I need specifically in Python > > > ---- > Thanks & Regards, > Sumit Kumar Agrawal, > Ph.D. (Electrical Engineering) > Indian Institute of Technology, > Jodhpur, Rajasthan-342037 > Mobile No. +91-8410957412 > > On Sun, 11 Dec, 2022, 5:56 pm Jeff Long, <willco...@gmail.com> wrote: > >> There is a built-in Stream Demux block you could use. Do you specifically >> need it to be in Python? >> >> On Sun, Dec 11, 2022 at 1:33 AM Sumit Agrawal (P19EE207) < >> agrawal...@iitj.ac.in> wrote: >> >>> Hi everyone, >>> Can anyone tell me how to make a stream demuxing block to demultiplex >>> one stream into N output streams? >>> >>> Demuxes a stream producing N outputs streams that contain n_0 items in >>> the first stream, n_1 items in the second, etc., and repeats. Tags are >>> propagated. The number of items in each output stream is specified using >>> the lengths parameter like so [n_0, n_1, ..., n_N-1]. >>> >>> Example: >>> lengths = [2,3,4,5] >>> >>> input stream = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...] >>> output_stream_0 = [0, 1, 14, 15, ...] >>> output_stream_1 = [2, 3, 4, 16, ...] >>> output_stream_2 = [5, 6, 7, 8, ...] >>> output_stream_2 = [9, 10, 11, 12, 13 ...] >>> >>> -- >>> >>> >>> >>> >>> *Thanks & Regards,Sumit Kumar AgrawalPh.D. (Electrical >>> Engineering)Indian Institute of TechnologyJodhpur, Rajasthan-342037* >>> *Mob. No.- 8410957412* >>> ᐧ >>> >>