|
CARMA C++
|
Class used to set up repetitive or one-shot timers on integral boundries relative to the system clock. More...
#include <carma/szautil/AbsTimer.h>
Classes | |
| class | TimerId |
| A class for storing information about a known Timer. More... | |
| class | TimerId_eq |
| A predicate for testing if a timer's id matches a requested id. More... | |
| class | TimerSig_eq |
| A predicate for testing if a timer's signal matches a requested signal. More... | |
Public Member Functions | |
| AbsTimer (int signo, void(*handler)(int)) | |
| AbsTimer constructor. More... | |
| AbsTimer (int signo) | |
| Constructor with no handler. More... | |
| void | checkTimer () |
| A debugging function, to print out the signals of all know timers. More... | |
| unsigned long | getResolution () |
| Returns the resolution of the clock in nsec. More... | |
| bool | isRunning () |
| Query if this timer is running. More... | |
| void | reArm () |
| Re-arm a periodic timer which we want to fire relative to absolute second boundaries. More... | |
| void | setInitialDelay (unsigned long sec, unsigned long nsec) |
| Set initial delay when timer is to start from the moment its start() method is called. More... | |
| void | setIntegral (bool integral) |
| Set whether this clock should run on integral second boundaries relative to the current time. More... | |
| void | setIntervalDelay (unsigned long sec, unsigned long nsec) |
| Set interval delay for timer. More... | |
| void | start () |
| Start the Timer. More... | |
| void | stop () |
| Stop the Timer. More... | |
| ~AbsTimer () | |
| AbsTimer destructor. More... | |
Static Public Attributes | |
| static std::list< TimerId > | timerList_ |
| A static list of timers. More... | |
Class used to set up repetitive or one-shot timers on integral boundries relative to the system clock.
For example, use this class if you want to fire events every 500 msec starting at a specific absolute time.
Author: Erik Leitch, extended from Rick Hobbs' Abstimer class Version:
,
Definition at line 52 of file AbsTimer.h.
| sza::util::AbsTimer::AbsTimer | ( | int | signo, |
| void(*)(int) | handler | ||
| ) |
AbsTimer constructor.
| AntException |
| sza::util::AbsTimer::AbsTimer | ( | int | signo | ) |
Constructor with no handler.
| sza::util::AbsTimer::~AbsTimer | ( | ) |
AbsTimer destructor.
| void sza::util::AbsTimer::checkTimer | ( | ) |
A debugging function, to print out the signals of all know timers.
| unsigned long sza::util::AbsTimer::getResolution | ( | ) |
Returns the resolution of the clock in nsec.
| AntException |
| bool sza::util::AbsTimer::isRunning | ( | ) |
| void sza::util::AbsTimer::reArm | ( | ) |
Re-arm a periodic timer which we want to fire relative to absolute second boundaries.
| void sza::util::AbsTimer::setInitialDelay | ( | unsigned long | sec, |
| unsigned long | nsec | ||
| ) |
Set initial delay when timer is to start from the moment its start() method is called.
Remember, sec is in absolute time from start of epoch.
| void sza::util::AbsTimer::setIntegral | ( | bool | integral | ) |
Set whether this clock should run on integral second boundaries relative to the current time.
| void sza::util::AbsTimer::setIntervalDelay | ( | unsigned long | sec, |
| unsigned long | nsec | ||
| ) |
Set interval delay for timer.
| void sza::util::AbsTimer::start | ( | ) |
Start the Timer.
| void sza::util::AbsTimer::stop | ( | ) |
Stop the Timer.
| AntException |
|
static |
A static list of timers.
This list is added to by addTimer() each time a timer gets created for a unique signal
Definition at line 104 of file AbsTimer.h.