Clock synchronization is necessary for federations to operate correctly in real-time. We have two alternatives:
1) Add clock-sync as a runtime feature. Inspired by reactor-c
2) Develop a library reactor doing clock sync that can be instantiated in the federate
After a discussion with @edwardalee and @tanneberger we will initially go with (2). A few points:
Clock-sync ports should be connected with physical connections, because then the time-of-reception will be the logical tag of the event triggering the reaction handling it.
To minimize the time between reading physical time and storing it in the payload of an event, and the time where the event is sent over a connection, we should make this happen at a very odd tag where nothing else is happening in the federate. We can do that by scheduling an action at (current_time, UINT32_MAX) which is unlikely to coincide with anything.
Clock synchronization is necessary for federations to operate correctly in real-time. We have two alternatives: 1) Add clock-sync as a runtime feature. Inspired by reactor-c 2) Develop a library reactor doing clock sync that can be instantiated in the federate