cRealTimeScheduler Class Reference
[Internal classes]

#include <cscheduler.h>

Inheritance diagram for cRealTimeScheduler:

cScheduler cPolymorphic List of all members.

Detailed Description

Real-time scheduler class.

When installed as scheduler using the scheduler-class omnetpp.ini entry, it will syncronize simulation execution to real (wall clock) time.

Operation: a "base time" is determined when startRun() is called. Later on, the scheduler object calls usleep() from getNextEvent() to synchronize the simulation time to real time, that is, to wait until the current time minus base time becomes equal to the simulation time. Should the simulation lag behind real time, this scheduler will try to catch up by omitting sleep calls altogether.

Scaling is supported via the realtimescheduler-scaling omnetpp.ini entry. For example, if it is set to 2.0, the simulation will try to execute twice as fast as real time.


Public Member Functions

 cRealTimeScheduler ()
virtual ~cRealTimeScheduler ()
virtual void startRun ()
virtual void endRun ()
virtual void executionResumed ()
virtual cMessagegetNextEvent ()


Constructor & Destructor Documentation

cRealTimeScheduler::cRealTimeScheduler  )  [inline]
 

Constructor.

virtual cRealTimeScheduler::~cRealTimeScheduler  )  [inline, virtual]
 

Destructor.


Member Function Documentation

virtual void cRealTimeScheduler::endRun  )  [virtual]
 

Called at the end of a simulation run.

Implements cScheduler.

virtual void cRealTimeScheduler::executionResumed  )  [virtual]
 

Recalculates "base time" from current wall clock time.

Reimplemented from cScheduler.

virtual cMessage* cRealTimeScheduler::getNextEvent  )  [virtual]
 

Scheduler function -- it comes from cScheduler interface.

This function synchronizes to real time: it waits (usleep()) until the real time reaches the time of the next simulation event.

Implements cScheduler.

virtual void cRealTimeScheduler::startRun  )  [virtual]
 

Called at the beginning of a simulation run.

Implements cScheduler.


The documentation for this class was generated from the following file:
Generated on Sat Oct 21 17:47:57 2006 for OMNeT++/OMNEST Simulation Library by  doxygen 1.4.6