cRealTimeScheduler Class Reference
[Internal classes]

Real-time scheduler class. More...

#include <cscheduler.h>

Inheritance diagram for cRealTimeScheduler:
cScheduler cObject

List of all members.

Public Member Functions

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

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 11:16:30 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3