Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

NewSimulatorTimerThread Class Reference

Starts a thread in which a timer will trigger a function after expiration. More...

#include <new_sim_timer_thread.h>

Inheritance diagram for NewSimulatorTimerThread:

Inheritance graph
[legend]
Collaboration diagram for NewSimulatorTimerThread:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NewSimulatorTimerThread (unsigned int ms_timeout)
 Constructor for Watchdogs.
virtual ~NewSimulatorTimerThread ()
 Destructor.
void Stop ()
 Set the exit flag and sleep THREAD_SLEEPTIME to be sure it is read.
unsigned int Reset (unsigned int new_timeout)
 Set a new timeout value.

Public Attributes

bool m_exit
 signal thread to exit

Protected Member Functions

virtual void * Run ()
 Main loop of the timer.
virtual bool TriggerAction ()=0
 Abstract method which is called after the timre expires.

Protected Attributes

bool m_running
 Flag if a thread is already running.

Detailed Description

Starts a thread in which a timer will trigger a function after expiration.


Member Function Documentation

unsigned int NewSimulatorTimerThread::Reset unsigned int  new_timeout  ) 
 

Set a new timeout value.

Parameters:
new_timeout new timeout value in ms
Returns:
latest timeout value of the object

void * NewSimulatorTimerThread::Run  )  [protected, virtual]
 

Main loop of the timer.

If the timer expires the method TriggerAction() is called.

Implements cThread.


The documentation for this class was generated from the following files:
Generated on Mon Apr 26 14:39:49 2010 for New Simulator by  doxygen 1.4.4