A MAC-48 (6-byte) hardware address.
More...
|
| constexpr | mac_address () noexcept=default |
| | Constructs a zero-initialized MAC address (00:00:00:00:00:00).
|
| |
| constexpr | mac_address (std::array< uint8_t, 6 > bytes) noexcept |
| | Constructs a MAC address from a byte array.
|
| |
| constexpr | mac_address (uint8_t b0, uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4, uint8_t b5) noexcept |
| | Constructs a MAC address from individual bytes.
|
| |
| constexpr const std::array< uint8_t, 6 > & | bytes () const noexcept |
| | Returns a reference to the underlying byte array.
|
| |
| constexpr const uint8_t * | data () const noexcept |
| | Returns a pointer to the raw byte data.
|
| |
| constexpr uint8_t * | data () noexcept |
| | Returns a mutable pointer to the raw byte data.
|
| |
| constexpr uint8_t | operator[] (std::size_t i) const noexcept |
| | Accesses a byte by index.
|
| |
| constexpr bool | operator== (const mac_address &) const noexcept=default |
| | Equality comparison.
|
| |
A MAC-48 (6-byte) hardware address.
Fixed-size value type for storing and comparing MAC addresses.
std::string to_string(core_id c)
Returns a string representation of a CPU core identifier.
mac_address base_mac_address()
Returns the base MAC address.
Definition at line 62 of file mac.hpp.
◆ mac_address() [1/3]
| constexpr idfxx::mac_address::mac_address |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs a zero-initialized MAC address (00:00:00:00:00:00).
◆ mac_address() [2/3]
| constexpr idfxx::mac_address::mac_address |
( |
std::array< uint8_t, 6 > |
bytes | ) |
|
|
inlineexplicitconstexprnoexcept |
Constructs a MAC address from a byte array.
- Parameters
-
| bytes | The 6-byte MAC address. |
Definition at line 74 of file mac.hpp.
◆ mac_address() [3/3]
| constexpr idfxx::mac_address::mac_address |
( |
uint8_t |
b0, |
|
|
uint8_t |
b1, |
|
|
uint8_t |
b2, |
|
|
uint8_t |
b3, |
|
|
uint8_t |
b4, |
|
|
uint8_t |
b5 |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a MAC address from individual bytes.
- Parameters
-
| b0 | First byte (most significant). |
| b1 | Second byte. |
| b2 | Third byte. |
| b3 | Fourth byte. |
| b4 | Fifth byte. |
| b5 | Sixth byte (least significant). |
Definition at line 87 of file mac.hpp.
◆ bytes()
| constexpr const std::array< uint8_t, 6 > & idfxx::mac_address::bytes |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns a reference to the underlying byte array.
- Returns
- The 6-byte array.
Definition at line 95 of file mac.hpp.
◆ data() [1/2]
| constexpr const uint8_t * idfxx::mac_address::data |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns a pointer to the raw byte data.
- Returns
- Pointer to the first byte.
Definition at line 102 of file mac.hpp.
◆ data() [2/2]
| constexpr uint8_t * idfxx::mac_address::data |
( |
| ) |
|
|
inlineconstexprnoexcept |
Returns a mutable pointer to the raw byte data.
- Returns
- Pointer to the first byte.
Definition at line 109 of file mac.hpp.
◆ operator==()
| constexpr bool idfxx::mac_address::operator== |
( |
const mac_address & |
| ) |
const |
|
constexprdefaultnoexcept |
Equality comparison.
- Returns
- True if both MAC addresses have the same bytes.
◆ operator[]()
| constexpr uint8_t idfxx::mac_address::operator[] |
( |
std::size_t |
i | ) |
const |
|
inlineconstexprnoexcept |
Accesses a byte by index.
- Parameters
-
- Returns
- The byte at the given index.
Definition at line 117 of file mac.hpp.
The documentation for this class was generated from the following file:
- idfxx_hw_support/include/idfxx/mac.hpp