#include <ble_device.h>
|
| | ESPBTUUID ()=default |
| |
| esp_bt_uuid_t | get_uuid () const |
| |
| ESPBTUUID | as_128bit () const |
| | Expand to the 128-bit Bluetooth Base UUID form.
|
| |
| bool | contains (uint8_t data1, uint8_t data2) const |
| | True if the UUID value contains the adjacent byte pair (data1, data2).
|
| |
| bool | operator== (const ESPBTUUID &other) const |
| |
| bool | operator!= (const ESPBTUUID &other) const |
| |
| const char * | to_str (char *buf) const |
| | Write "0xABCD" / "0xABCDEF01" / the dashed 128-bit form, or "None" for an unset UUID, into buf (>= UUID_STR_LEN bytes) and return buf.
|
| |
| const char * | to_str (std::span< char, UUID_STR_LEN > output) const |
| |
| Type | type () const |
| |
| bool | is_set () const |
| | True if a UUID has been configured (not default-constructed).
|
| |
| uint16_t | uuid16 () const |
| |
| uint32_t | uuid32 () const |
| |
| const uint8_t * | uuid128 () const |
| |
Definition at line 55 of file ble_device.h.
◆ Type
| Enumerator |
|---|
| UNSET | |
| UUID16 | |
| UUID32 | |
| UUID128 | |
Definition at line 96 of file ble_device.h.
◆ ESPBTUUID()
| esphome::ble_device_base::ESPBTUUID::ESPBTUUID |
( |
| ) |
|
|
default |
◆ as_128bit()
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::as_128bit |
( |
| ) |
const |
Expand to the 128-bit Bluetooth Base UUID form.
Definition at line 148 of file ble_device.cpp.
◆ contains()
| bool esphome::ble_device_base::ESPBTUUID::contains |
( |
uint8_t | data1, |
|
|
uint8_t | data2 ) const |
True if the UUID value contains the adjacent byte pair (data1, data2).
Definition at line 157 of file ble_device.cpp.
◆ from_raw() [1/5]
| static ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw |
( |
const char * | data | ) |
|
|
inlinestatic |
◆ from_raw() [2/5]
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw |
( |
const char * | data, |
|
|
size_t | length ) |
|
static |
Parse from text: 4 hex chars (16-bit), 8 hex chars (32-bit), 16 raw bytes, or the 36-char dashed UUID form.
Same semantics as esp32_ble historically.
Definition at line 58 of file ble_device.cpp.
◆ from_raw() [3/5]
| static ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw |
( |
const std::string & | data | ) |
|
|
inlinestatic |
◆ from_raw() [4/5]
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw |
( |
const uint8_t * | data | ) |
|
|
static |
Construct from raw 16-byte little-endian UUID.
Definition at line 43 of file ble_device.cpp.
◆ from_raw() [5/5]
| static ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw |
( |
std::initializer_list< uint8_t > | data | ) |
|
|
inlinestatic |
◆ from_raw_reversed()
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_raw_reversed |
( |
const uint8_t * | data | ) |
|
|
static |
Construct from raw 16-byte big-endian UUID (reversed on store).
Definition at line 50 of file ble_device.cpp.
◆ from_uint16()
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_uint16 |
( |
uint16_t | uuid | ) |
|
|
static |
◆ from_uint32()
◆ from_uuid()
| ESPBTUUID esphome::ble_device_base::ESPBTUUID::from_uuid |
( |
esp_bt_uuid_t | uuid | ) |
|
|
static |
◆ get_uuid()
| esp_bt_uuid_t esphome::ble_device_base::ESPBTUUID::get_uuid |
( |
| ) |
const |
◆ is_set()
| bool esphome::ble_device_base::ESPBTUUID::is_set |
( |
| ) |
const |
|
inline |
True if a UUID has been configured (not default-constructed).
Definition at line 99 of file ble_device.h.
◆ operator!=()
| bool esphome::ble_device_base::ESPBTUUID::operator!= |
( |
const ESPBTUUID & | other | ) |
const |
|
inline |
◆ operator==()
| bool esphome::ble_device_base::ESPBTUUID::operator== |
( |
const ESPBTUUID & | other | ) |
const |
◆ to_128bit_()
| void esphome::ble_device_base::ESPBTUUID::to_128bit_ |
( |
uint8_t | out[16] | ) |
const |
|
protected |
◆ to_str() [1/2]
| const char * esphome::ble_device_base::ESPBTUUID::to_str |
( |
char * | buf | ) |
const |
Write "0xABCD" / "0xABCDEF01" / the dashed 128-bit form, or "None" for an unset UUID, into buf (>= UUID_STR_LEN bytes) and return buf.
Definition at line 182 of file ble_device.cpp.
◆ to_str() [2/2]
| const char * esphome::ble_device_base::ESPBTUUID::to_str |
( |
std::span< char, UUID_STR_LEN > | output | ) |
const |
|
inline |
◆ type()
| Type esphome::ble_device_base::ESPBTUUID::type |
( |
| ) |
const |
|
inline |
◆ uuid128()
| const uint8_t * esphome::ble_device_base::ESPBTUUID::uuid128 |
( |
| ) |
const |
|
inline |
◆ uuid16()
| uint16_t esphome::ble_device_base::ESPBTUUID::uuid16 |
( |
| ) |
const |
|
inline |
◆ uuid32()
| uint32_t esphome::ble_device_base::ESPBTUUID::uuid32 |
( |
| ) |
const |
|
inline |
◆ type_
◆ uuid128
| uint8_t esphome::ble_device_base::ESPBTUUID::uuid128[16] |
◆ uuid16
| uint16_t esphome::ble_device_base::ESPBTUUID::uuid16 |
◆ uuid32
| uint32_t esphome::ble_device_base::ESPBTUUID::uuid32 |
◆ [union]
| union { ... } esphome::ble_device_base::ESPBTUUID::uuid_ |
The documentation for this class was generated from the following files: