Template Class Subscription
Defined in File subscription_mock.hpp
Inheritance Relationships
Base Type
public SubscriptionBase
Class Documentation
-
template<typename MessageT, typename AllocatorT = std::allocator<void>, typename SubscribedT = typename rclcpp::TypeAdapter<MessageT>::custom_type, typename ROSMessageT = typename rclcpp::TypeAdapter<MessageT>::ros_message_type, typename MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<ROSMessageT, AllocatorT>>
class Subscription : public SubscriptionBase Subscription implementation, templated on the type of message this subscription receives.
Public Types
-
using SubscribedType = SubscribedT
Redeclare these here to use outside of the class.
-
using ROSMessageType = ROSMessageT
-
using MessageMemoryStrategyType = MessageMemoryStrategyT
-
using SubscribedTypeAllocatorTraits = allocator::AllocRebind<SubscribedType, AllocatorT>
-
using SubscribedTypeAllocator = typename SubscribedTypeAllocatorTraits::allocator_type
-
using SubscribedTypeDeleter = allocator::Deleter<SubscribedTypeAllocator, SubscribedType>
-
using ROSMessageTypeAllocatorTraits = allocator::AllocRebind<ROSMessageType, AllocatorT>
-
using ROSMessageTypeAllocator = typename ROSMessageTypeAllocatorTraits::allocator_type
-
using ROSMessageTypeDeleter = allocator::Deleter<ROSMessageTypeAllocator, ROSMessageType>
-
using MessageAllocatorTraits = ROSMessageTypeAllocatorTraits
-
using MessageAllocator = ROSMessageTypeAllocator
-
using MessageDeleter = ROSMessageTypeDeleter
-
using MessageUniquePtr = std::unique_ptr<ROSMessageType, ROSMessageTypeDeleter>
Public Functions
-
inline void post_init_setup(rclcpp::node_interfaces::NodeBaseInterface *node_base, const rclcpp::QoS &qos, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT> &options)
Called after construction to continue setup that requires shared_from_this().
-
inline bool take(ROSMessageType &message_out, rclcpp::MessageInfo &message_info_out)
-
template<typename TakeT>
inline std::enable_if_t<!rosidl_generator_traits::is_message<TakeT>::value && std::is_same_v<TakeT, SubscribedType>, bool> take(TakeT &message_out, rclcpp::MessageInfo &message_info_out)
-
inline std::shared_ptr<void> create_message() override
-
inline std::shared_ptr<rclcpp::SerializedMessage> create_serialized_message() override
-
template<typename T = MessageT>
inline std::enable_if<has_data_type<T>::value>::type handle_message(const typename T::_data_type &data)
-
inline void handle_loaned_message(void *loaned_message, const rclcpp::MessageInfo &message_info) override
-
inline rclcpp::dynamic_typesupport::DynamicMessage::SharedPtr create_dynamic_message() override
Friends
- friend class rclcpp::node_interfaces::NodeTopicsInterface
-
using SubscribedType = SubscribedT