|
livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
|
Bounded single-producer / multi-consumer queue for handing Frames or ImuData from the receive thread to any other thread. More...
#include <livox/mid360/frame.hpp>
Public Member Functions | |
| BoundedQueue (std::size_t capacity=8) | |
| An empty, open queue that holds at most capacity items. | |
| void | push (T &&item) |
| Producer side (receive thread). Never blocks. | |
| std::optional< T > | pop (std::chrono::nanoseconds timeout) |
| Consumer side. Empty after timeout or once closed and drained. | |
| std::optional< T > | try_pop () |
| Consumer side without waiting. Empty when nothing is queued. | |
| void | close () |
| Wakes every waiting pop(); later pushes are ignored, queued items can still be popped. | |
| std::uint64_t | dropped () const |
| Items discarded by overflow so far. | |
| std::size_t | size () const |
| Items currently queued. | |
| std::size_t | capacity () const noexcept |
| Maximum number of queued items, as passed to the constructor. | |
Bounded single-producer / multi-consumer queue for handing Frames or ImuData from the receive thread to any other thread.
Overflow drops the OLDEST element (newest data wins) and counts it in dropped(). Not part of Device: connect it yourself, e.g.