|
INET Framework for OMNeT++/OMNEST
|
This class defines the interface for oscillators. More...
#include <IOscillator.h>
Public Member Functions | |
| virtual | ~IOscillator () |
| virtual simtime_t | getNominalTickLength () const =0 |
| Returns the nominal time interval between subsequent ticks. More... | |
| virtual simtime_t | getComputationOrigin () const =0 |
| Returns the oscillator computation origin from which the ticks are measured. More... | |
| virtual int64_t | computeTicksForInterval (simtime_t timeInterval) const =0 |
| Returns the number of ticks in the specified time interval measured from the oscillator computation origin. More... | |
| virtual simtime_t | computeIntervalForTicks (int64_t numTicks) const =0 |
| Returns the smallest simulation time interval for the specified number of ticks measured from the oscillator computation origin. More... | |
Static Public Attributes | |
| static simsignal_t | preOscillatorStateChangedSignal = cComponent::registerSignal("preOscillatorStateChanged") |
| static simsignal_t | postOscillatorStateChangedSignal = cComponent::registerSignal("postOscillatorStateChanged") |
This class defines the interface for oscillators.
See the corresponding NED file for details.
|
pure virtual |
Returns the smallest simulation time interval for the specified number of ticks measured from the oscillator computation origin.
For example, for 0 ticks returns 0, for 1 tick returns the remaining time till the next tick, and so on.
Implemented in inet::DriftingOscillatorBase, and inet::IdealOscillator.
Referenced by inet::OscillatorBasedClock::computeSimTimeFromClockTime().
|
pure virtual |
Returns the number of ticks in the specified time interval measured from the oscillator computation origin.
Note that each tick interval taken into consideration may be different from the nominal tick length. Returns the #ticks in (computation origin, computation origin + time interval].
Implemented in inet::DriftingOscillatorBase, and inet::IdealOscillator.
Referenced by inet::OscillatorBasedClock::computeClockTimeFromSimTime(), inet::OscillatorBasedClock::receiveSignal(), inet::OscillatorBasedClock::resolveDirective(), and inet::SettableClock::setClockTime().
|
pure virtual |
Returns the oscillator computation origin from which the ticks are measured.
There may or may not be an actual tick at the returned simulation time.
Implemented in inet::DriftingOscillatorBase, and inet::IdealOscillator.
Referenced by inet::OscillatorBasedClock::computeClockTimeFromSimTime(), inet::OscillatorBasedClock::computeSimTimeFromClockTime(), inet::OscillatorBasedClock::receiveSignal(), inet::OscillatorBase::resolveDirective(), inet::OscillatorBasedClock::resolveDirective(), and inet::SettableClock::setClockTime().
|
pure virtual |
Returns the nominal time interval between subsequent ticks.
This value is usually different from the actual amount of elapsed time between ticks.
Implemented in inet::DriftingOscillatorBase, and inet::IdealOscillator.
Referenced by inet::OscillatorBasedClock::computeClockTimeFromSimTime(), inet::OscillatorBasedClock::computeSimTimeFromClockTime(), inet::OscillatorBasedClock::initialize(), inet::OscillatorBase::resolveDirective(), inet::OscillatorBasedClock::scheduleClockEventAfter(), inet::OscillatorBasedClock::scheduleClockEventAt(), and inet::SettableClock::setClockTime().
|
static |
|
static |