Hi, Replace all xxx.run with xxx.start() and put xxx.wait() followed by xxx.stop() to stop the flowgraph
Best Regards, Firas ----- Original Message ---- > From: Andy_Long <luckshiw...@yahoo.com.cn> > To: Discuss-gnuradio@gnu.org > Sent: Thu, April 15, 2010 10:50:39 AM > Subject: Re: re[Discuss-gnuradio] configuring with usrp2 src present > > Hello,Johnathan Did I have some misunderstanding about it? I still > think the problem is from USRP2 rather than flow graph. For example, I > made some tests to change the while loop such as: def main(): > t = my_top_block() t.run() > print t.c2mag.unmuted(): #show exceed threshold or not > time.sleep(3) m = my_top_block() m.run() > print m.c2mag.unmuted(): #show exceed threshold or not > time.sleep(3) n = my_top_block() > n.run() print n.c2mag.unmuted(): #show > exceed threshold or not time.sleep(3) As same > condition as before, after two correct outputs, the third one start to show > the error. Thank you. regards, Andy Johnathan > Corgan-2 wrote: > > On Wed, Apr 14, 2010 at 12:27, Andy_Long < > ymailto="mailto:luckshiw...@yahoo.com.cn" > href="mailto:luckshiw...@yahoo.com.cn">luckshiw...@yahoo.com.cn> > wrote: > >> I have faced the same problem. I try to received the > limited samples from >> USRP2 by using "head"block. It should return a > -1 and the flow graph will >> stop, am I right? > > The > flowgraph will not only stop, but will end its lifetime. Once > > run() has returned, the flowgraph is no longer usable, or as we like > to > say, further operations on it are "undefined." > > In general, > starting and stopping an individual flowgraph should occur > at the same > level of processing as application startup and shutdown. > Anything else > is usually a sign of incorrect design (though not > always.) The > run() method on a top block is really just a convenient > way of telling > GNU Radio your application has nothing else to do until > the flowgraph > exits. > > Can you describe what you are trying to do? > > > Johnathan > > > > _______________________________________________ > Discuss-gnuradio mailing > list > > href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org > > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > -- View this message in context: > http://old.nabble.com/reconfiguring-with-usrp2-src-present-tp27615622p28252256.html Sent > from the GnuRadio mailing list archive at > href="http://Nabble.com">Nabble.com. _______________________________________________ Discuss-gnuradio > mailing list > href="mailto:Discuss-gnuradio@gnu.org">Discuss-gnuradio@gnu.org > href="http://lists.gnu.org/mailman/listinfo/discuss-gnuradio" target=_blank > >http://lists.gnu.org/mailman/listinfo/discuss-gnuradio _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio