rclcpp  master
C++ ROS Client Library API
Public Types | Public Member Functions | List of all members
rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc > Class Template Reference

Delegate for handling memory allocations while the Executor is executing. More...

#include <allocator_memory_strategy.hpp>

Inheritance diagram for rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >:
Inheritance graph
[legend]
Collaboration diagram for rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >:
Collaboration graph
[legend]

Public Types

using VoidAllocTraits = typename allocator::AllocRebind< void *, Alloc >
 
using VoidAlloc = typename VoidAllocTraits::allocator_type
 
- Public Types inherited from rclcpp::memory_strategy::MemoryStrategy
using WeakNodeList = std::list< rclcpp::node_interfaces::NodeBaseInterface::WeakPtr >
 

Public Member Functions

 AllocatorMemoryStrategy (std::shared_ptr< Alloc > allocator)
 
 AllocatorMemoryStrategy ()
 
void add_guard_condition (const rcl_guard_condition_t *guard_condition) override
 
void remove_guard_condition (const rcl_guard_condition_t *guard_condition) override
 
void clear_handles () override
 
void remove_null_handles (rcl_wait_set_t *wait_set) override
 
bool collect_entities (const WeakNodeList &weak_nodes) override
 
void add_waitable_handle (const rclcpp::Waitable::SharedPtr &waitable) override
 
bool add_handles_to_wait_set (rcl_wait_set_t *wait_set) override
 
void get_next_subscription (rclcpp::AnyExecutable &any_exec, const WeakNodeList &weak_nodes) override
 
void get_next_service (rclcpp::AnyExecutable &any_exec, const WeakNodeList &weak_nodes) override
 
void get_next_client (rclcpp::AnyExecutable &any_exec, const WeakNodeList &weak_nodes) override
 
void get_next_timer (rclcpp::AnyExecutable &any_exec, const WeakNodeList &weak_nodes) override
 
void get_next_waitable (rclcpp::AnyExecutable &any_exec, const WeakNodeList &weak_nodes) override
 
rcl_allocator_t get_allocator () override
 
size_t number_of_ready_subscriptions () const override
 
size_t number_of_ready_services () const override
 
size_t number_of_ready_events () const override
 
size_t number_of_ready_clients () const override
 
size_t number_of_guard_conditions () const override
 
size_t number_of_ready_timers () const override
 
size_t number_of_waitables () const override
 
- Public Member Functions inherited from rclcpp::memory_strategy::MemoryStrategy
virtual ~MemoryStrategy ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from rclcpp::memory_strategy::MemoryStrategy
static rclcpp::SubscriptionBase::SharedPtr get_subscription_by_handle (std::shared_ptr< const rcl_subscription_t > subscriber_handle, const WeakNodeList &weak_nodes)
 
static rclcpp::ServiceBase::SharedPtr get_service_by_handle (std::shared_ptr< const rcl_service_t > service_handle, const WeakNodeList &weak_nodes)
 
static rclcpp::ClientBase::SharedPtr get_client_by_handle (std::shared_ptr< const rcl_client_t > client_handle, const WeakNodeList &weak_nodes)
 
static rclcpp::TimerBase::SharedPtr get_timer_by_handle (std::shared_ptr< const rcl_timer_t > timer_handle, const WeakNodeList &weak_nodes)
 
static rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_by_group (rclcpp::CallbackGroup::SharedPtr group, const WeakNodeList &weak_nodes)
 
static rclcpp::CallbackGroup::SharedPtr get_group_by_subscription (rclcpp::SubscriptionBase::SharedPtr subscription, const WeakNodeList &weak_nodes)
 
static rclcpp::CallbackGroup::SharedPtr get_group_by_service (rclcpp::ServiceBase::SharedPtr service, const WeakNodeList &weak_nodes)
 
static rclcpp::CallbackGroup::SharedPtr get_group_by_client (rclcpp::ClientBase::SharedPtr client, const WeakNodeList &weak_nodes)
 
static rclcpp::CallbackGroup::SharedPtr get_group_by_timer (rclcpp::TimerBase::SharedPtr timer, const WeakNodeList &weak_nodes)
 
