A network hardware (MAC) address.
More...
#include <MacAddress.h>
A network hardware (MAC) address.
- Author
- Mark Lindner
-
mikee47 mike@.nosp@m.sill.nosp@m.yhous.nosp@m.e.ne.nosp@m.t Sming integration
◆ Octets
◆ MacAddress() [1/2]
MacAddress::MacAddress |
( |
| ) |
|
|
default |
◆ MacAddress() [2/2]
MacAddress::MacAddress |
( |
const Octets & |
octets | ) |
|
|
inline |
◆ clear()
void MacAddress::clear |
( |
void |
| ) |
|
|
inline |
Clear address to null value.
◆ getHash()
uint32_t MacAddress::getHash |
( |
| ) |
const |
Generate a simple 32-bit hash from the MAC address.
- Return values
-
- Note
- This does not uniquely identify the key
◆ getOctets()
void MacAddress::getOctets |
( |
Octets & |
octets | ) |
const |
|
inline |
Get the octets of the MAC address.
◆ operator bool_type()
MacAddress::operator bool_type |
( |
| ) |
const |
|
inline |
Safe bool operator, returns true if address is non-null.
◆ operator!()
bool MacAddress::operator! |
( |
| ) |
const |
Test if this is a null address (00:00:00:00:00:00).
◆ operator!=()
◆ operator==()
◆ operator[]() [1/2]
uint8_t MacAddress::operator[] |
( |
unsigned |
index | ) |
const |
Get the octet at the given index in the MAC address.
- Parameters
-
- Returns
- The octet at the given index.
◆ operator[]() [2/2]
uint8_t& MacAddress::operator[] |
( |
unsigned |
index | ) |
|
Get a reference to the octet at the given index in the MAC address.
- Parameters
-
- Returns
- A reference to the octet at the given index.
◆ printTo()
size_t MacAddress::printTo |
( |
Print & |
p | ) |
const |
|
inlineoverridevirtual |
◆ setOctets()
void MacAddress::setOctets |
( |
const Octets & |
octets | ) |
|
|
inline |
Set the octets of the MAC address.
◆ toString()
String MacAddress::toString |
( |
char |
sep = ':' | ) |
const |
Return a String representation of the MacAddress.
- Parameters
-
sep | Character to insert between octets |
- Note
- Various conventions exist for display MAC addresses.
- The IEEE standard specifies '-',
"01-02-03-04-05-06"
- A more common convention (as used in linux) is ':',
"01:02:03:04:05:06"
- To omit the separator use '\0',
"010203040506"
The documentation for this class was generated from the following file: