|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Definition at line 37 of file event_queue.hpp.
#include <event_queue.hpp>
Public Member Functions | |
| bool | push (const T &event) |
| Producer side. Returns false (and counts a drop) if the queue is full. | |
| template<typename Fn > | |
| uint32_t | drain (Fn &&fn) |
| bool | pop (T &event) |
| Consumer side. Pop one event; false if empty. | |
| bool | empty () const |
| uint32_t | dropped () const |
| Pushes rejected because the queue was full, since boot. Any context. | |
Static Public Member Functions | |
| static constexpr uint32_t | capacity () |
Producer side. Returns false (and counts a drop) if the queue is full.
Definition at line 40 of file event_queue.hpp.
|
inline |
Consumer side. Calls fn(event) for up to capacity() queued events, oldest first. Returns the number handled.
Definition at line 50 of file event_queue.hpp.
References sbl::control::EventQueue< T, Size >::capacity().
|
inline |
Consumer side. Pop one event; false if empty.
Definition at line 61 of file event_queue.hpp.
|
inline |
Definition at line 63 of file event_queue.hpp.
|
inline |
Pushes rejected because the queue was full, since boot. Any context.
Definition at line 66 of file event_queue.hpp.
Definition at line 68 of file event_queue.hpp.
Referenced by sbl::control::EventQueue< T, Size >::drain().