Control Surface  1.2.0
MIDI Control Surface library for Arduino
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Attributes | List of all members
MIDI_Interface Class Referenceabstract

An abstract class for MIDI interfaces. More...

#include <MIDI_Interfaces/MIDI_Interface.hpp>

+ Inheritance diagram for MIDI_Interface:
+ Collaboration diagram for MIDI_Interface:

Public Types

using Mutex = typename std::conditional< ThreadSafe, DefaultMutEx, EmptyMutex >::type
 
using LockGuard = typename std::conditional< ThreadSafe, DefaultLockGuard< Mutex >, EmptyLockGuard< Mutex > >::type
 

Public Member Functions

virtual ~MIDI_Interface ()
 Destructor. More...
 
void begin () override
 Initialize the MIDI Interface. More...
 
void update () override=0
 Read the MIDI interface and call the callback if a message is received. More...
 

Static Public Member Functions

static MutexgetMutex ()
 

Protected Member Functions

 MIDI_Interface ()=default
 Constructor. More...
 
 MIDI_Interface (MIDI_Interface &&)=default
 
virtual void sendImpl (uint8_t header, uint8_t d1, uint8_t d2, uint8_t cn)=0
 Low-level function for sending a 3-byte MIDI message. More...
 
virtual void sendImpl (uint8_t header, uint8_t d1, uint8_t cn)=0
 Low-level function for sending a 2-byte MIDI message. More...
 
virtual void sendImpl (const uint8_t *data, size_t length, uint8_t cn)=0
 Low-level function for sending a system exclusive MIDI message. More...
 
virtual void sendImpl (uint8_t rt, uint8_t cn)=0
 Low-level function for sending a single-byte MIDI message. More...
 
void sinkMIDIfromPipe (ChannelMessage) override
 Accept an incoming MIDI Channel message. More...
 
void sinkMIDIfromPipe (SysExMessage) override
 Accept an incoming MIDI System Exclusive message. More...
 
void sinkMIDIfromPipe (RealTimeMessage) override
 Accept an incoming MIDI Real-Time message. More...
 

Protected Attributes

MIDI_PipesourcePipe = nullptr
 
MIDI_PipesinkPipe = nullptr
 
Updatable< MIDI_Interface, false > * next
 
Updatable< MIDI_Interface, false > * previous
 

Static Protected Attributes

static DoublyLinkedList< Updatable< MIDI_Interface, false > > updatables
 
static Mutex mutex
 

Private Member Functions

virtual void lockDownstream (cn_t cn, bool lock)
 Base case for recursive lock function. More...
 
virtual MIDI_SinkgetFinalSink ()
 Base case for recursive function. More...
 
void disconnectSourcePipesShallow ()
 Disconnect only the first pipe connected to this sink. More...
 
virtual MIDI_SourcegetInitialSource ()
 Base case for recursive function. More...
 
void disconnectSinkPipesShallow ()
 Disconnect only the first pipe connected to this source. More...
 

Static Private Attributes

static MIDI_InterfaceDefaultMIDI_Interface = nullptr
 

Main initialization and updating methods

static void applyToAll (const LockGuard &, void(Derived::*method)(Args &&...), Args &&... args)
 
static void applyToAll (void(Derived::*method)(Args &&...), Args &&... args)
 

Enabling and disabling updatables

void enable (const LockGuard &lock)
 Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
 
void enable ()
 Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
 
void disable (const LockGuard &lock)
 Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
 
void disable ()
 Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
 
bool isEnabled (const LockGuard &) const
 Check if this updatable is enabled. More...
 
bool isEnabled ()
 Check if this updatable is enabled. More...
 
void moveDown (const LockGuard &)
 Move down this element in the list. More...
 
void moveDown ()
 Move down this element in the list. More...
 
static void enable (UpdatableCRTP *element)
 Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
 
static void enable (UpdatableCRTP &element)
 Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
 
static void enable (U(&array)[N])
 Enable this updatable: insert it into the linked list of instances, so it gets updated automatically. More...
 
static void disable (UpdatableCRTP *element)
 Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
 
static void disable (UpdatableCRTP &element)
 Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
 
static void disable (U(&array)[N])
 Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically. More...
 

Main initialization and updating methods

static void beginAll ()
 Begin all enabled instances of this class. More...
 
static void updateAll ()
 Update all enabled instances of this class. More...
 

Sending MIDI

void send (MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable=CABLE_1)
 Send a 3-byte MIDI packet. More...
 
