BLE address container with an associated address type.
More...
#include <ble_address.hpp>
|
| static constexpr size_t | kLength = 6 |
| | Number of bytes in a BLE device address.
|
| |
BLE address container with an associated address type.
A BLE address is a 6-byte value plus an address type (public/random/etc).
Construction
Create an address from a raw 6-byte buffer and a type:
BLE address container with an associated address type.
Definition ble_address.hpp:43
@ kLeRandom
Random Device Address (Vol 3, Part C, 10.8.2).
std::array< uint8_t, kLength > RawAddress
Raw 6-byte address container.
Definition ble_address.hpp:53
Accessors and Utilities
Comparison
Equality compares both the address type and address bytes.
◆ RawAddress
Raw 6-byte address container.
◆ AddressType
Bluetooth address types (BTstack-compatible values).
| Enumerator |
|---|
| kLePublic | Public Device Address (Vol 3, Part C, 10.8.1).
|
| kLeRandom | Random Device Address (Vol 3, Part C, 10.8.2).
|
| kLePublicIdentity | Public Identity Address (resolvable via IRK).
|
| kLeRandomIdentity | Random (static or resolvable) Identity Address.
|
| kSco | BR/EDR (SCO) address type.
|
| kAcl | BR/EDR (ACL) address type.
|
| kUnknown | Unknown or not provided.
|
◆ BleAddress() [1/3]
| c7222::BleAddress::BleAddress |
( |
| ) |
|
|
default |
Constructs an empty address with type Unknown and zero bytes.
◆ BleAddress() [2/3]
Constructs from address type and raw Bluetooth address.
Example:
@ kLePublic
Public Device Address (Vol 3, Part C, 10.8.1).
◆ BleAddress() [3/3]
| c7222::BleAddress::BleAddress |
( |
AddressType |
type, |
|
|
const uint8_t |
address[kLength] |
|
) |
| |
|
inline |
Constructs from address type and a raw 6-byte buffer.
◆ CopyTo() [1/2]
| void c7222::BleAddress::CopyTo |
( |
RawAddress & |
out | ) |
const |
|
inline |
Copies the raw address into a caller-provided buffer.
◆ CopyTo() [2/2]
| void c7222::BleAddress::CopyTo |
( |
uint8_t(&) |
out[kLength] | ) |
const |
|
inline |
Copies the raw address into a caller-provided array.
◆ GetBytes()
| const uint8_t * c7222::BleAddress::GetBytes |
( |
| ) |
const |
|
inline |
Returns a pointer to the raw address bytes.
◆ GetRaw()
| const RawAddress & c7222::BleAddress::GetRaw |
( |
| ) |
const |
|
inline |
Returns a const reference to the raw address array.
◆ GetType()
Returns the stored address type.
◆ NullAddress()
| static const RawAddress & c7222::BleAddress::NullAddress |
( |
| ) |
|
|
inlinestatic |
Returns a zero-filled address constant.
◆ operator!=()
| bool c7222::BleAddress::operator!= |
( |
const BleAddress & |
other | ) |
const |
|
inline |
Compares both address type and address bytes.
◆ operator==()
| bool c7222::BleAddress::operator== |
( |
const BleAddress & |
other | ) |
const |
|
inline |
Compares both address type and address bytes.
◆ SetType()
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const BleAddress & |
addr |
|
) |
| |
|
friend |
◆ kLength
| constexpr size_t c7222::BleAddress::kLength = 6 |
|
staticconstexpr |
Number of bytes in a BLE device address.
The documentation for this class was generated from the following file: