Bounded FIFO of outbound notification payloads, drained in MTU-sized chunks.
Exactly one payload is "in flight" at a time: chunkData() / chunkSize() always describe the front payload at the current offset, and the front is popped only once advance() has consumed all of it.
Definition at line 57 of file ble_notify_queue.h.
|
| void | advance (size_t sent) |
| | Record that sent bytes were accepted by the stack.
|
| |
| const u8 * | chunkData () const |
| | Start of the next chunk, or nullptr when the queue is empty.
|
| |
| size_t | chunkSize (size_t max_payload) const |
| | Size of the next chunk, capped at max_payload.
|
| |
| void | clear () |
| | Drop every queued payload — used when the link goes away.
|
| |
| size_t | depth () const |
| | Number of complete payloads queued, including the one in flight.
|
| |
| void | dropFront () |
| | Drop the in-flight payload and move to the next one.
|
| |
| bool | empty () const |
| | True when nothing is waiting to be sent.
|
| |
| bool | push (const char *data, size_t size) |
| | Append a complete payload.
|
| |
| size_t | remaining () const |
| | Bytes of the in-flight payload not yet accepted by the stack.
|
| |