James Kuszmaul | 80d6c42 | 2023-01-06 14:16:04 -0800 | [diff] [blame] | 1 | include "aos/configuration.fbs"; |
| 2 | |
| 3 | namespace aos; |
| 4 | |
| 5 | // Current clock values on a given node. Clock values + boot count will not be populated if |
| 6 | // the node is not currently running. |
| 7 | table NodeTimepoint { |
| 8 | // The name of the node that this clock corresponds to. |
| 9 | node:string (id: 0); |
| 10 | // Current boot count for this node (to allow observing reboots). |
| 11 | boot_count:int (id: 1); |
| 12 | // Current monotonic time of this clock, in nanoseconds. |
| 13 | monotonic_time:int64 (id: 2); |
| 14 | // Current realtime (UNIX epoch) time of this clock, in nanoseconds. |
| 15 | realtime_time:int64 (id: 3); |
| 16 | } |
| 17 | |
| 18 | table ClockTimepoints { |
| 19 | // Current "distributed clock" time, in nanoseconds. This will roughly correspond to the |
| 20 | // average of the monotonic clocks across all devices, and will itself be monotonic. |
| 21 | distributed_clock:int64 (id: 0); |
| 22 | // Current clock values for every node. There will be an entry for every node, and the nodes |
| 23 | // will be in the same order as they are in in the config used to generated this message. |
| 24 | clocks:[NodeTimepoint] (id: 1); |
| 25 | } |
| 26 | |
| 27 | root_type ClockTimepoints; |