discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Disable some paths of the flowgraph without stopp


From: Brashendeavours
Subject: Re: [Discuss-gnuradio] Disable some paths of the flowgraph without stopping (C++)
Date: Sun, 5 Nov 2017 12:40:10 -0500

Stefan,

Consider wrapping the blocks you want to switch in/out in a hier block.
Use the setter functions of the hier block parameters to:
1. lock the flow graph
2. swap in/out the null sink(s) [1]
3. unlock the flowgraph

[1] https://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1null__sink.html

Respectfully,
Blake



Sent from my iPhone
On Nov 4, 2017, at 7:13 PM, Stefan Oltmanns <address@hidden> wrote:

Hello,

I've got a flowgraph with one source that will end in several sinks. Not
all paths of the flowgraph are needed all the time and I would like to
enable/disable a path without stopping the flowgraph to reduce processor
load.
When I leave a path unconnected by default the application will crash.
I've seen there is a (deprecated) Valve block implemented in Python, but
I'm all C++.

Is there a solution in C++?
If there is not, I could probably write a custom block that could either
just return 0 from work function or copy all data from input to output,
but I don't like the idea of copying the data, is there a way to just
handover the pointer?

Best regards
Stefan



reply via email to

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