ClockBase¶
Package: inet.clock.base
compound module ClockBase
Base module for clocks.
Display string format directives:
- -t: clock time in seconds
-T: clock time in automatically selected (natural) units -d: clock time difference to reference clock in automatically selected (natural) units
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
compound module |
Ideal clock: clock time equals simulation time. |
|
compound module |
Oscillator-driven clock. |
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
Base module for all INET compound modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“%t” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
referenceClock |
string |
“” |
Full path of the reference clock |
clockTimeChangeEventSchedulingPriority |
int |
0 |
Specifies the scheduling priority of the clock time changed event |
emitClockTimeInterval |
double |
0s |
A non-zero value means the clock time will be emitted periodically |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
ClockBase |
|
display |
i=block/timer |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
timeChanged |
simtime_t |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
timeChanged |
Clock time |
localSignal(timeChanged) |
vector |
s |
linear |
Source code¶
//
// Base module for clocks.
//
// Display string format directives:
//
// -t: clock time in seconds
// -T: clock time in automatically selected (natural) units
// -d: clock time difference to reference clock in automatically selected (natural) units
//
module ClockBase extends Module
{
parameters:
displayStringTextFormat = default("%t"); // Determines the text that is written on top of the submodule
string referenceClock = default(""); // Full path of the reference clock
int clockTimeChangeEventSchedulingPriority = default(0); // Specifies the scheduling priority of the clock time changed event
double emitClockTimeInterval @unit(s) = default(0s); // A non-zero value means the clock time will be emitted periodically
@class(ClockBase);
@display("i=block/timer");
@signal[timeChanged](type=simtime_t);
@statistic[timeChanged](title="Clock time"; source=localSignal(timeChanged); record=vector; interpolationmode=linear; unit=s);
}