Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Unique Bluetooth EUI48 address and BDAddressType tuple. More...
#include <BTAddress.hpp>
Public Member Functions | |
constexpr | BDAddressAndType () noexcept |
BDAddressAndType (BDAddressAndType &&o) noexcept | |
BDAddressAndType (const BDAddressAndType &o) noexcept | |
BDAddressAndType (const jau::EUI48 &address_, BDAddressType type_) | |
void | clear () |
Method clears the underlying byte array b and cached hash value. More... | |
void | clearHash () |
Method clears the cached hash value. More... | |
BLERandomAddressType | getBLERandomAddressType () const noexcept |
Returns the BLERandomAddressType. More... | |
std::size_t | hash_code () const noexcept |
Implementation uses a lock-free volatile cache. More... | |
constexpr bool | isBREDRAddress () const noexcept |
Returns true if the BDAddressType is a BREDR address type. More... | |
constexpr bool | isIdentityAddress () const noexcept |
Returns true if this address and type refers to a public static identity address, which does not require address resolution via an Identity Resolving Key (IRK). More... | |
constexpr bool | isIdentityLEAddress () const noexcept |
Returns true if this address and type refers to a static public LE identity address, which does not require address resolution via an Identity Resolving Key (IRK). More... | |
constexpr bool | isLEAddress () const noexcept |
Returns true if the BDAddressType is a LE address type. More... | |
bool | matches (const BDAddressAndType &o) const noexcept |
Returns true if both devices match, i.e. More... | |
BDAddressAndType & | operator= (BDAddressAndType &&o) noexcept |
constexpr BDAddressAndType & | operator= (const BDAddressAndType &o) noexcept |
std::string | toString () const noexcept |
Static Public Member Functions | |
static BLERandomAddressType | getBLERandomAddressType (const jau::EUI48 &address, const BDAddressType addressType) noexcept |
Returns the BLERandomAddressType. More... | |
static std::string | getBLERandomAddressTypeString (const jau::EUI48 &address, const BDAddressType addressType, const std::string &prefix) noexcept |
Returns the BLERandomAddressType std::string representation. More... | |
Public Attributes | |
jau::EUI48 | address |
BDAddressType | type |
Static Public Attributes | |
static const BDAddressAndType | ANY_BREDR_DEVICE |
Using EUI48::ANY_DEVICE and BDAddressType::BDADDR_BREDR to match any BREDR device. More... | |
static const BDAddressAndType | ANY_DEVICE |
Using EUI48::ANY_DEVICE and BDAddressType::BDADDR_UNDEFINED to match any device. More... | |
Unique Bluetooth EUI48 address and BDAddressType tuple.
Bluetooth EUI48 address itself is not unique as it requires the BDAddressType bits.
E.g. there could be two devices with the same EUI48 address, one using BDAddressType::BDADDR_LE_PUBLIC and one using BDAddressType::BDADDR_LE_RANDOM being a BLERandomAddressType::RESOLVABLE_PRIVAT.
Definition at line 175 of file BTAddress.hpp.
|
inline |
Definition at line 193 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Definition at line 196 of file BTAddress.hpp.
|
inlinenoexcept |
Definition at line 197 of file BTAddress.hpp.
|
inlinenoexcept |
Definition at line 198 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Definition at line 202 of file BTAddress.hpp.
|
inlinenoexcept |
Definition at line 207 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Returns true if the BDAddressType is a LE address type.
Definition at line 216 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Returns true if this address and type refers to a static public LE identity address, which does not require address resolution via an Identity Resolving Key (IRK).
Either BDAddressType::BDADDR_LE_PUBLIC or BDAddressType::BDADDR_LE_RANDOM of sub-type BLERandomAddressType::STATIC_PUBLIC.
Definition at line 225 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Returns true if this address and type refers to a public static identity address, which does not require address resolution via an Identity Resolving Key (IRK).
This includes BDAddressType::BDADDR_LE_RANDOM of sub-type BLERandomAddressType::STATIC_PUBLIC
Returns false if this address is of type BDAddressType::BDADDR_LE_RANDOM, excluding sub-type BLERandomAddressType::STATIC_PUBLIC and not of type BDAddressType::BDADDR_LE_PUBLIC or BDAddressType::BDADDR_BREDR.
Definition at line 243 of file BTAddress.hpp.
|
inlineconstexprnoexcept |
Returns true if the BDAddressType is a BREDR address type.
Definition at line 255 of file BTAddress.hpp.
|
staticnoexcept |
Returns the BLERandomAddressType.
If BDAddressType is BDAddressType::BDADDR_LE_RANDOM, method shall return a valid value other than BLERandomAddressType::UNDEFINED.
If BDAddressType is not BDAddressType::BDADDR_LE_RANDOM, method shall return BLERandomAddressType::UNDEFINED.
Definition at line 162 of file BTTypes0.cpp.
|
staticnoexcept |
Returns the BLERandomAddressType std::string representation.
If BDAddressType is BDAddressType::BDADDR_LE_RANDOM, method shall return the given prefix and a valid string value other than BLERandomAddressType::UNDEFINED.
If BDAddressType is not BDAddressType::BDADDR_LE_RANDOM, method shall return an empty string.
Definition at line 176 of file BTTypes0.cpp.
|
inlinenoexcept |
Returns the BLERandomAddressType.
If type is BDAddressType::BDADDR_LE_RANDOM}, method shall return a valid value other than BLERandomAddressType::UNDEFINED.
If type is not BDAddressType::BDADDR_LE_RANDOM, method shall return BLERandomAddressType::UNDEFINED.
Definition at line 297 of file BTAddress.hpp.
|
inlinenoexcept |
Returns true if both devices match, i.e.
equal address and equal type or at least one type is BDAddressType#BDADDR_UNDEFINED
.
Definition at line 306 of file BTAddress.hpp.
|
inlinenoexcept |
Implementation uses a lock-free volatile cache.
Definition at line 319 of file BTAddress.hpp.
|
inline |
Method clears the cached hash value.
Definition at line 334 of file BTAddress.hpp.
|
inline |
Method clears the underlying byte array b
and cached hash value.
Definition at line 340 of file BTAddress.hpp.
|
noexcept |
|
static |
Using EUI48::ANY_DEVICE and BDAddressType::BDADDR_BREDR to match any BREDR device.
Definition at line 178 of file BTAddress.hpp.
|
static |
Using EUI48::ANY_DEVICE and BDAddressType::BDADDR_UNDEFINED to match any device.
This constant is suitable to any device.
Definition at line 184 of file BTAddress.hpp.
jau::EUI48 direct_bt::BDAddressAndType::address |
Definition at line 186 of file BTAddress.hpp.
BDAddressType direct_bt::BDAddressAndType::type |
Definition at line 187 of file BTAddress.hpp.