15 #ifndef RCLCPP__SUBSCRIPTION_OPTIONS_HPP_ 16 #define RCLCPP__SUBSCRIPTION_OPTIONS_HPP_ 57 template<
typename Allocator>
72 template<
typename MessageT>
78 using MessageAllocatorT =
typename AllocatorTraits::template rebind_alloc<MessageT>;
79 auto message_alloc = std::make_shared<MessageAllocatorT>(*allocator.
get());
80 result.
allocator = allocator::get_rcl_allocator<MessageT>(*message_alloc);
96 if (!this->allocator) {
97 return std::make_shared<Allocator>();
99 return this->allocator;
107 #endif // RCLCPP__SUBSCRIPTION_OPTIONS_HPP_
std::shared_ptr< Allocator > get_allocator() const
Get the allocator, creating one if needed.
Definition: subscription_options.hpp:94
Non-template base class for subscription options.
Definition: subscription_options.hpp:34
Encapsulation of Quality of Service settings.
Definition: qos.hpp:55
bool ignore_local_publications
SubscriptionEventCallbacks event_callbacks
Callbacks for events related to this subscription.
Definition: subscription_options.hpp:37
IntraProcessSetting
Used as argument in create_publisher and create_subscriber.
Definition: intra_process_setting.hpp:22
rmw_qos_profile_t & get_rmw_qos_profile()
Return the rmw qos profile.
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
std::shared_ptr< rclcpp::detail::RMWImplementationSpecificSubscriptionPayload > rmw_implementation_payload
Optional RMW implementation specific payload to be used during creation of the subscription.
Definition: subscription_options.hpp:53
rcl_subscription_options_t rcl_subscription_get_default_options(void)
Set the data type used in the intra-process buffer as the same used in the callback.
rmw_subscription_options_t rmw_subscription_options
Structure containing optional configuration for Subscriptions.
Definition: subscription_options.hpp:58
rcl_subscription_options_t to_rcl_subscription_options(const rclcpp::QoS &qos) const
Convert this class, with a rclcpp::QoS, into an rcl_subscription_options_t.
Definition: subscription_options.hpp:74
rclcpp::callback_group::CallbackGroup::SharedPtr callback_group
The callback group for this subscription. NULL to use the default callback group. ...
Definition: subscription_options.hpp:43
IntraProcessBufferType
Definition: intra_process_buffer_type.hpp:23
IntraProcessBufferType intra_process_buffer_type
Setting the data-type stored in the intraprocess buffer.
Definition: subscription_options.hpp:49
IntraProcessSetting use_intra_process_comm
Setting to explicitly set intraprocess communications.
Definition: subscription_options.hpp:46
rcl_allocator_t allocator
Contains callbacks for non-message events that a Subscription can receive from the middleware...
Definition: qos_event.hpp:49
SubscriptionOptionsWithAllocator(const SubscriptionOptionsBase &subscription_options_base)
Constructor using base class as input.
Definition: subscription_options.hpp:66
Take intraprocess configuration from the node.
bool ignore_local_publications
True to ignore local publications.
Definition: subscription_options.hpp:40