blob: 892b1c44f995793ed65e5049455d1d620dd12b0a [file] [log] [blame]
James Kuszmaul80d6c422023-01-06 14:16:04 -08001include "aos/configuration.fbs";
2
3namespace 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.
7table 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
18table 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
27root_type ClockTimepoints;