blob: 128f1f30b90b939ac3266a4e120e9d97d0c775ed [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
Austin Schuh40f4c472021-03-31 21:28:44 -070022 // Number of packets sent 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 Schuh20ac95d2020-12-05 17:24:19 -080030 // Boot UUID of the client.
31 boot_uuid:string (id: 5);
32
Austin Schuh40f4c472021-03-31 21:28:44 -070033 // Number of extra calls needed to receive a single message
34 // (indicates congestion)
35 partial_deliveries:uint (id: 6);
36
Austin Schuhe84c3ed2019-12-14 15:29:48 -080037 // TODO(austin): Per channel counts?
38}
39
40// Statistics for all connections to all the clients.
41table ServerStatistics {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080042 connections:[ServerConnection] (id: 0);
milind1f1dca32021-07-03 13:50:07 -070043
44 // Count of timestamp send failures
45 timestamp_send_failures:uint64 (id: 1);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080046}
47
48root_type ServerStatistics;