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/3]
MacAddress::MacAddress |
( |
| ) |
|
|
default |
◆ MacAddress() [2/3]
MacAddress::MacAddress |
( |
const Octets & |
octets | ) |
|
|
inline |
◆ MacAddress() [3/3]
MacAddress::MacAddress |
( |
const String & |
s | ) |
|
Create a MAC address from valid string. e.g. 01:02:03:04:05:06 Separators are optional.
◆ 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 String()
MacAddress::operator String |
( |
| ) |
const |
|
inline |
◆ operator!()
bool MacAddress::operator! |
( |
| ) |
const |
Test if this is a null address (00:00:00:00:00:00).
◆ operator!=()
◆ operator==()
bool MacAddress::operator== |
( |
const MacAddress & |
other | ) |
const |
|
inline |
◆ operator[]() [1/2]
uint8_t& MacAddress::operator[] |
( |
unsigned |
index | ) |
|
Get a reference to the octet at the given index in the MAC address.
- Parameters
-
- Return values
-
uint8_t& | A writeable reference to the octet at the given index. |
◆ operator[]() [2/2]
const uint8_t& MacAddress::operator[] |
( |
unsigned |
index | ) |
const |
|
inline |
Get the octet at the given index in the MAC address.
- Parameters
-
- Return values
-
const | uint8_t& Read-only reference to the octet at the given index. |
◆ 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: