---------- Forwarded message ----------
From: Sumedha Goyal <sumedha1...@gmail.com>
Date: Wed, Dec 18, 2013 at 10:50 AM
Subject: Re: [Discuss-gnuradio] problem with top_block.stop()
To: Tom Rondeau <t...@trondeau.com>


Hi
My flowgraph does not stop naturally. I want to stop and start it again
using different value for a parameter as shown in my above question.
There is an event in my program where the flowgraph finishes it's job with
first parameter value (which is 0.8 here), at the occurrence of that event
I want the control of flowgraph to come back to the main(). Then I want to
restart the flowgraph with a new parameter value (which is 0.4 here).
 Kindly guide me on this.

Also, can I forcibly bring the control back to main() even when the
flowgraph doesn't have anything to stop its execution?

Thanks and Regards,
Sumedha


On Tue, Dec 17, 2013 at 11:24 PM, Tom Rondeau <t...@trondeau.com> wrote:

> On Tue, Dec 17, 2013 at 12:23 PM, Sumedha Goyal <sumedha1...@gmail.com>
> wrote:
> > I am trying to pass two different parameters to my top_block class
> > I m not able to do this please help. The control of program gets stuck at
> > tb.stop() and doesn't go beyond that.
> >
> > tb=top_block(options,0.8)
> > tb.start()
> > tb.wait()
> > tb.stop()
> > sleep(5)
> > print "I AM BACK"
> > tb1=top_block(options,0.4)
> > tb1.start()
> > tb1.wait()
> > tb1.stop()
> > sleep()
> >
> > Regards,
> > Sumedha
>
> Does your flowgraph in tb naturally stop? The tb.wait() is a blocking
> call and will halt the main loop there until all threads (blocks) in
> tb are done. If your flowgraph doesn't have something that stops
> execution (like a finite file or a blocks.head block), then it will
> continue to process forever and your tb.wait() will continue to block.
>
> Tom
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to