blob: fa73ba51f06c519591f9a4c3f7b6dd43d4a36165 [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 Schuh20ac95d2020-12-05 17:24:19 -080030 // Boot UUID of the client.
31 boot_uuid:string (id: 5);
32
Austin Schuhe84c3ed2019-12-14 15:29:48 -080033 // TODO(austin): Per channel counts?
34}
35
36// Statistics for all connections to all the clients.
37table ServerStatistics {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080038 connections:[ServerConnection] (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080039}
40
41root_type ServerStatistics;