static rclcpp::CallbackGroup::SharedPtr get_group_by_waitable (rclcpp::Waitable::SharedPtr waitable, const WeakNodeList &weak_nodes)
 

Detailed Description

template<typename Alloc = std::allocator<void>>
class rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >

Delegate for handling memory allocations while the Executor is executing.

By default, the memory strategy dynamically allocates memory for structures that come in from the rmw implementation after the executor waits for work, based on the number of entities that come through.

Member Typedef Documentation

◆ VoidAllocTraits

template<typename Alloc = std::allocator<void>>
using rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::VoidAllocTraits = typename allocator::AllocRebind<void *, Alloc>

◆ VoidAlloc

template<typename Alloc = std::allocator<void>>
using rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::VoidAlloc = typename VoidAllocTraits::allocator_type

Constructor & Destructor Documentation

◆ AllocatorMemoryStrategy() [1/2]

template<typename Alloc = std::allocator<void>>
rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::AllocatorMemoryStrategy ( std::shared_ptr< Alloc >  allocator)
inlineexplicit

◆ AllocatorMemoryStrategy() [2/2]

template<typename Alloc = std::allocator<void>>
rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::AllocatorMemoryStrategy ( )
inline

Member Function Documentation

◆ add_guard_condition()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::add_guard_condition ( const rcl_guard_condition_t guard_condition)
inlineoverridevirtual

◆ remove_guard_condition()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::remove_guard_condition ( const rcl_guard_condition_t guard_condition)
inlineoverridevirtual

◆ clear_handles()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::clear_handles ( )
inlineoverridevirtual

◆ remove_null_handles()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::remove_null_handles ( rcl_wait_set_t wait_set)
inlineoverridevirtual

◆ collect_entities()

template<typename Alloc = std::allocator<void>>
bool rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::collect_entities ( const WeakNodeList weak_nodes)
inlineoverridevirtual

◆ add_waitable_handle()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::add_waitable_handle ( const rclcpp::Waitable::SharedPtr &  waitable)
inlineoverridevirtual

◆ add_handles_to_wait_set()

template<typename Alloc = std::allocator<void>>
bool rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::add_handles_to_wait_set ( rcl_wait_set_t wait_set)
inlineoverridevirtual

◆ get_next_subscription()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_next_subscription ( rclcpp::AnyExecutable any_exec,
const WeakNodeList weak_nodes 
)
inlineoverridevirtual

◆ get_next_service()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_next_service ( rclcpp::AnyExecutable any_exec,
const WeakNodeList weak_nodes 
)
inlineoverridevirtual

◆ get_next_client()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_next_client ( rclcpp::AnyExecutable any_exec,
const WeakNodeList weak_nodes 
)
inlineoverridevirtual

◆ get_next_timer()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_next_timer ( rclcpp::AnyExecutable any_exec,
const WeakNodeList weak_nodes 
)
inlineoverridevirtual

◆ get_next_waitable()

template<typename Alloc = std::allocator<void>>
void rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_next_waitable ( rclcpp::AnyExecutable any_exec,
const WeakNodeList weak_nodes 
)
inlineoverridevirtual

◆ get_allocator()

template<typename Alloc = std::allocator<void>>
rcl_allocator_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::get_allocator ( )
inlineoverridevirtual

◆ number_of_ready_subscriptions()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_ready_subscriptions ( ) const
inlineoverridevirtual

◆ number_of_ready_services()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_ready_services ( ) const
inlineoverridevirtual

◆ number_of_ready_events()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_ready_events ( ) const
inlineoverridevirtual

◆ number_of_ready_clients()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_ready_clients ( ) const
inlineoverridevirtual

◆ number_of_guard_conditions()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_guard_conditions ( ) const
inlineoverridevirtual

◆ number_of_ready_timers()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_ready_timers ( ) const
inlineoverridevirtual

◆ number_of_waitables()

template<typename Alloc = std::allocator<void>>
size_t rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy< Alloc >::number_of_waitables ( ) const
inlineoverridevirtual

The documentation for this class was generated from the following file: