discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Timers


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Timers
Date: Tue, 24 Feb 2009 16:17:03 -0800
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Feb 24, 2009 at 05:57:35PM -0500, Marcus D. Leech wrote:
> What's the best way to setup a timer routine that has access to the bits
> of the flowgraph?
> 
> I'm using an external process (UI) to set dynamic values for certain
> USRP attributes, and one of the mechanisms
>   I'm thinking of using is to trigger a regular timer to see if the
> values in an external control file have changed, and if
>   so, update the USRP settings.
> 
> I know that there's gr_local_signal_sighandler()--does the handler
> function have access to the flowgraph?

No.  In general it's virtually impossible to safely uses threads and
signals together.  If you need a timer, one way to get it is to use a
dedicated thread that manages the timer queue, then send messages to
those who want them when the timer expires.

[I'll be implementing something like this in the next few months]

Eric




reply via email to

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