#include <Def/Cable.hpp>
A type-safe class for MIDI USB Cable numbers.
- Examples
- MIDI-Input-Fine-Grained-All-Callbacks.ino, and MIDI-Input-Fine-Grained.ino.
Definition at line 13 of file Cable.hpp.
◆ Cable()
constexpr Cable |
( |
uint8_t | zeroBasedCable | ) |
|
|
inlineexplicitconstexpr |
Create a MIDI Cable object.
- Parameters
-
zeroBasedCable | The zero-based cable (0 is the first cable). |
Definition at line 21 of file Cable.hpp.
◆ getRaw()
constexpr uint8_t getRaw |
( |
| ) |
const |
|
inlineconstexpr |
Get the cable as an integer.
- Returns
- The zero-based cable (0 is the first cable).
Definition at line 29 of file Cable.hpp.
◆ getOneBased()
constexpr uint8_t getOneBased |
( |
| ) |
const |
|
inlineconstexpr |
◆ createCable()
static constexpr Cable createCable |
( |
uint8_t | oneBasedCable | ) |
|
|
inlinestaticconstexpr |
Create a cable.
- Parameters
-
oneBasedCable | The cable number (1 is the first cable). |
Definition at line 44 of file Cable.hpp.
◆ operator==()
constexpr bool operator== |
( |
const Cable & | rhs | ) |
const |
|
inlineconstexpr |
Check if two cables are the same.
- Parameters
-
rhs | The other cable to compare this cable to. |
Definition at line 54 of file Cable.hpp.
◆ operator!=()
constexpr bool operator!= |
( |
const Cable & | rhs | ) |
const |
|
inlineconstexpr |
Check if two cables are the different.
- Parameters
-
rhs | The other cable to compare this cable to. |
Definition at line 64 of file Cable.hpp.
◆ operator+=()
Cable & operator+= |
( |
uint8_t | rhs | ) |
|
|
inline |
Add an offset.
- Parameters
-
rhs | The offset to add to this cable. |
Definition at line 74 of file Cable.hpp.
◆ operator+()
Cable operator+ |
( |
uint8_t | rhs | ) |
const |
|
inline |
Add an offset to a cable.
- Parameters
-
rhs | The offset to add to the cable. |
Definition at line 85 of file Cable.hpp.
◆ operator-=()
Cable & operator-= |
( |
uint8_t | rhs | ) |
|
|
inline |
Subtract an offset.
- Parameters
-
rhs | The offset to subtract from this cable. |
Definition at line 97 of file Cable.hpp.
◆ operator-()
Cable operator- |
( |
uint8_t | rhs | ) |
const |
|
inline |
Subtract an offset from a cable.
- Parameters
-
rhs | The offset to subtract from the cable. |
Definition at line 108 of file Cable.hpp.
◆ zeroBasedCable
The documentation for this class was generated from the following file: