18#ifndef NIMBLE_CPP_ADDRESS_H_
19#define NIMBLE_CPP_ADDRESS_H_
21#if defined(CONFIG_BT_ENABLED)
23# if defined(CONFIG_NIMBLE_CPP_IDF)
24# include "nimble/ble.h"
26# include "nimble/nimble/include/nimble/ble.h"
48 NimBLEAddress(
const uint8_t address[BLE_DEV_ADDR_LEN], uint8_t type);
49 NimBLEAddress(
const std::string& stringAddress, uint8_t type);
58 const ble_addr_t*
getBase()
const;
61 const uint8_t*
getVal()
const;
65 operator std::string()
const;
66 operator uint64_t()
const;
A BLE device address.
Definition NimBLEAddress.h:41
const NimBLEAddress & reverseByteOrder()
Reverse the byte order of the address.
Definition NimBLEAddress.cpp:195
uint8_t getType() const
Get the address type.
Definition NimBLEAddress.cpp:130
const uint8_t * getVal() const
Get the address value.
Definition NimBLEAddress.cpp:138
const ble_addr_t * getBase() const
Get the NimBLE base struct of the address.
Definition NimBLEAddress.cpp:122
bool isStatic() const
Determine if this address is a Static Address.
Definition NimBLEAddress.cpp:162
bool isPublic() const
Determine if this address is a Public Address.
Definition NimBLEAddress.cpp:170
bool equals(const NimBLEAddress &otherAddress) const
Determine if this address equals another.
Definition NimBLEAddress.cpp:114
bool operator==(const NimBLEAddress &rhs) const
Convenience operator to check if this address is equal to another.
Definition NimBLEAddress.cpp:203
bool isRpa() const
Determine if this address is a Resolvable Private Address.
Definition NimBLEAddress.cpp:146
bool isNrpa() const
Determine if this address is a Non-Resolvable Private Address.
Definition NimBLEAddress.cpp:154
bool isNull() const
Determine if this address is a NULL Address.
Definition NimBLEAddress.cpp:178
std::string toString() const
Convert a BLE address to a string.
Definition NimBLEAddress.cpp:187
NimBLEAddress()=default
Create a blank address, i.e. 00:00:00:00:00:00, type 0.
bool operator!=(const NimBLEAddress &rhs) const
Convenience operator to check if this address is not equal to another.
Definition NimBLEAddress.cpp:214