|
SatCat5
|
Diagnostic telemetry for a SatCat5 switch.
The SwitchTelemetry class reports state-of-health telemetry for a SatCat5 switch, using the CBOR telemetry API (net_telemetry.h). Status is polled through the SwitchConfig interface (switch_cfg.h), and optionally through the NetworkStats interface (cfgbus_stats.h). If the latter is provided, then this class will call "refresh_now()", which resets hardware counters for traffic statistics.
Telemetry is divided into tiers, with independent rates:
Definition at line 31 of file switch_telemetry.h.
#include <switch_telemetry.h>
Public Member Functions | |
| SwitchTelemetry (satcat5::net::TelemetryAggregator *tlm, satcat5::eth::SwitchConfig *cfg, satcat5::cfg::NetworkStats *stats=0) | |
| Constructor links to a specific data source. More... | |
| void | set_interval_cfg (unsigned interval_msec) |
| Adjust the reporting interval for Tier 1 telemetry. | |
| void | set_interval_stats (unsigned interval_msec) |
| Adjust the reporting interval for Tier 2 telemetry. | |
Protected Member Functions | |
| void | telem_event (u32 tier_id, satcat5::net::TelemetryCbor &cbor) override |
| User method for writing each telemetry message. More... | |
Protected Attributes | |
| satcat5::eth::SwitchConfig *const | m_cfg |
| satcat5::cfg::NetworkStats *const | m_stats |
| satcat5::net::TelemetryTier | m_tier1 |
| satcat5::net::TelemetryTier | m_tier2 |
| SwitchTelemetry::SwitchTelemetry | ( | satcat5::net::TelemetryAggregator * | tlm, |
| satcat5::eth::SwitchConfig * | cfg, | ||
| satcat5::cfg::NetworkStats * | stats = 0 |
||
| ) |
Constructor links to a specific data source.
Note: No data is sent until user calls connect(...).
Definition at line 60 of file switch_telemetry.cc.
|
overrideprotectedvirtual |
User method for writing each telemetry message.
Child class MUST override this method.
Implements satcat5::net::TelemetrySource.
Definition at line 72 of file switch_telemetry.cc.