|
SatCat5
|
Traffic statistics polling.
Define a memory-mapped interface to the "config_stats" block. It can be refreshed manually, or instructed to refresh automatically at a fixed interval (e.g., once per second).
Definition at line 49 of file cfgbus_stats.h.
#include <cfgbus_stats.h>
Public Member Functions | |
| NetworkStats (satcat5::cfg::ConfigBus *cfg, unsigned devaddr) | |
| Construct a memory-map for the designated ConfigBus device. | |
| void | refresh_now () |
| Immediately refresh statistics for every port. More... | |
| satcat5::cfg::TrafficStats | get_port (unsigned idx) |
| Read most recent statistics for the Nth port. More... | |
Private Attributes | |
| satcat5::cfg::Register | m_traffic |
| cfg::TrafficStats satcat5::cfg::NetworkStats::get_port | ( | unsigned | idx | ) |
Read most recent statistics for the Nth port.
(Call "refresh_now()" at regular intervals to update statistics.)
Definition at line 36 of file cfgbus_stats.cc.
| void satcat5::cfg::NetworkStats::refresh_now | ( | ) |
Immediately refresh statistics for every port.
Each call to refresh_now() executes the following atomically:
Definition at line 31 of file cfgbus_stats.cc.