BitBuffer class final
#include <pr/afsk/bit_buffer.hpp>
Fixed-size ring buffer for recovered modem bits.
The implementation stores bits packed into bytes and performs no dynamic allocation. It is intended for steady-state embedded paths where heap use is forbidden.
Public static variables
- static std::size_t kCapacityBits constexpr
- Maximum number of bits that can be queued.
- static std::size_t kCapacityBytes constexpr
- Internal packed storage size in bytes.
Public functions
Function documentation
bool prf:: pr:: afsk:: BitBuffer:: pop(bool* out_bit)
Pop one bit from the queue head.
| Parameters | |
|---|---|
| out_bit out | Destination for the popped bit. |
| Returns | true on success, false if queue is empty or output pointer is null. |
bool prf:: pr:: afsk:: BitBuffer:: push(bool bit)
Push one recovered bit to the queue tail.
| Parameters | |
|---|---|
| bit | Bit value to enqueue. |
| Returns | true if enqueued, false if the queue is full. |