Package: inet.applications.clock
SimpleClockSynchronizer
simple moduleThis module periodically synchronizes the slave clock to the master clock with the specified accuracy. The synchronization happens directly using C++ methods calls and without any packet exchange. This is primarily useful when the overhead of the time synchronization protocol messages can be safely ignored.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| masterClockModule | string | ||
| slaveClockModule | string | ||
| synchronizationInterval | double |
clock synchronization period |
|
| synchronizationAccuracy | double | 0s |
0 means exact synchronization |
Properties
| Name | Value | Description |
|---|---|---|
| display | i=block/app | |
| lifecycleSupport |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| socketIn | input | ||
| socketOut | output |
Source code
// // This module periodically synchronizes the slave clock to the master clock with // the specified accuracy. The synchronization happens directly using C++ methods // calls and without any packet exchange. This is primarily useful when the overhead // of the time synchronization protocol messages can be safely ignored. // simple SimpleClockSynchronizer like IApp { parameters: string masterClockModule; string slaveClockModule; volatile double synchronizationInterval @unit(s); // clock synchronization period volatile double synchronizationAccuracy @unit(s) = default(0s); // 0 means exact synchronization @display("i=block/app"); @lifecycleSupport; gates: input socketIn @loose; output socketOut @loose; }File: src/inet/applications/clock/SimpleClockSynchronizer.ned