Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
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

Called by the BLE stack when a connection is established.

Implemented in BTstackBackgroundBackend, ESP32BLEBackend< Impl >, and ArduinoBLEBackend.

◆ handleDisconnect()

virtual void handleDisconnect ( BLEConnectionHandle conn_handle)
pure virtual

Called by the BLE stack when a connection is terminated.

Implemented in ESP32BLEBackend< Impl >, ArduinoBLEBackend, and BTstackBackgroundBackend.

◆ 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 ESP32BLEBackend< Impl >, ArduinoBLEBackend, and BTstackBackgroundBackend.

◆ 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 ESP32BLEBackend< Impl >, BTstackBackgroundBackend, and ArduinoBLEBackend.

◆ 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 ESP32BLEBackend< Impl >, ArduinoBLEBackend, and BTstackBackgroundBackend.


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