discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GNU-Radio Companion Python flowgraph - return sig


From: Kevin Reid
Subject: Re: [Discuss-gnuradio] GNU-Radio Companion Python flowgraph - return signal that it is finished?
Date: Sat, 28 Sep 2019 19:42:54 -0700

On Sat, Sep 28, 2019 at 6:34 PM Andrew Payne <address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]