15 #ifndef RCLCPP__WAITABLE_HPP_
16 #define RCLCPP__WAITABLE_HPP_
22 #include "rclcpp/macros.hpp"
23 #include "rclcpp/visibility_control.hpp"
33 RCLCPP_SMART_PTR_DEFINITIONS_NOT_COPYABLE(
Waitable)
160 std::shared_ptr<void>
178 std::shared_ptr<void>
262 std::atomic<bool> in_use_by_wait_set_{
false};
virtual RCLCPP_PUBLIC void execute(std::shared_ptr< void > &data)=0
Execute data that is passed in.
virtual RCLCPP_PUBLIC void add_to_wait_set(rcl_wait_set_t *wait_set)=0
Add the Waitable to a wait set.
virtual RCLCPP_PUBLIC size_t get_number_of_ready_guard_conditions()
Get the number of ready guard_conditions.
virtual RCLCPP_PUBLIC bool is_ready(rcl_wait_set_t *wait_set)=0
Check if the Waitable is ready.
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_subscriptions()
Get the number of ready subscriptions.
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.
virtual RCLCPP_PUBLIC std::shared_ptr< void > take_data()=0
Take the data so that it can be consumed with execute.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
Container for subscription's, guard condition's, etc to be waited on.