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

#include <sysex_chunk_assembler.hpp>

Public Member Functions

bool append (const std::uint8_t *data, std::size_t count)
 Append one returned buffer.
const std::vector< std::uint8_t > & message () const
std::vector< std::uint8_t > take ()
 Take the completed message and reset for the next one.
bool in_progress () const
 True while an F0 has been seen without its F7.
void reset ()

Static Public Attributes

static constexpr std::size_t kMaxMessageBytes = 1u << 20
 Longest message kept.

Member Function Documentation

◆ append()

bool pulp::midi::SysexChunkAssembler::append ( const std::uint8_t * data,
std::size_t count )
inline

Append one returned buffer.

Returns true when message() now holds a complete F0...F7 message; read it, then call take().

◆ in_progress()

bool pulp::midi::SysexChunkAssembler::in_progress ( ) const
inline

True while an F0 has been seen without its F7.

◆ message()

const std::vector< std::uint8_t > & pulp::midi::SysexChunkAssembler::message ( ) const
inline

◆ reset()

void pulp::midi::SysexChunkAssembler::reset ( )
inline

◆ take()

std::vector< std::uint8_t > pulp::midi::SysexChunkAssembler::take ( )
inline

Take the completed message and reset for the next one.

Member Data Documentation

◆ kMaxMessageBytes

std::size_t pulp::midi::SysexChunkAssembler::kMaxMessageBytes = 1u << 20
staticconstexpr

Longest message kept.

A message that outgrows it is dropped whole, up to and including its closing F7, instead of being delivered truncated.


The documentation for this class was generated from the following file: