Package: inet.clock.oscillator
RandomDriftOscillator
simple moduleThis 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) |
| changeInterval | double |
drift change happens at the end of every interval |
|
| driftRate | double | 0ppm |
expressed as a ratio in parts per million |
| 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 | sample-hold |
Scheduled messages (observed)
| msg | kind | ctrl | tags | msgname | context |
|---|---|---|---|---|---|
| omnetpp::cMessage | 0 | ChangeTimer |
Direct method calls (observed)
| call to | function | info |
|---|---|---|
| OscillatorBasedClock | inet::OscillatorBasedClock::receiveSignal | postOscillatorStateChanged |
| OscillatorBasedClock | inet::OscillatorBasedClock::receiveSignal | preOscillatorStateChanged |
| RandomDriftOscillator | inet::RandomDriftOscillator::setDriftRate | setDriftRate |
Called methods (observed)
| function | info | call from |
|---|---|---|
| inet::RandomDriftOscillator::setDriftRate | setDriftRate | RandomDriftOscillator |
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: volatile double changeInterval @unit(s); // drift change happens at the end of every interval volatile double driftRate @unit(ppm) = default(0ppm); // expressed as a ratio in parts per million 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