void send (MIDIMessageType m, Channel c, uint8_t d1, Cable cable=CABLE_1)
 Send a 2-byte MIDI packet. More...
 
void send (ChannelMessage message)
 Send a MIDI Channel Message. More...
 
void send (SysExMessage message)
 Send a MIDI System Exclusive message. More...
 
void send (const uint8_t(&sysexdata)[N], Cable cable=CABLE_1)
 Send a MIDI System Exclusive message. More...
 
void send (RealTimeMessage message)
 Send a MIDI Real-Time message. More...
 
void send (MIDIMessageType rt, Cable cable=CABLE_1)
 Send a single-byte MIDI message. More...
 
void sendOnCable (MIDIMessageType m, Channel c, uint8_t d1, uint8_t d2, Cable cable)
 Send a 3-byte MIDI packet with cable number. More...
 
void sendOnCable (MIDIMessageType m, Channel c, uint8_t d1, Cable cable)
 Send a 2-byte MIDI packet with cable number. More...
 
void sendOnCable (MIDIMessageType rt, Cable cable)
 Send a single-byte MIDI packet with cable number. More...
 
void sendNoteOn (MIDIAddress address, uint8_t velocity)
 Send a MIDI Note On event. More...
 
void sendNoteOff (MIDIAddress address, uint8_t velocity)
 Send a MIDI Note Off event. More...
 
void sendKP (MIDIAddress address, uint8_t pressure)
 Send a MIDI Key Pressure event. More...
 
void sendCC (MIDIAddress address, uint8_t value)
 Send a MIDI Control Change event. More...
 
void sendPC (MIDIAddress address)
 Send a MIDI Program Change event. More...
 
void sendPC (MIDIChannelCN address, uint8_t value)
 Send a MIDI Program Change event. More...
 
void sendCP (MIDIChannelCN address, uint8_t pressure)
 Send a MIDI Channel Pressure event. More...
 
void sendPB (MIDIChannelCN address, uint16_t value)
 Send a MIDI Pitch Bend event. More...
 

Default MIDI Interfaces

void setAsDefault ()
 Set this MIDI interface as the default interface. More...
 
static MIDI_InterfacegetDefault ()
 Return the default MIDI interface. More...
 

MIDI Input Callbacks

virtual void setCallbacks (MIDI_Callbacks *cb)=0
 Set the callbacks that will be called when a MIDI message is received. More...
 
void setCallbacks (MIDI_Callbacks &cb)
 Set the callbacks that will be called when a MIDI message is received. More...
 

Connecting and disconnecting MIDI Pipes

void connectSourcePipe (MIDI_Pipe *source)
 Fully connect a source pipe to this sink. More...
 
void disconnectSourcePipes ()
 Disconnect all source pipes that sink to this sink (recursively). More...
 
bool disconnect (TrueMIDI_Source &source)
 Disconnect the given source from this sink. More...
 
bool hasSourcePipe () const
 Check if this sink is connected to a source pipe. More...
 

Sending data over a MIDI Pipe

void sourceMIDItoPipe (ChannelMessage)
 Send a MIDI Channel Message. More...
 
void sourceMIDItoPipe (SysExMessage)
 Send a MIDI System Exclusive message. More...
 
void sourceMIDItoPipe (RealTimeMessage)
 Send a MIDI Real-Time message. More...
 
void exclusive (cn_t cn, bool exclusive=true)
 Enter or exit exclusive mode for the given cable number. More...
 
bool canWrite (cn_t cn) const
 Check if this source can write to the sinks it connects to. More...
 

Connecting and disconnecting MIDI Pipes

bool disconnect (TrueMIDI_Sink &sink)
 Disconnect the given sink from this source. More...
 
void connectSinkPipe (MIDI_Pipe *sink)
 Fully connect a sink pipe to this source. More...
 
void disconnectSinkPipes ()
 Disconnect all sink pipes that this source sinks to (recursively). More...
 
bool hasSinkPipe () const
 Check if this source is connected to a sink pipe. More...
 

Detailed Description

An abstract class for MIDI interfaces.

Definition at line 132 of file MIDI_Interface.hpp.

Member Typedef Documentation

◆ Mutex

using Mutex = typename std::conditional<ThreadSafe, DefaultMutEx, EmptyMutex>::type
inherited

Definition at line 36 of file Updatable.hpp.

◆ LockGuard

using LockGuard = typename std::conditional<ThreadSafe, DefaultLockGuard<Mutex>, EmptyLockGuard<Mutex> >::type
inherited

