61 memcpy(octets, this->octets, 6);
69 memcpy(this->octets, octets, 6);
101 return memcmp(octets, other.octets,
sizeof(octets)) == 0;
120 operator bool_type()
const 122 return operator!() ? nullptr : &MacAddress::Testable;
130 memset(octets, 0,
sizeof(octets));
149 #define MACADDR_NONE MacAddress() size_t printTo(Print &p) const override
Definition: MacAddress.h:140
size_t print(char c)
Prints a single character to output stream.
Definition: Print.h:93
uint32_t getHash() const
Generate a simple 32-bit hash from the MAC address.
uint8_t operator[](unsigned index) const
Get the octet at the given index in the MAC address.
bool operator==(const MacAddress &other) const
Equality operator.
Definition: MacAddress.h:99
MacAddress(const Octets &octets)
Definition: MacAddress.h:51
The String class.
Definition: WString.h:136
A network hardware (MAC) address.
Definition: MacAddress.h:38
Provides formatted output to stream.
Definition: Print.h:36
String toString(char sep=':') const
Return a String representation of the MacAddress.
void getOctets(Octets &octets) const
Get the octets of the MAC address.
Definition: MacAddress.h:59
void clear()
Clear address to null value.
Definition: MacAddress.h:128
void setOctets(const Octets &octets)
Set the octets of the MAC address.
Definition: MacAddress.h:67
Definition: Printable.h:42
uint8_t Octets[6]
Definition: MacAddress.h:47
bool operator!() const
Test if this is a null address (00:00:00:00:00:00).
bool operator!=(const MacAddress &other) const
Inequality operator.
Definition: MacAddress.h:107