Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::midi::PeReassembler Class Reference

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.

Detailed Description

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.

Member Function Documentation

◆ cancel()

void pulp::midi::PeReassembler::cancel ( uint8_t request_id)

NOT RT-safe — unordered_map::erase may rehash and frees the per-slot vectors.

◆ pending_transfers()

std::size_t pulp::midi::PeReassembler::pending_transfers ( ) const
inline

RT-safe.

Returns the in-progress transfer count; touches no heap state.

◆ push()

std::optional< PeChunk > pulp::midi::PeReassembler::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.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/midi/include/pulp/midi/midi_ci_pe.hpp