Definition at line 38 of file Updatable.hpp.

Constructor & Destructor Documentation

◆ MIDI_Interface() [1/2]

MIDI_Interface ( )
protecteddefault

Constructor.

◆ MIDI_Interface() [2/2]

MIDI_Interface ( MIDI_Interface &&  )
protecteddefault

◆ ~MIDI_Interface()

~MIDI_Interface ( )
virtual

Destructor.

Definition at line 5 of file MIDI_Interface.cpp.

Member Function Documentation

◆ begin()

void begin ( )
inlineoverridevirtual

◆ update()

void update ( )
overridepure virtual

Read the MIDI interface and call the callback if a message is received.

Implements Updatable< MIDI_Interface >.

Implemented in Parsing_MIDI_Interface, and BluetoothMIDI_Interface.

◆ getDefault()

MIDI_Interface * getDefault ( )
static

Return the default MIDI interface.

Definition at line 14 of file MIDI_Interface.cpp.

◆ setAsDefault()

void setAsDefault ( )

Set this MIDI interface as the default interface.

Definition at line 12 of file MIDI_Interface.cpp.

◆ setCallbacks() [1/2]

virtual void setCallbacks ( MIDI_Callbacks cb)
pure virtual

Set the callbacks that will be called when a MIDI message is received.

Parameters
cbA pointer to an object that implements the MIDI_Callbacks class.

Implemented in Parsing_MIDI_Interface.

◆ setCallbacks() [2/2]

void setCallbacks ( MIDI_Callbacks cb)
inline

Set the callbacks that will be called when a MIDI message is received.

Parameters
cbA reference to an object that implements the MIDI_Callbacks class.

Definition at line 192 of file MIDI_Interface.hpp.

◆ sendImpl() [1/4]

virtual void sendImpl ( uint8_t  header,
uint8_t  d1,
uint8_t  d2,
uint8_t  cn 
)
protectedpure virtual

◆ sendImpl() [2/4]

virtual void sendImpl ( uint8_t  header,
uint8_t  d1,
uint8_t  cn 
)
protectedpure virtual

◆ sendImpl() [3/4]

virtual void sendImpl ( const uint8_t *  data,
size_t  length,
uint8_t  cn 
)
protectedpure virtual

Low-level function for sending a system exclusive MIDI message.

Implemented in USBMIDI_Interface, StreamMIDI_Interface, StreamDebugMIDI_Interface, BluetoothMIDI_Interface, and FortySevenEffectsMIDI_Interface< MidiInterface >.

◆ sendImpl() [4/4]

virtual void sendImpl ( uint8_t  rt,
uint8_t  cn 
)
protectedpure virtual

Low-level function for sending a single-byte MIDI message.

Implemented in FortySevenEffectsMIDI_Interface< MidiInterface >, USBMIDI_Interface, StreamMIDI_Interface, StreamDebugMIDI_Interface, and BluetoothMIDI_Interface.

◆ sinkMIDIfromPipe() [1/3]

void sinkMIDIfromPipe ( ChannelMessage  msg)
overrideprotectedvirtual

Accept an incoming MIDI Channel message.

Implements MIDI_Sink.

Definition at line 28 of file MIDI_Interface.cpp.

◆ sinkMIDIfromPipe() [2/3]

void sinkMIDIfromPipe ( SysExMessage  msg)
overrideprotectedvirtual

Accept an incoming MIDI System Exclusive message.

Implements MIDI_Sink.

Definition at line 29 of file MIDI_Interface.cpp.

◆ sinkMIDIfromPipe() [3/3]

void sinkMIDIfromPipe ( RealTimeMessage  msg)
overrideprotectedvirtual

Accept an incoming MIDI Real-Time message.

Implements MIDI_Sink.

Definition at line 30 of file MIDI_Interface.cpp.

◆ connectSourcePipe()

void connectSourcePipe ( MIDI_Pipe source)
inherited

Fully connect a source pipe to this sink.

Definition at line 15 of file MIDI_Pipes.cpp.

◆ disconnectSourcePipes()

void disconnectSourcePipes ( )
inherited

Disconnect all source pipes that sink to this sink (recursively).

Definition at line 24 of file MIDI_Pipes.cpp.

◆ disconnect() [1/2]

bool disconnect ( TrueMIDI_Source source)
inherited

Disconnect the given source from this sink.

Leaves other sources connected. Returns true if the source was found and disconnected, false if the given source was not a direct or indirect source to this sink.

Definition at line 39 of file MIDI_Pipes.cpp.

◆ disconnect() [2/2]

bool disconnect ( TrueMIDI_Sink sink)
inherited

Disconnect the given sink from this source.

Leaves other sinks connected. Returns true if the sink was found and disconnected, false if the given sink was not a direct or indirect sink of this source.

Definition at line 94 of file MIDI_Pipes.cpp.

◆ hasSourcePipe()

bool hasSourcePipe ( ) const
inlineinherited

Check if this sink is connected to a source pipe.

Definition at line 94 of file MIDI_Pipes.hpp.

◆ lockDownstream()

virtual void lockDownstream ( cn_t  cn,
bool  lock 
)
inlineprivatevirtualinherited

Base case for recursive lock function.

See also
MIDI_Pipe::lockDownstream

Reimplemented in MIDI_Pipe.

Definition at line 105 of file MIDI_Pipes.hpp.

◆ getFinalSink()

virtual MIDI_Sink* getFinalSink ( )
inlineprivatevirtualinherited

Base case for recursive function.

See also
MIDI_Pipe::getFinalSink

Reimplemented in MIDI_Pipe.

Definition at line 108 of file MIDI_Pipes.hpp.

◆ disconnectSourcePipesShallow()

void disconnectSourcePipesShallow ( )
privateinherited

Disconnect only the first pipe connected to this sink.

Leaves the other pipes connected to the original pipe, which doesn't have a sink anymore when this function finishes. Used to disconnect a MIDI_Pipe while preserving the connections of its "through" inputs.

Definition at line 32 of file MIDI_Pipes.cpp.

◆ sourceMIDItoPipe() [1/3]

void sourceMIDItoPipe ( ChannelMessage  msg)
inherited

Send a MIDI Channel Message.

Definition at line 132 of file MIDI_Pipes.cpp.

◆ sourceMIDItoPipe() [2/3]

void sourceMIDItoPipe ( SysExMessage  msg)
inherited

Send a MIDI System Exclusive message.

Definition at line 137 of file MIDI_Pipes.cpp.

◆ sourceMIDItoPipe() [3/3]

void sourceMIDItoPipe ( RealTimeMessage  msg)
inherited

Send a MIDI Real-Time message.

Definition at line 142 of file MIDI_Pipes.cpp.

◆ exclusive()

void exclusive ( cn_t  cn,
bool  exclusive = true 
)
inherited

Enter or exit exclusive mode for the given cable number.

This means that this becomes the only source that can sink to the sinks connected to this source. Other sources have to wait until this source exits exclusive mode until they can send again.

Parameters
cnCable number to set the exclusive mode for [0, 15].
exclusiveTrue to enable exclusive mode, false to disable.

Definition at line 123 of file MIDI_Pipes.cpp.

◆ canWrite()

bool canWrite ( cn_t  cn) const
inherited

Check if this source can write to the sinks it connects to.

Returns false if any of the sinks have another source that is in exclusive mode.

Parameters
cnCable number to check [0, 15].

Definition at line 128 of file MIDI_Pipes.cpp.

◆ connectSinkPipe()

void connectSinkPipe ( MIDI_Pipe sink)
inherited

Fully connect a sink pipe to this source.

Definition at line 70 of file MIDI_Pipes.cpp.

◆ disconnectSinkPipes()

void disconnectSinkPipes ( )
inherited

Disconnect all sink pipes that this source sinks to (recursively).

Definition at line 79 of file MIDI_Pipes.cpp.

◆ hasSinkPipe()

bool hasSinkPipe ( ) const
inlineinherited

Check if this source is connected to a sink pipe.

Definition at line 189 of file MIDI_Pipes.hpp.

◆ getInitialSource()

virtual MIDI_Source* getInitialSource ( )
inlineprivatevirtualinherited

Base case for recursive function.

See also
MIDI_Pipe::getInitialSource

Reimplemented in MIDI_Pipe.

Definition at line 200 of file MIDI_Pipes.hpp.

◆ disconnectSinkPipesShallow()

void disconnectSinkPipesShallow ( )
privateinherited

Disconnect only the first pipe connected to this source.

Leaves the other pipes connected to the original pipe, which doesn't have a source anymore when this function finishes. Used to disconnect a MIDI_Pipe while preserving the connections of its "through" outputs.

Definition at line 87 of file MIDI_Pipes.cpp.

◆ send() [1/7]

void send ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
uint8_t  d2,
Cable  cable = CABLE_1 
)
inherited

