Template Class TopicStatisticsCollector

Inheritance Relationships

Base Type

Derived Types

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.