Template Class SubscriptionIntraProcessBuffer

Inheritance Relationships

Base Type

  • public rclcpp::experimental::SubscriptionROSMsgIntraProcessBuffer< SubscribedType, allocator::AllocRebind< SubscribedType, std::allocator< SubscribedType > >::allocator_type, allocator::Deleter< allocator::AllocRebind< SubscribedType, std::allocator< SubscribedType > >::allocator_type, SubscribedType > > (Template Class SubscriptionROSMsgIntraProcessBuffer)

Derived Type

Class Documentation

template<typename SubscribedType, typename Alloc = std::allocator<SubscribedType>, typename Deleter = std::default_delete<SubscribedType>, typename ROSMessageType = SubscribedType>
class SubscriptionIntraProcessBuffer : public rclcpp::experimental::SubscriptionROSMsgIntraProcessBuffer<SubscribedType, allocator::AllocRebind<SubscribedType, std::allocator<SubscribedType>>::allocator_type, allocator::Deleter<allocator::AllocRebind<SubscribedType, std::allocator<SubscribedType>>::allocator_type, SubscribedType>>

Subclassed by rclcpp::experimental::SubscriptionIntraProcess< MessageT, SubscribedType, SubscribedTypeAlloc, SubscribedTypeDeleter, ROSMessageType, Alloc >

Public Types

using SubscribedTypeAllocatorTraits = allocator::AllocRebind<SubscribedType, Alloc>
using SubscribedTypeAllocator = typename SubscribedTypeAllocatorTraits::allocator_type
using SubscribedTypeDeleter = allocator::Deleter<SubscribedTypeAllocator, SubscribedType>
using ROSMessageTypeAllocatorTraits = allocator::AllocRebind<ROSMessageType, Alloc>
using ROSMessageTypeAllocator = typename ROSMessageTypeAllocatorTraits::allocator_type
using ROSMessageTypeDeleter = allocator::Deleter<ROSMessageTypeAllocator, ROSMessageType>
using ConstMessageSharedPtr = std::shared_ptr<const ROSMessageType>
using MessageUniquePtr = std::unique_ptr<ROSMessageType, ROSMessageTypeDeleter>
using ConstDataSharedPtr = std::shared_ptr<const SubscribedType>
using SubscribedTypeUniquePtr = std::unique_ptr<SubscribedType, SubscribedTypeDeleter>
using BufferUniquePtr = typename rclcpp::experimental::buffers::IntraProcessBuffer<SubscribedType, Alloc, SubscribedTypeDeleter>::UniquePtr

Public Functions

inline SubscriptionIntraProcessBuffer(std::shared_ptr<Alloc> allocator, rclcpp::Context::SharedPtr context, const std::string &topic_name, const rclcpp::QoS &qos_profile, rclcpp::IntraProcessBufferType buffer_type)
inline virtual void add_to_wait_set(rcl_wait_set_t &wait_set) override

Add the Waitable to a wait set.

Parameters:

wait_set[in] A handle to the wait set to add the Waitable to.

Throws:

rclcpp::execptions::RCLError – from rcl_wait_set_add_*()

inline virtual bool is_ready(const rcl_wait_set_t &wait_set) override

Check if the Waitable is ready.

The input wait set should be the same that was used in a previously call to add_to_wait_set(). The wait set should also have been previously waited on with rcl_wait().

Parameters:

wait_set[in] A handle to the wait set the Waitable was previously added to and that has been waited on.

Returns:

true if the Waitable is ready, false otherwise.

inline SubscribedTypeUniquePtr convert_ros_message_to_subscribed_type_unique_ptr(const ROSMessageType &msg)
inline void provide_intra_process_message(ConstMessageSharedPtr message) override
inline void provide_intra_process_message(MessageUniquePtr message) override
inline void provide_intra_process_data(ConstDataSharedPtr message)
inline void provide_intra_process_data(SubscribedTypeUniquePtr message)
inline virtual bool use_take_shared_method() const override
inline virtual size_t available_capacity() const override

Protected Functions

inline virtual void trigger_guard_condition() override

Protected Attributes

BufferUniquePtr buffer_
SubscribedTypeAllocator subscribed_type_allocator_
SubscribedTypeDeleter subscribed_type_deleter_