Send a 3-byte MIDI packet.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
d2The second data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]
Examples
SysEx-Send-Receive.ino.

Definition at line 38 of file MIDI_Interface.ipp.

◆ send() [2/7]

void send ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
Cable  cable = CABLE_1 
)
inherited

Send a 2-byte MIDI packet.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 53 of file MIDI_Interface.ipp.

◆ send() [3/7]

void send ( ChannelMessage  message)
inherited

Send a MIDI Channel Message.

Definition at line 113 of file MIDI_Interface.ipp.

◆ send() [4/7]

void send ( SysExMessage  message)
inherited

Send a MIDI System Exclusive message.

Definition at line 115 of file MIDI_Interface.ipp.

◆ send() [5/7]

void send ( const uint8_t(&)  sysexdata[N],
Cable  cable = CABLE_1 
)
inlineinherited

Send a MIDI System Exclusive message.

Definition at line 118 of file MIDI_Interface.hpp.

◆ send() [6/7]

void send ( RealTimeMessage  message)
inherited

Send a MIDI Real-Time message.

Definition at line 122 of file MIDI_Interface.ipp.

◆ send() [7/7]

void send ( MIDIMessageType  rt,
Cable  cable = CABLE_1 
)
inherited

Send a single-byte MIDI message.

Definition at line 124 of file MIDI_Interface.ipp.

◆ sendOnCable() [1/3]

void sendOnCable ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
uint8_t  d2,
Cable  cable 
)
inherited

Send a 3-byte MIDI packet with cable number.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
d2The second data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 69 of file MIDI_Interface.ipp.

◆ sendOnCable() [2/3]

void sendOnCable ( MIDIMessageType  m,
Channel  c,
uint8_t  d1,
Cable  cable 
)
inherited

Send a 2-byte MIDI packet with cable number.

Parameters
mMIDI message type. [0x80, 0xE0]
cThe MIDI channel. [1, 16]
d1The first data byte. [0, 127]
cableThe MIDI Cable Number. [1, 16]

Definition at line 84 of file MIDI_Interface.ipp.

◆ sendOnCable() [3/3]

void sendOnCable ( MIDIMessageType  rt,
Cable  cable 
)
inherited

Send a single-byte MIDI packet with cable number.

Parameters
rtThe MIDI byte to send.
cableThe MIDI Cable Number. [1, 16]

Definition at line 94 of file MIDI_Interface.ipp.

◆ sendNoteOn()

void sendNoteOn ( MIDIAddress  address,
uint8_t  velocity 
)
inherited

Send a MIDI Note On event.

Examples
MIDI-Output.ino, and Send-MIDI-Notes.ino.

Definition at line 97 of file MIDI_Interface.ipp.

◆ sendNoteOff()

void sendNoteOff ( MIDIAddress  address,
uint8_t  velocity 
)
inherited

Send a MIDI Note Off event.

Examples
MIDI-Output.ino, and Send-MIDI-Notes.ino.

Definition at line 99 of file MIDI_Interface.ipp.

◆ sendKP()

void sendKP ( MIDIAddress  address,
uint8_t  pressure 
)
inherited

Send a MIDI Key Pressure event.

Definition at line 101 of file MIDI_Interface.ipp.

◆ sendCC()

void sendCC ( MIDIAddress  address,
uint8_t  value 
)
inherited

Send a MIDI Control Change event.

Definition at line 103 of file MIDI_Interface.ipp.

◆ sendPC() [1/2]

void sendPC ( MIDIAddress  address)
inherited

Send a MIDI Program Change event.

Definition at line 105 of file MIDI_Interface.ipp.

◆ sendPC() [2/2]

void sendPC ( MIDIChannelCN  address,
uint8_t  value 
)
inherited

Send a MIDI Program Change event.

Definition at line 107 of file MIDI_Interface.ipp.

◆ sendCP()

void sendCP ( MIDIChannelCN  address,
uint8_t  pressure 
)
inherited

Send a MIDI Channel Pressure event.

Definition at line 109 of file MIDI_Interface.ipp.

◆ sendPB()

void sendPB ( MIDIChannelCN  address,
uint16_t  value 
)
inherited

Send a MIDI Pitch Bend event.

Definition at line 111 of file MIDI_Interface.ipp.

◆ beginAll()

static void beginAll ( )
inlinestaticinherited

Begin all enabled instances of this class.

See also
begin()

Definition at line 208 of file Updatable.hpp.

◆ updateAll()

static void updateAll ( )
inlinestaticinherited

