A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address).
More...
#include <eui48.hpp>
|
static bool | scanEUI48 (const std::string &str, EUI48 &dest, std::string &errmsg) |
|
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Media Access Control address).
Stores value in lb_endian::native byte order.
- Examples
- dbt_peripheral00.cpp, dbt_repeater00.cpp, and dbt_scanner10.cpp.
Definition at line 324 of file eui48.hpp.
◆ EUI48() [1/5]
constexpr jau::EUI48::EUI48 |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ EUI48() [2/5]
EUI48::EUI48 |
( |
const uint8_t * |
source, |
|
|
const lb_endian_t |
byte_order |
|
) |
| |
|
noexcept |
- Copy address bytes from given source and byte_order, * while converting them to lb_endian::native byte order. * *
- Parameters
-
source | address bytes * |
byte_order | lb_endian::little or lb_endian::big byte order of given source, one may pass lb_endian::native.
|
Definition at line 233 of file eui48.cpp.
◆ EUI48() [3/5]
EUI48::EUI48 |
( |
const std::string & |
str | ) |
|
- Construct instance via given string representation. *
* Implementation is consistent with EUI48::toString(). *
*
- Parameters
-
str | a 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
-
Definition at line 226 of file eui48.cpp.
◆ EUI48() [4/5]
constexpr jau::EUI48::EUI48 |
( |
const EUI48 & |
o | ) |
|
|
constexprdefaultnoexcept |
◆ EUI48() [5/5]
jau::EUI48::EUI48 |
( |
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
-
str | a string of exactly 17 characters representing 6 bytes as hexadecimal numbers separated via colon 01:02:03:0A:0B:0C . * |
dest | EUI48 to set its value * |
errmsg | error parsing message if returning false * |
- Returns
- true if successful, otherwise false *
- See also
- EUI48::EUI48 *
-
EUI48::toString()
Definition at line 202 of file eui48.cpp.
◆ operator=() [1/2]
constexpr EUI48 & jau::EUI48::operator= |
( |
const EUI48 & |
o | ) |
|
|
constexprdefaultnoexcept |
◆ operator=() [2/2]
◆ hash_code()
constexpr std::size_t jau::EUI48::hash_code |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ clear()
void jau::EUI48::clear |
( |
| ) |
|
|
inline |
- Method clears the underlying byte array
b
.
Definition at line 324 of file eui48.hpp.
◆ indexOf()
- Finds the index of given EUI48Sub needle within this instance haystack. * * The returned index will be adjusted for the desired byte order. * - lb_endian::big will return index 0 for the leading byte like the string representation from left (MSB) to right (LSB). * - lb_endian::little will return index 5 for the leading byte * *
- Parameters
-
needle | * |
byte_order | byte order will adjust the returned index, lb_endian::big is equivalent to the string representation from left (MSB) to right (LSB). * |
- 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. *
- See also
- indexOf()
Definition at line 324 of file eui48.hpp.
◆ contains()
bool jau::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 324 of file eui48.hpp.
◆ toString()
std::string EUI48::toString |
( |
| ) |
const |
|
noexcept |
- Returns the EUI48 string representation with MSB first (lb_endian::big), * 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 167 of file eui48.cpp.
◆ put()
- Method transfers all bytes representing this instance into the given * destination array at the given position and in the given byte order. *
* Implementation is consistent with EUI48(byte[], int, ByteOrder)
. *
*
- Parameters
-
sink | the destination array * |
byte_order | destination buffer byte order * |
- See also
- #EUI48(byte[], int, ByteOrder)
Definition at line 241 of file eui48.cpp.
◆ ANY_DEVICE
const EUI48 jau::EUI48::ANY_DEVICE |
|
static |
EUI48 MAC address matching any device, i.e.
0:0:0:0:0:0
.
Definition at line 324 of file eui48.hpp.
◆ ALL_DEVICE
const EUI48 jau::EUI48::ALL_DEVICE |
|
static |
EUI48 MAC address matching all device, i.e.
ff:ff:ff:ff:ff:ff
.
Definition at line 324 of file eui48.hpp.
◆ LOCAL_DEVICE
const EUI48 jau::EUI48::LOCAL_DEVICE |
|
static |
EUI48 MAC address matching local device, i.e.
0:0:0:ff:ff:ff
.
Definition at line 324 of file eui48.hpp.
The documentation for this struct was generated from the following files: