blob: 705650609910a6e86266f326b8a1cf599721d83f [file] [log] [blame]
Austin Schuhe84c3ed2019-12-14 15:29:48 -08001include "aos/network/message_bridge_server.fbs";
2
3namespace aos.message_bridge;
4
5// Statistics from a single client connection to a server.
6table ClientConnection {
7 // The node that we are connected to.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -08008 node:Node (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -08009
10 // Health of this connection. Connected or not?
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080011 state:State (id: 1);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080012
13 // Number of packets received on all channels.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080014 received_packets:uint (id: 2);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080015
Austin Schuh7bc59052020-02-16 23:48:33 -080016 // This is the measured monotonic offset for just the server -> client
17 // direction measured in nanoseconds. Subtract this from our monotonic time
18 // to get their monotonic time.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080019 monotonic_offset:int64 (id: 3);
Austin Schuh7bc59052020-02-16 23:48:33 -080020
Austin Schuh4889b182020-11-18 19:11:56 -080021 // Number of duplicate packets we received and dropped.
22 duplicate_packets:uint (id: 4);
23
Austin Schuhe84c3ed2019-12-14 15:29:48 -080024 // TODO(austin): Per channel counts?
25}
26
27// Statistics for all clients.
28table ClientStatistics {
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080029 connections:[ClientConnection] (id: 0);
Austin Schuhe84c3ed2019-12-14 15:29:48 -080030}
31
32root_type ClientStatistics;