On Fri, Aug 21, 2009 at 12:03:51AM +0000, Yan Wang wrote: > Hello, > I am trying to change some options dynamically. Right now I am trying this > with benchmark_ofdm_rx.py, I add one new class for dynamically enter the new > option value and change it in the program. However I found those options, > except center frequency and gain, all cannot be effectively changed just > by "disconnec+rebuild a receive_path+connect". I did successfully change the > options and make it work through that way, but that's only before I start the > my_top_block, once the top block started, nothing can be effectively changed > (again except center frequency). > > On way I thought about is to stop the top block before changeing the value, > but that's also no way to do that, because the top block won't stop indeed > even I use tb.stop().(This can be proved that the top block cannot be > restarted by tb.start(), errors will come up saying top block is running). > > Is there any effective way to change options dynamically or stop/start the > top > block? > > Thanks a lot.
No need to stop the graph to alter the connections. Use lock/unlock. E.g., top_block.lock() disconnect(...) ... connect(...) ... top_block.unlock() There are some exxamples that do this, and there's been discussion on the mailing list. Eric _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
