ROS 2 rclcpp + rcl - jazzy
jazzy
ROS 2 C++ Client Library with ROS Client Library
|
This abstract class can be used to implement different types of queues where ExecutorEvent
can be stored. The derived classes should choose which underlying container to use and the strategy for pushing and popping events. For example a queue implementation may be bounded or unbounded and have different pruning strategies. Implementations may or may not check the validity of events and decide how to handle the situation where an event is not valid anymore (e.g. a subscription history cache overruns)
More...
#include <rclcpp/experimental/executors/events_executor/events_queue.hpp>
Public Member Functions | |
virtual RCLCPP_PUBLIC | ~EventsQueue ()=default |
Destruct the object. | |
virtual RCLCPP_PUBLIC void | enqueue (const rclcpp::experimental::executors::ExecutorEvent &event)=0 |
push event into the queue More... | |
virtual RCLCPP_PUBLIC bool | dequeue (rclcpp::experimental::executors::ExecutorEvent &event, std::chrono::nanoseconds timeout=std::chrono::nanoseconds::max())=0 |
Extracts an event from the queue, eventually waiting until timeout if none is available. More... | |
virtual RCLCPP_PUBLIC bool | empty () const =0 |
Test whether queue is empty. More... | |
virtual RCLCPP_PUBLIC size_t | size () const =0 |
Returns the number of elements in the queue. More... | |
This abstract class can be used to implement different types of queues where ExecutorEvent
can be stored. The derived classes should choose which underlying container to use and the strategy for pushing and popping events. For example a queue implementation may be bounded or unbounded and have different pruning strategies. Implementations may or may not check the validity of events and decide how to handle the situation where an event is not valid anymore (e.g. a subscription history cache overruns)
Definition at line 42 of file events_queue.hpp.
|
pure virtual |
Extracts an event from the queue, eventually waiting until timeout if none is available.
Implemented in rclcpp::experimental::executors::SimpleEventsQueue.
|
pure virtual |
Test whether queue is empty.
Implemented in rclcpp::experimental::executors::SimpleEventsQueue.
|
pure virtual |
push event into the queue
event | The event to push into the queue |
Implemented in rclcpp::experimental::executors::SimpleEventsQueue.
|
pure virtual |
Returns the number of elements in the queue.
Implemented in rclcpp::experimental::executors::SimpleEventsQueue.