Class that implements a Shlaer-Mellor timer event
Class that implements a Shlaer-Mellor timer event. Timer events are used to avoid a deadlock, which can occur when an object waits for an event that never arrives. For example the run control sends an event to a DCM, but the DCM server has crashed and therefore no reply is ever sent back to the run control.
Timer events have a run control event internally and a timeout value. When the timeout has occured, the timer event is fired, which means that the internal run control event is sent (i.e. put on the rcEventQueue deque). It is noteworthy that the timer event is always put at the beginning of the deque.
Timer events can also be cancelled, which has to be done, when the object that generated the timer receives the desired event and therefore no timeout can occur.The timers are organized in an STL multimap with the timeout value as the key (first parameter of the multimap).
See also: rcEvent, rcEventQueue
smTimer( int nMilliSec, rcEvent *pEvent )
~smTimer()
void fire()
static int FireTimers()
static void cancel( smTimer *pTimer )
inline int getTimeRemaining()
static void listAll( ostream &os = cout )
static multimap <int, smTimer*, less<int> > mapTimers
static int getTime()
static bool bPrintOnFire
bool bFired
int tFire
rcEvent* pEvent
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de