Template Class TopicStatisticsCollector
Defined in File topic_statistics_collector.hpp
Inheritance Relationships
Base Type
public libstatistics_collector::collector::Collector
(Class Collector)
Derived Types
public libstatistics_collector::topic_statistics_collector::ReceivedMessageAgeCollector< T >
(Template Class ReceivedMessageAgeCollector)public libstatistics_collector::topic_statistics_collector::ReceivedMessagePeriodCollector< T >
(Template Class ReceivedMessagePeriodCollector)
Class Documentation
-
template<typename T>
class TopicStatisticsCollector : public libstatistics_collector::collector::Collector Interface to collect and perform measurements for ROS2 topic statistics.
- Template Parameters
T – the ROS2 message type to collect
Subclassed by libstatistics_collector::topic_statistics_collector::ReceivedMessageAgeCollector< T >, libstatistics_collector::topic_statistics_collector::ReceivedMessagePeriodCollector< T >
Public Functions
-
TopicStatisticsCollector() = default
-
virtual ~TopicStatisticsCollector() = default
-
virtual void OnMessageReceived(const T &received_message, const rcl_time_point_value_t now_nanoseconds) = 0
Handle receiving a single message of type T.
- Parameters
received_message – T the ROS2 message type to collect
now_nanoseconds – nanoseconds the time the message was received. Any metrics using this time assumes the following 1). the time provided is strictly monotonic 2). the time provided uses the same source as time obtained from the message header.