libGulliBLE
ble Namespace Reference

Namespaces

namespace  impl
 

Classes

class  characteristic_base
 
class  controller
 
struct  device_name_characteristic
 
class  service
 
class  stored_characteristic
 
class  uuid
 
struct  uuid_cast_t
 
struct  uuid_data
 
struct  uuid_data< uuid_type::_128 >
 
struct  uuid_data< uuid_type::_16 >
 
struct  uuid_data< uuid_type::_32 >
 
struct  uuid_data_with_length
 

Enumerations

enum struct  retcode : int {
  ok = 0 , invalid_handle = BLE_ATT_ERR_INVALID_HANDLE , read_not_permitted = BLE_ATT_ERR_READ_NOT_PERMITTED , write_not_permitted = BLE_ATT_ERR_WRITE_NOT_PERMITTED ,
  invalid_pdu = BLE_ATT_ERR_INVALID_PDU , insufficient_authen = BLE_ATT_ERR_INSUFFICIENT_AUTHEN , req_not_supported = BLE_ATT_ERR_REQ_NOT_SUPPORTED , invalid_offset = BLE_ATT_ERR_INVALID_OFFSET ,
  insufficient_author = BLE_ATT_ERR_INSUFFICIENT_AUTHOR , prepare_queue_full = BLE_ATT_ERR_PREPARE_QUEUE_FULL , attr_not_found = BLE_ATT_ERR_ATTR_NOT_FOUND , attr_not_long = BLE_ATT_ERR_ATTR_NOT_LONG ,
  insufficient_key_sz = BLE_ATT_ERR_INSUFFICIENT_KEY_SZ , invalid_attr_value_len = BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN , unlikely = BLE_ATT_ERR_UNLIKELY , insufficient_enc = BLE_ATT_ERR_INSUFFICIENT_ENC ,
  unsupported_group = BLE_ATT_ERR_UNSUPPORTED_GROUP , insufficient_res = BLE_ATT_ERR_INSUFFICIENT_RES
}
 
enum struct  access_type : std::uint8_t { none = 0b00 , r = 0b01 , w = 0b10 , rw = 0b11 }
 
enum struct  device_appearance : std::uint16_t { none = 0x0 , multicolor_led_array = 0x07C6 }
 
enum struct  gap_event : std::uint8_t {
  connect = BLE_GAP_EVENT_CONNECT , disconnect = BLE_GAP_EVENT_DISCONNECT , conn_update = BLE_GAP_EVENT_CONN_UPDATE , conn_update_req = BLE_GAP_EVENT_CONN_UPDATE_REQ ,
  l2cap_update_req = BLE_GAP_EVENT_L2CAP_UPDATE_REQ , term_failure = BLE_GAP_EVENT_TERM_FAILURE , disc = BLE_GAP_EVENT_DISC , disc_complete = BLE_GAP_EVENT_DISC_COMPLETE ,
  adv_complete = BLE_GAP_EVENT_ADV_COMPLETE , enc_change = BLE_GAP_EVENT_ENC_CHANGE , passkey_action = BLE_GAP_EVENT_PASSKEY_ACTION , notify_rx = BLE_GAP_EVENT_NOTIFY_RX ,
  notify_tx = BLE_GAP_EVENT_NOTIFY_TX , subscribe = BLE_GAP_EVENT_SUBSCRIBE , mtu = BLE_GAP_EVENT_MTU , identity_resolved = BLE_GAP_EVENT_IDENTITY_RESOLVED ,
  repeat_pairing = BLE_GAP_EVENT_REPEAT_PAIRING , phy_update_complete = BLE_GAP_EVENT_PHY_UPDATE_COMPLETE , ext_disc = BLE_GAP_EVENT_EXT_DISC , periodic_sync = BLE_GAP_EVENT_PERIODIC_SYNC ,
  periodic_report = BLE_GAP_EVENT_PERIODIC_REPORT , periodic_sync_lost = BLE_GAP_EVENT_PERIODIC_SYNC_LOST , scan_req_rcvd = BLE_GAP_EVENT_SCAN_REQ_RCVD
}
 
enum struct  service_type : std::uint8_t { primary = BLE_GATT_SVC_TYPE_PRIMARY , secondary = BLE_GATT_SVC_TYPE_SECONDARY }
 
enum struct  uuid_type : std::uint8_t { _16 = BLE_UUID_TYPE_16 , _32 = BLE_UUID_TYPE_32 , _128 = BLE_UUID_TYPE_128 }
 

Functions

bool operator& (access_type l, access_type r)
 
access_type operator| (access_type l, access_type r)
 
std::uint16_t to_nimble (access_type a)
 
const char * to_string (gap_event evt)
 

Variables

constexpr std::array< uint8_t, 16 > base_uuid
 
static constexpr auto cast_uuid16 = uuid_cast_t<uuid_type::_16>{}
 
static constexpr auto cast_uuid32 = uuid_cast_t<uuid_type::_32>{}
 
static constexpr auto cast_uuid128 = uuid_cast_t<uuid_type::_128>{}
 

Detailed Description

Headers above are dark and full of terrors.

Enumeration Type Documentation

◆ access_type

enum struct ble::access_type : std::uint8_t
strong
Enumerator
none 
rw 

◆ device_appearance

enum struct ble::device_appearance : std::uint16_t
strong
Todo:
Copy all values from https://specificationrefs.bluetooth.com/assigned-values/Appearance%20Values.pdf.
Enumerator
none 
multicolor_led_array 

◆ gap_event

enum struct ble::gap_event : std::uint8_t
strong
Enumerator
connect 
disconnect 
conn_update 
conn_update_req 
l2cap_update_req 
term_failure 
disc 
disc_complete 
adv_complete 
enc_change 
passkey_action 
notify_rx 
notify_tx 
subscribe 
mtu 
identity_resolved 
repeat_pairing 
phy_update_complete 
ext_disc 
periodic_sync 
periodic_report 
periodic_sync_lost 
scan_req_rcvd 

◆ retcode

enum struct ble::retcode : int
strong
Enumerator
ok 
invalid_handle 
read_not_permitted 
write_not_permitted 
invalid_pdu 
insufficient_authen 
req_not_supported 
invalid_offset 
insufficient_author 
prepare_queue_full 
attr_not_found 
attr_not_long 
insufficient_key_sz 
invalid_attr_value_len 
unlikely 
insufficient_enc 
unsupported_group 
insufficient_res 

◆ service_type

enum struct ble::service_type : std::uint8_t
strong
Enumerator
primary 
secondary 

◆ uuid_type

enum struct ble::uuid_type : std::uint8_t
strong
Enumerator
_16 
_32 
_128 

Function Documentation

◆ operator&()

bool ble::operator& ( access_type  l,
access_type  r 
)
inline

◆ operator|()

access_type ble::operator| ( access_type  l,
access_type  r 
)
inline

◆ to_nimble()

std::uint16_t ble::to_nimble ( access_type  a)
inline

◆ to_string()

const char * ble::to_string ( gap_event  evt)

Variable Documentation

◆ base_uuid

constexpr std::array<uint8_t, 16> ble::base_uuid
constexpr
Initial value:
= {
0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}

◆ cast_uuid128

constexpr auto ble::cast_uuid128 = uuid_cast_t<uuid_type::_128>{}
staticconstexpr

◆ cast_uuid16

constexpr auto ble::cast_uuid16 = uuid_cast_t<uuid_type::_16>{}
staticconstexpr

◆ cast_uuid32

constexpr auto ble::cast_uuid32 = uuid_cast_t<uuid_type::_32>{}
staticconstexpr