35 if (in == NULL || out == NULL) {
return false; }
38 for (
int i = 0; i < 2; i++) {
50 v += (in[i] -
'0') << (4 * (1 - i));
58 v += (in[i] -
'a' + 10) << (4 * (1 - i));
66 v += (in[i] -
'A' + 10) << (4 * (1 - i));
93 if (in == NULL || out == NULL || (*end) < 25) {
return false; }
96 for (
unsigned int i = 0; i < (*end); ++i) {
102 if (le < 0) {
return false; }
bool hexpair_to_uint(const char *in, uint8_t *out)
Convert a string of hexadecimal characters to corresponding value.
bool dw_string_hxv(const char *in, size_t *end, dw_hxv *out)
Read a line of HXV data from string and convert.
Internal representation of a Datawell HXV message.
uint8_t data[8]
8 bytes of data
uint8_t status
Error count. 0 or 1 OK, 2+ error.
uint8_t lines
Transmitted line number.