|
INET Framework for OMNeT++/OMNEST
|
This class implements the event scheduler interface of OMNeT++ to provide a real time scheduling mechanism. More...
#include <RealTimeScheduler.h>
Classes | |
| class | BeginSimulationEvent |
| class | Entry |
| class | ICallback |
Public Member Functions | |
| RealTimeScheduler () | |
| virtual | ~RealTimeScheduler () |
| void | addCallback (int fd, ICallback *callback) |
| To be called from the module which wishes to receive data from the fd. More... | |
| void | removeCallback (int fd, ICallback *callback) |
| virtual void | startRun () override |
| Called at the beginning of a simulation run. More... | |
| virtual void | endRun () override |
| Called at the end of a simulation run. More... | |
| virtual void | executionResumed () override |
| Recalculates "base time" from current wall clock time. More... | |
| virtual cEvent * | guessNextEvent () override |
| Returns the first event in the Future Event Set. More... | |
| virtual cEvent * | takeNextEvent () override |
| Scheduler function – it comes from the cScheduler interface. More... | |
| virtual void | putBackEvent (cEvent *event) override |
| Scheduler function – it comes from the cScheduler interface. More... | |
Public Attributes | |
| int64_t | baseTime = 0 |
Protected Member Functions | |
| virtual void | advanceSimTime () |
| virtual bool | receiveWithTimeout (int64_t timeout) |
| virtual int | receiveUntil (int64_t targetTime) |
Protected Attributes | |
| std::vector< Entry > | callbackEntries |
This class implements the event scheduler interface of OMNeT++ to provide a real time scheduling mechanism.
The events are scheduled so that the events are executed according to the time of the underlying operating system. All time values are measured in nanoseconds.
| void inet::RealTimeScheduler::addCallback | ( | int | fd, |
| ICallback * | callback | ||
| ) |
To be called from the module which wishes to receive data from the fd.
The method must be called from the module's initialize() function.
Referenced by inet::ExtLowerUdp::open().
|
protectedvirtual |
Referenced by guessNextEvent(), and receiveWithTimeout().
|
overridevirtual |
Called at the end of a simulation run.
|
overridevirtual |
|
overridevirtual |
Returns the first event in the Future Event Set.
|
overridevirtual |
|
protectedvirtual |
Referenced by takeNextEvent().
|
protectedvirtual |
Referenced by receiveUntil().
| void inet::RealTimeScheduler::removeCallback | ( | int | fd, |
| ICallback * | callback | ||
| ) |
Referenced by inet::ExtLowerUdp::close().
|
overridevirtual |
Called at the beginning of a simulation run.
|
overridevirtual |
Scheduler function – it comes from the cScheduler interface.
| int64_t inet::RealTimeScheduler::baseTime = 0 |
Referenced by advanceSimTime(), executionResumed(), startRun(), and takeNextEvent().
|
protected |
Referenced by addCallback(), endRun(), receiveWithTimeout(), and removeCallback().