networkLoad Class Reference

#include <RobotAPI/libraries/armem_system_state/server/LightweightSystemMonitor/linux_networkload.hpp>

Public Types

enum  networkParam {
  RXbytes = 0, RXpackets, RXerrs, RXdrop,
  RXfifo, RXframe, RXcompressed, RXmulticast,
  TXbytes, TXpackets, TXerrs, TXdrop,
  TXfifo, TXcolls, TXcarrier, TXcompressed
}
 

Public Member Functions

std::string getDeviceName ()
 
uint64_t getParamPerSecond (std::string designator)
 
uint64_t getParamSinceStartup (std::string designator)
 
bool isDeviceUp () const
 
 networkLoad (std::string ethernetDataFileName="/proc/net/dev", std::string ethName="eth0")
 

Static Public Member Functions

static std::vector< std::shared_ptr< networkLoad > > createLinuxEthernetScanList (const std::string &ethernetDataFileName="/proc/net/dev")
 
static std::string getBitsPerSeceondString (uint64_t bytesPerSecond)
 
static std::string getBitsString (uint64_t totalBytes)
 
static std::string getBytesPerSeceondString (uint64_t bytesPerSecond)
 
static std::string getBytesString (uint64_t totalBytes)
 
static std::string mapEnumToString (networkLoad::networkParam param)
 
static std::list< std::string > scanNetworkDevices (const std::string &ethernetDataFile="/proc/net/dev")
 

Detailed Description

Author
: Daniel Fuchs @contact: fuxey.nosp@m.solu.nosp@m.tions.nosp@m.@gma.nosp@m.il.co.nosp@m.m

distributed under the MIT License (MIT). Copyright (c) Daniel Fuchs

Definition at line 21 of file linux_networkload.hpp.

Member Enumeration Documentation

◆ networkParam

Enumerator
RXbytes 
RXpackets 
RXerrs 
RXdrop 
RXfifo 
RXframe 
RXcompressed 
RXmulticast 
TXbytes 
TXpackets 
TXerrs 
TXdrop 
TXfifo 
TXcolls 
TXcarrier 
TXcompressed 

Definition at line 47 of file linux_networkload.hpp.

Constructor & Destructor Documentation

◆ networkLoad()

networkLoad ( std::string  ethernetDataFileName = "/proc/net/dev",
std::string  ethName = "eth0" 
)
explicit

Definition at line 48 of file linux_networkload.cpp.

Member Function Documentation

◆ createLinuxEthernetScanList()

static std::vector<std::shared_ptr<networkLoad> > createLinuxEthernetScanList ( const std::string &  ethernetDataFileName = "/proc/net/dev")
inlinestatic

Definition at line 25 of file linux_networkload.hpp.

+ Here is the call graph for this function:

◆ getBitsPerSeceondString()

std::string getBitsPerSeceondString ( uint64_t  bytesPerSecond)
static

Definition at line 164 of file linux_networkload.cpp.

+ Here is the call graph for this function:

◆ getBitsString()

std::string getBitsString ( uint64_t  totalBytes)
static

Definition at line 220 of file linux_networkload.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBytesPerSeceondString()

std::string getBytesPerSeceondString ( uint64_t  bytesPerSecond)
static

Definition at line 160 of file linux_networkload.cpp.

+ Here is the call graph for this function:

◆ getBytesString()

std::string getBytesString ( uint64_t  totalBytes)
static

Definition at line 168 of file linux_networkload.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDeviceName()

std::string getDeviceName ( )

Definition at line 150 of file linux_networkload.cpp.

◆ getParamPerSecond()

uint64_t getParamPerSecond ( std::string  designator)

Definition at line 273 of file linux_networkload.cpp.

◆ getParamSinceStartup()

uint64_t getParamSinceStartup ( std::string  designator)

Definition at line 296 of file linux_networkload.cpp.

◆ isDeviceUp()

bool isDeviceUp ( ) const

Definition at line 145 of file linux_networkload.cpp.

◆ mapEnumToString()

std::string mapEnumToString ( networkLoad::networkParam  param)
static

Definition at line 39 of file linux_networkload.cpp.

◆ scanNetworkDevices()

std::list< std::string > scanNetworkDevices ( const std::string &  ethernetDataFile = "/proc/net/dev")
static

Definition at line 154 of file linux_networkload.cpp.

+ Here is the caller graph for this function:

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