INET Framework for OMNeT++/OMNEST
inet::IOscillator Class Referenceabstract

This class defines the interface for oscillators. More...

#include <IOscillator.h>

Inheritance diagram for inet::IOscillator:
inet::OscillatorBase inet::DriftingOscillatorBase inet::IdealOscillator inet::ConstantDriftOscillator inet::RandomDriftOscillator

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")
 

Detailed Description

This class defines the interface for oscillators.

See the corresponding NED file for details.

Constructor & Destructor Documentation

◆ ~IOscillator()

virtual inet::IOscillator::~IOscillator ( )
inlinevirtual
25 {}

Member Function Documentation

◆ computeIntervalForTicks()

virtual simtime_t inet::IOscillator::computeIntervalForTicks ( int64_t  numTicks) const
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().

◆ computeTicksForInterval()

virtual int64_t inet::IOscillator::computeTicksForInterval ( simtime_t  timeInterval) const
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().

◆ getComputationOrigin()

virtual simtime_t inet::IOscillator::getComputationOrigin ( ) const
pure virtual

◆ getNominalTickLength()

virtual simtime_t inet::IOscillator::getNominalTickLength ( ) const
pure virtual

Member Data Documentation

◆ postOscillatorStateChangedSignal

simsignal_t inet::IOscillator::postOscillatorStateChangedSignal = cComponent::registerSignal("postOscillatorStateChanged")
static

◆ preOscillatorStateChangedSignal

simsignal_t inet::IOscillator::preOscillatorStateChangedSignal = cComponent::registerSignal("preOscillatorStateChanged")
static

The documentation for this class was generated from the following files: