rclcpp  master
C++ ROS Client Library API
dynamic_storage.hpp
Go to the documentation of this file.
1 // Copyright 2020 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCLCPP__WAIT_SET_POLICIES__DYNAMIC_STORAGE_HPP_
16 #define RCLCPP__WAIT_SET_POLICIES__DYNAMIC_STORAGE_HPP_
17 
18 #include <algorithm>
19 #include <memory>
20 #include <utility>
21 #include <vector>
22 
23 #include "rclcpp/client.hpp"
25 #include "rclcpp/macros.hpp"
26 #include "rclcpp/service.hpp"
29 #include "rclcpp/timer.hpp"
32 #include "rclcpp/waitable.hpp"
33 
34 namespace rclcpp
35 {
36 namespace wait_set_policies
37 {
38 
41 {
42 protected:
44 
46  {
47  // (wjwwood): indent of 'public:' is weird, I know. uncrustify is dumb.
48 
49 public:
52 
55  std::shared_ptr<rclcpp::SubscriptionBase> subscription_in = nullptr,
56  const rclcpp::SubscriptionWaitSetMask & mask_in = {})
57  : subscription(std::move(subscription_in)),
58  mask(mask_in)
59  {}
60 
61  void
62  reset() noexcept
63  {
65  }
66  };
68  {
69 public:
72 
74  const std::shared_ptr<rclcpp::SubscriptionBase> & subscription_in,
75  const rclcpp::SubscriptionWaitSetMask & mask_in) noexcept
76  : subscription(subscription_in),
77  mask(mask_in)
78  {}
79 
80  explicit WeakSubscriptionEntry(const SubscriptionEntry & other)
81  : subscription(other.subscription),
82  mask(other.mask)
83  {}
84 
86  lock() const
87  {
88  return subscription.lock();
89  }
90 
91  bool
92  expired() const noexcept
93  {
94  return subscription.expired();
95  }
96  };
99 
102 
105 
108 
111 
113  {
114 public:
117 
120  std::shared_ptr<rclcpp::Waitable> waitable_in = nullptr,
121  std::shared_ptr<void> associated_entity_in = nullptr) noexcept
122  : waitable(std::move(waitable_in)),
123  associated_entity(std::move(associated_entity_in))
124  {}
125 
126  void
127  reset() noexcept
128  {
129  waitable.reset();
131  }
132  };
134  {
135 public:
138 
140  const std::shared_ptr<rclcpp::Waitable> & waitable_in,
141  const std::shared_ptr<void> & associated_entity_in) noexcept
142  : waitable(waitable_in),
143  associated_entity(associated_entity_in)
144  {}
145 
146  explicit WeakWaitableEntry(const WaitableEntry & other)
147  : waitable(other.waitable),
149  {}
150 
152  lock() const
153  {
154  return waitable.lock();
155  }
156 
157  bool
158  expired() const noexcept
159  {
160  return waitable.expired();
161  }
162  };
165 
166  template<class ArrayOfExtraGuardConditions>
167  explicit
169  const SubscriptionsIterable & subscriptions,
170  const GuardConditionsIterable & guard_conditions,
171  const ArrayOfExtraGuardConditions & extra_guard_conditions,
172  const TimersIterable & timers,
173  const ClientsIterable & clients,
174  const ServicesIterable & services,
175  const WaitablesIterable & waitables,
176  rclcpp::Context::SharedPtr context
177  )
179  subscriptions,
180  guard_conditions,
181  extra_guard_conditions,
182  timers,
183  clients,
184  services,
185  waitables,
186  context),
187  subscriptions_(subscriptions.cbegin(), subscriptions.cend()),
189  guard_conditions_(guard_conditions.cbegin(), guard_conditions.cend()),
191  timers_(timers.cbegin(), timers.cend()),
192  shared_timers_(timers_.size()),
193  clients_(clients.cbegin(), clients.cend()),
194  shared_clients_(clients_.size()),
195  services_(services.cbegin(), services.cend()),
196  shared_services_(services_.size()),
197  waitables_(waitables.cbegin(), waitables.cend()),
199  {}
200 
201  ~DynamicStorage() = default;
202 
203  template<class ArrayOfExtraGuardConditions>
204  void
205  storage_rebuild_rcl_wait_set(const ArrayOfExtraGuardConditions & extra_guard_conditions)
206  {
210  extra_guard_conditions,
211  timers_,
212  clients_,
213  services_,
214  waitables_
215  );
216  }
217 
218  template<class EntityT, class SequenceOfEntitiesT>
219  static
220  bool
221  storage_has_entity(const EntityT & entity, const SequenceOfEntitiesT & entities)
222  {
223  return std::any_of(
224  entities.cbegin(),
225  entities.cend(),
226  [&entity](const auto & inner) {return &entity == inner.lock().get();});
227  }
228 
229  template<class EntityT, class SequenceOfEntitiesT>
230  static
231  auto
232  storage_find_entity(const EntityT & entity, const SequenceOfEntitiesT & entities)
233  {
234  return std::find_if(
235  entities.cbegin(),
236  entities.cend(),
237  [&entity](const auto & inner) {return &entity == inner.lock().get();});
238  }
239 
240  void
242  {
243  if (this->storage_has_entity(*subscription, subscriptions_)) {
244  throw std::runtime_error("subscription already in wait set");
245  }
246  WeakSubscriptionEntry weak_entry{std::move(subscription), {}};
247  subscriptions_.push_back(std::move(weak_entry));
248  this->storage_flag_for_resize();
249  }
250 
251  void
253  {
254  auto it = this->storage_find_entity(*subscription, subscriptions_);
255  if (subscriptions_.cend() == it) {
256  throw std::runtime_error("subscription not in wait set");
257  }
258  subscriptions_.erase(it);
259  this->storage_flag_for_resize();
260  }
261 
262  void
264  {
265  if (this->storage_has_entity(*guard_condition, guard_conditions_)) {
266  throw std::runtime_error("guard_condition already in wait set");
267  }
268  guard_conditions_.push_back(std::move(guard_condition));
269  this->storage_flag_for_resize();
270  }
271 
272  void
274  {
275  auto it = this->storage_find_entity(*guard_condition, guard_conditions_);
276  if (guard_conditions_.cend() == it) {
277  throw std::runtime_error("guard_condition not in wait set");
278  }
280  this->storage_flag_for_resize();
281  }
282 
283  void
285  {
286  if (this->storage_has_entity(*timer, timers_)) {
287  throw std::runtime_error("timer already in wait set");
288  }
289  timers_.push_back(std::move(timer));
290  this->storage_flag_for_resize();
291  }
292 
293  void
295  {
296  auto it = this->storage_find_entity(*timer, timers_);
297  if (timers_.cend() == it) {
298  throw std::runtime_error("timer not in wait set");
299  }
300  timers_.erase(it);
301  this->storage_flag_for_resize();
302  }
303 
304  void
306  {
307  if (this->storage_has_entity(*client, clients_)) {
308  throw std::runtime_error("client already in wait set");
309  }
310  clients_.push_back(std::move(client));
311  this->storage_flag_for_resize();
312  }
313 
314  void
316  {
317  auto it = this->storage_find_entity(*client, clients_);
318  if (clients_.cend() == it) {
319  throw std::runtime_error("client not in wait set");
320  }
321  clients_.erase(it);
322  this->storage_flag_for_resize();
323  }
324 
325  void
327  {
328  if (this->storage_has_entity(*service, services_)) {
329  throw std::runtime_error("service already in wait set");
330  }
331  services_.push_back(std::move(service));
332  this->storage_flag_for_resize();
333  }
334 
335  void
337  {
338  auto it = this->storage_find_entity(*service, services_);
339  if (services_.cend() == it) {
340  throw std::runtime_error("service not in wait set");
341  }
342  services_.erase(it);
343  this->storage_flag_for_resize();
344  }
345 
346  void
349  std::shared_ptr<void> && associated_entity)
350  {
351  if (this->storage_has_entity(*waitable, waitables_)) {
352  throw std::runtime_error("waitable already in wait set");
353  }
354  WeakWaitableEntry weak_entry(std::move(waitable), std::move(associated_entity));
355  waitables_.push_back(std::move(weak_entry));
356  this->storage_flag_for_resize();
357  }
358 
359  void
361  {
362  auto it = this->storage_find_entity(*waitable, waitables_);
363  if (waitables_.cend() == it) {
364  throw std::runtime_error("waitable not in wait set");
365  }
366  waitables_.erase(it);
367  this->storage_flag_for_resize();
368  }
369 
370  // this is noexcept because:
371  // - std::weak_ptr::expired is noexcept
372  // - the erase-remove idiom is noexcept, since we're not using the ExecutionPolicy version
373  // - std::vector::erase is noexcept if the assignment operator of T is also
374  // - and, the operator= for std::weak_ptr is noexcept
375  void
377  {
378  // reusable (templated) lambda for removal predicate
379  auto p =
380  [](const auto & weak_ptr) {
381  // remove entries which have expired
382  return weak_ptr.expired();
383  };
384  // remove guard conditions which have been deleted
392  }
393 
394  void
396  {
397  if (++ownership_reference_counter_ > 1) {
398  // Avoid redundant locking.
399  return;
400  }
401  // Setup common locking function.
402  auto lock_all = [](const auto & weak_ptrs, auto & shared_ptrs) {
403  shared_ptrs.resize(weak_ptrs.size());
404  size_t index = 0;
405  for (const auto & weak_ptr : weak_ptrs) {
406  shared_ptrs[index++] = weak_ptr.lock();
407  }
408  };
409  // Lock all the weak pointers and hold them until released.
411  lock_all(timers_, shared_timers_);
412  lock_all(clients_, shared_clients_);
413  lock_all(services_, shared_services_);
414 
415  // We need a specialized version of this for waitables.
416  auto lock_all_waitables = [](const auto & weak_ptrs, auto & shared_ptrs) {
417  shared_ptrs.resize(weak_ptrs.size());
418  size_t index = 0;
419  for (const auto & weak_ptr : weak_ptrs) {
420  shared_ptrs[index++] = WaitableEntry{
421  weak_ptr.waitable.lock(),
422  weak_ptr.associated_entity.lock()};
423  }
424  };
425  lock_all_waitables(waitables_, shared_waitables_);
426  }
427 
428  void
430  {
431  if (--ownership_reference_counter_ > 0) {
432  // Avoid releasing ownership until reference count is 0.
433  return;
434  }
435  // "Unlock" all shared pointers by resetting them.
436  auto reset_all = [](auto & shared_ptrs) {
437  for (auto & shared_ptr : shared_ptrs) {
438  shared_ptr.reset();
439  }
440  };
441  reset_all(shared_guard_conditions_);
442  reset_all(shared_timers_);
443  reset_all(shared_clients_);
444  reset_all(shared_services_);
445  reset_all(shared_waitables_);
446  }
447 
449 
452 
455 
458 
461 
464 
467 };
468 
469 } // namespace wait_set_policies
470 } // namespace rclcpp
471 
472 #endif // RCLCPP__WAIT_SET_POLICIES__DYNAMIC_STORAGE_HPP_
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::waitable
std::weak_ptr< rclcpp::Waitable > waitable
Definition: dynamic_storage.hpp:136
std::weak_ptr::lock
T lock(T... args)
std::true_type
rclcpp::wait_set_policies::detail::StoragePolicyCommon< false >::storage_flag_for_resize
void storage_flag_for_resize()
Definition: storage_policy_common.hpp:406
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::lock
std::shared_ptr< rclcpp::SubscriptionBase > lock() const
Definition: dynamic_storage.hpp:86
rclcpp::wait_set_policies::DynamicStorage::waitables_
SequenceOfWeakWaitables waitables_
Definition: dynamic_storage.hpp:465
client.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_add_waitable
void storage_add_waitable(std::shared_ptr< rclcpp::Waitable > &&waitable, std::shared_ptr< void > &&associated_entity)
Definition: dynamic_storage.hpp:347
rclcpp::wait_set_policies::DynamicStorage::storage_add_guard_condition
void storage_add_guard_condition(std::shared_ptr< rclcpp::GuardCondition > &&guard_condition)
Definition: dynamic_storage.hpp:263
std::shared_ptr< rclcpp::SubscriptionBase >
rclcpp::wait_set_policies::DynamicStorage::ownership_reference_counter_
size_t ownership_reference_counter_
Definition: dynamic_storage.hpp:448
std::move
T move(T... args)
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::WeakSubscriptionEntry
WeakSubscriptionEntry(const std::shared_ptr< rclcpp::SubscriptionBase > &subscription_in, const rclcpp::SubscriptionWaitSetMask &mask_in) noexcept
Definition: dynamic_storage.hpp:73
rclcpp::wait_set_policies::DynamicStorage::storage_release_ownerships
void storage_release_ownerships()
Definition: dynamic_storage.hpp:429
rclcpp::wait_set_policies::DynamicStorage::~DynamicStorage
~DynamicStorage()=default
rclcpp::wait_set_policies::DynamicStorage::SubscriptionEntry::reset
void reset() noexcept
Definition: dynamic_storage.hpp:62
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry
Definition: dynamic_storage.hpp:133
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::expired
bool expired() const noexcept
Definition: dynamic_storage.hpp:158
rclcpp::wait_set_policies::detail::StoragePolicyCommon
Common structure for storage policies, which provides rcl wait set access.
Definition: storage_policy_common.hpp:39
std::vector< WeakSubscriptionEntry >
std::find_if
T find_if(T... args)
rclcpp::wait_set_policies::DynamicStorage::services_
SequenceOfWeakServices services_
Definition: dynamic_storage.hpp:462
rclcpp::SubscriptionWaitSetMask
Options used to determine what parts of a subscription get added to or removed from a wait set.
Definition: subscription_wait_set_mask.hpp:24
rclcpp::wait_set_policies::DynamicStorage::shared_waitables_
WaitablesIterable shared_waitables_
Definition: dynamic_storage.hpp:466
rclcpp::wait_set_policies::DynamicStorage::clients_
SequenceOfWeakClients clients_
Definition: dynamic_storage.hpp:459
rclcpp::wait_set_policies::DynamicStorage::storage_remove_client
void storage_remove_client(std::shared_ptr< rclcpp::ClientBase > &&client)
Definition: dynamic_storage.hpp:315
rclcpp::wait_set_policies::DynamicStorage::WaitableEntry::WaitableEntry
WaitableEntry(std::shared_ptr< rclcpp::Waitable > waitable_in=nullptr, std::shared_ptr< void > associated_entity_in=nullptr) noexcept
Conversion constructor, which is intentionally not marked explicit.
Definition: dynamic_storage.hpp:119
rclcpp::wait_set_policies::DynamicStorage::storage_acquire_ownerships
void storage_acquire_ownerships()
Definition: dynamic_storage.hpp:395
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::associated_entity
std::weak_ptr< void > associated_entity
Definition: dynamic_storage.hpp:137
rclcpp::wait_set_policies::DynamicStorage::SubscriptionEntry::SubscriptionEntry
SubscriptionEntry(std::shared_ptr< rclcpp::SubscriptionBase > subscription_in=nullptr, const rclcpp::SubscriptionWaitSetMask &mask_in={})
Conversion constructor, which is intentionally not marked explicit.
Definition: dynamic_storage.hpp:54
std::any_of
T any_of(T... args)
rclcpp::wait_set_policies::DynamicStorage
WaitSet policy that provides dynamically sized storage.
Definition: dynamic_storage.hpp:40
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::subscription
std::weak_ptr< rclcpp::SubscriptionBase > subscription
Definition: dynamic_storage.hpp:70
rclcpp::wait_set_policies::DynamicStorage::shared_clients_
ClientsIterable shared_clients_
Definition: dynamic_storage.hpp:460
subscription_base.hpp
guard_condition.hpp
std::shared_ptr::reset
T reset(T... args)
rclcpp::wait_set_policies::DynamicStorage::SubscriptionEntry
Definition: dynamic_storage.hpp:45
rclcpp::wait_set_policies::DynamicStorage::storage_remove_guard_condition
void storage_remove_guard_condition(std::shared_ptr< rclcpp::GuardCondition > &&guard_condition)
Definition: dynamic_storage.hpp:273
rclcpp
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
std::weak_ptr::expired
T expired(T... args)
timer.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_remove_waitable
void storage_remove_waitable(std::shared_ptr< rclcpp::Waitable > &&waitable)
Definition: dynamic_storage.hpp:360
rclcpp::wait_set_policies::DynamicStorage::subscriptions_
SequenceOfWeakSubscriptions subscriptions_
Definition: dynamic_storage.hpp:450
std::vector::push_back
T push_back(T... args)
rclcpp::wait_set_policies::DynamicStorage::storage_remove_subscription
void storage_remove_subscription(std::shared_ptr< rclcpp::SubscriptionBase > &&subscription)
Definition: dynamic_storage.hpp:252
rclcpp::wait_set_policies::DynamicStorage::shared_guard_conditions_
GuardConditionsIterable shared_guard_conditions_
Definition: dynamic_storage.hpp:454
rclcpp::wait_set_policies::DynamicStorage::storage_prune_deleted_entities
void storage_prune_deleted_entities() noexcept
Definition: dynamic_storage.hpp:376
rclcpp::wait_set_policies::DynamicStorage::storage_has_entity
static bool storage_has_entity(const EntityT &entity, const SequenceOfEntitiesT &entities)
Definition: dynamic_storage.hpp:221
macros.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_add_service
void storage_add_service(std::shared_ptr< rclcpp::ServiceBase > &&service)
Definition: dynamic_storage.hpp:326
rclcpp::wait_set_policies::DynamicStorage::timers_
SequenceOfWeakTimers timers_
Definition: dynamic_storage.hpp:456
subscription_wait_set_mask.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_add_client
void storage_add_client(std::shared_ptr< rclcpp::ClientBase > &&client)
Definition: dynamic_storage.hpp:305
rclcpp::wait_set_policies::DynamicStorage::DynamicStorage
DynamicStorage(const SubscriptionsIterable &subscriptions, const GuardConditionsIterable &guard_conditions, const ArrayOfExtraGuardConditions &extra_guard_conditions, const TimersIterable &timers, const ClientsIterable &clients, const ServicesIterable &services, const WaitablesIterable &waitables, rclcpp::Context::SharedPtr context)
Definition: dynamic_storage.hpp:168
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::mask
rclcpp::SubscriptionWaitSetMask mask
Definition: dynamic_storage.hpp:71
std::vector::erase
T erase(T... args)
std::runtime_error
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::WeakWaitableEntry
WeakWaitableEntry(const std::shared_ptr< rclcpp::Waitable > &waitable_in, const std::shared_ptr< void > &associated_entity_in) noexcept
Definition: dynamic_storage.hpp:139
rclcpp::wait_set_policies::DynamicStorage::shared_services_
ServicesIterable shared_services_
Definition: dynamic_storage.hpp:463
std::remove_if
T remove_if(T... args)
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::WeakWaitableEntry
WeakWaitableEntry(const WaitableEntry &other)
Definition: dynamic_storage.hpp:146
rclcpp::wait_set_policies::DynamicStorage::SubscriptionEntry::subscription
std::shared_ptr< rclcpp::SubscriptionBase > subscription
Definition: dynamic_storage.hpp:50
std::weak_ptr< rclcpp::SubscriptionBase >
rclcpp::wait_set_policies::DynamicStorage::WaitableEntry
Definition: dynamic_storage.hpp:112
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::WeakSubscriptionEntry
WeakSubscriptionEntry(const SubscriptionEntry &other)
Definition: dynamic_storage.hpp:80
rclcpp::wait_set_policies::DynamicStorage::guard_conditions_
SequenceOfWeakGuardConditions guard_conditions_
Definition: dynamic_storage.hpp:453
rclcpp::wait_set_policies::DynamicStorage::WaitableEntry::associated_entity
std::shared_ptr< void > associated_entity
Definition: dynamic_storage.hpp:116
std::vector::begin
T begin(T... args)
visibility_control.hpp
std
rclcpp::wait_set_policies::DynamicStorage::shared_subscriptions_
SubscriptionsIterable shared_subscriptions_
Definition: dynamic_storage.hpp:451
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry
Definition: dynamic_storage.hpp:67
rclcpp::wait_set_policies::DynamicStorage::storage_rebuild_rcl_wait_set
void storage_rebuild_rcl_wait_set(const ArrayOfExtraGuardConditions &extra_guard_conditions)
Definition: dynamic_storage.hpp:205
storage_policy_common.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_add_subscription
void storage_add_subscription(std::shared_ptr< rclcpp::SubscriptionBase > &&subscription)
Definition: dynamic_storage.hpp:241
rclcpp::wait_set_policies::DynamicStorage::WaitableEntry::reset
void reset() noexcept
Definition: dynamic_storage.hpp:127
rclcpp::wait_set_policies::DynamicStorage::WeakWaitableEntry::lock
std::shared_ptr< rclcpp::Waitable > lock() const
Definition: dynamic_storage.hpp:152
rclcpp::wait_set_policies::DynamicStorage::storage_add_timer
void storage_add_timer(std::shared_ptr< rclcpp::TimerBase > &&timer)
Definition: dynamic_storage.hpp:284
rclcpp::wait_set_policies::detail::StoragePolicyCommon< false >::StoragePolicyCommon
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)
Definition: storage_policy_common.hpp:52
std::vector::cend
T cend(T... args)
rclcpp::wait_set_policies::DynamicStorage::SubscriptionEntry::mask
rclcpp::SubscriptionWaitSetMask mask
Definition: dynamic_storage.hpp:51
rclcpp::wait_set_policies::detail::StoragePolicyCommon< false >::storage_rebuild_rcl_wait_set_with_sets
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.
Definition: storage_policy_common.hpp:168
rclcpp::wait_set_policies::DynamicStorage::storage_find_entity
static auto storage_find_entity(const EntityT &entity, const SequenceOfEntitiesT &entities)
Definition: dynamic_storage.hpp:232
rclcpp::wait_set_policies::DynamicStorage::storage_remove_service
void storage_remove_service(std::shared_ptr< rclcpp::ServiceBase > &&service)
Definition: dynamic_storage.hpp:336
service.hpp
rclcpp::wait_set_policies::DynamicStorage::shared_timers_
TimersIterable shared_timers_
Definition: dynamic_storage.hpp:457
waitable.hpp
rclcpp::wait_set_policies::DynamicStorage::storage_remove_timer
void storage_remove_timer(std::shared_ptr< rclcpp::TimerBase > &&timer)
Definition: dynamic_storage.hpp:294
rclcpp::wait_set_policies::DynamicStorage::WaitableEntry::waitable
std::shared_ptr< rclcpp::Waitable > waitable
Definition: dynamic_storage.hpp:115
rclcpp::wait_set_policies::DynamicStorage::WeakSubscriptionEntry::expired
bool expired() const noexcept
Definition: dynamic_storage.hpp:92