Gazebo Transport

API Reference

12.2.2
TopicStatistics Class Reference

Encapsulates statistics for a single topic. The set of statistics include: More...

#include <TopicStatistics.hh>

Public Member Functions

 TopicStatistics ()
 Default constructor. More...
 
 TopicStatistics (const TopicStatistics &_stats)
 Copy constructor. More...
 
 ~TopicStatistics ()
 Default destructor. More...
 
Statistics AgeStatistics () const
 Get the message age statistics. More...
 
uint64_t DroppedMsgCount () const
 Get the number of dropped messages. More...
 
void FillMessage (msgs::Metric &_msg) const
 Populate a gz::msgs::Metric message with topic statistics. More...
 
Statistics PublicationStatistics () const
 Get statistics about publication of messages. More...
 
Statistics ReceptionStatistics () const
 Get the statistics about reception of messages. More...
 
void Update (const std::string &_sender, uint64_t _stamp, uint64_t _seq)
 Update the topic statistics. More...
 

Detailed Description

Encapsulates statistics for a single topic. The set of statistics include:

  1. Number of dropped messages. max time between publications.
  2. Receive statistics: The reception hz rate, standard deviation between receiving messages, min time between receiving messages, and max time between receiving messages.

Publication statistics utilize time stamps generated by the publisher. Receive statistics use time stamps generated by the subscriber.

Constructor & Destructor Documentation

◆ TopicStatistics() [1/2]

Default constructor.

◆ TopicStatistics() [2/2]

TopicStatistics ( const TopicStatistics _stats)

Copy constructor.

Parameters
[in]_statsStatistics to copy.

◆ ~TopicStatistics()

Default destructor.

Member Function Documentation

◆ AgeStatistics()

Statistics AgeStatistics ( ) const

Get the message age statistics.

Returns
Age statistics.

◆ DroppedMsgCount()

uint64_t DroppedMsgCount ( ) const

Get the number of dropped messages.

Returns
Number of dropped messages.

◆ FillMessage()

void FillMessage ( msgs::Metric &  _msg) const

Populate a gz::msgs::Metric message with topic statistics.

Parameters
[in]_msgMessage to populate.

◆ PublicationStatistics()

Statistics PublicationStatistics ( ) const

Get statistics about publication of messages.

Returns
Publication statistics.

◆ ReceptionStatistics()

Statistics ReceptionStatistics ( ) const

Get the statistics about reception of messages.

Returns
Reception statistics.

◆ Update()

void Update ( const std::string _sender,
uint64_t  _stamp,
uint64_t  _seq 
)

Update the topic statistics.

Parameters
[in]_senderAddress of the sender.
[in]_stampPublication time stamp.
[in]_seqPublication sequence number.

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