15#ifndef COMPONENTS_NIMBLEUUID_H_
16#define COMPONENTS_NIMBLEUUID_H_
19#if defined(CONFIG_BT_ENABLED)
21#if defined(CONFIG_NIMBLE_CPP_IDF)
22#include "host/ble_uuid.h"
24#include "nimble/nimble/host/include/host/ble_uuid.h"
43 NimBLEUUID(
const uint8_t* pData,
size_t size,
bool msbFirst);
44 NimBLEUUID(uint32_t first, uint16_t second, uint16_t third, uint64_t fourth);
57 operator std::string()
const;
60 ble_uuid_any_t m_uuid;
61 bool m_valueSet =
false;
A model of a BLE UUID.
Definition: NimBLEUUID.h:37
bool equals(const NimBLEUUID &uuid) const
Compare a UUID against this UUID.
Definition: NimBLEUUID.cpp:187
bool operator==(const NimBLEUUID &rhs) const
Convenience operator to check if this UUID is equal to another.
Definition: NimBLEUUID.cpp:302
const NimBLEUUID & to16()
Convert 128 bit UUID to its 16 bit representation.
Definition: NimBLEUUID.cpp:266
const ble_uuid_any_t * getNative() const
Get the native UUID value.
Definition: NimBLEUUID.cpp:227
const NimBLEUUID & to128()
Convert a UUID to its 128 bit representation.
Definition: NimBLEUUID.cpp:242
std::string toString() const
Get a string representation of the UUID.
Definition: NimBLEUUID.cpp:294
NimBLEUUID()
Creates an empty UUID.
Definition: NimBLEUUID.cpp:166
bool operator!=(const NimBLEUUID &rhs) const
Convenience operator to check if this UUID is not equal to another.
Definition: NimBLEUUID.cpp:341
static NimBLEUUID fromString(const std::string &uuid)
Definition: NimBLEUUID.cpp:203
uint8_t bitSize() const
Get the number of bits in this uuid.
Definition: NimBLEUUID.cpp:175