Go to the documentation of this file.
41 using bool_type = void (
MacAddress::*)()
const;
68 memcpy(octets, this->octets, 6);
76 memcpy(this->octets, octets, 6);
86 return const_cast<MacAddress*
>(
this)->
operator[](index);
116 return memcmp(octets, other.octets,
sizeof(octets)) == 0;
135 operator bool_type()
const
137 return operator!() ? nullptr : &MacAddress::Testable;
145 memset(octets, 0,
sizeof(octets));
159 #define MACADDR_NONE MacAddress()
const uint8_t & operator[](unsigned index) const
Get the octet at the given index in the MAC address.
Definition: MacAddress.h:84
The String class.
Definition: WString.h:136
void getOctets(Octets &octets) const
Get the octets of the MAC address.
Definition: MacAddress.h:66
String toString(char sep=':') const
Return a String representation of the MacAddress.
void clear()
Clear address to null value.
Definition: MacAddress.h:143
uint32_t getHash() const
Generate a simple 32-bit hash from the MAC address.
MacAddress(const Octets &octets)
Definition: MacAddress.h:51
bool operator!=(const MacAddress &other) const
Inequality operator.
Definition: MacAddress.h:122
bool operator!() const
Test if this is a null address (00:00:00:00:00:00).
bool operator==(const MacAddress &other) const
Equality operator.
Definition: MacAddress.h:114
void setOctets(const Octets &octets)
Set the octets of the MAC address.
Definition: MacAddress.h:74
A network hardware (MAC) address.
Definition: MacAddress.h:38
uint8_t[6] Octets
Definition: MacAddress.h:47