#include <MIDI_Interfaces/BLEMIDI/ArduinoBLEBackend.hpp>
ArduinoBLE backend intended to be plugged into GenericBLEMIDI_Interface.
Definition at line 14 of file ArduinoBLEBackend.hpp.
|
| bool | popMessage (IncomingMIDIMessage &incomingMessage) |
| | Retrieve and remove a single incoming MIDI message from the buffer.
|
| |
| void | begin (BLESettings ble_settings) |
| | Initialize the BLE stack etc.
|
| |
| void | end () |
| | Deinitialize the BLE stack.
|
| |
| bool | isConnected () const |
| | Returns true if we are connected to a BLE Central device.
|
| |
|
| bool | connected = false |
| | Are we connected to a BLE Central?
|
| |
| bool | subscribed = false |
| | Did the BLE Central subscribe to be notified for the MIDI characteristic?
|
| |
| BufferedBLEMIDIParser< 1024 > | parser |
| | Contains incoming BLE MIDI data to be parsed.
|
| |
| friend | Sender |
| |
| BLEMIDIPacketBuilder | packet |
| | View of the data to send.
|
| |
| unsigned long | timeout |
| | Timeout before the sender thread sends a packet.
|
| |
| unsigned long | packet_start_time |
| | Time point when the packet was started.
|
| |
| uint16_t | min_mtu |
| | The minimum MTU of all connected clients.
|
| |
| uint16_t | force_min_mtu |
| | Override the minimum MTU (0 means don't override, nonzero overrides if it's smaller than the minimum MTU of the clients).
|
| |
◆ IncomingMIDIMessage
◆ Sender
◆ handleConnect()
|
|
inlineoverrideprivatevirtual |
◆ handleDisconnect()
|
|
inlineoverrideprivatevirtual |
◆ handleMTU()
|
|
inlineoverrideprivatevirtual |
◆ handleSubscribe()
|
|
inlineoverrideprivatevirtual |
Called by the BLE stack when the central subscribes to receive notifications for the MIDI GATT characteristic.
Implements MIDIBLEInstance.
Definition at line 25 of file ArduinoBLEBackend.hpp.
◆ handleData()
|
|
inlineoverrideprivatevirtual |
◆ popMessage()
Retrieve and remove a single incoming MIDI message from the buffer.
Definition at line 54 of file ArduinoBLEBackend.hpp.
◆ begin() [1/2]
◆ end()
◆ isConnected()
| bool isConnected |
( |
| ) |
const |
|
inline |
◆ sendData()
◆ begin() [2/2]
◆ acquirePacket()
| ProtectedBuilder acquirePacket |
( |
| ) |
|
|
inherited |
Acquire exclusive access to the buffer.
- Returns
- A RAII wrapper that automatically releases the buffer upon destruction. Just make sure you don't keep any pointers to the
packet member.
◆ releasePacketAndNotify()
| void releasePacketAndNotify |
( |
ProtectedBuilder & | lck | ) |
|
|
inherited |
Release exclusive access to the buffer and notify the sender thread that data is available.
◆ sendNow()
| void sendNow |
( |
ProtectedBuilder & | lck | ) |
|
|
inherited |
Sends the data immediately without waiting for the timeout.
◆ updateMTU()
| void updateMTU |
( |
uint16_t | mtu | ) |
|
|
inherited |
Set the maximum transmission unit of the Bluetooth link.
Used to compute the MIDI BLE packet size.
◆ getMinMTU()
| uint16_t getMinMTU |
( |
| ) |
const |
|
inlineinherited |
◆ forceMinMTU()
| void forceMinMTU |
( |
uint16_t | mtu | ) |
|
|
inherited |
Force the MTU to an artificially small value (used for testing).
◆ setTimeout()
| void setTimeout |
( |
std::chrono::milliseconds | timeout | ) |
|
|
inherited |
Set the timeout, the number of milliseconds to buffer the outgoing MIDI messages.
◆ connected
◆ subscribed
Did the BLE Central subscribe to be notified for the MIDI characteristic?
Definition at line 46 of file ArduinoBLEBackend.hpp.
◆ parser
◆ Sender
◆ packet
◆ timeout
◆ packet_start_time
| unsigned long packet_start_time |
|
privateinherited |
◆ min_mtu
◆ force_min_mtu
Override the minimum MTU (0 means don't override, nonzero overrides if it's smaller than the minimum MTU of the clients).
- See also
- forceMinMTU()
Definition at line 69 of file PollingBLEMIDISender.hpp.
The documentation for this class was generated from the following file: