Patrick Strasser wrote:
Hello!
I'd like to construct a demo for grc which can switch between two or
more branches in a flow graph, like AM or FM: given a Signal, this
would be modulated by an FM and an AM branch, then one is selected for
a simulated channel (noise) and afterwards the signal is fed to either
a FM or a AM demodulator. I want easily switch between the two
behaviours, but am not shure about how to do this the Right Way.
I'd do this now with multiplicators, but that introduces for every
branch a new block, and keeps the unused paths running, which is
rousource hungry (I don't have that much CPU power).
A mute outputs zero when it is "muted", so this is as effective as the
multiplier (maybe a bit faster). I did not integrate the mute because
there is no way yet to use a variable/slider to control an enumerated
data type like the mute parameter which is true or false. A multiply
constant with a variable min=0, max=1, step=1 is the best solution at
the moment.
An other way would be to do disconnects and connects in the flow
graph. Is this a sensible way to go? Can I rearrange a running flow
graph or do I have to stop before rearranging and start the flow graph
afterwards?
Josh: What do you think about integrating this into grc?
I did not know that one can disconnect blocks in a running flow graph.
This is possible? Anyway, I will save that idea for the future.
The third possibility would be contruct a swtich block that takes n
inputs and has a method to select the input by a number. Would this be
possible an a way so that the not-to be consumed path temporarily
discontinues processing? On continuation, the interrupted path would
work with old data. Any way to flush this or are the buffers small
enough to neglect this effect? I guess this would also be true for
connect/disconnect.
I think gnuradio needs a mux and a demux block. A mux has N inputs and a
set_n method. The mux will only feed the output with the nth input
stream (throw out/ignore the other inputs). A demux has N outputs and a
set_n method. The demux will only feed the nth output with the input stream.
The mux seems easy to make. Is the demux possible in the current
gnuradio? Meaning: can you feed one output and starve the other outputs?
In Patrick's example, the demux outputs would be an FM and an AM
demodulator.
Patrick
-Josh
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio