Classes | Public Member Functions | Private Attributes | List of all members
roswrap::StatisticsLogger Class Reference

This class logs statistics data about a ROS connection and publishs them periodically on a common topic. More...

#include <statistics.h>

Classes

struct  StatData
 

Public Member Functions

void callback (const std::shared_ptr< M_string > &connection_header, const std::string &topic, const std::string &callerid, const SerializedMessage &m, const uint64_t &bytes_sent, const ros::Time &received_time, bool dropped)
 
void init (const SubscriptionCallbackHelperPtr &helper)
 
 StatisticsLogger ()
 

Private Attributes

bool enable_statistics
 
bool hasHeader_
 
std::map< std::string, struct StatDatamap_
 
int max_elements
 
int max_window
 
int min_elements
 
int min_window
 
ros::Publisher pub_
 
double pub_frequency_
 

Detailed Description

This class logs statistics data about a ROS connection and publishs them periodically on a common topic.

It provides a callback() function that has to be called everytime a new message arrives on a topic.

Definition at line 50 of file statistics.h.

Constructor & Destructor Documentation

◆ StatisticsLogger()

roswrap::StatisticsLogger::StatisticsLogger ( )

Constructior

Member Function Documentation

◆ callback()

void roswrap::StatisticsLogger::callback ( const std::shared_ptr< M_string > &  connection_header,
const std::string &  topic,
const std::string &  callerid,
const SerializedMessage m,
const uint64_t &  bytes_sent,
const ros::Time received_time,
bool  dropped 
)

Callback function. Must be called for every message received.

◆ init()

void roswrap::StatisticsLogger::init ( const SubscriptionCallbackHelperPtr helper)

Actual initialization. Must be called before the first call to callback()

Member Data Documentation

◆ enable_statistics

bool roswrap::StatisticsLogger::enable_statistics
private

Definition at line 79 of file statistics.h.

◆ hasHeader_

bool roswrap::StatisticsLogger::hasHeader_
private

Definition at line 82 of file statistics.h.

◆ map_

std::map<std::string, struct StatData> roswrap::StatisticsLogger::map_
private

Definition at line 106 of file statistics.h.

◆ max_elements

int roswrap::StatisticsLogger::max_elements
private

Definition at line 76 of file statistics.h.

◆ max_window

int roswrap::StatisticsLogger::max_window
private

Definition at line 72 of file statistics.h.

◆ min_elements

int roswrap::StatisticsLogger::min_elements
private

Definition at line 77 of file statistics.h.

◆ min_window

int roswrap::StatisticsLogger::min_window
private

Definition at line 73 of file statistics.h.

◆ pub_

ros::Publisher roswrap::StatisticsLogger::pub_
private

Definition at line 88 of file statistics.h.

◆ pub_frequency_

double roswrap::StatisticsLogger::pub_frequency_
private

Definition at line 85 of file statistics.h.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15