blob: 031f80119bf7aeb11aeae32cda9c970fb4b7a4d2 [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 Schuh367a7f42021-11-23 23:04:36 -080037 // Time at which we connected to the client as nanoseconds on the local
38 // monotonic clock. This is not populated when not connected, and defaults
39 // to monotonic_clock::min_time.
40 connected_since_time:int64 = -9223372036854775808 (id: 7);
41
42 // Number of times we've established a connection to the server.
43 connection_count:uint (id: 8);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080044}
45
46// Statistics for all connections to all the clients.
47table ServerStatistics {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080048 connections:[ServerConnection] (id: 0);
milind1f1dca32021-07-03 13:50:07 -070049
50 // Count of timestamp send failures
51 timestamp_send_failures:uint64 (id: 1);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080052}
53
54root_type ServerStatistics;