TopicStatistics Class Reference
Encapsulates statistics for a single topic. The set of statistics include: More...
#include <TopicStatistics.hh>
Public Member Functions | |
TopicStatistics () | |
Default constructor. | |
TopicStatistics (const TopicStatistics &_stats) | |
Copy constructor. | |
~TopicStatistics () | |
Default destructor. | |
Statistics | AgeStatistics () const |
Get the message age statistics. | |
uint64_t | DroppedMsgCount () const |
Get the number of dropped messages. | |
void | FillMessage (msgs::Metric &_msg) const |
Populate a gz::msgs::Metric message with topic statistics. | |
Statistics | PublicationStatistics () const |
Get statistics about publication of messages. | |
Statistics | ReceptionStatistics () const |
Get the statistics about reception of messages. | |
void | Update (const std::string &_sender, uint64_t _stamp, uint64_t _seq) |
Update the topic statistics. | |
Detailed Description
Encapsulates statistics for a single topic. The set of statistics include:
- Number of dropped messages. max time between publications.
- 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]
TopicStatistics | ( | ) |
Default constructor.
◆ TopicStatistics() [2/2]
TopicStatistics | ( | const TopicStatistics & | _stats | ) |
Copy constructor.
- Parameters
-
[in] _stats Statistics to copy.
◆ ~TopicStatistics()
~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] _msg Message 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] _sender Address of the sender. [in] _stamp Publication time stamp. [in] _seq Publication sequence number.
The documentation for this class was generated from the following file: