Control Surface 2.1.2
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
MIDIBLEInstance Class Referenceabstract

#include <MIDI_Interfaces/BLEMIDI/BLEAPI.hpp>

Detailed Description

Defines the interface for callback functions registered by the low-level BLE code.

Warning
These functions may be called from different tasks/threads or low-priority interrupt handlers. You cannot take locks, and you need to synchronize appropriately (e.g. using std::atomic or by using critical sections).

Definition at line 127 of file BLEAPI.hpp.

Inheritance diagram for MIDIBLEInstance:
Collaboration diagram for MIDIBLEInstance:

Public Member Functions

virtual ~MIDIBLEInstance ()=default
virtual void handleConnect (BLEConnectionHandle conn_handle)=0
 Called by the BLE stack when a connection is established.
virtual void handleDisconnect (BLEConnectionHandle conn_handle)=0
 Called by the BLE stack when a connection is terminated.
virtual void handleMTU (BLEConnectionHandle conn_handle, uint16_t mtu)=0
 Called by the BLE stack when the maximum transmission unit for the connection changes.
virtual void handleSubscribe (BLEConnectionHandle conn_handle, BLECharacteristicHandle char_handle, bool notify)=0
 Called by the BLE stack when the central subscribes to receive notifications for the MIDI GATT characteristic.
virtual void handleData (BLEConnectionHandle conn_handle, BLEDataGenerator &&data, BLEDataLifetime lifetime)=0
 Called by the BLE stack when the central writes data to the MIDI GATT characteristic.

Constructor & Destructor Documentation

◆ ~MIDIBLEInstance()

virtual ~MIDIBLEInstance ( )
virtualdefault

Member Function Documentation

◆ handleConnect()

virtual void handleConnect ( BLEConnectionHandle conn_handle)
pure virtual

◆ handleDisconnect()

virtual void handleDisconnect ( BLEConnectionHandle conn_handle)
pure virtual

◆ handleMTU()

virtual void handleMTU ( BLEConnectionHandle conn_handle,
uint16_t mtu )
pure virtual

Called by the BLE stack when the maximum transmission unit for the connection changes.

Implemented in ArduinoBLEBackend, BTstackBackgroundBackend, ESP32BLEBackend< Impl >, ESP32BLEBackend< ble_backend::ESP32BluedroidBLE >, and ESP32BLEBackend< ble_backend::ESP32NimBLE >.

◆ handleSubscribe()

virtual void handleSubscribe ( BLEConnectionHandle conn_handle,
BLECharacteristicHandle char_handle,
bool notify )
pure virtual

Called by the BLE stack when the central subscribes to receive notifications for the MIDI GATT characteristic.

Implemented in ArduinoBLEBackend, BTstackBackgroundBackend, ESP32BLEBackend< Impl >, ESP32BLEBackend< ble_backend::ESP32BluedroidBLE >, and ESP32BLEBackend< ble_backend::ESP32NimBLE >.

◆ handleData()

virtual void handleData ( BLEConnectionHandle conn_handle,
BLEDataGenerator && data,
BLEDataLifetime lifetime )
pure virtual

Called by the BLE stack when the central writes data to the MIDI GATT characteristic.

Implemented in ArduinoBLEBackend, BTstackBackgroundBackend, ESP32BLEBackend< Impl >, ESP32BLEBackend< ble_backend::ESP32BluedroidBLE >, and ESP32BLEBackend< ble_backend::ESP32NimBLE >.


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