Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EthernetInterfaceInfo Class Reference

#include <ethernet_interface_info.h>

Public Member Functions

 EthernetInterfaceInfo ()
 
void initialize (const std::string &interface)
 
void publishDiagnostics (diagnostic_updater::DiagnosticStatusWrapper &d)
 Collect and append ethernet interface diagnostics. More...
 
 ~EthernetInterfaceInfo ()
 

Protected Member Functions

bool getEthtoolStats (EthtoolStats &stats)
 Get ethtool stats from interface. More...
 
bool getInterfaceState (InterfaceState &state)
 Get state (up,running) of interface. More...
 

Protected Attributes

char * ethtool_stats_buf_
 buffer for NIC statistic values More...
 
std::string interface_
 name of network interface (for example : eth0) More...
 
InterfaceState last_state_
 
unsigned lost_link_count_
 Number of time master link went down. More...
 
unsigned n_stats_
 Number of stats available from ethtool ioctl. More...
 
EthtoolStats orig_stats_
 Orignal statistics counts when initialize() was called. More...
 
int rx_align_error_index_
 
int rx_crc_error_index_
 
int rx_error_index_
 
int rx_frame_error_index_
 
int sock_
 network socket for making ioctl requests More...
 

Detailed Description

Definition at line 61 of file ethernet_interface_info.h.

Constructor & Destructor Documentation

EthernetInterfaceInfo::EthernetInterfaceInfo ( )

Definition at line 26 of file ethernet_interface_info.cpp.

EthernetInterfaceInfo::~EthernetInterfaceInfo ( )

Definition at line 38 of file ethernet_interface_info.cpp.

Member Function Documentation

bool EthernetInterfaceInfo::getEthtoolStats ( EthtoolStats stats)
protected

Get ethtool stats from interface.

Definition at line 160 of file ethernet_interface_info.cpp.

bool EthernetInterfaceInfo::getInterfaceState ( InterfaceState state)
protected

Get state (up,running) of interface.

Definition at line 143 of file ethernet_interface_info.cpp.

void EthernetInterfaceInfo::initialize ( const std::string &  interface)

Definition at line 46 of file ethernet_interface_info.cpp.

void EthernetInterfaceInfo::publishDiagnostics ( diagnostic_updater::DiagnosticStatusWrapper d)

Collect and append ethernet interface diagnostics.

Parameters
dDiagnostics status wrapper.

Definition at line 199 of file ethernet_interface_info.cpp.

Member Data Documentation

char* EthernetInterfaceInfo::ethtool_stats_buf_
protected

buffer for NIC statistic values

Definition at line 89 of file ethernet_interface_info.h.

std::string EthernetInterfaceInfo::interface_
protected

name of network interface (for example : eth0)

Definition at line 83 of file ethernet_interface_info.h.

InterfaceState EthernetInterfaceInfo::last_state_
protected

Definition at line 104 of file ethernet_interface_info.h.

unsigned EthernetInterfaceInfo::lost_link_count_
protected

Number of time master link went down.

Definition at line 100 of file ethernet_interface_info.h.

unsigned EthernetInterfaceInfo::n_stats_
protected

Number of stats available from ethtool ioctl.

Definition at line 87 of file ethernet_interface_info.h.

EthtoolStats EthernetInterfaceInfo::orig_stats_
protected

Orignal statistics counts when initialize() was called.

Definition at line 103 of file ethernet_interface_info.h.

int EthernetInterfaceInfo::rx_align_error_index_
protected

Definition at line 96 of file ethernet_interface_info.h.

int EthernetInterfaceInfo::rx_crc_error_index_
protected

Definition at line 94 of file ethernet_interface_info.h.

int EthernetInterfaceInfo::rx_error_index_
protected

Definition at line 93 of file ethernet_interface_info.h.

int EthernetInterfaceInfo::rx_frame_error_index_
protected

Definition at line 95 of file ethernet_interface_info.h.

int EthernetInterfaceInfo::sock_
protected

network socket for making ioctl requests

Definition at line 85 of file ethernet_interface_info.h.


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


ethercat_hardware
Author(s): Rob Wheeler , Derek King
autogenerated on Fri Mar 15 2019 02:53:29