first use of libmbus

This commit is contained in:
Wolfgang Hottgenroth 2020-11-03 12:32:08 +01:00
parent 9f35a6e338
commit e708da9178
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -81,15 +81,20 @@ static void parseAndPrintFrame(t_longframe *frame) {
logMsg("papf parse: %d, t:%d", r, frame_data.type);
mbus_data_record *record;
for (record = frame_data.data_var.record;
int i;
for (record = frame_data.data_var.record, i = 0;
record;
record = record->next) {
record = record->next, i++) {
logMsg("papf len: %d, dif: %02x, difel: %02x, vif: %02x, vifel: %02x",
record->data_len,
record->drh.dib.dif,
record->drh.dib.ndife,
record->drh.vib.vif,
record->drh.vib.nvife);
logMsg("papf txt: %s %s %s",
mbus_data_record_function(record),
mbus_data_record_unit(record),
mbus_data_record_value(record));
}
mbus_data_record_free(frame_data.data_var.record);