Forum: GNU Radio Connect question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sebastiaan H. (Guest)
on 2009-01-06 16:22
(Received via mailing list)
Hi

I would just like to know if it is possible to connect blocks
dynamically?  I'm implementing the analysis_filterbank block.  What I
would like to do is write a GUI application that allows one to select
the channel of interest.  This channel is then displayed on an FFT
sink.  Can I do it as such?

def pick_channel(self,event):
    chan = spinctrl.GetValue()
    self.channel = int(chan)
    self.connect((bank,chan),self.demod)

or do I need to call fg.stop() and fg.start()?

Sebastiaan

--
Sebastiaan H.
Radar and Remote Sensing Group, University of Cape Town
Tel:  +27 83 305 5667
Johnathan C. (Guest)
on 2009-01-06 18:21
(Received via mailing list)
On Tue, Jan 6, 2009 at 6:21 AM, Sebastiaan H. 
<removed_email_address@domain.invalid>
wrote:
>    self.channel = int(chan)
>    self.connect((bank,chan),self.demod)
>
> or do I need to call fg.stop() and fg.start()?

You use self.lock(), do the rewiring, then self.unlock().  See an
example of this usage in:

http://gnuradio.org/trac/browser/gnuradio/trunk/gr...

The above does a disconnect_all() also, which you don't need.

-Johnathan
This topic is locked and can not be replied to.