Update all enabled instances of this class.

See also
update()

Definition at line 212 of file Updatable.hpp.

◆ getMutex()

static Mutex& getMutex ( )
inlinestaticinherited

Definition at line 79 of file Updatable.hpp.

◆ applyToAll() [1/2]

static void applyToAll ( const LockGuard ,
void(Derived::*)(Args &&...)  method,
Args &&...  args 
)
inlinestaticinherited

Definition at line 85 of file Updatable.hpp.

◆ applyToAll() [2/2]

static void applyToAll ( void(Derived::*)(Args &&...)  method,
Args &&...  args 
)
inlinestaticinherited

Definition at line 93 of file Updatable.hpp.

◆ enable() [1/5]

void enable ( const LockGuard lock)
inlineinherited

Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.

Definition at line 106 of file Updatable.hpp.

◆ enable() [2/5]

void enable ( )
inlineinherited

Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.

Definition at line 115 of file Updatable.hpp.

◆ enable() [3/5]

static void enable ( UpdatableCRTP< Updatable< MIDI_Interface, false >, false > *  element)
inlinestaticinherited

Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.

Definition at line 144 of file Updatable.hpp.

◆ enable() [4/5]

static void enable ( UpdatableCRTP< Updatable< MIDI_Interface, false >, false > &  element)
inlinestaticinherited

Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.

Definition at line 146 of file Updatable.hpp.

◆ enable() [5/5]

static void enable ( U(&)  array[N])
inlinestaticinherited

Enable this updatable: insert it into the linked list of instances, so it gets updated automatically.

Definition at line 149 of file Updatable.hpp.

◆ disable() [1/5]

void disable ( const LockGuard lock)
inlineinherited

Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.

Definition at line 119 of file Updatable.hpp.

◆ disable() [2/5]

void disable ( )
inlineinherited

Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.

Definition at line 128 of file Updatable.hpp.

◆ disable() [3/5]

static void disable ( UpdatableCRTP< Updatable< MIDI_Interface, false >, false > *  element)
inlinestaticinherited

Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.

Definition at line 155 of file Updatable.hpp.

◆ disable() [4/5]

static void disable ( UpdatableCRTP< Updatable< MIDI_Interface, false >, false > &  element)
inlinestaticinherited

Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.

Definition at line 157 of file Updatable.hpp.

◆ disable() [5/5]

static void disable ( U(&)  array[N])
inlinestaticinherited

Disable this updatable: remove it from the linked list of instances, so it no longer gets updated automatically.

Definition at line 160 of file Updatable.hpp.

◆ isEnabled() [1/2]

bool isEnabled ( const LockGuard ) const
inlineinherited

Check if this updatable is enabled.

Note
Assumes that the updatable is not added to a different linked list by the user.

Definition at line 136 of file Updatable.hpp.

◆ isEnabled() [2/2]

bool isEnabled ( )
inlineinherited

Check if this updatable is enabled.

Note
Assumes that the updatable is not added to a different linked list by the user.

Definition at line 141 of file Updatable.hpp.

◆ moveDown() [1/2]

void moveDown ( const LockGuard )
inlineinherited

Move down this element in the list.

Definition at line 166 of file Updatable.hpp.

◆ moveDown() [2/2]

void moveDown ( )
inlineinherited

Move down this element in the list.

Definition at line 168 of file Updatable.hpp.

Member Data Documentation

◆ DefaultMIDI_Interface

MIDI_Interface * DefaultMIDI_Interface = nullptr
staticprivate

Definition at line 226 of file MIDI_Interface.hpp.

◆ sourcePipe

MIDI_Pipe* sourcePipe = nullptr
protectedinherited

Definition at line 117 of file MIDI_Pipes.hpp.

◆ sinkPipe

MIDI_Pipe* sinkPipe = nullptr
protectedinherited

Definition at line 209 of file MIDI_Pipes.hpp.

◆ updatables

DoublyLinkedList< Updatable< MIDI_Interface, false > > updatables
staticprotectedinherited

Definition at line 173 of file Updatable.hpp.

◆ mutex

UpdatableCRTP< Updatable< MIDI_Interface, false > , ThreadSafe >::Mutex mutex
staticprotectedinherited

Definition at line 174 of file Updatable.hpp.

◆ next

Updatable< MIDI_Interface, false > * next
protectedinherited

Definition at line 323 of file LinkedList.hpp.

◆ previous

Updatable< MIDI_Interface, false > * previous
protectedinherited

Definition at line 324 of file LinkedList.hpp.


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