15#ifndef COMPONENTS_NIMBLEADDRESS_H_
16#define COMPONENTS_NIMBLEADDRESS_H_
18#if defined(CONFIG_BT_ENABLED)
20#if defined(CONFIG_NIMBLE_CPP_IDF)
21#include "nimble/ble.h"
23#include "nimble/nimble/include/nimble/ble.h"
43 NimBLEAddress(uint8_t address[6], uint8_t type = BLE_ADDR_PUBLIC);
44 NimBLEAddress(
const std::string &stringAddress, uint8_t type = BLE_ADDR_PUBLIC);
45 NimBLEAddress(
const uint64_t &address, uint8_t type = BLE_ADDR_PUBLIC);
53 operator std::string()
const;
54 operator uint64_t()
const;
A BLE device address.
Definition: NimBLEAddress.h:39
uint8_t getType() const
Get the address type.
Definition: NimBLEAddress.cpp:136
NimBLEAddress()
Create a blank address, i.e. 00:00:00:00:00:00, type 0.
Definition: NimBLEAddress.cpp:43
bool equals(const NimBLEAddress &otherAddress) const
Determine if this address equals another.
Definition: NimBLEAddress.cpp:118
bool operator==(const NimBLEAddress &rhs) const
Convenience operator to check if this address is equal to another.
Definition: NimBLEAddress.cpp:161
std::string toString() const
Convert a BLE address to a string.
Definition: NimBLEAddress.cpp:153
const uint8_t * getNative() const
Get the native representation of the address.
Definition: NimBLEAddress.cpp:127
bool operator!=(const NimBLEAddress &rhs) const
Convenience operator to check if this address is not equal to another.
Definition: NimBLEAddress.cpp:169