SatCat5
satcat5::eth::SwitchLogStats Class Reference

Detailed Description

Record packet statistics based on switch log events.

This API is simplified from the one provided by cfg::NetworkStats.

Definition at line 173 of file eth_sw_log.h.

#include <eth_sw_log.h>

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

Classes

struct  TrafficStats
 Data structure for reporting per-port traffic statistics. More...
 

Public Member Functions

TrafficStats get_port (unsigned idx)
 Read most recent statistics for the Nth port. More...
 
void log_packet (const satcat5::eth::SwitchLogMessage &msg) override
 Process each packet event.
 

Protected Member Functions

 SwitchLogStats (TrafficStats *buff, unsigned size)
 Constructor accepts a pointer to the working buffer.
 

Protected Attributes

TrafficStats *const m_stats
 Working counters.
 
const unsigned m_size
 Buffer size.
 

Private Attributes

satcat5::eth::SwitchLogHandlerm_next
 

Member Function Documentation

◆ get_port()

SwitchLogStats::TrafficStats SwitchLogStats::get_port ( unsigned  idx)

Read most recent statistics for the Nth port.

Calling this method resets all counters for the requested port.

Definition at line 211 of file eth_sw_log.cc.


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