PVData C++  8.0.3
Public Types | Public Member Functions | List of all members
epics::pvData::Timer Class Reference

Support for delayed or periodic callback execution. More...

#include <misc/pv/timer.h>

Inheritance diagram for epics::pvData::Timer:
Inheritance graph
Collaboration diagram for epics::pvData::Timer:
Collaboration graph

Public Types

typedef std::tr1::shared_ptr< Timershared_pointer
typedef std::tr1::shared_ptr< const Timerconst_shared_pointer
typedef std::tr1::weak_ptr< Timerweak_pointer
typedef std::tr1::weak_ptr< const Timerconst_weak_pointer

Public Member Functions

 Timer (std::string threadName, ThreadPriority priority)
void close ()
 Prevent new callbacks from being scheduled, and cancel pending callbacks.
void scheduleAfterDelay (TimerCallbackPtr const &timerCallback, double delay)
void schedulePeriodic (TimerCallbackPtr const &timerCallback, double delay, double period)
bool cancel (TimerCallbackPtr const &timerCallback)
bool isScheduled (TimerCallbackPtr const &timerCallback) const
void dump (std::ostream &o) const

Detailed Description

Support for delayed or periodic callback execution.

Definition at line 71 of file timer.h.

Constructor & Destructor Documentation

◆ Timer()

epics::pvData::Timer::Timer ( std::string  threadName,
ThreadPriority  priority 

Create a new timer queue

threadNamename for the timer thread.
prioritythread priority

Member Function Documentation

◆ cancel()

bool epics::pvData::Timer::cancel ( TimerCallbackPtr const &  timerCallback)

cancel a callback.

timerCallbackthe timerCallback to cancel.
true if the timer was queued, and now is cancelled

◆ dump()

void epics::pvData::Timer::dump ( std::ostream o) const

show the elements in the timer queue.

oThe output stream for the output

◆ isScheduled()

bool epics::pvData::Timer::isScheduled ( TimerCallbackPtr const &  timerCallback) const

Is the callback scheduled to be called?

timerCallbackthe timerCallback.
(false,true) if (not, is) scheduled.

◆ scheduleAfterDelay()

void epics::pvData::Timer::scheduleAfterDelay ( TimerCallbackPtr const &  timerCallback,
double  delay 

schedule a callback after a delay.

timerCallbackthe timerCallback instance.
delaynumber of seconds before calling callback.

◆ schedulePeriodic()

void epics::pvData::Timer::schedulePeriodic ( TimerCallbackPtr const &  timerCallback,
double  delay,
double  period 

schedule a periodic callback.`

timerCallbackthe timerCallback instance.
delaynumber of seconds before first callback.
periodtime in seconds between each callback.

The documentation for this class was generated from the following file: