Reassemble a stream of incoming PeChunks for the same request_id. More...
#include <midi_ci_pe.hpp>
Public Member Functions | |
| std::optional< PeChunk > | push (PeChunk chunk) |
| NOT RT-safe — inserts/erases on unordered_map, resizes per-slot vector<bool> and vector<vector<uint8_t>>, and on the final chunk allocates the concatenated output payload. | |
| void | cancel (uint8_t request_id) |
| NOT RT-safe — unordered_map::erase may rehash and frees the per-slot vectors. | |
| std::size_t | pending_transfers () const |
| RT-safe. | |
Reassemble a stream of incoming PeChunks for the same request_id.
Holds chunks until total_chunks have all been observed, then returns the concatenated payload and the (first) header.
RT-safety contract: every method mutates an unordered_map slot owning per-transfer vectors, and on completion concatenates payload bytes into the returned chunk. Drive the reassembler from the same MIDI / main thread that decoded the SysEx envelope, never from the audio callback.
| void pulp::midi::PeReassembler::cancel | ( | uint8_t | request_id | ) |
NOT RT-safe — unordered_map::erase may rehash and frees the per-slot vectors.
|
inline |
RT-safe.
Returns the in-progress transfer count; touches no heap state.
NOT RT-safe — inserts/erases on unordered_map, resizes per-slot vector<bool> and vector<vector<uint8_t>>, and on the final chunk allocates the concatenated output payload.