Class GenericSubscription
Defined in File generic_subscription.hpp
Inheritance Relationships
Base Type
public rclcpp::GenericSubscription
Class Documentation
-
class GenericSubscription : public rclcpp::GenericSubscription
Public Functions
Constructor.
In order to properly subscribe to a topic, this subscription needs to be added to the node_topic_interface of the node passed into this constructor.
See also
cras::create_generic_subscription() for creating an instance of this class and adding it to the node_topic_interface.
- Parameters:
node_base – [in] Pointer to parent node’s NodeBaseInterface
ts_lib – [in] Type support library, needs to correspond to topic_type
topic_name – [in] Topic name
topic_type – [in] Topic type
qos – [in] QoS settings
callback – [in] Callback for new messages of serialized form
options – [in] Subscription options.
subscription_topic_stats – [in] Optional pointer to a topic statistics subscription. Not all subscription options are currently respected, the only relevant options for this subscription are
event_callbacks,use_default_callbacks,ignore_local_publications,topic_statisticsandcallback_group.
Protected Attributes
-
::std::shared_ptr<::rclcpp::topic_statistics::SubscriptionTopicStatistics> subscription_topic_statistics = {nullptr}
Component which computes and publishes topic statistics for this subscriber.
-
::rclcpp::AnySubscriptionCallback<::rclcpp::SerializedMessage, ::std::allocator<void>> any_callback
The callback to call when a message is received.