I have noticed that many user’s have found the need to mux a stream.
Either to dynamically select an alternative data source or to mux an
output to an alternative sink like a different demodulator.
Currently, GRC has come with selector (and valve). These blocks
implement stream muxing by dynamically reconfiguring the flow graph.
However, this method seems to be slow and error prone.
So, I have created a stream selector block in gr-basic. Stream selector
has N inputs and M outputs and allows the user to dynamically change the
stream routing without flow graph reconfiguration.
- the switchover is immediate
- no lock/unlock start/stop, so no errors
- unused inputs can be put into blocking or consume mode
- The post-reconfiguration overhead is an extra memcpy from source port
to destination port
The work is here, and grc demo attached: