Package: inet.clock.contract
IOscillator
module interfaceThis module interface is implemented by oscillator models. Oscillators are typically simple modules, and are used by other modules via direct C++ method calls.
The IOscillator C++ interface provides an API to efficiently simulate the generation of ticks that are usually counted by clocks. The tick period is not necessarily constant, it can change over time.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Implemented by
Name | Type | Description |
---|---|---|
ConstantDriftOscillator | simple module |
This module generates ticks periodically using a constant drift in the clock speed. The first tick is at the simulation time of the module initialization optionally shifted with an offset. The constant drift can be set from C++ or using a <set-oscillator module="..." drift-rate="..." tick-offset=".."/> command in a ScenarioManager script. |
IdealOscillator | simple module |
This module generates ticks periodically with a constant tick length. |
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. |
Used in compound modules
Name | Type | Description |
---|---|---|
OscillatorBasedClock | compound module | (no description) |
Properties
Name | Value | Description |
---|---|---|
display | i=block/tunnel |
Source code
// // This module interface is implemented by oscillator models. Oscillators are // typically simple modules, and are used by other modules via direct C++ method // calls. // // The IOscillator C++ interface provides an API to efficiently simulate the // generation of ticks that are usually counted by clocks. The tick period is // not necessarily constant, it can change over time. // // @see ~IClock // moduleinterface IOscillator { parameters: @display("i=block/tunnel"); }File: src/inet/clock/contract/IOscillator.ned