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:183
uint8_t getType() const
Get the address type.
Definition NimBLEAddress.cpp:118
const uint8_t * getVal() const
Get the address value.
Definition NimBLEAddress.cpp:126
const ble_addr_t * getBase() const
Get the NimBLE base struct of the address.
Definition NimBLEAddress.cpp:110
bool isStatic() const
Determine if this address is a Static Address.
Definition NimBLEAddress.cpp:150
bool isPublic() const
Determine if this address is a Public Address.
Definition NimBLEAddress.cpp:158
bool equals(const NimBLEAddress &otherAddress) const
Determine if this address equals another.
Definition NimBLEAddress.cpp:102
bool operator==(const NimBLEAddress &rhs) const
Convenience operator to check if this address is equal to another.
Definition NimBLEAddress.cpp:191
bool isRpa() const
Determine if this address is a Resolvable Private Address.
Definition NimBLEAddress.cpp:134
bool isNrpa() const
Determine if this address is a Non-Resolvable Private Address.
Definition NimBLEAddress.cpp:142
bool isNull() const
Determine if this address is a NULL Address.
Definition NimBLEAddress.cpp:166
std::string toString() const
Convert a BLE address to a string.
Definition NimBLEAddress.cpp:175
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:202