Classes | Public Member Functions | Private Attributes | List of all members
ros::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 boost::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 49 of file statistics.h.

Constructor & Destructor Documentation

ros::StatisticsLogger::StatisticsLogger ( )

Constructior

Definition at line 39 of file statistics.cpp.

Member Function Documentation

void ros::StatisticsLogger::callback ( const boost::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.

Definition at line 53 of file statistics.cpp.

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

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

Definition at line 44 of file statistics.cpp.

Member Data Documentation

bool ros::StatisticsLogger::enable_statistics
private

Definition at line 78 of file statistics.h.

bool ros::StatisticsLogger::hasHeader_
private

Definition at line 81 of file statistics.h.

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

Definition at line 105 of file statistics.h.

int ros::StatisticsLogger::max_elements
private

Definition at line 75 of file statistics.h.

int ros::StatisticsLogger::max_window
private

Definition at line 71 of file statistics.h.

int ros::StatisticsLogger::min_elements
private

Definition at line 76 of file statistics.h.

int ros::StatisticsLogger::min_window
private

Definition at line 72 of file statistics.h.

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

Definition at line 87 of file statistics.h.

double ros::StatisticsLogger::pub_frequency_
private

Definition at line 84 of file statistics.h.


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


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
autogenerated on Mon Nov 2 2020 03:52:27