38 bool test(
const char *in);
47 const char *l1 =
"0618,B34D,8EE9,2DE4,2F4C\r";
48 const char *l2 =
"0424,4CBA,2FC8,2F84,F09E\r";
49 const char *l3 =
"001E,7FFF,80E0,0300,1689\r";
65 bool test(
const char *in) {
67 size_t slen = strlen(in);
77 "Line 0x%02x: Status %02d, North: %+5.2fm, West: %+5.2fm, Vertical: "
79 thxv.
lines, thxv.
status, north / 100.0, west / 100.0, vert / 100.0);
80 fprintf(stdout,
"\tCyclic data: 0x%04x. Parity bytes: 0x%04x\n", cycdat, parity);
bool test(const char *in)
int16_t dw_hxv_vertical(const dw_hxv *in)
Extract vertical displacement component from HXV input line.
int16_t dw_hxv_west(const dw_hxv *in)
Extract west displacement component from HXV input line.
int16_t dw_hxv_north(const dw_hxv *in)
Extract north displacement component from HXV input line.
uint16_t dw_hxv_parity(const dw_hxv *in)
Extract parity word from HXV input line.
uint16_t dw_hxv_cycdat(const dw_hxv *in)
Extract cyclic data word from HXV input line.
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 status
Error count. 0 or 1 OK, 2+ error.
uint8_t lines
Transmitted line number.