Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame^] | 1 | include "aos/configuration.fbs"; |
| 2 | |
| 3 | namespace aos.message_bridge; |
| 4 | |
| 5 | // State of the connection. |
| 6 | enum State: ubyte { |
| 7 | CONNECTED, |
| 8 | DISCONNECTED, |
| 9 | } |
| 10 | |
| 11 | // Statistics from a single connection to a client from this server. |
| 12 | table ServerConnection { |
| 13 | // The node that we are connected to. |
| 14 | node:Node; |
| 15 | |
| 16 | // Health of this connection. Connected or not? |
| 17 | state:State; |
| 18 | |
| 19 | // Number of packets that have been dropped (if known). |
| 20 | dropped_packets:uint; |
| 21 | |
| 22 | // Number of packets received on all channels. |
| 23 | sent_packets:uint; |
| 24 | |
| 25 | // TODO(austin): Per channel counts? |
| 26 | } |
| 27 | |
| 28 | // Statistics for all connections to all the clients. |
| 29 | table ServerStatistics { |
| 30 | connections:[ServerConnection]; |
| 31 | } |
| 32 | |
| 33 | root_type ServerStatistics; |