SatCat5
satcat5::eth::SwitchTelemetry Class Referencefinal

Detailed Description

Diagnostic telemetry for a SatCat5 switch.

See also
net_telemetry.h.

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:

  • Tier 1: Switch status, including MAC table information. (Default once every 30 seconds.)
  • Tier 2: Trafic statistics, including per-port counters if available. (Default once every second.)

Definition at line 31 of file switch_telemetry.h.

#include <switch_telemetry.h>

Inheritance diagram for satcat5::eth::SwitchTelemetry:
[legend]
Collaboration diagram for satcat5::eth::SwitchTelemetry:
[legend]

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
 

Constructor & Destructor Documentation

◆ SwitchTelemetry()

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.

Member Function Documentation

◆ telem_event()

void SwitchTelemetry::telem_event ( u32  tier_id,
satcat5::net::TelemetryCbor cbor 
)
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.


The documentation for this class was generated from the following files: