ROS 2 rclcpp + rcl - rolling
rolling-a919a6e5
ROS 2 C++ Client Library with ROS Client Library
|
This class implements an EventsQueue as a simple wrapper around a std::queue. It does not perform any checks about the size of queue, which can grow unbounded without being pruned. The simplicity of this implementation makes it suitable for optimizing CPU usage. More...
#include <rclcpp/experimental/executors/events_executor/simple_events_queue.hpp>
Public Member Functions | |
RCLCPP_PUBLIC void | enqueue (const rclcpp::experimental::executors::ExecutorEvent &event) override |
enqueue event into the queue Thread safe More... | |
RCLCPP_PUBLIC bool | dequeue (rclcpp::experimental::executors::ExecutorEvent &event, std::chrono::nanoseconds timeout=std::chrono::nanoseconds::max()) override |
waits for an event until timeout, gets a single event Thread safe More... | |
RCLCPP_PUBLIC bool | empty () const override |
Test whether queue is empty Thread safe. More... | |
RCLCPP_PUBLIC size_t | size () const override |
Returns the number of elements in the queue. Thread safe. More... | |
![]() | |
virtual RCLCPP_PUBLIC | ~EventsQueue ()=default |
Destruct the object. | |
This class implements an EventsQueue as a simple wrapper around a std::queue. It does not perform any checks about the size of queue, which can grow unbounded without being pruned. The simplicity of this implementation makes it suitable for optimizing CPU usage.
Definition at line 38 of file simple_events_queue.hpp.
|
inlineoverridevirtual |
waits for an event until timeout, gets a single event Thread safe
Implements rclcpp::experimental::executors::EventsQueue.
Definition at line 71 of file simple_events_queue.hpp.
|
inlineoverridevirtual |
Test whether queue is empty Thread safe.
Implements rclcpp::experimental::executors::EventsQueue.
Definition at line 102 of file simple_events_queue.hpp.
|
inlineoverridevirtual |
enqueue event into the queue Thread safe
event | The event to enqueue into the queue |
Implements rclcpp::experimental::executors::EventsQueue.
Definition at line 51 of file simple_events_queue.hpp.
|
inlineoverridevirtual |
Returns the number of elements in the queue. Thread safe.
Implements rclcpp::experimental::executors::EventsQueue.
Definition at line 115 of file simple_events_queue.hpp.