OscillatorBase¶
Package: inet.clock.base
simple module OscillatorBase
Base module for oscillators.
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for oscillators whose effective tick rate may drift relative to a nominal tick length. This module provides the mapping used by clocks without generating one event per tick. |
|
simple module |
Ideal strictly periodic oscillator (no drift). |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“%n” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
emitNumTicksSignal |
bool |
false |
Enables emitting a signal at each oscillator tick, can be useful for validating the behavior of the more efficient implementation without events |
oscillatorTickEventSchedulingPriority |
int |
0 |
Specifies the scheduling priority of the tick event |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
OscillatorBase |
|
display |
i=block/tunnel |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
driftRateChanged |
double |
||
numTicksChanged |
unsigned long |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
driftRateChanged |
Oscillator drift rate |
vector |
ppm |
sample-hold |
||
numTicksChanged |
number of ticks |
vector |
sample-hold |
Source code¶
//
// Base module for oscillators.
//
simple OscillatorBase extends SimpleModule
{
parameters:
@class(OscillatorBase);
bool emitNumTicksSignal = default(false); // Enables emitting a signal at each oscillator tick, can be useful for validating the behavior of the more efficient implementation without events
int oscillatorTickEventSchedulingPriority = default(0); // Specifies the scheduling priority of the tick event
displayStringTextFormat = default("%n"); // Determines the text that is written on top of the submodule
@display("i=block/tunnel");
@signal[numTicksChanged](type=unsigned long);
@signal[driftRateChanged](type=double);
@statistic[numTicksChanged](title="number of ticks"; record=vector; interpolationmode=sample-hold);
@statistic[driftRateChanged](title="Oscillator drift rate"; record=vector; interpolationmode=sample-hold; unit=ppm);
}