OpcUaCanOpen
CANopen OPC-UA server
CanModule::CanStatistics Class Reference

#include <CanStatistics.h>

Classes

class  Internals
 Following is encapsulated as a class, to provide sane copying in assignment operator. More...
 

Public Member Functions

SHARED_LIB_EXPORT_DEFN CanStatistics ()
 
void beginNewRun ()
 
void computeDerived (unsigned int baudRate)
 
void onTransmit (unsigned int dataLength)
 dataLength is the user data size (DLC field) More...
 
void onReceive (unsigned int dataLength)
 dataLength is the user data size (DLC field) More...
 
unsigned int totalTransmitted ()
 
unsigned int totalReceived ()
 
float txRate ()
 
float rxRate ()
 
float busLoad ()
 
void operator= (const CanStatistics &other)
 

Private Attributes

std::atomic_uint_least32_t m_totalTransmitted
 
std::atomic_uint_least32_t m_totalReceived
 
std::atomic_uint_least32_t m_transmitted
 Number of messaged in current statistic run. More...
 
std::atomic_uint_least32_t m_received
 Number of messaged in current statistic run. More...
 
std::atomic_uint_least32_t m_transmittedOctets
 
std::atomic_uint_least32_t m_receivedOctets
 
Internals m_internals
 

Detailed Description

Definition at line 51 of file CanStatistics.h.

Constructor & Destructor Documentation

◆ CanStatistics()

CanModule::CanStatistics::CanStatistics ( )

Definition at line 34 of file CanStatistics.cpp.

Member Function Documentation

◆ beginNewRun()

void CanModule::CanStatistics::beginNewRun ( )

Definition at line 43 of file CanStatistics.cpp.

◆ busLoad()

float CanModule::CanStatistics::busLoad ( )
inline

Definition at line 71 of file CanStatistics.h.

◆ computeDerived()

void CanModule::CanStatistics::computeDerived ( unsigned int  baudRate)

Definition at line 52 of file CanStatistics.cpp.

◆ onReceive()

void CanModule::CanStatistics::onReceive ( unsigned int  dataLength)

dataLength is the user data size (DLC field)

Definition at line 79 of file CanStatistics.cpp.

◆ onTransmit()

void CanModule::CanStatistics::onTransmit ( unsigned int  dataLength)

dataLength is the user data size (DLC field)

Definition at line 72 of file CanStatistics.cpp.

◆ operator=()

void CanModule::CanStatistics::operator= ( const CanStatistics other)

Definition at line 86 of file CanStatistics.cpp.

◆ rxRate()

float CanModule::CanStatistics::rxRate ( )
inline

Definition at line 70 of file CanStatistics.h.

◆ totalReceived()

unsigned int CanModule::CanStatistics::totalReceived ( )
inline

Definition at line 68 of file CanStatistics.h.

◆ totalTransmitted()

unsigned int CanModule::CanStatistics::totalTransmitted ( )
inline

Definition at line 67 of file CanStatistics.h.

◆ txRate()

float CanModule::CanStatistics::txRate ( )
inline

Definition at line 69 of file CanStatistics.h.

Member Data Documentation

◆ m_internals

Internals CanModule::CanStatistics::m_internals
private

Definition at line 99 of file CanStatistics.h.

◆ m_received

std::atomic_uint_least32_t CanModule::CanStatistics::m_received
private

Number of messaged in current statistic run.

Definition at line 83 of file CanStatistics.h.

◆ m_receivedOctets

std::atomic_uint_least32_t CanModule::CanStatistics::m_receivedOctets
private

Definition at line 87 of file CanStatistics.h.

◆ m_totalReceived

std::atomic_uint_least32_t CanModule::CanStatistics::m_totalReceived
private

Definition at line 79 of file CanStatistics.h.

◆ m_totalTransmitted

std::atomic_uint_least32_t CanModule::CanStatistics::m_totalTransmitted
private

Definition at line 78 of file CanStatistics.h.

◆ m_transmitted

std::atomic_uint_least32_t CanModule::CanStatistics::m_transmitted
private

Number of messaged in current statistic run.

Definition at line 81 of file CanStatistics.h.

◆ m_transmittedOctets

std::atomic_uint_least32_t CanModule::CanStatistics::m_transmittedOctets
private

Definition at line 86 of file CanStatistics.h.


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