#include <MIDI_Interfaces/BLEMIDI/BufferedBLEMIDIParser.hpp>
FIFO buffer that you can push BLE packets into, and pop MIDI messages out of.
If SizeT
is chosen to be atomic, one thread can push packets, and another thread can pop MIDI messages, without additional synchronization.
Definition at line 16 of file BufferedBLEMIDIParser.hpp.
Public Types | |
using | IncomingMIDIMessage = AnyMIDIMessage |
Public Member Functions | |
bool | pushPacket (BLEDataView packet, BLEDataType type=BLEDataType::Packet) |
Add a new BLE packet or chunk to the buffer. | |
bool | popMessage (IncomingMIDIMessage &incomingMessage) |
Retrieve and remove a single incoming MIDI message from the buffer. | |
Private Attributes | |
BLERingBuf< Capacity, SizeT > | ble_buffer {} |
Contains incoming data to be parsed. | |
BLEMIDIParser | ble_parser {nullptr, 0} |
Parses the (chunked) BLE packet obtained from ble_buffer. | |
SerialMIDI_Parser | parser {false} |
Parser for MIDI data extracted from the BLE packet by ble_parser. | |
using IncomingMIDIMessage = AnyMIDIMessage |
Definition at line 26 of file BufferedBLEMIDIParser.hpp.
|
inline |
Add a new BLE packet or chunk to the buffer.
Definition at line 29 of file BufferedBLEMIDIParser.hpp.
|
inline |
Retrieve and remove a single incoming MIDI message from the buffer.
Definition at line 35 of file BufferedBLEMIDIParser.hpp.
|
private |
Contains incoming data to be parsed.
Definition at line 19 of file BufferedBLEMIDIParser.hpp.
|
private |
Parses the (chunked) BLE packet obtained from ble_buffer.
Definition at line 21 of file BufferedBLEMIDIParser.hpp.
|
private |
Parser for MIDI data extracted from the BLE packet by ble_parser.
Definition at line 23 of file BufferedBLEMIDIParser.hpp.