#include <MIDI_Parsers/SysExBuffer.hpp>
Helper for storing the System Exclusive messages being received by a MIDI parser.
Definition at line 13 of file SysExBuffer.hpp.
Public Member Functions | |
void | start () |
Start a new SysEx message. | |
void | end () |
Finish the current SysEx message. | |
void | add (uint8_t data) |
Add a byte to the current SysEx message. | |
void | add (const uint8_t *data, uint8_t len) |
Add multiple bytes to the current SysEx message. | |
bool | hasSpaceLeft (uint8_t amount=1) const |
Check if the buffer has at least amount bytes of free space available. | |
bool | isReceiving () const |
Check if the buffer is receiving a SysEx message. | |
const uint8_t * | getBuffer () const |
Get a pointer to the buffer. | |
uint16_t | getLength () const |
Get the length of the SysEx message in the buffer. | |
Private Attributes | |
uint8_t | buffer [SYSEX_BUFFER_SIZE] |
uint16_t | length = 0 |
bool | receiving = false |
void start | ( | ) |
Start a new SysEx message.
Definition at line 6 of file SysExBuffer.cpp.
void end | ( | ) |
Finish the current SysEx message.
Definition at line 11 of file SysExBuffer.cpp.
Add a byte to the current SysEx message.
Definition at line 13 of file SysExBuffer.cpp.
Add multiple bytes to the current SysEx message.
Definition at line 18 of file SysExBuffer.cpp.
Check if the buffer has at least amount
bytes of free space available.
Definition at line 23 of file SysExBuffer.cpp.
bool isReceiving | ( | ) | const |
Check if the buffer is receiving a SysEx message.
Definition at line 30 of file SysExBuffer.cpp.
Get a pointer to the buffer.
Definition at line 32 of file SysExBuffer.cpp.
uint16_t getLength | ( | ) | const |
Get the length of the SysEx message in the buffer.
Definition at line 34 of file SysExBuffer.cpp.
|
private |
Definition at line 15 of file SysExBuffer.hpp.
|
private |
Definition at line 16 of file SysExBuffer.hpp.
Definition at line 17 of file SysExBuffer.hpp.