Template Class EventHandler
Defined in File event_handler.hpp
Inheritance Relationships
Base Type
public rclcpp::EventHandlerBase
(Class EventHandlerBase)
Class Documentation
-
template<typename EventCallbackT, typename ParentHandleT>
class EventHandler : public rclcpp::EventHandlerBase Public Functions
-
template<typename InitFuncT, typename EventTypeEnum>
inline EventHandler(const EventCallbackT &callback, InitFuncT init_func, ParentHandleT parent_handle, EventTypeEnum event_type)
-
inline ~EventHandler()
-
inline virtual std::shared_ptr<void> take_data() override
Take data so that the callback cannot be scheduled again.
-
inline virtual std::shared_ptr<void> take_data_by_entity_id(size_t id) override
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.
See also
- Parameters:
id – [in] the id of the entity from which to take
- Returns:
the type-erased data taken from entity specified
Execute any entities of the Waitable that are ready.
-
template<typename InitFuncT, typename EventTypeEnum>