From 20bc6c6a022a918224e1de614a142a7ba3cbf86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Sat, 9 May 2020 23:43:30 +0200 Subject: [PATCH] Add --selectfields=... --- CHANGES | 13 +++++ README.md | 16 ++++-- src/cmdline.cc | 19 ++++++- src/config.cc | 13 +++++ src/config.h | 3 ++ src/main.cc | 27 ++++++++-- src/meters.cc | 81 ++++++++++++++++++++++++++++-- src/meters.h | 6 ++- src/meters_common_implementation.h | 5 +- src/printer.cc | 6 ++- src/printer.h | 2 +- test.sh | 3 ++ tests/test_additional_json.sh | 2 +- tests/test_fields.sh | 37 ++++++++++++++ wmbusmeters.1 | 2 +- 15 files changed, 217 insertions(+), 18 deletions(-) create mode 100755 tests/test_fields.sh diff --git a/CHANGES b/CHANGES index 18444be..1841e96 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,16 @@ +Version 0.9.31: 2020-05-09 + +You can add comments in the conf and meter files. +A comment is a line that starts with #. + +When using --format=fields you can now supply +--selectfields=id,total_m3 to print only the selected fields. +Run with --listfields to see all the avilable fields from a meter. + +Improvements in the izar driver. Thanks Erwan! + +Bug fixes in the amd8465 driver. Thanks Henry N.! + Version 0.9.30: 2020-04-22 Erwan added support for building on FreeBSD. Thanks Erwan! diff --git a/README.md b/README.md index dceeb88..665a03d 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,8 @@ As you can use: --listento=c1,t1,s1 tell the wmbus dongle to listen to these link modes different dongles support different combinations of modes --c1 --t1 --s1 --s1m ... another way to set the link mode for the dongle + --listenvs list the env variables available for the meter + --listfields list the fields selectable for the meter --logfile= use this file instead of stdout --logtelegrams log the contents of the telegrams for easy replay --meterfiles= store meter readings in dir @@ -142,9 +144,9 @@ As you can use: timestamp (localtime) with the given resolution. --oneshot wait for an update from each meter, then quit --reopenafter=