This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
SysExBuffer.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
6 
7 class SysExBuffer {
8  private:
10  size_t SysExLength = 0;
11  bool receiving = false;
12 
13  public:
15  void start();
17  void end();
19  bool add(uint8_t data);
21  bool hasSpaceLeft() const;
23  bool isReceiving() const;
25  const uint8_t *getBuffer() const;
27  size_t getLength() const;
28 };
29 
SysExBuffer::add
bool add(uint8_t data)
Add a byte to the current SysEx message.
Definition: SysExBuffer.cpp:16
SysExBuffer::getLength
size_t getLength() const
Get the length of the SysEx message in the buffer.
Definition: SysExBuffer.cpp:35
SysExBuffer::isReceiving
bool isReceiving() const
Check if the buffer is receiving a SysEx message.
Definition: SysExBuffer.cpp:31
SysExBuffer::SysExLength
size_t SysExLength
Definition: SysExBuffer.hpp:10
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: NamespaceSettings.hpp:9
SysExBuffer::receiving
bool receiving
Definition: SysExBuffer.hpp:11
SysExBuffer
Definition: SysExBuffer.hpp:7
SysExBuffer::getBuffer
const uint8_t * getBuffer() const
Get a pointer to the buffer.
Definition: SysExBuffer.cpp:33
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: NamespaceSettings.hpp:10
SysExBuffer::hasSpaceLeft
bool hasSpaceLeft() const
Check if the buffer has at least 1 byte of free space available.
Definition: SysExBuffer.cpp:24
SysExBuffer::start
void start()
Start a new SysEx message.
Definition: SysExBuffer.cpp:5
SYSEX_BUFFER_SIZE
constexpr size_t SYSEX_BUFFER_SIZE
The length of the maximum System Exclusive message that can be received.
Definition: Settings.hpp:105
SysExBuffer::end
void end()
Finish the current SysEx message.
Definition: SysExBuffer.cpp:11
SettingsWrapper.hpp