rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__SUBSCRIPTION_OPTIONS_HPP_
16 #define RCLCPP__SUBSCRIPTION_OPTIONS_HPP_
78 template<
typename Allocator>
97 template<
typename MessageT>
103 using MessageAllocatorT =
typename AllocatorTraits::template rebind_alloc<MessageT>;
104 auto message_alloc = std::make_shared<MessageAllocatorT>(*
allocator.
get());
105 result.
allocator = allocator::get_rcl_allocator<MessageT>(*message_alloc);
121 if (!this->allocator) {
122 return std::make_shared<Allocator>();
131 #endif // RCLCPP__SUBSCRIPTION_OPTIONS_HPP_
IntraProcessBufferType intra_process_buffer_type
Setting the data-type stored in the intraprocess buffer.
Definition: subscription_options.hpp:54
std::string publish_topic
Definition: subscription_options.hpp:67
bool ignore_local_publications
True to ignore local publications.
Definition: subscription_options.hpp:45
rcl_allocator_t allocator
rmw_subscription_options_t rmw_subscription_options
@ NodeDefault
Take intraprocess configuration from the node.
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:58
Definition: subscription_options.hpp:61
rmw_qos_profile_t & get_rmw_qos_profile()
Return the rmw qos profile.
TopicStatisticsState state
Definition: subscription_options.hpp:64
Structure containing optional configuration for Subscriptions.
Definition: subscription_options.hpp:79
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:99
std::shared_ptr< Allocator > get_allocator() const
Get the allocator, creating one if needed.
Definition: subscription_options.hpp:119
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
SubscriptionEventCallbacks event_callbacks
Callbacks for events related to this subscription.
Definition: subscription_options.hpp:39
TopicStatisticsState
Definition: topic_statistics_state.hpp:23
bool use_default_callbacks
Whether or not to use default callbacks when user doesn't supply any in event_callbacks.
Definition: subscription_options.hpp:42
Encapsulation of Quality of Service settings.
Definition: qos.hpp:59
@ NodeDefault
Take topic statistics state from the node.
std::chrono::milliseconds publish_period
Definition: subscription_options.hpp:71
rclcpp::CallbackGroup::SharedPtr callback_group
The callback group for this subscription. NULL to use the default callback group.
Definition: subscription_options.hpp:48
IntraProcessSetting
Used as argument in create_publisher and create_subscriber.
Definition: intra_process_setting.hpp:22
SubscriptionOptionsWithAllocator(const SubscriptionOptionsBase &subscription_options_base)
Constructor using base class as input.
Definition: subscription_options.hpp:87
@ CallbackDefault
Set the data type used in the intra-process buffer as the same used in the callback.
bool ignore_local_publications
IntraProcessSetting use_intra_process_comm
Setting to explicitly set intraprocess communications.
Definition: subscription_options.hpp:51
IntraProcessBufferType
Definition: intra_process_buffer_type.hpp:23
std::shared_ptr< Allocator > allocator
Optional custom allocator.
Definition: subscription_options.hpp:82
Non-template base class for subscription options.
Definition: subscription_options.hpp:36
Contains callbacks for non-message events that a Subscription can receive from the middleware.
Definition: qos_event.hpp:57
TopicStatisticsOptions topic_stats_options
Definition: subscription_options.hpp:74