OscillatorBasedClock

Package: inet.clock.model

OscillatorBasedClock

compound module

(no description)

oscillator : like IOscillator

ConstantDriftOscillator: This module generates ticks periodically using a constant drift in the clock speed.

IOscillator: This module interface is implemented by oscillator models.

Source:
oscillator: <default("ConstantDriftOscillator")> like IOscillator {
    @display("p=100,100");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

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

Known subclasses

Name Type Description
SettableClock compound module

Models a clock which can be set to a different clock time. The clock time can be set from C++ or using a <set-clock module="..." time="..."/> command in a ScenarioManager script.

Extends

Name Type Description
ClockBase compound module

This is a base module for clocks.

Parameters

Name Type Default value Description
displayStringTextFormat string "%t (%c)"

determines the text that is written on top of the submodule

referenceClock string ""

full path of reference clock

emitClockTimeInterval double 0s

non-zero value means the clock time will be emitted periodically

initialClockTime double 0s

clock time at the simulation time when the module is initialized

roundingMode string "up"

when scheduling to a clock time or with a clock delay this clock uses rounding with respect to the nominal tick length

Properties

Name Value Description
class OscillatorBasedClock
display i=block/timer

Signals

Name Type Unit
timeChanged simtime_t

Statistics

Name Title Source Record Unit Interpolation Mode
timeChanged Clock time vector linear

Called methods (observed)

functioninfocall from
inet::OscillatorBasedClock::receiveSignalpostOscillatorStateChangedRandomDriftOscillator
inet::OscillatorBasedClock::receiveSignalpreOscillatorStateChangedRandomDriftOscillator

Source code

module OscillatorBasedClock extends ClockBase like IClock
{
    parameters:
        displayStringTextFormat = default("%t (%c)"); // determines the text that is written on top of the submodule
        double initialClockTime @unit(s) = default(0s); // clock time at the simulation time when the module is initialized
        string roundingMode @enum("down","up","closer","none") = default("up"); // when scheduling to a clock time or with a clock delay this clock uses rounding with respect to the nominal tick length
        @class(OscillatorBasedClock);
    submodules:
        oscillator: <default("ConstantDriftOscillator")> like IOscillator {
            @display("p=100,100");
        }
}

File: src/inet/clock/model/OscillatorBasedClock.ned