Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Classes | Enumerations
BLEAPI.hpp File Reference

Detailed Description

Type definitions and callback interfaces for communication between the low-level BLE stacks and higher-level MIDI BLE backends.

Definition in file BLEAPI.hpp.

#include <Settings/NamespaceSettings.hpp>
#include "Util/compat.hpp"
#include <cstddef>
#include <cstdint>
#include "BLEAPI.ipp"
+ Include dependency graph for BLEAPI.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BLEConnectionHandle
 Represents a handle to the connection to another device. More...
 
struct  BLECharacteristicHandle
 Represents a handle to a local GATT characteristic. More...
 
struct  BLEDataView
 Non-owning, std::span-style read-only view of BLE data. More...
 
class  BLEDataGenerator
 Callable that returns the next chunk of data from a BLE packet when called. More...
 
class  MIDIBLEInstance
 Defines the interface for callback functions registered by the low-level BLE code. More...
 
struct  BLESettings
 Configuration options for the low-level BLE code. More...
 

Enumerations

enum class  BLEDataType : uint8_t { None = 0 , Packet , Continuation }
 Describes a byte buffer containing (part of) a BLE packet. More...
 
enum class  BLEDataLifetime { ConsumeImmediately , Managed }
 Should a buffer of BLEData be consumed immediately inside of the callback, or can we hold on to it and process it later? More...
 

Enumeration Type Documentation

◆ BLEDataType

enum class BLEDataType : uint8_t
strong

Describes a byte buffer containing (part of) a BLE packet.

Packets can be stored across multiple buffers, in which case the first first buffer has type Packet and subsequent buffers of the same packet have the type Continuation.

Enumerator
None 

No buffers available.

Packet 

Buffer contains the start of a BLE packet.

Continuation 

Buffer contains a chunk of a BLE packet.

Definition at line 58 of file BLEAPI.hpp.

◆ BLEDataLifetime

enum class BLEDataLifetime
strong

Should a buffer of BLEData be consumed immediately inside of the callback, or can we hold on to it and process it later?

Enumerator
ConsumeImmediately 

Buffer is valid only during the callback. Do not keep any pointers to it.

Managed 

Buffer is valid for as long as the owning BLEDataGenerator is not resumed or destroyed.

Definition at line 113 of file BLEAPI.hpp.