#include <InputRingBuffer.hpp>
|
| void | push (uint32_t tick, const InputSnapshot &input) |
| | Push the input that was just stamped + sent for tick.
|
| const InputSnapshot * | find (uint32_t tick) const |
| | Find the input stamped with exactly tick.
|
| size_t | size () const noexcept |
| | Number of valid entries currently buffered (≤ k_capacity).
|
| void | clear () noexcept |
| | Drop everything (used on disconnect / reset).
|
|
| static constexpr size_t | k_capacity = 256 |
| | Capacity in ticks.
|
◆ clear()
| void InputRingBuffer::clear |
( |
| ) |
|
|
inlinenoexcept |
Drop everything (used on disconnect / reset).
◆ find()
| const InputSnapshot * InputRingBuffer::find |
( |
uint32_t | tick | ) |
const |
|
inlinenodiscard |
Find the input stamped with exactly tick.
- Returns
- Pointer into the ring (valid until next push), or nullptr if missing.
◆ push()
| void InputRingBuffer::push |
( |
uint32_t | tick, |
|
|
const InputSnapshot & | input ) |
|
inline |
Push the input that was just stamped + sent for tick.
◆ size()
| size_t InputRingBuffer::size |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Number of valid entries currently buffered (≤ k_capacity).
◆ count_
| size_t InputRingBuffer::count_ = 0 |
|
private |
Number of valid entries; saturates at k_capacity.
◆ entries_
◆ head_
| size_t InputRingBuffer::head_ = 0 |
|
private |
Next write index, wraps mod k_capacity.
◆ k_capacity
| size_t InputRingBuffer::k_capacity = 256 |
|
staticconstexpr |
Capacity in ticks.
Sized for ≥1 RTT of replay buffer at any reasonable RTT; oversize is safer than too-small (replay just stops early if history runs out).
The documentation for this class was generated from the following file: