|
INET Framework for OMNeT++/OMNEST
|
#include <ClockBase.h>
Public Member Functions | |
| virtual clocktime_t | getClockTime () const override |
| Returns the current clock time. More... | |
| virtual void | scheduleClockEventAt (clocktime_t time, ClockEvent *event) override |
| Schedules an event to be delivered to the caller module (i.e. More... | |
| virtual void | scheduleClockEventAfter (clocktime_t time, ClockEvent *event) override |
| Schedules an event to be delivered to the caller module (i.e. More... | |
| virtual ClockEvent * | cancelClockEvent (ClockEvent *event) override |
| Cancels a previously scheduled clock event. More... | |
| virtual void | handleClockEvent (ClockEvent *event) override |
| Called by the clock event to be executed in the context of this clock. More... | |
| virtual const char * | resolveDirective (char directive) const override |
Public Member Functions inherited from inet::IClock | |
| virtual | ~IClock () |
| virtual clocktime_t | computeClockTimeFromSimTime (simtime_t time) const =0 |
| Returns the clock time for the specified future simulation time according to the current state of the clock. More... | |
| virtual simtime_t | computeSimTimeFromClockTime (clocktime_t time) const =0 |
| Returns the simulation time (first moment) for the specified future clock time according to the current state of the clock. More... | |
Static Public Attributes | |
| static simsignal_t | timeChangedSignal = cComponent::registerSignal("timeChanged") |
Protected Member Functions | |
| virtual int | numInitStages () const override |
| virtual void | initialize (int stage) override |
| virtual void | finish () override |
| virtual void | refreshDisplay () const override |
| virtual void | updateDisplayString () const |
| cSimpleModule * | getTargetModule () const |
Protected Attributes | |
| clocktime_t | clockEventTime = -1 |
| const char * | displayStringTextFormat = nullptr |
|
overridevirtual |
Cancels a previously scheduled clock event.
The clock event ownership is transferred to the caller.
Implements inet::IClock.
Reimplemented in inet::OscillatorBasedClock.
Referenced by inet::OscillatorBasedClock::cancelClockEvent().
|
overrideprotectedvirtual |
Reimplemented in inet::IdealClock.
Referenced by inet::IdealClock::finish().
|
overridevirtual |
Returns the current clock time.
Note that the clock time is not necessarily monotonous in execution order. For example, the clock time may decrease even at the same simulation time.
Implements inet::IClock.
Referenced by inet::OscillatorBasedClock::computeSimTimeFromClockTime(), finish(), initialize(), inet::OscillatorBasedClock::receiveSignal(), resolveDirective(), scheduleClockEventAfter(), scheduleClockEventAt(), and inet::SettableClock::setClockTime().
|
inlineprotected |
Referenced by cancelClockEvent(), scheduleClockEventAfter(), and scheduleClockEventAt().
|
overridevirtual |
Called by the clock event to be executed in the context of this clock.
This method is primarily useful for clock implementations to update their internal data structures related to individual clock events.
Implements inet::IClock.
Reimplemented in inet::OscillatorBasedClock.
Referenced by inet::OscillatorBasedClock::handleClockEvent().
|
overrideprotectedvirtual |
Reimplemented in inet::OscillatorBasedClock, inet::SettableClock, and inet::IdealClock.
Referenced by inet::IdealClock::initialize(), and inet::OscillatorBasedClock::initialize().
|
inlineoverrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overridevirtual |
Implements inet::StringFormat::IDirectiveResolver.
Reimplemented in inet::OscillatorBasedClock.
Referenced by inet::OscillatorBasedClock::resolveDirective().
|
overridevirtual |
Schedules an event to be delivered to the caller module (i.e.
the context module) after the given clock time delay has elapsed. The event is anchored to a specific clock time duration, so the actual simulation time when this event is executed is not affected if the clock time is set later. On the other hand, setting the clock drift still affects the simulation time of the event execution.
Implements inet::IClock.
Reimplemented in inet::OscillatorBasedClock.
Referenced by inet::OscillatorBasedClock::scheduleClockEventAfter().
|
overridevirtual |
Schedules an event to be delivered to the caller module (i.e.
the context module) at the specified clock time. The event is anchored to a specific clock time value, so the actual simulation time when this event is executed will be affected if the clock time is set later.
Implements inet::IClock.
Reimplemented in inet::OscillatorBasedClock.
Referenced by inet::OscillatorBasedClock::scheduleClockEventAt().
|
protectedvirtual |
Referenced by initialize(), and refreshDisplay().
|
protected |
Referenced by getClockTime(), and handleClockEvent().
|
protected |
Referenced by initialize(), and updateDisplayString().
|
static |