28#ifndef NIDAS_CORE_LOOPER_H
29#define NIDAS_CORE_LOOPER_H
39#include <sys/select.h>
44namespace nidas {
namespace core {
68 unsigned int msecOffset);
85 static int gcd(
unsigned int a,
unsigned int b);
Interface of a client of Looper.
Definition LooperClient.h:38
Looper is a Thread that periodically loops, calling the LooperClient::looperNotify() method of Looper...
Definition Looper.h:51
void removeClient(LooperClient *clnt)
Remove a client from the Looper.
Definition Looper.cc:64
std::map< LooperClient *, unsigned int > _clientDivs
Definition Looper.h:98
virtual int run()
Thread function.
Definition Looper.cc:155
std::map< LooperClient *, unsigned int > _clientPeriods
Definition Looper.h:95
std::list< LooperClient * > _clients
Definition Looper.h:93
void setupClientMaps()
Definition Looper.cc:96
void addClient(LooperClient *clnt, unsigned int msecPeriod, unsigned int msecOffset)
Add a client to the Looper whose LooperClient::looperNotify() method should be called every msec numb...
Definition Looper.cc:45
nidas::util::Mutex _clientMutex
Definition Looper.h:91
Looper()
Definition Looper.cc:36
static int gcd(unsigned int a, unsigned int b)
Utility function for finding greatest common divisor.
Definition Looper.cc:90
std::map< LooperClient *, unsigned int > _clientOffsets
Definition Looper.h:96
std::map< LooperClient *, unsigned int > _clientMods
Definition Looper.h:99
unsigned int _sleepMsec
Definition Looper.h:101
A C++ wrapper for a POSIX mutex.
Definition ThreadSupport.h:161
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31