15 #ifndef RCLCPP__CREATE_SUBSCRIPTION_HPP_ 16 #define RCLCPP__CREATE_SUBSCRIPTION_HPP_ 33 typename CallbackMessageT,
39 CallbackT && callback,
41 rclcpp::callback_group::CallbackGroup::SharedPtr group,
42 bool ignore_local_publications,
43 bool use_intra_process_comms,
45 CallbackMessageT, AllocatorT>::SharedPtr
50 subscription_options.qos = qos_profile;
51 subscription_options.ignore_local_publications = ignore_local_publications;
54 <MessageT, CallbackT, AllocatorT, CallbackMessageT, SubscriptionT>(
55 std::forward<CallbackT>(callback), msg_mem_strat, allocator);
61 use_intra_process_comms);
68 #endif // RCLCPP__CREATE_SUBSCRIPTION_HPP_ std::shared_ptr< SubscriptionT > create_subscription(rclcpp::node_interfaces::NodeTopicsInterface *node_topics, const std::string &topic_name, CallbackT &&callback, const rmw_qos_profile_t &qos_profile, rclcpp::callback_group::CallbackGroup::SharedPtr group, bool ignore_local_publications, bool use_intra_process_comms, typename rclcpp::message_memory_strategy::MessageMemoryStrategy< CallbackMessageT, AllocatorT >::SharedPtr msg_mem_strat, typename std::shared_ptr< AllocatorT > allocator)
Definition: create_subscription.hpp:36
Default allocation strategy for messages received by subscriptions.
Definition: message_memory_strategy.hpp:40
Definition: allocator_common.hpp:24
Subscription implementation, templated on the type of message this subscription receives.
Definition: subscription.hpp:148
rcl_subscription_options_t rcl_subscription_get_default_options(void)
T dynamic_pointer_cast(T... args)
virtual rclcpp::SubscriptionBase::SharedPtr create_subscription(const std::string &topic_name, const rclcpp::SubscriptionFactory &subscription_factory, rcl_subscription_options_t &subscription_options, bool use_intra_process)=0
virtual void add_subscription(rclcpp::SubscriptionBase::SharedPtr subscription, rclcpp::callback_group::CallbackGroup::SharedPtr callback_group)=0
Pure virtual interface class for the NodeTopics part of the Node API.
Definition: node_topics_interface.hpp:38
SubscriptionFactory create_subscription_factory(CallbackT &&callback, typename rclcpp::message_memory_strategy::MessageMemoryStrategy< CallbackMessageT, Alloc >::SharedPtr msg_mem_strat, std::shared_ptr< Alloc > allocator)
Return a SubscriptionFactory with functions for creating a SubscriptionT<MessageT, Alloc>.
Definition: subscription_factory.hpp:76