rclcpp  master
C++ ROS Client Library API
Protected Member Functions | Protected Attributes | List of all members
rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership > Class Template Reference

Common structure for storage policies, which provides rcl wait set access. More...

#include <storage_policy_common.hpp>

Collaboration diagram for rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >:
Collaboration graph
[legend]

Protected Member Functions

template<class SubscriptionsIterable , class GuardConditionsIterable , class ExtraGuardConditionsIterable , class TimersIterable , class ClientsIterable , class ServicesIterable , class WaitablesIterable >
 StoragePolicyCommon (const SubscriptionsIterable &subscriptions, const GuardConditionsIterable &guard_conditions, const ExtraGuardConditionsIterable &extra_guard_conditions, const TimersIterable &timers, const ClientsIterable &clients, const ServicesIterable &services, const WaitablesIterable &waitables, rclcpp::Context::SharedPtr context)
 
 ~StoragePolicyCommon ()
 
template<class EntityT >
std::pair< void *, EntityT * > get_raw_pointer_from_smart_pointer (const std::shared_ptr< EntityT > &shared_pointer)
 
template<class EntityT >
std::pair< std::shared_ptr< EntityT >, EntityT * > get_raw_pointer_from_smart_pointer (const std::weak_ptr< EntityT > &weak_pointer)
 
template<class SubscriptionsIterable , class GuardConditionsIterable , class ExtraGuardConditionsIterable , class TimersIterable , class ClientsIterable , class ServicesIterable , class WaitablesIterable >
void storage_rebuild_rcl_wait_set_with_sets (const SubscriptionsIterable &subscriptions, const GuardConditionsIterable &guard_conditions, const ExtraGuardConditionsIterable &extra_guard_conditions, const TimersIterable &timers, const ClientsIterable &clients, const ServicesIterable &services, const WaitablesIterable &waitables)
 Rebuild the wait set, preparing it for the next wait call. More...
 
const rcl_wait_set_tstorage_get_rcl_wait_set () const
 
rcl_wait_set_tstorage_get_rcl_wait_set ()
 
void storage_flag_for_resize ()
 

Protected Attributes

rcl_wait_set_t rcl_wait_set_
 
rclcpp::Context::SharedPtr context_
 
bool needs_pruning_ = false
 
bool needs_resize_ = false
 

Detailed Description

template<bool HasStrongOwnership>
class rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >

Common structure for storage policies, which provides rcl wait set access.

Constructor & Destructor Documentation

◆ StoragePolicyCommon()

template<bool HasStrongOwnership>
template<class SubscriptionsIterable , class GuardConditionsIterable , class ExtraGuardConditionsIterable , class TimersIterable , class ClientsIterable , class ServicesIterable , class WaitablesIterable >
rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::StoragePolicyCommon ( const SubscriptionsIterable &  subscriptions,
const GuardConditionsIterable &  guard_conditions,
const ExtraGuardConditionsIterable &  extra_guard_conditions,
const TimersIterable &  timers,
const ClientsIterable &  clients,
const ServicesIterable &  services,
const WaitablesIterable &  waitables,
rclcpp::Context::SharedPtr  context 
)
inlineexplicitprotected

◆ ~StoragePolicyCommon()

template<bool HasStrongOwnership>
rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::~StoragePolicyCommon ( )
inlineprotected

Member Function Documentation

◆ get_raw_pointer_from_smart_pointer() [1/2]

template<bool HasStrongOwnership>
template<class EntityT >
std::pair<void *, EntityT *> rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::get_raw_pointer_from_smart_pointer ( const std::shared_ptr< EntityT > &  shared_pointer)
inlineprotected

◆ get_raw_pointer_from_smart_pointer() [2/2]

template<bool HasStrongOwnership>
template<class EntityT >
std::pair<std::shared_ptr<EntityT>, EntityT *> rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::get_raw_pointer_from_smart_pointer ( const std::weak_ptr< EntityT > &  weak_pointer)
inlineprotected

◆ storage_rebuild_rcl_wait_set_with_sets()

template<bool HasStrongOwnership>
template<class SubscriptionsIterable , class GuardConditionsIterable , class ExtraGuardConditionsIterable , class TimersIterable , class ClientsIterable , class ServicesIterable , class WaitablesIterable >
void rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::storage_rebuild_rcl_wait_set_with_sets ( const SubscriptionsIterable &  subscriptions,
const GuardConditionsIterable &  guard_conditions,
const ExtraGuardConditionsIterable &  extra_guard_conditions,
const TimersIterable &  timers,
const ClientsIterable &  clients,
const ServicesIterable &  services,
const WaitablesIterable &  waitables 
)
inlineprotected

Rebuild the wait set, preparing it for the next wait call.

The wait set is rebuilt by:

  • resizing the wait set if needed,
  • clearing the wait set if not already done by resizing, and
  • re-adding the entities.

◆ storage_get_rcl_wait_set() [1/2]

template<bool HasStrongOwnership>
const rcl_wait_set_t& rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::storage_get_rcl_wait_set ( ) const
inlineprotected

◆ storage_get_rcl_wait_set() [2/2]

template<bool HasStrongOwnership>
rcl_wait_set_t& rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::storage_get_rcl_wait_set ( )
inlineprotected

◆ storage_flag_for_resize()

template<bool HasStrongOwnership>
void rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::storage_flag_for_resize ( )
inlineprotected

Member Data Documentation

◆ rcl_wait_set_

template<bool HasStrongOwnership>
rcl_wait_set_t rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::rcl_wait_set_
protected

◆ context_

template<bool HasStrongOwnership>
rclcpp::Context::SharedPtr rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::context_
protected

◆ needs_pruning_

template<bool HasStrongOwnership>
bool rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::needs_pruning_ = false
protected

◆ needs_resize_

template<bool HasStrongOwnership>
bool rclcpp::wait_set_policies::detail::StoragePolicyCommon< HasStrongOwnership >::needs_resize_ = false
protected

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