Saturday, September 28, 2019

Re: [Discuss-gnuradio] GNU-Radio Companion Python flowgraph - return signal that it is finished?

On Sat, Sep 28, 2019 at 6:34 PM Andrew Payne <wandrewp@gmail.com> wrote:
I have a short IQ file that I simply want to play once without repeating, and I want the calling Python code to "know" when it's completed after commanding the GR class instance to start via a call to tb.start(), if tb is the class instance variable.

Call
    tb.start() 
    tb.wait() 
    tb.stop() 
in that order. The call to wait() will block until the flow graph finishes.

If you need to do something else while waiting, you can create another thread from Python (threading.Thread) and either have it call tb.wait() or have it do the other work, whichever suits your application.

No comments:

Post a Comment