Copying samples to multiple sinks and correlating the streams #118
Replies: 2 comments
-
Extending question 2 a bit: I'd also need to publish other metadata (to external apps) along with the spectrum, e.g. the center frequency and the bandwidth of each slice. It would be important to know when SDR source (SoapySDR source) settings change (mainly regarding the frequency) so it can be reflected correctly in the external applications displaying the frequency scale with the spectrum. I did notice that there is some form of messaging (MessageIo) possible across the blocks, but I'm not sure if the messages are delivered "out-of-band" (immediately) to all blocks or mixed/"in order" with the data? The latter is what I'm after. EDIT: It looks like tags are something that could be used for this purpose? For example:
However, I did not find much documetation on tags... |
Beta Was this translation helpful? Give feedback.
-
Hi, Regarding Q1: You can use the Split or ApplyNM blocks. If your flowgraph is not designed for the web, you can also just connect more than one downstream blocks to a stream output port. (background: circular buffers, which are used by default for native code, support multiple readers; slab buffers, which are used by default in the web, do not yet support multiple -readers.) Regarding Q2: Yes, you could use Tags but you need to make sure its forwarded through all blocks by setting the tag_propgation_function. There is not much documentation at the moment. But tags are also used in the WLAN transceiver. Regarding Q3: You would instantiate a flowgraph with these demodulators and use a Selector to change the output/demodulator in which samples are streamed dynamically. Doing everything inside the block is, of course, also possible but not so nice. In the future, I want to add support to add new blocks during runtime pause and reconnect the flowgraph etc. but that's not possible at the moment. |
Beta Was this translation helpful? Give feedback.
-
Disclaimer: I'm still a beginner in both Rust and SDR apps :)
I'm experimenting with FutureSDR to develop a backend application that would stream audio + spectrum (FFT) from an SDR receiver via network to other applications.
I'm starting to get the idea how a simple "one source to one sink" flowgraph would work for both cases. However, I haven't yet figured out how to "branch" the data stream from the SDR source to two "sub-flowgraphs" where one part would handle demodulation to audio (and push it to network) and the other would produce the spectrum output.
The Copy block seems to only have a single input and a single output. Do I have to write a custom block for duplicating data (kind of fan-out block with multiple outputs) -- and what would be the most efficient way to copy/duplicate the data stream?
How would I easily be able to correlate the output of these sub-flowgraphs? It would be important to know which "slice" of spectrum output correlates with which buffer of audio. Is there a way to pass metadata around (from block to block) with the actual data (e.g. passing timestamps or sample numbers)?
Sort of an unrelated question, but I'll write it down here anyway: Is it possible to edit the flowgraph when it's running, e.g. to switch to another type of demodulator (just thinking of simple things now like SSB, AM, FM, etc.) by switching to another type of block or would this type of dynamic behavior need to be implemented within the block (and then just change the config/params of the block)?
Beta Was this translation helpful? Give feedback.
All reactions