On Sun, May 15, 2005 at 12:20:03AM +0100, mjam01 wrote:
> hey guys,
> 
> i'm trying to change from nbfm to am with this function:
> 
> def set_mode_am(self,urm):
>         #self.connect.clear()
>         self.guts = blks.am_rx (self, self.audio_rate, self.quad_rate)
>       self.connect (self.src, self.ddc, self.guts, self.mute_audio,
> (self.audio_sink, 0))
> 
> what can i replace self.connect.clear() with to make it disconnect and
> connect to the new mode?
> 

First you have to stop the flow graph using fg.stop(),
then use fg.disconnect(xxx, yyy) or fg.disconnect_all()
to disconnect some things, then use fg.connect(xxx, yyy) to glue the
new stuff in, then restart the graph with fg.start().

There's a convoluted example in usrp_siggen.py

Eric


_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to