first use of libmbus
This commit is contained in:
parent
9c76689e06
commit
54233f4a99
@ -76,16 +76,18 @@ static void parseAndPrintFrame(t_longframe *frame) {
|
||||
|
||||
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);
|
||||
mbus_data_record *record;
|
||||
int i;
|
||||
for (record = frame_data.data_var.record, i = 0;
|
||||
for (record = data_var->record, i = 0;
|
||||
record;
|
||||
record = record->next, i++) {
|
||||
logMsg("papf txt: U:%s V:%s",
|
||||
mbus_data_record_unit(record),
|
||||
mbus_data_record_value(record));
|
||||
}
|
||||
mbus_data_record_free(frame_data.data_var.record);
|
||||
mbus_data_record_free(data_var->record);
|
||||
} else {
|
||||
logMsg("papf err: unable to parse frame");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user