first use of libmbus
This commit is contained in:
parent
47df03e9e5
commit
6ddc415a45
@ -116,7 +116,31 @@ static void parseAndPrintFrame(t_mbusCommHandle *mbusCommHandle) {
|
||||
int r = mbus_frame_data_parse(&reply, &frame_data);
|
||||
if (r == 0) {
|
||||
mbus_data_variable *data_var = &(frame_data.data_var);
|
||||
logMsg("papf sts: %d", data_var->header.status);
|
||||
logMsg("papf sts: %02x", data_var->header.status);
|
||||
if ((data_var->header.status & 0x01)) {
|
||||
logMsg("papf sts: Application Busy");
|
||||
}
|
||||
if ((data_var->header.status & 0x02)) {
|
||||
logMsg("papf sts: Any Application Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x04)) {
|
||||
logMsg("papf sts: Power Low");
|
||||
}
|
||||
if ((data_var->header.status & 0x08)) {
|
||||
logMsg("papf sts: Permanent Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x10)) {
|
||||
logMsg("papf sts: Temporary Error");
|
||||
}
|
||||
if ((data_var->header.status & 0x20)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 1");
|
||||
}
|
||||
if ((data_var->header.status & 0x40)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 2");
|
||||
}
|
||||
if ((data_var->header.status & 0x80)) {
|
||||
logMsg("papf sts: Specific to manufacturer Error 3");
|
||||
}
|
||||
mbus_data_record *record;
|
||||
int i;
|
||||
for (record = data_var->record, i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user