Merge pull request #560 from meshtastic/stats

Local device mesh stats container
This commit is contained in:
Ben Meadors 2024-08-16 06:07:20 -05:00 committed by GitHub
commit 4eb4f42517
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 52 additions and 1 deletions

View file

@ -2,4 +2,7 @@
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options
*EnvironmentMetrics.iaq int_size:16
*EnvironmentMetrics.wind_direction int_size:16
*EnvironmentMetrics.wind_direction int_size:16
*LocalStats.num_online_nodes int_size:16
*LocalStats.num_total_nodes int_size:16

View file

@ -230,6 +230,49 @@ message AirQualityMetrics {
optional uint32 particles_100um = 12;
}
/*
* Local device mesh statistics
*/
message LocalStats {
/*
* How long the device has been running since the last reboot (in seconds)
*/
uint32 uptime_seconds = 1;
/*
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/
float channel_utilization = 2;
/*
* Percent of airtime for transmission used within the last hour.
*/
float air_util_tx = 3;
/*
* Number of packets sent
*/
uint32 num_packets_tx = 4;
/*
* Number of packets received good
*/
uint32 num_packets_rx = 5;
/*
* Number of packets received that are malformed or violate the protocol
*/
uint32 num_packets_rx_bad = 6;
/*
* Number of nodes online (in the past 2 hours)
*/
uint32 num_online_nodes = 7;
/*
* Number of nodes total
*/
uint32 num_total_nodes = 8;
}
/*
* Types of Measurements the telemetry module is equipped to handle
*/
@ -259,6 +302,11 @@ message Telemetry {
* Power Metrics
*/
PowerMetrics power_metrics = 5;
/*
* Local device mesh statistics
*/
LocalStats local_stats = 6;
}
}