ROS 2 rclcpp + rcl - kilted
kilted
ROS 2 C++ Client Library with ROS Client Library
|
Public Member Functions | |
template<typename InitFuncT , typename EventTypeEnum > | |
EventHandler (const EventCallbackT &callback, InitFuncT init_func, ParentHandleT parent_handle, EventTypeEnum event_type) | |
std::shared_ptr< void > | take_data () override |
Take data so that the callback cannot be scheduled again. | |
std::shared_ptr< void > | take_data_by_entity_id ([[maybe_unused]] size_t id) override |
void | execute (const std::shared_ptr< void > &data) override |
Execute any entities of the Waitable that are ready. | |
![]() | |
RCLCPP_PUBLIC size_t | get_number_of_ready_events () override |
Get the number of ready events. | |
RCLCPP_PUBLIC void | add_to_wait_set (rcl_wait_set_t &wait_set) override |
Add the Waitable to a wait set. | |
RCLCPP_PUBLIC bool | is_ready (const rcl_wait_set_t &wait_set) override |
Check if the Waitable is ready. | |
void | set_on_ready_callback (std::function< void(size_t, int)> callback) override |
Set a callback to be called when each new event instance occurs. More... | |
void | clear_on_ready_callback () override |
Unset the callback registered for new events, if any. | |
RCLCPP_PUBLIC std::vector< std::shared_ptr< rclcpp::TimerBase > > | get_timers () const override |
Returns all timers used by this waitable. More... | |
![]() | |
virtual RCLCPP_PUBLIC size_t | get_number_of_ready_subscriptions () |
Get the number of ready subscriptions. More... | |
virtual RCLCPP_PUBLIC size_t | get_number_of_ready_timers () |
Get the number of ready timers. More... | |
virtual RCLCPP_PUBLIC size_t | get_number_of_ready_clients () |
Get the number of ready clients. More... | |
virtual RCLCPP_PUBLIC size_t | get_number_of_ready_services () |
Get the number of ready services. More... | |
virtual RCLCPP_PUBLIC size_t | get_number_of_ready_guard_conditions () |
Get the number of ready guard_conditions. More... | |
virtual RCLCPP_PUBLIC std::shared_ptr< void > | take_data_by_entity_id (size_t id)=0 |
Take the data so that it can be consumed with execute . More... | |
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. More... | |
Additional Inherited Members | |
![]() | |
enum class | EntityType : std::size_t { Event } |
![]() | |
RCLCPP_PUBLIC void | set_on_new_event_callback (rcl_event_callback_t callback, const void *user_data) |
![]() | |
std::recursive_mutex | callback_mutex_ |
std::function< void(size_t)> | on_new_event_callback_ {nullptr} |
rcl_event_t | event_handle_ |
size_t | wait_set_event_index_ |
Definition at line 245 of file event_handler.hpp.