Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
direct_bt::EUI48 Struct Reference

A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address). More...

#include <BTAddress.hpp>

Collaboration diagram for direct_bt::EUI48:

Public Member Functions

constexpr EUI48 () noexcept
 
 EUI48 (const uint8_t *b_) noexcept
 
 EUI48 (const std::string &str)
 
constexpr EUI48 (const EUI48 &o) noexcept=default
 
 EUI48 (EUI48 &&o) noexcept=default
 
constexpr EUI48operator= (const EUI48 &o) noexcept=default
 
EUI48operator= (EUI48 &&o) noexcept=default
 
constexpr std::size_t hash_code () const noexcept
 
void clear ()
 
BLERandomAddressType getBLERandomAddressType (const BDAddressType addressType) const noexcept
 
jau::snsize_t indexOf (const EUI48Sub &needle) const noexcept
 
bool contains (const EUI48Sub &needle) const noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

static bool scanEUI48 (const std::string &str, EUI48 &dest, std::string &errmsg)
 

Public Attributes

uint8_t b [6]
 

Static Public Attributes

static const EUI48 ANY_DEVICE
 EUI48 MAC address matching any device, i.e. More...
 
static const EUI48 ALL_DEVICE
 EUI48 MAC address matching all device, i.e. More...
 
static const EUI48 LOCAL_DEVICE
 EUI48 MAC address matching local device, i.e. More...
 

Detailed Description

A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address).

Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, and dbt_scanner10.cpp.

Definition at line 388 of file BTAddress.hpp.

Constructor & Destructor Documentation

◆ EUI48() [1/5]

constexpr direct_bt::EUI48::EUI48 ( )
inlineconstexprnoexcept

Definition at line 388 of file BTAddress.hpp.

◆ EUI48() [2/5]

EUI48::EUI48 ( const uint8_t *  b_)
noexcept

Definition at line 315 of file BTTypes0.cpp.

◆ EUI48() [3/5]

EUI48::EUI48 ( const std::string &  str)
  • Construct instance via given string representation. *

* Implementation is consistent with EUI48::toString(). *

*

Parameters
stra string of exactly 17 characters representing 6 bytes as hexadecimal numbers separated via colon 01:02:03:0A:0B:0C. *
See also
EUI48::scanEUI48() *
EUI48::toString() *
Exceptions
jau::IllegalArgumentExceptionif given string doesn't comply with EUI48

Definition at line 308 of file BTTypes0.cpp.

Here is the call graph for this function:

◆ EUI48() [4/5]

constexpr direct_bt::EUI48::EUI48 ( const EUI48 o)
constexprdefaultnoexcept

◆ EUI48() [5/5]

direct_bt::EUI48::EUI48 ( EUI48 &&  o)
defaultnoexcept

Member Function Documentation

◆ clear()

void direct_bt::EUI48::clear ( )
inline
  • Method clears the underlying byte array b.

Definition at line 388 of file BTAddress.hpp.

Here is the caller graph for this function:

◆ contains()

bool direct_bt::EUI48::contains ( const EUI48Sub needle) const
inlinenoexcept
  • Returns true, if given EUI48Sub needle is contained in this instance haystack. *

* If the sub is zero, true is returned. *


Definition at line 388 of file BTAddress.hpp.

Here is the caller graph for this function:

◆ getBLERandomAddressType()

BLERandomAddressType EUI48::getBLERandomAddressType ( const BDAddressType  addressType) const
noexcept
  • 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. *

*

Since
2.2.0

Definition at line 152 of file BTTypes0.cpp.

Here is the caller graph for this function:

◆ hash_code()

constexpr std::size_t direct_bt::EUI48::hash_code ( ) const
inlineconstexprnoexcept

Definition at line 388 of file BTAddress.hpp.

Here is the caller graph for this function:

◆ indexOf()

jau::snsize_t direct_bt::EUI48::indexOf ( const EUI48Sub needle) const
inlinenoexcept
  • Finds the index of given EUI48Sub needle within this instance haystack. *
    Parameters
    needle*
    Returns
    index of first element of needle within this instance haystack or -1 if not found. If the needle length is zero, 0 (found) is returned.

Definition at line 388 of file BTAddress.hpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

constexpr EUI48& direct_bt::EUI48::operator= ( const EUI48 o)
constexprdefaultnoexcept

◆ operator=() [2/2]

EUI48& direct_bt::EUI48::operator= ( EUI48 &&  o)
defaultnoexcept

◆ scanEUI48()

bool EUI48::scanEUI48 ( const std::string &  str,
EUI48 dest,
std::string &  errmsg 
)
static
  • Fills given EUI48 instance via given string representation. *

* Implementation is consistent with EUI48::toString(). *

*

Parameters
stra string of exactly 17 characters representing 6 bytes as hexadecimal numbers separated via colon 01:02:03:0A:0B:0C. *
destEUI48 to set its value *
errmsgerror parsing message if returning false *
Returns
true if successful, otherwise false *
See also
EUI48::EUI48 *
EUI48::toString()

Definition at line 290 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

std::string EUI48::toString ( ) const
noexcept
  • Returns the EUI48 string representation, * exactly 17 characters representing 6 bytes as upper case hexadecimal numbers separated via colon 01:02:03:0A:0B:0C. *
    See also
    EUI48::EUI48()

Definition at line 274 of file BTTypes0.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ALL_DEVICE

const EUI48 direct_bt::EUI48::ALL_DEVICE
static

EUI48 MAC address matching all device, i.e.

ff:ff:ff:ff:ff:ff.

Definition at line 388 of file BTAddress.hpp.

◆ ANY_DEVICE

const EUI48 direct_bt::EUI48::ANY_DEVICE
static

EUI48 MAC address matching any device, i.e.

0:0:0:0:0:0.

Definition at line 388 of file BTAddress.hpp.

◆ b

uint8_t direct_bt::EUI48::b[6]
  • The 6 byte EUI48 address.

Definition at line 388 of file BTAddress.hpp.

◆ LOCAL_DEVICE

const EUI48 direct_bt::EUI48::LOCAL_DEVICE
static

EUI48 MAC address matching local device, i.e.

0:0:0:ff:ff:ff.

Definition at line 388 of file BTAddress.hpp.


The documentation for this struct was generated from the following files: