3#include <Settings/NamespaceSettings.hpp>
15template <u
int16_t Capacity,
class SizeT = NonatomicBLERingBufSize<u
int16_t>>
BLEDataType
Describes a byte buffer containing (part of) a BLE packet.
@ None
No buffers available.
@ Continuation
Buffer contains a chunk of a BLE packet.
@ Packet
Buffer contains the start of a BLE packet.
MIDIReadEvent
Values returned by the MIDI reading functions.
@ CHANNEL_MESSAGE
A MIDI Channel message was received.
@ SYSEX_CHUNK
An incomplete System Exclusive message.
@ SYSCOMMON_MESSAGE
A MIDI System Common message was received.
@ NO_MESSAGE
No new messages were received.
@ SYSEX_MESSAGE
A MIDI System Exclusive message was received.
@ REALTIME_MESSAGE
A MIDI Real-Time message was received.
#define BEGIN_CS_NAMESPACE
Class for parsing BLE-MIDI packets.
void extend(const uint8_t *data, size_t length)
Extend the BLE packet with the given buffer.
uint16_t getTimestamp() const
Circular FIFO buffer for buffering BLE packet data.
FIFO buffer that you can push BLE packets into, and pop MIDI messages out of.
bool pushPacket(BLEDataView packet, BLEDataType type=BLEDataType::Packet)
Add a new BLE packet or chunk to the buffer.
BLEMIDIParser ble_parser
Parses the (chunked) BLE packet obtained from ble_buffer.
bool popMessage(IncomingMIDIMessage &incomingMessage)
Retrieve and remove a single incoming MIDI message from the buffer.
BLERingBuf< Capacity, SizeT > ble_buffer
Contains incoming data to be parsed.
SerialMIDI_Parser parser
Parser for MIDI data extracted from the BLE packet by ble_parser.
ChannelMessage getChannelMessage() const
Get the latest MIDI channel voice message.
RealTimeMessage getRealTimeMessage() const
Get the latest MIDI real-time message.
SysCommonMessage getSysCommonMessage() const
Get the latest MIDI system common message.
Parser for Serial MIDI streams (and BLE-MIDI).
MIDIReadEvent pull(BytePuller &&puller)
Parse one incoming MIDI message.
SysExMessage getSysExMessage() const
Get the latest SysEx message.
MIDI message variant type (with timestamp).
Non-owning, std::span-style read-only view of BLE data.