15 #ifndef RCLCPP__CREATE_SUBSCRIPTION_HPP_ 16 #define RCLCPP__CREATE_SUBSCRIPTION_HPP_ 29 template<
typename MessageT,
typename CallbackT,
typename AllocatorT,
typename SubscriptionT>
34 CallbackT && callback,
36 rclcpp::callback_group::CallbackGroup::SharedPtr group,
37 bool ignore_local_publications,
38 bool use_intra_process_comms,
44 subscription_options.qos = qos_profile;
45 subscription_options.ignore_local_publications = ignore_local_publications;
48 rclcpp::create_subscription_factory<MessageT, CallbackT, AllocatorT, SubscriptionT>(
49 std::forward<CallbackT>(callback), msg_mem_strat, allocator);
55 use_intra_process_comms);
62 #endif // RCLCPP__CREATE_SUBSCRIPTION_HPP_
Definition: allocator_common.hpp:24
Subscription implementation, templated on the type of message this subscription receives.
Definition: subscription.hpp:122
rcl_subscription_options_t rcl_subscription_get_default_options(void)
virtual rclcpp::subscription::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
Pure virtual interface class for the NodeTopics part of the Node API.
Definition: node_topics_interface.hpp:38
T dynamic_pointer_cast(T... args)
Default allocation strategy for messages received by subscriptions.
Definition: message_memory_strategy.hpp:33
rclcpp::subscription::Subscription< MessageT, AllocatorT >::SharedPtr 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< MessageT, AllocatorT >::SharedPtr msg_mem_strat, typename std::shared_ptr< AllocatorT > allocator)
Definition: create_subscription.hpp:31
virtual void add_subscription(rclcpp::subscription::SubscriptionBase::SharedPtr subscription, rclcpp::callback_group::CallbackGroup::SharedPtr callback_group)=0