blob: 1be07965948ba6924c13995c0e5aab7dd6f031a4 [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.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080014 node:Node (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080015
16 // Health of this connection. Connected or not?
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080017 state:State (id: 1);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080018
19 // Number of packets that have been dropped (if known).
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080020 dropped_packets:uint (id: 2);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080021
22 // Number of packets received on all channels.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080023 sent_packets:uint (id: 3);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080024
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.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080028 monotonic_offset:int64 (id: 4);
Austin Schuh7bc59052020-02-16 23:48:33 -080029
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 {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080035 connections:[ServerConnection] (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080036}
37
38root_type ServerStatistics;