Structure that represents physical MAC address used in MeshNEt protocol. MeshMAC address unlike MAC address used in TCP/IP protocol has just 4 octets.
More...
#include <meshHelper.h>
|
static char | digitToHex (uint8_t digit, bool low=true) |
| Converts one HEX digit (0-15) to HEX character (0-F). More...
|
|
Structure that represents physical MAC address used in MeshNEt protocol. MeshMAC address unlike MAC address used in TCP/IP protocol has just 4 octets.
◆ MeshMAC() [1/4]
◆ MeshMAC() [2/4]
MeshMAC::MeshMAC |
( |
uint8_t |
octet1, |
|
|
uint8_t |
octet2, |
|
|
uint8_t |
octet3, |
|
|
uint8_t |
octet4 |
|
) |
| |
Constructor with octets.
- Parameters
-
◆ MeshMAC() [3/4]
MeshMAC::MeshMAC |
( |
uint32_t |
mac | ) |
|
Constructor with raw value.
- Parameters
-
mac | Representation of MeshMAC as raw value 32-bit value. |
◆ MeshMAC() [4/4]
MeshMAC::MeshMAC |
( |
const MeshMAC & |
mac | ) |
|
|
default |
Default copy constructor.
◆ digitToHex()
char MeshMAC::digitToHex |
( |
uint8_t |
digit, |
|
|
bool |
low = true |
|
) |
| |
|
static |
Converts one HEX digit (0-15) to HEX character (0-F).
- Parameters
-
digit | Digit to convert (0-15). |
low | Set to true to return low case characters. |
- Returns
- Returns HEX character of digit.
◆ getRaw()
uint32_t MeshMAC::getRaw |
( |
| ) |
const |
|
inline |
Gets raw form of Mesh MAC address.
- Returns
- Returns raw form of Mesh MAC address.
◆ isValid()
bool MeshMAC::isValid |
( |
| ) |
const |
|
inline |
Checks if Mesh MAC address is valid.
- Returns
- Returns true when Mesh MAC address is valid.
◆ operator uint32_t() [1/2]
MeshMAC::operator uint32_t |
( |
| ) |
|
|
inline |
◆ operator uint32_t() [2/2]
MeshMAC::operator uint32_t |
( |
| ) |
const |
|
inline |
◆ operator=()
void MeshMAC::operator= |
( |
const uint32_t & |
val | ) |
|
|
inline |
◆ printTo()
size_t MeshMAC::printTo |
( |
Print & |
p | ) |
const |
Pretty prints MeshMAC.
- Parameters
-
p | Stream, where to print data. |
- Returns
- Returns number of printed characters.
◆ setRaw()
void MeshMAC::setRaw |
( |
const uint32_t |
mac | ) |
|
|
inline |
Sets Mesh MAC address from raw form.
- Parameters
-
mac | Mesh MAC address to set. |
◆ octet1
uint8_t MeshMAC::octet1 = 0 |
◆ octet2
uint8_t MeshMAC::octet2 = 0 |
◆ octet3
uint8_t MeshMAC::octet3 = 0 |
◆ octet4
uint8_t MeshMAC::octet4 = 0 |
The documentation for this struct was generated from the following files: