Control Surface  1.1.0
MIDI Control Surface library for Arduino
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
USBMIDI_Parser Class Reference

#include <USBMIDI_Parser.hpp>

Inheritance diagram for USBMIDI_Parser:
Collaboration diagram for USBMIDI_Parser:

Public Member Functions

MIDI_read_t parse (uint8_t *packet)
 
SysExMessage getSysEx () const override
 Get the latest SysEx message. More...
 
uint8_t getCN () const override
 Get the cable number of the latests MIDI message. More...
 
ChannelMessage getChannelMessage ()
 Get the latest MIDI channel message. More...
 
const uint8_t * getSysExBuffer () const
 Get the pointer to the SysEx data. More...
 
size_t getSysExLength () const
 Get the length of the SysEx message. More...
 

Static Public Member Functions

static bool isStatus (uint8_t data)
 Check if the given byte is a MIDI header byte. More...
 
static bool isData (uint8_t data)
 Check if the given byte is a MIDI data byte. More...
 

Protected Member Functions

void startSysEx (uint8_t CN)
 
void endSysEx (uint8_t CN)
 
bool addSysExByte (uint8_t CN, uint8_t data)
 
bool receivingSysEx (uint8_t CN) const
 

Protected Attributes

uint8_t CN = 0
 
ChannelMessage midimsg = {}
 

Private Attributes

Array< SysExBuffer, 1 > sysexbuffers
 

Detailed Description

Definition at line 19 of file USBMIDI_Parser.hpp.

Member Function Documentation

◆ parse()

MIDI_read_t USBMIDI_Parser::parse ( uint8_t *  packet)

Definition at line 7 of file USBMIDI_Parser.cpp.

◆ getSysEx()

SysExMessage USBMIDI_Parser::getSysEx ( ) const
inlineoverridevirtual

Get the latest SysEx message.

Implements MIDI_Parser.

Definition at line 24 of file USBMIDI_Parser.hpp.

◆ getCN()

uint8_t USBMIDI_Parser::getCN ( ) const
inlineoverridevirtual

Get the cable number of the latests MIDI message.

Reimplemented from MIDI_Parser.

Definition at line 29 of file USBMIDI_Parser.hpp.

◆ startSysEx()

void USBMIDI_Parser::startSysEx ( uint8_t  CN)
inlineprotected

Definition at line 33 of file USBMIDI_Parser.hpp.

◆ endSysEx()

void USBMIDI_Parser::endSysEx ( uint8_t  CN)
inlineprotected

Definition at line 34 of file USBMIDI_Parser.hpp.

◆ addSysExByte()

bool USBMIDI_Parser::addSysExByte ( uint8_t  CN,
uint8_t  data 
)
inlineprotected

Definition at line 35 of file USBMIDI_Parser.hpp.

◆ receivingSysEx()

bool USBMIDI_Parser::receivingSysEx ( uint8_t  CN) const
inlineprotected

Definition at line 38 of file USBMIDI_Parser.hpp.

◆ getChannelMessage()

ChannelMessage MIDI_Parser::getChannelMessage ( )
inherited

Get the latest MIDI channel message.

Definition at line 17 of file MIDI_Parser.cpp.

◆ getSysExBuffer()

const uint8_t* MIDI_Parser::getSysExBuffer ( ) const
inlineinherited

Get the pointer to the SysEx data.

Definition at line 95 of file MIDI_Parser.hpp.

◆ getSysExLength()

size_t MIDI_Parser::getSysExLength ( ) const
inlineinherited

Get the length of the SysEx message.

Definition at line 97 of file MIDI_Parser.hpp.

◆ isStatus()

bool MIDI_Parser::isStatus ( uint8_t  data)
staticinherited

Check if the given byte is a MIDI header byte.

Definition at line 11 of file MIDI_Parser.cpp.

◆ isData()

bool MIDI_Parser::isData ( uint8_t  data)
staticinherited

Check if the given byte is a MIDI data byte.

Definition at line 15 of file MIDI_Parser.cpp.

Member Data Documentation

◆ CN

uint8_t USBMIDI_Parser::CN = 0
protected

Definition at line 43 of file USBMIDI_Parser.hpp.

◆ sysexbuffers

Array<SysExBuffer, 1 > USBMIDI_Parser::sysexbuffers
private

Definition at line 47 of file USBMIDI_Parser.hpp.

◆ midimsg

ChannelMessage MIDI_Parser::midimsg = {}
protectedinherited

Definition at line 102 of file MIDI_Parser.hpp.


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