Template Class StoragePolicyCommon

Class Documentation

template<bool HasStrongOwnership>
class StoragePolicyCommon

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

Protected Functions

template<class SubscriptionsIterable, class GuardConditionsIterable, class ExtraGuardConditionsIterable, class TimersIterable, class ClientsIterable, class ServicesIterable, class WaitablesIterable>
inline explicit 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)
inline ~StoragePolicyCommon()
template<class EntityT>
inline std::pair<void*, EntityT*> get_raw_pointer_from_smart_pointer(const std::shared_ptr<EntityT> &shared_pointer)
template<class EntityT>
inline 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>
inline 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.

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.

inline const rcl_wait_set_t &storage_get_rcl_wait_set() const
inline rcl_wait_set_t &storage_get_rcl_wait_set()
inline 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