RandomDriftOscillator

Package: inet.clock.oscillator

RandomDriftOscillator

simple module

This oscillator changes drift rate over time. The drift rate is the sum of a distribution that is evaluated periodically and a random walk process.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
DriftingOscillatorBase simple module

This is a base module for oscillators that drift relative to the nominal tick length over time.

Parameters

Name Type Default value Description
displayStringTextFormat string "%c (%n + %d)"

determines the text that is written on top of the submodule

nominalTickLength double 0s

0 means simulation time precision

tickOffset double 0s

shifts ticks to the past, must be in the range of [0, current tick length)

initialDriftRate double 0ppm

expressed as a ratio in parts per million

changeInterval double

drift change happens at the end of every interval

driftRateChange double 0ppm

integrated over time (random walk), no change by default

driftRateChangeLowerLimit double -inf ppm

lower limit for random walk, no limit by default

driftRateChangeUpperLimit double inf ppm

upper limit for random walk, no limit by default

Properties

Name Value Description
class RandomDriftOscillator
display i=block/tunnel

Signals

Name Type Unit
postOscillatorStateChanged
preOscillatorStateChanged

Statistics

Name Title Source Record Unit Interpolation Mode
driftRateChanged Oscillator drift rate vector ppm sample-hold

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0ChangeTimer

Direct method calls (observed)

call tofunctioninfo
OscillatorBasedClockinet::OscillatorBasedClock::receiveSignalpostOscillatorStateChanged
OscillatorBasedClockinet::OscillatorBasedClock::receiveSignalpreOscillatorStateChanged
SettableClockinet::SettableClock::receiveSignalpostOscillatorStateChanged
SettableClockinet::SettableClock::receiveSignalpreOscillatorStateChanged
RandomDriftOscillatorinet::RandomDriftOscillator::setDriftRatesetDriftRate

Called methods (observed)

functioninfocall from
inet::RandomDriftOscillator::setDriftRatesetDriftRateRandomDriftOscillator

Source code

//
// This oscillator changes drift rate over time. The drift rate is the sum of
// a distribution that is evaluated periodically and a random walk process.
//
simple RandomDriftOscillator extends DriftingOscillatorBase like IOscillator
{
    parameters:
        double initialDriftRate @unit(ppm) = default(0ppm); // expressed as a ratio in parts per million
        volatile double changeInterval @unit(s); // drift change happens at the end of every interval
        volatile double driftRateChange @unit(ppm) = default(0ppm); // integrated over time (random walk), no change by default
        double driftRateChangeLowerLimit @unit(ppm) = default(-inf ppm); // lower limit for random walk, no limit by default
        double driftRateChangeUpperLimit @unit(ppm) = default(inf ppm); // upper limit for random walk, no limit by default
        @class(RandomDriftOscillator);
}

File: src/inet/clock/oscillator/RandomDriftOscillator.ned