7 if (c >=
'0' && c <=
'9')
9 if (c >=
'a' && c <=
'f')
11 if (c >=
'A' && c <=
'F')
68 return ((c >=
'0' && c <=
'9') ||
69 (c >=
'a' && c <=
'f') ||
70 (c >=
'A' && c <=
'F'));
76 int len = mac_str.size();
79 for (
int j = 2; j < len; j += 3)
80 if (mac_str[j] !=
':')
82 for (
int j = 0; j < len; j += 3)
static uint8_t byteFromHexPair(char c1, char c2)
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
A simple wrapper class for internal C-API HebiMacAddress objects to allow interfacing with API calls ...
bool setToHexString(std::string mac_str)
Sets the value of the current MacAddress to the value given in 'mac_str'.
static bool isHexDigitValid(char c)
static uint8_t hexToInt(char c)
static MacAddress fromBytes(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t e, uint8_t f)
Creates a MacAddress from individual bytes.
static bool isHexStringValid(std::string mac_str)
Is mac_str a valid string of format dd:dd:dd:dd:dd:dd, where 'd' is a hex digit 0-F. Lowercase values accepted. 1 if yes, 0 if no.
uint8_t & operator[](std::size_t idx)
MacAddress()
Creates MAC address 00:00:00:00:00:00.
EIGEN_DEVICE_FUNC const Scalar & b