17 #include "rclcpp/waitable.hpp"
22 Waitable::get_number_of_ready_subscriptions()
61 throw std::runtime_error(
62 "Custom waitables should override take_data_by_entity_id "
63 "if they want to use it.");
69 return in_use_by_wait_set_.exchange(in_use_state);
77 throw std::runtime_error(
78 "Custom waitables should override set_on_ready_callback "
79 "if they want to use it.");
85 throw std::runtime_error(
86 "Custom waitables should override clear_on_ready_callback if they "
87 "want to use it and make sure to call it on the waitable destructor.");
virtual RCLCPP_PUBLIC size_t get_number_of_ready_guard_conditions()
Get the number of ready guard_conditions.
virtual RCLCPP_PUBLIC size_t get_number_of_ready_timers()
Get the number of ready timers.
virtual RCLCPP_PUBLIC std::shared_ptr< void > take_data_by_entity_id(size_t id)
Take the data so that it can be consumed with execute.
virtual RCLCPP_PUBLIC size_t get_number_of_ready_clients()
Get the number of ready clients.
virtual RCLCPP_PUBLIC void clear_on_ready_callback()
Unset any callback registered via set_on_ready_callback.
virtual RCLCPP_PUBLIC size_t get_number_of_ready_events()
Get the number of ready events.
RCLCPP_PUBLIC bool exchange_in_use_by_wait_set_state(bool in_use_state)
Exchange the "in use by wait set" state for this timer.
virtual RCLCPP_PUBLIC size_t get_number_of_ready_services()
Get the number of ready services.
virtual RCLCPP_PUBLIC void set_on_ready_callback(std::function< void(size_t, int)> callback)
Set a callback to be called whenever the waitable becomes ready.