ROS 2 rclcpp + rcl - humble
humble
ROS 2 C++ Client Library with ROS Client Library
|
Public Member Functions | |
template<typename InitFuncT , typename EventTypeEnum > | |
QOSEventHandler (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 (size_t id) override |
Take the data so that it can be consumed with execute . More... | |
void | execute (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 (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. | |
![]() | |
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... | |
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) |
![]() | |
rcl_event_t | event_handle_ |
size_t | wait_set_event_index_ |
std::recursive_mutex | callback_mutex_ |
std::function< void(size_t)> | on_new_event_callback_ {nullptr} |
Definition at line 223 of file qos_event.hpp.
|
inlineoverridevirtual |
Take the data so that it can be consumed with execute
.
This function allows to specify an entity ID to take the data from. Entity IDs are identifiers that can be defined by waitable-derived classes that are composed of several distinct entities. The main use-case is in conjunction with the listener APIs.
[in] | id | the id of the entity from which to take |
Reimplemented from rclcpp::Waitable.
Definition at line 263 of file qos_event.hpp.
References rclcpp::QOSEventHandler< EventCallbackT, ParentHandleT >::take_data().