Package: inet.clock.base
ClockBase
compound moduleThis is a base module for clocks.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Known subclasses
| Name | Type | Description |
|---|---|---|
| IdealClock | compound module |
Models a clock where the clock time is identical to the simulation time. |
| OscillatorBasedClock | compound module |
Models a clock that uses an oscillator to produce ticks periodically. The oscillator is allowed to drift and produce ticks with different lengths over time. The clock simply counts the number of oscillator ticks. The mapping between clock ticks and clock time uses the nominal tick length. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "%t" |
determines the text that is written on top of the submodule |
| referenceClock | string | "" |
full path of reference clock |
Properties
| Name | Value | Description |
|---|---|---|
| class | ClockBase | |
| display | i=block/timer |
Signals
| Name | Type | Unit |
|---|---|---|
| timeChanged | simtime_t |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode |
|---|---|---|---|---|---|
| timeChanged | Clock time | vector | linear |
Source code
// // This is a base module for clocks. // module ClockBase { parameters: string displayStringTextFormat = default("%t"); // determines the text that is written on top of the submodule string referenceClock = default(""); // full path of reference clock @class(ClockBase); @display("i=block/timer"); @signal[timeChanged](type=simtime_t); @statistic[timeChanged](title="Clock time"; record=vector; interpolationmode=linear); }File: src/inet/clock/base/ClockBase.ned