NimBLE-Arduino 2.1.2
|
Bluetooth UUID. More...
Classes | |
struct | ble_uuid_t |
struct | ble_uuid16_t |
struct | ble_uuid32_t |
struct | ble_uuid128_t |
union | ble_uuid_any_t |
Macros | |
#define | BLE_UUID_STR_LEN (37) |
Enumerations | |
enum | { BLE_UUID_TYPE_16 = 16 , BLE_UUID_TYPE_32 = 32 , BLE_UUID_TYPE_128 = 128 } |
Functions | |
int | ble_uuid_init_from_buf (ble_uuid_any_t *uuid, const void *buf, size_t len) |
Constructs a UUID object from a byte array. | |
int | ble_uuid_cmp (const ble_uuid_t *uuid1, const ble_uuid_t *uuid2) |
Compares two Bluetooth UUIDs. | |
void | ble_uuid_copy (ble_uuid_any_t *dst, const ble_uuid_t *src) |
Copy Bluetooth UUID. | |
char * | ble_uuid_to_str (const ble_uuid_t *uuid, char *dst) |
Converts the specified UUID to its string representation. | |
uint16_t | ble_uuid_u16 (const ble_uuid_t *uuid) |
Converts the specified 16-bit UUID to a uint16_t. | |
Bluetooth UUID.
#define BLE_UUID_STR_LEN (37) |
Size of buffer needed to store UUID as a string. Includes trailing \0.
anonymous enum |
int ble_uuid_cmp | ( | const ble_uuid_t * | uuid1, |
const ble_uuid_t * | uuid2 | ||
) |
Compares two Bluetooth UUIDs.
uuid1 | The first UUID to compare. |
uuid2 | The second UUID to compare. |
void ble_uuid_copy | ( | ble_uuid_any_t * | dst, |
const ble_uuid_t * | src | ||
) |
Copy Bluetooth UUID.
dst | Destination UUID. |
src | Source UUID. |
int ble_uuid_init_from_buf | ( | ble_uuid_any_t * | uuid, |
const void * | buf, | ||
size_t | len | ||
) |
Constructs a UUID object from a byte array.
uuid | On success, this gets populated with the constructed UUID. |
buf | The source buffer to parse. |
len | The size of the buffer, in bytes. |
char * ble_uuid_to_str | ( | const ble_uuid_t * | uuid, |
char * | dst | ||
) |
Converts the specified UUID to its string representation.
Example string representations: o 16-bit: 0x1234 o 32-bit: 0x12345678 o 128-bit: 12345678-1234-1234-1234-123456789abc
uuid | The source UUID to convert. |
dst | The destination buffer. |
uint16_t ble_uuid_u16 | ( | const ble_uuid_t * | uuid | ) |
Converts the specified 16-bit UUID to a uint16_t.
uuid | The source UUID to convert. |