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_
86 template<
typename Allocator>
105 template<
typename MessageT>
111 using MessageAllocatorT =
typename AllocatorTraits::template rebind_alloc<MessageT>;
112 auto message_alloc = std::make_shared<MessageAllocatorT>(*this->
get_allocator().get());
113 result.
allocator = allocator::get_rcl_allocator<MessageT>(*message_alloc);
131 if (!this->allocator) {
132 return std::make_shared<Allocator>();
141 #endif // RCLCPP__SUBSCRIPTION_OPTIONS_HPP_
IntraProcessBufferType intra_process_buffer_type
Setting the data-type stored in the intraprocess buffer.
Definition: subscription_options.hpp:60
std::string publish_topic
Definition: subscription_options.hpp:73
bool ignore_local_publications
True to ignore local publications.
Definition: subscription_options.hpp:46
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:64
Definition: subscription_options.hpp:67
rmw_qos_profile_t & get_rmw_qos_profile()
Return the rmw qos profile.
TopicStatisticsState state
Definition: subscription_options.hpp:70
Structure containing optional configuration for Subscriptions.
Definition: subscription_options.hpp:87
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:107
rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints
Definition: subscription_options.hpp:50
std::shared_ptr< Allocator > get_allocator() const
Get the allocator, creating one if needed.
Definition: subscription_options.hpp:129
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:40
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:43
Options that are passed in subscription/publisher constructor to specify QoSConfigurability.
Definition: qos_overriding_options.hpp:89
Encapsulation of Quality of Service settings.
Definition: qos.hpp:110
@ NodeDefault
Take topic statistics state from the node.
std::chrono::milliseconds publish_period
Definition: subscription_options.hpp:77
rclcpp::CallbackGroup::SharedPtr callback_group
The callback group for this subscription. NULL to use the default callback group.
Definition: subscription_options.hpp:54
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:95
@ CallbackDefault
Set the data type used in the intra-process buffer as the same used in the callback.
rcl_subscription_options_t rcl_subscription_get_default_options(void)
bool ignore_local_publications
IntraProcessSetting use_intra_process_comm
Setting to explicitly set intraprocess communications.
Definition: subscription_options.hpp:57
enum RMW_PUBLIC_TYPE rmw_unique_network_flow_endpoints_requirement_t rmw_unique_network_flow_endpoints_requirement_t
IntraProcessBufferType
Definition: intra_process_buffer_type.hpp:23
rmw_unique_network_flow_endpoints_requirement_t require_unique_network_flow_endpoints
std::shared_ptr< Allocator > allocator
Optional custom allocator.
Definition: subscription_options.hpp:90
Non-template base class for subscription options.
Definition: subscription_options.hpp:37
Contains callbacks for non-message events that a Subscription can receive from the middleware.
Definition: qos_event.hpp:61
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED
QosOverridingOptions qos_overriding_options
Definition: subscription_options.hpp:82
TopicStatisticsOptions topic_stats_options
Definition: subscription_options.hpp:80