15 #ifndef RCLCPP__CALLBACK_GROUP_HPP_ 16 #define RCLCPP__CALLBACK_GROUP_HPP_ 35 namespace node_interfaces
43 namespace callback_group
65 template<
typename Function>
69 return _find_ptrs_if_impl<rclcpp::SubscriptionBase, Function>(func, subscription_ptrs_);
72 template<
typename Function>
76 return _find_ptrs_if_impl<rclcpp::TimerBase, Function>(func, timer_ptrs_);
79 template<
typename Function>
83 return _find_ptrs_if_impl<rclcpp::ServiceBase, Function>(func, service_ptrs_);
86 template<
typename Function>
90 return _find_ptrs_if_impl<rclcpp::ClientBase, Function>(func, client_ptrs_);
93 template<
typename Function>
97 return _find_ptrs_if_impl<rclcpp::Waitable, Function>(func, waitable_ptrs_);
150 template<
typename TypeT,
typename Function>
155 for (
auto & weak_ptr : vect_ptrs) {
156 auto ref_ptr = weak_ptr.lock();
157 if (ref_ptr && func(ref_ptr)) {
168 #endif // RCLCPP__CALLBACK_GROUP_HPP_ rclcpp::ServiceBase::SharedPtr find_service_ptrs_if(Function func) const
Definition: callback_group.hpp:81
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
std::vector< rclcpp::ServiceBase::WeakPtr > service_ptrs_
Definition: callback_group.hpp:144
rclcpp::TimerBase::SharedPtr find_timer_ptrs_if(Function func) const
Definition: callback_group.hpp:74
CallbackGroupType type_
Definition: callback_group.hpp:139
std::mutex mutex_
Definition: callback_group.hpp:141
CallbackGroupType
Definition: callback_group.hpp:46
std::vector< rclcpp::ClientBase::WeakPtr > client_ptrs_
Definition: callback_group.hpp:145
Implementation of the NodeTimers part of the Node API.
Definition: node_timers.hpp:31
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
std::atomic_bool can_be_taken_from_
Definition: callback_group.hpp:147
Implementation of the NodeServices part of the Node API.
Definition: node_services.hpp:32
std::vector< rclcpp::SubscriptionBase::WeakPtr > subscription_ptrs_
Definition: callback_group.hpp:142
#define RCLCPP_SMART_PTR_DEFINITIONS(...)
Definition: macros.hpp:36
Definition: callback_group.hpp:52
rclcpp::Waitable::SharedPtr find_waitable_ptrs_if(Function func) const
Definition: callback_group.hpp:95
std::vector< rclcpp::TimerBase::WeakPtr > timer_ptrs_
Definition: callback_group.hpp:143
virtual void remove_waitable(rclcpp::Waitable::SharedPtr waitable_ptr, rclcpp::callback_group::CallbackGroup::SharedPtr group) noexcept
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Set the data type used in the intra-process buffer as std::shared_ptr<MessageT>
rclcpp::SubscriptionBase::SharedPtr find_subscription_ptrs_if(Function func) const
Definition: callback_group.hpp:67
std::vector< rclcpp::Waitable::WeakPtr > waitable_ptrs_
Definition: callback_group.hpp:146
Implementation of the NodeTopics part of the Node API.
Definition: node_topics.hpp:36
rclcpp::ClientBase::SharedPtr find_client_ptrs_if(Function func) const
Definition: callback_group.hpp:88
Implementation of the NodeWaitables part of the Node API.
Definition: node_waitables.hpp:32
virtual void add_waitable(rclcpp::Waitable::SharedPtr waitable_base_ptr, rclcpp::callback_group::CallbackGroup::SharedPtr group)