blob: 8f06fdbf2448bd2fc623a85f3c4e590397b2f483 [file] [log] [blame]
Austin Schuhe84c3ed2019-12-14 15:29:48 -08001include "aos/configuration.fbs";
2
3namespace aos.message_bridge;
4
5// State of the connection.
6enum State: ubyte {
7 CONNECTED,
8 DISCONNECTED,
9}
10
11// Statistics from a single connection to a client from this server.
12table ServerConnection {
13 // The node that we are connected to.
14 node:Node;
15
16 // Health of this connection. Connected or not?
17 state:State;
18
19 // Number of packets that have been dropped (if known).
20 dropped_packets:uint;
21
22 // Number of packets received on all channels.
23 sent_packets:uint;
24
Austin Schuh7bc59052020-02-16 23:48:33 -080025 // This is the measured monotonic offset for the connected node in
26 // nanoseconds. Add this to our monotonic time to get their
27 // monotonic time.
28 monotonic_offset:int64;
29
Austin Schuhe84c3ed2019-12-14 15:29:48 -080030 // TODO(austin): Per channel counts?
31}
32
33// Statistics for all connections to all the clients.
34table ServerStatistics {
35 connections:[ServerConnection];
36}
37
38root_type ServerStatistics;