From 05134e7e608111455ce64dfe9293cd7bffcd686a Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Apr 2018 22:38:30 +0200 Subject: [PATCH 01/29] try offering FCB function --- mbus/mbus-protocol-aux.c | 36 ++++++++++++++++++++++++++++++++++++ mbus/mbus-protocol-aux.h | 5 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 8877d62c..ff3ed572 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -1930,6 +1930,42 @@ mbus_send_request_frame(mbus_handle * handle, int address) return retval; } +//------------------------------------------------------------------------------ +// send a request packet to from master to slave +//------------------------------------------------------------------------------ +int +mbus_send_request_frame_fcb(mbus_handle * handle, int address) +{ + int retval = 0; + mbus_frame *frame; + + if (mbus_is_primary_address(address) == 0) + { + MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, address); + return -1; + } + + frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT); + + if (frame == NULL) + { + MBUS_ERROR("%s: failed to allocate mbus frame.\n", __PRETTY_FUNCTION__); + return -1; + } + + frame->control = MBUS_CONTROL_MASK_REQ_UD2 | MBUS_CONTROL_MASK_DIR_M2S | MBUS_CONTROL_MASK_FCB; + frame->address = address; + + if (mbus_send_frame(handle, frame) == -1) + { + MBUS_ERROR("%s: failed to send mbus frame.\n", __PRETTY_FUNCTION__); + retval = -1; + } + + mbus_frame_free(frame); + return retval; +} + //------------------------------------------------------------------------------ // send a user data packet from master to slave //------------------------------------------------------------------------------ diff --git a/mbus/mbus-protocol-aux.h b/mbus/mbus-protocol-aux.h index 4dacef4c..143c7eee 100755 --- a/mbus/mbus-protocol-aux.h +++ b/mbus/mbus-protocol-aux.h @@ -97,7 +97,7 @@ typedef struct _mbus_handle { void (*recv_event) (unsigned char src_type, const char *buff, size_t len); void (*send_event) (unsigned char src_type, const char *buff, size_t len); void (*scan_progress) (struct _mbus_handle *handle, const char *mask); - void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); + void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); void *auxdata; } mbus_handle; @@ -293,7 +293,8 @@ int mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baud * * @return Zero when successful. */ -int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame_fcb(mbus_handle * handle, int address); /** * Sends user data frame (SND_UD) to given slave using "unified" handle From 075ae5cdd15a633835990d4f89074f6b5dd9437e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Apr 2018 22:38:30 +0200 Subject: [PATCH 02/29] try offering FCB function --- mbus/mbus-protocol-aux.c | 36 ++++++++++++++++++++++++++++++++++++ mbus/mbus-protocol-aux.h | 5 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 8877d62c..ff3ed572 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -1930,6 +1930,42 @@ mbus_send_request_frame(mbus_handle * handle, int address) return retval; } +//------------------------------------------------------------------------------ +// send a request packet to from master to slave +//------------------------------------------------------------------------------ +int +mbus_send_request_frame_fcb(mbus_handle * handle, int address) +{ + int retval = 0; + mbus_frame *frame; + + if (mbus_is_primary_address(address) == 0) + { + MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, address); + return -1; + } + + frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT); + + if (frame == NULL) + { + MBUS_ERROR("%s: failed to allocate mbus frame.\n", __PRETTY_FUNCTION__); + return -1; + } + + frame->control = MBUS_CONTROL_MASK_REQ_UD2 | MBUS_CONTROL_MASK_DIR_M2S | MBUS_CONTROL_MASK_FCB; + frame->address = address; + + if (mbus_send_frame(handle, frame) == -1) + { + MBUS_ERROR("%s: failed to send mbus frame.\n", __PRETTY_FUNCTION__); + retval = -1; + } + + mbus_frame_free(frame); + return retval; +} + //------------------------------------------------------------------------------ // send a user data packet from master to slave //------------------------------------------------------------------------------ diff --git a/mbus/mbus-protocol-aux.h b/mbus/mbus-protocol-aux.h index 4dacef4c..143c7eee 100755 --- a/mbus/mbus-protocol-aux.h +++ b/mbus/mbus-protocol-aux.h @@ -97,7 +97,7 @@ typedef struct _mbus_handle { void (*recv_event) (unsigned char src_type, const char *buff, size_t len); void (*send_event) (unsigned char src_type, const char *buff, size_t len); void (*scan_progress) (struct _mbus_handle *handle, const char *mask); - void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); + void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); void *auxdata; } mbus_handle; @@ -293,7 +293,8 @@ int mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baud * * @return Zero when successful. */ -int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame_fcb(mbus_handle * handle, int address); /** * Sends user data frame (SND_UD) to given slave using "unified" handle From 324b2420f94b5646964299c4c78a86b81f7c0a4b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Apr 2018 22:38:30 +0200 Subject: [PATCH 03/29] try offering FCB function --- mbus/mbus-protocol-aux.c | 36 ++++++++++++++++++++++++++++++++++++ mbus/mbus-protocol-aux.h | 5 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 5ddba9fb..c932f7e1 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -1924,6 +1924,42 @@ mbus_send_request_frame(mbus_handle * handle, int address) return retval; } +//------------------------------------------------------------------------------ +// send a request packet to from master to slave +//------------------------------------------------------------------------------ +int +mbus_send_request_frame_fcb(mbus_handle * handle, int address) +{ + int retval = 0; + mbus_frame *frame; + + if (mbus_is_primary_address(address) == 0) + { + MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, address); + return -1; + } + + frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT); + + if (frame == NULL) + { + MBUS_ERROR("%s: failed to allocate mbus frame.\n", __PRETTY_FUNCTION__); + return -1; + } + + frame->control = MBUS_CONTROL_MASK_REQ_UD2 | MBUS_CONTROL_MASK_DIR_M2S | MBUS_CONTROL_MASK_FCB; + frame->address = address; + + if (mbus_send_frame(handle, frame) == -1) + { + MBUS_ERROR("%s: failed to send mbus frame.\n", __PRETTY_FUNCTION__); + retval = -1; + } + + mbus_frame_free(frame); + return retval; +} + //------------------------------------------------------------------------------ // send a user data packet from master to slave //------------------------------------------------------------------------------ diff --git a/mbus/mbus-protocol-aux.h b/mbus/mbus-protocol-aux.h index 4dacef4c..143c7eee 100755 --- a/mbus/mbus-protocol-aux.h +++ b/mbus/mbus-protocol-aux.h @@ -97,7 +97,7 @@ typedef struct _mbus_handle { void (*recv_event) (unsigned char src_type, const char *buff, size_t len); void (*send_event) (unsigned char src_type, const char *buff, size_t len); void (*scan_progress) (struct _mbus_handle *handle, const char *mask); - void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); + void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); void *auxdata; } mbus_handle; @@ -293,7 +293,8 @@ int mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baud * * @return Zero when successful. */ -int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame_fcb(mbus_handle * handle, int address); /** * Sends user data frame (SND_UD) to given slave using "unified" handle From 37225059e29cef4c7c92e1cdd6b929816f62f644 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 6 Jul 2020 12:06:39 +0200 Subject: [PATCH 04/29] Also generate normalized XML In order to increase the test coverage also generate the normalized version of XML output. --- test/generate-xml.sh | 52 ++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/test/generate-xml.sh b/test/generate-xml.sh index 6a3231ff..b9662d93 100755 --- a/test/generate-xml.sh +++ b/test/generate-xml.sh @@ -37,51 +37,71 @@ if [ $# -eq 2 ]; then fi # Check if mbus_parse_hex exists -if [ ! -x $mbus_parse_hex ]; then +if [ ! -x "$mbus_parse_hex" ]; then echo "mbus_parse_hex not found" echo "path to mbus_parse_hex: $mbus_parse_hex" exit 3 fi -for hexfile in "$directory"/*.hex; do - if [ ! -f "$hexfile" ]; then - continue - fi +generate_xml() { + directory="$1" + hexfile="$2" + mode="$3" - filename=`basename $hexfile .hex` + filename=$(basename "$hexfile" .hex) + + if [ "$mode" = "normalized" ]; then + options="-n" + mode=".norm" + else + options="" + mode="" + fi # Parse hex file and write XML in file - $mbus_parse_hex "$hexfile" > "$directory/$filename.xml.new" + "$mbus_parse_hex" $options "$hexfile" > "$directory/$filename$mode.xml.new" result=$? # Check parsing result if [ $result -ne 0 ]; then echo "Unable to generate XML for $hexfile" - rm "$directory/$filename.xml.new" - continue + rm "$directory/$filename$mode.xml.new" + return 1 fi # Compare old XML with new XML and write in file - diff -u "$directory/$filename.xml" "$directory/$filename.xml.new" 2> /dev/null > "$directory/$filename.dif" + diff -u "$directory/$filename$mode.xml" "$directory/$filename$mode.xml.new" 2> /dev/null > "$directory/$filename$mode.dif" result=$? case "$result" in 0) # XML equal -> remove new - rm "$directory/$filename.xml.new" - rm "$directory/$filename.dif" + rm "$directory/$filename$mode.xml.new" + rm "$directory/$filename$mode.dif" ;; 1) # different -> print diff - cat "$directory/$filename.dif" && rm "$directory/$filename.dif" + cat "$directory/$filename$mode.dif" && rm "$directory/$filename$mode.dif" echo "" ;; *) # no old -> rename XML - echo "Create $filename.xml" - mv "$directory/$filename.xml.new" "$directory/$filename.xml" - rm "$directory/$filename.dif" + echo "Create $filename$mode.xml" + mv "$directory/$filename$mode.xml.new" "$directory/$filename$mode.xml" + rm "$directory/$filename$mode.dif" ;; esac + + return $result +} + +for hexfile in "$directory"/*.hex; do + if [ ! -f "$hexfile" ]; then + continue + fi + + generate_xml "$directory" "$hexfile" "default" + + generate_xml "$directory" "$hexfile" "normalized" done From 581a8d187827b7308708d3f2838a34d3afdb8c81 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 6 Jul 2020 12:55:05 +0200 Subject: [PATCH 05/29] Add normalized XML files of test frames --- test/test-frames/ACW_Itron-BM-plus-m.norm.xml | 87 ++++ .../ACW_Itron-CYBLE-M-Bus-14.norm.xml | 79 ++++ test/test-frames/EDC.norm.xml | 231 +++++++++++ .../EFE_Engelmann-Elster-SensoStar-2.norm.xml | 229 +++++++++++ .../EFE_Engelmann-WaterStar.norm.xml | 113 ++++++ test/test-frames/ELS_Elster-F96-Plus.norm.xml | 151 +++++++ test/test-frames/ELV-Elvaco-CMa10.norm.xml | 121 ++++++ .../EMU_EMU-Professional-375-M-Bus.norm.xml | 287 +++++++++++++ test/test-frames/Elster-F2.norm.xml | 133 ++++++ .../FIN-Finder-7E.23.8.230.0020.norm.xml | 69 ++++ test/test-frames/GWF-MTKcoder.norm.xml | 31 ++ test/test-frames/LGB_G350.norm.xml | 65 +++ test/test-frames/REL-Relay-Padpuls2.norm.xml | 63 +++ .../SBC_Saia-Burgess-ALE3.norm.xml | 191 +++++++++ test/test-frames/SEN_Pollustat.norm.xml | 143 +++++++ .../SEN_Sensus-PolluStat-E.norm.xml | 95 +++++ .../SEN_Sensus-PolluTherm.norm.xml | 87 ++++ .../SLB_CF-Compact-Integral-MK-MaXX.norm.xml | 139 +++++++ test/test-frames/THI_cma10.norm.xml | 121 ++++++ .../test-frames/ZRM_Minol-Minocal-C2.norm.xml | 335 ++++++++++++++++ test/test-frames/abb_delta.norm.xml | 153 +++++++ test/test-frames/abb_f95.norm.xml | 131 ++++++ test/test-frames/allmess_cf50.norm.xml | 95 +++++ test/test-frames/berg_dz_plus.norm.xml | 169 ++++++++ test/test-frames/electricity-meter-1.norm.xml | 191 +++++++++ test/test-frames/electricity-meter-2.norm.xml | 191 +++++++++ test/test-frames/els_falcon.norm.xml | 87 ++++ test/test-frames/els_tmpa_telegramm1.norm.xml | 63 +++ test/test-frames/elv_temp_humid.norm.xml | 121 ++++++ test/test-frames/emh_diz.norm.xml | 43 ++ .../engelmann_sensostar2c.norm.xml | 225 +++++++++++ test/test-frames/example_data_01.norm.xml | 63 +++ test/test-frames/example_data_02.norm.xml | 63 +++ test/test-frames/filler.norm.xml | 23 ++ test/test-frames/frame1.norm.xml | 23 ++ test/test-frames/frame2.norm.xml | 43 ++ test/test-frames/gmc_emmod206.norm.xml | 215 ++++++++++ test/test-frames/itron_bm_+m.norm.xml | 87 ++++ test/test-frames/itron_cf_51.norm.xml | 147 +++++++ test/test-frames/itron_cf_55.norm.xml | 119 ++++++ test/test-frames/itron_cf_echo_2.norm.xml | 119 ++++++ ...itron_cyble_m-bus_v1.4_cold_water.norm.xml | 79 ++++ .../itron_cyble_m-bus_v1.4_gas.norm.xml | 79 ++++ .../itron_cyble_m-bus_v1.4_water.norm.xml | 79 ++++ .../itron_integral_mk_maxx.norm.xml | 139 +++++++ test/test-frames/kamstrup_382_005.norm.xml | 75 ++++ .../kamstrup_multical_601.norm.xml | 259 ++++++++++++ .../landis+gyr_ultraheat_t230.norm.xml | 327 +++++++++++++++ test/test-frames/manual_frame2.norm.xml | 23 ++ test/test-frames/manual_frame3.norm.xml | 43 ++ test/test-frames/manual_frame7.norm.xml | 23 ++ test/test-frames/metrona_pollutherm.norm.xml | 95 +++++ .../test-frames/metrona_ultraheat_xs.norm.xml | 379 ++++++++++++++++++ test/test-frames/minol_minocal_c2.norm.xml | 335 ++++++++++++++++ test/test-frames/minol_minocal_wr3.norm.xml | 285 +++++++++++++ test/test-frames/nzr_dhz_5_63.norm.xml | 71 ++++ test/test-frames/oms_frame1.norm.xml | 39 ++ test/test-frames/oms_frame2.norm.xml | 55 +++ test/test-frames/oms_frame3.norm.xml | 87 ++++ test/test-frames/ram_modularis.norm.xml | 311 ++++++++++++++ test/test-frames/rel_padpuls2.norm.xml | 63 +++ test/test-frames/rel_padpuls3.norm.xml | 63 +++ test/test-frames/sen_pollusonic_2.norm.xml | 23 ++ test/test-frames/sen_pollutherm.norm.xml | 90 +++++ test/test-frames/siemens_water.norm.xml | 95 +++++ test/test-frames/siemens_wfh21.norm.xml | 103 +++++ .../sontex_supercal_531_telegram1.norm.xml | 111 +++++ test/test-frames/svm_f22_telegram1.norm.xml | 133 ++++++ test/test-frames/tch_telegramm1.norm.xml | 95 +++++ test/test-frames/wmbus-converted.norm.xml | 23 ++ 70 files changed, 8723 insertions(+) create mode 100644 test/test-frames/ACW_Itron-BM-plus-m.norm.xml create mode 100644 test/test-frames/ACW_Itron-CYBLE-M-Bus-14.norm.xml create mode 100644 test/test-frames/EDC.norm.xml create mode 100644 test/test-frames/EFE_Engelmann-Elster-SensoStar-2.norm.xml create mode 100644 test/test-frames/EFE_Engelmann-WaterStar.norm.xml create mode 100644 test/test-frames/ELS_Elster-F96-Plus.norm.xml create mode 100644 test/test-frames/ELV-Elvaco-CMa10.norm.xml create mode 100644 test/test-frames/EMU_EMU-Professional-375-M-Bus.norm.xml create mode 100644 test/test-frames/Elster-F2.norm.xml create mode 100644 test/test-frames/FIN-Finder-7E.23.8.230.0020.norm.xml create mode 100644 test/test-frames/GWF-MTKcoder.norm.xml create mode 100644 test/test-frames/LGB_G350.norm.xml create mode 100644 test/test-frames/REL-Relay-Padpuls2.norm.xml create mode 100644 test/test-frames/SBC_Saia-Burgess-ALE3.norm.xml create mode 100644 test/test-frames/SEN_Pollustat.norm.xml create mode 100644 test/test-frames/SEN_Sensus-PolluStat-E.norm.xml create mode 100644 test/test-frames/SEN_Sensus-PolluTherm.norm.xml create mode 100644 test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.norm.xml create mode 100644 test/test-frames/THI_cma10.norm.xml create mode 100644 test/test-frames/ZRM_Minol-Minocal-C2.norm.xml create mode 100644 test/test-frames/abb_delta.norm.xml create mode 100644 test/test-frames/abb_f95.norm.xml create mode 100644 test/test-frames/allmess_cf50.norm.xml create mode 100644 test/test-frames/berg_dz_plus.norm.xml create mode 100644 test/test-frames/electricity-meter-1.norm.xml create mode 100644 test/test-frames/electricity-meter-2.norm.xml create mode 100644 test/test-frames/els_falcon.norm.xml create mode 100644 test/test-frames/els_tmpa_telegramm1.norm.xml create mode 100644 test/test-frames/elv_temp_humid.norm.xml create mode 100644 test/test-frames/emh_diz.norm.xml create mode 100644 test/test-frames/engelmann_sensostar2c.norm.xml create mode 100644 test/test-frames/example_data_01.norm.xml create mode 100644 test/test-frames/example_data_02.norm.xml create mode 100644 test/test-frames/filler.norm.xml create mode 100644 test/test-frames/frame1.norm.xml create mode 100644 test/test-frames/frame2.norm.xml create mode 100644 test/test-frames/gmc_emmod206.norm.xml create mode 100644 test/test-frames/itron_bm_+m.norm.xml create mode 100644 test/test-frames/itron_cf_51.norm.xml create mode 100644 test/test-frames/itron_cf_55.norm.xml create mode 100644 test/test-frames/itron_cf_echo_2.norm.xml create mode 100644 test/test-frames/itron_cyble_m-bus_v1.4_cold_water.norm.xml create mode 100644 test/test-frames/itron_cyble_m-bus_v1.4_gas.norm.xml create mode 100644 test/test-frames/itron_cyble_m-bus_v1.4_water.norm.xml create mode 100644 test/test-frames/itron_integral_mk_maxx.norm.xml create mode 100644 test/test-frames/kamstrup_382_005.norm.xml create mode 100644 test/test-frames/kamstrup_multical_601.norm.xml create mode 100644 test/test-frames/landis+gyr_ultraheat_t230.norm.xml create mode 100644 test/test-frames/manual_frame2.norm.xml create mode 100644 test/test-frames/manual_frame3.norm.xml create mode 100644 test/test-frames/manual_frame7.norm.xml create mode 100644 test/test-frames/metrona_pollutherm.norm.xml create mode 100644 test/test-frames/metrona_ultraheat_xs.norm.xml create mode 100644 test/test-frames/minol_minocal_c2.norm.xml create mode 100644 test/test-frames/minol_minocal_wr3.norm.xml create mode 100644 test/test-frames/nzr_dhz_5_63.norm.xml create mode 100644 test/test-frames/oms_frame1.norm.xml create mode 100644 test/test-frames/oms_frame2.norm.xml create mode 100644 test/test-frames/oms_frame3.norm.xml create mode 100644 test/test-frames/ram_modularis.norm.xml create mode 100644 test/test-frames/rel_padpuls2.norm.xml create mode 100644 test/test-frames/rel_padpuls3.norm.xml create mode 100644 test/test-frames/sen_pollusonic_2.norm.xml create mode 100644 test/test-frames/sen_pollutherm.norm.xml create mode 100644 test/test-frames/siemens_water.norm.xml create mode 100644 test/test-frames/siemens_wfh21.norm.xml create mode 100644 test/test-frames/sontex_supercal_531_telegram1.norm.xml create mode 100644 test/test-frames/svm_f22_telegram1.norm.xml create mode 100644 test/test-frames/tch_telegramm1.norm.xml create mode 100644 test/test-frames/wmbus-converted.norm.xml diff --git a/test/test-frames/ACW_Itron-BM-plus-m.norm.xml b/test/test-frames/ACW_Itron-BM-plus-m.norm.xml new file mode 100644 index 00000000..fead0d15 --- /dev/null +++ b/test/test-frames/ACW_Itron-BM-plus-m.norm.xml @@ -0,0 +1,87 @@ + + + + + 11490378 + ACW + 14 + Itron BM +m + Cold water + 10 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11490378.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 54.321000 + + + + Instantaneous value + 1 + - + Time point (date) + 2000-00-00 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T11:11:00Z + + + + Instantaneous value + 0 + s + Operating time + 0.000000 + + + + Instantaneous value + 0 + + Firmware version + 2.000000 + + + + Instantaneous value + 0 + + Software version + 6.000000 + + + + Manufacturer specific + 0 + + + 00 01 75 13 + + + diff --git a/test/test-frames/ACW_Itron-CYBLE-M-Bus-14.norm.xml b/test/test-frames/ACW_Itron-CYBLE-M-Bus-14.norm.xml new file mode 100644 index 00000000..943c741d --- /dev/null +++ b/test/test-frames/ACW_Itron-CYBLE-M-Bus-14.norm.xml @@ -0,0 +1,79 @@ + + + + + 9011523 + ACW + 20 + Itron CYBLE M-Bus 1.4 + Water + 37 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 9011523.000000 + + + + Instantaneous value + 0 + - + cust. ID + 09LA076755 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T14:26:00Z + + + + Instantaneous value + 0 + - + bat. time + 2516.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.031000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.031000 + + + + Manufacturer specific + 0 + + + 00 01 1F + + + diff --git a/test/test-frames/EDC.norm.xml b/test/test-frames/EDC.norm.xml new file mode 100644 index 00000000..c43be60c --- /dev/null +++ b/test/test-frames/EDC.norm.xml @@ -0,0 +1,231 @@ + + + + + 11120895 + EDC + 2 + + Heat: Outlet + 23 + 00 + 0000 + + + + Instantaneous value + 0 + 0 + 0 + Wh + Energy + 35000.000000 + + + + Instantaneous value + 0 + 0 + 0 + Wh + Energy + 465000.000000 + + + + Instantaneous value + 0 + 0 + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 0 + 0 + °C + Flow temperature + 21.536703 + + + + Instantaneous value + 0 + 0 + 0 + °C + Return temperature + 21.605042 + + + + Instantaneous value + 0 + 0 + 1 + °C + Flow temperature + 92.000000 + + + + Instantaneous value + 0 + 0 + 1 + °C + Return temperature + 92.000000 + + + + Instantaneous value + 0 + 0 + 0 + m^3/h + Volume flow + 0.000707 + + + + Instantaneous value + 0 + 0 + 1 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 0 + 0 + 0 + m^3/h + Volume flow + 0.357622 + + + + Maximum value + 0 + 0 + 1 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + 0 + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Maximum value + 0 + 0 + 0 + W + Power + 18511.912109 + + + + Maximum value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-07-10T15:25:00Z + + + + Instantaneous value + 0 + 0 + 0 + - + C + 3571.000000 + + + + Instantaneous value + 0 + 0 + 1 + - + C + 413.000000 + + + + Instantaneous value + 0 + 0 + 0 + - + c + 1.000000 + + + + Instantaneous value + 0 + 0 + 1 + - + c + 1.000000 + + + + Manufacturer specific + 0 + + + + + + diff --git a/test/test-frames/EFE_Engelmann-Elster-SensoStar-2.norm.xml b/test/test-frames/EFE_Engelmann-Elster-SensoStar-2.norm.xml new file mode 100644 index 00000000..95229632 --- /dev/null +++ b/test/test-frames/EFE_Engelmann-Elster-SensoStar-2.norm.xml @@ -0,0 +1,229 @@ + + + + + 24083345 + EFE + 0 + Engelmann / Elster SensoStar 2 + Heat: Outlet + 102 + 27 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 24083345.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-12T14:23:00Z + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 2 + 0 + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2013-12-31 + + + + Instantaneous value + 0 + - + Time point (date) + 2014-12-31 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 0 + m^3/h + Volume flow + 0.025000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Maximum value + 0 + W + Power + 11.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 22.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 21.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.090000 + + + + Instantaneous value + 0 + s + On time + 45273600.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000011 + + + diff --git a/test/test-frames/EFE_Engelmann-WaterStar.norm.xml b/test/test-frames/EFE_Engelmann-WaterStar.norm.xml new file mode 100644 index 00000000..c0e11e42 --- /dev/null +++ b/test/test-frames/EFE_Engelmann-WaterStar.norm.xml @@ -0,0 +1,113 @@ + + + + + 4990254 + EFE + 0 + Engelmann WaterStar + Warm water (30-90°C) + 12 + 27 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 4990254.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T12:10:00Z + + + + Instantaneous value + 0 + m^3 + Volume + 0.332000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.331000 + + + + Instantaneous value + 2 + 0 + 0 + m^3 + Volume + 0.332000 + + + + Instantaneous value + 1 + - + Time point (date) + 2013-12-31 + + + + Instantaneous value + 0 + - + Time point (date) + 2014-12-31 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 0 + m^3/h + Volume flow + 2.070000 + + + + Instantaneous value + 0 + s + On time + 102902400.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000008 + + + diff --git a/test/test-frames/ELS_Elster-F96-Plus.norm.xml b/test/test-frames/ELS_Elster-F96-Plus.norm.xml new file mode 100644 index 00000000..e2407b37 --- /dev/null +++ b/test/test-frames/ELS_Elster-F96-Plus.norm.xml @@ -0,0 +1,151 @@ + + + + + 44493951 + ELS + 47 + Elster F96 Plus + Heat: Outlet + 161 + 70 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Value during error state + 0 + W + Power + 13131113.000000 + + + + Value during error state + 0 + m^3/h + Volume flow + 131.113000 + + + + Instantaneous value + 0 + °C + Flow temperature + 22.700000 + + + + Instantaneous value + 0 + °C + Return temperature + 22.600000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.100000 + + + + Instantaneous value + 0 + s + Operating time + 63072000.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T13:09:00Z + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 2 + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2013-05-31 + + + diff --git a/test/test-frames/ELV-Elvaco-CMa10.norm.xml b/test/test-frames/ELV-Elvaco-CMa10.norm.xml new file mode 100644 index 00000000..13a95962 --- /dev/null +++ b/test/test-frames/ELV-Elvaco-CMa10.norm.xml @@ -0,0 +1,121 @@ + + + + + 24011561 + ELV + 22 + Elvaco CMa10 + Other + 63 + 00 + 0000 + + + + Instantaneous value + 0 + + Digital Input + 2.000000 + + + + Instantaneous value + 0 + - + %RH + 54.100000 + + + + Minimum value + 0 + - + %RH + 33.640000 + + + + Maximum value + 0 + - + %RH + 73.630000 + + + + Instantaneous value + 0 + °C + External temperature + 20.940000 + + + + Minimum value + 0 + °C + External temperature + 13.720000 + + + + Maximum value + 0 + °C + External temperature + 29.780000 + + + + Instantaneous value + 0 + s + Averaging Duration + 86400.000000 + + + + Instantaneous value + 1 + °C + External temperature + 20.920000 + + + + Instantaneous value + 2 + 0 + 0 + °C + External temperature + 20.790000 + + + + Instantaneous value + 0 + + Fabrication No + 24011561.000000 + + + + Instantaneous value + 0 + + Software version + 262144.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/EMU_EMU-Professional-375-M-Bus.norm.xml b/test/test-frames/EMU_EMU-Professional-375-M-Bus.norm.xml new file mode 100644 index 00000000..e1d3388b --- /dev/null +++ b/test/test-frames/EMU_EMU-Professional-375-M-Bus.norm.xml @@ -0,0 +1,287 @@ + + + + + 32629 + EMU + 16 + EMU Professional 3/75 M-Bus + Electricity + 2 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 32629.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 1364.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 2 + Wh + Energy + 7854.000000 + + + + Instantaneous value + 0 + 2 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + W + Power + -2.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + W + Power + -2.000000 + + + + Instantaneous value + 0 + 0 + 2 + W + Power + 14.000000 + + + + Instantaneous value + 0 + 0 + 2 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + W + Power + 14.000000 + + + + Instantaneous value + 0 + V + Voltage + 225.700000 + + + + Instantaneous value + 0 + V + Voltage + 0.000000 + + + + Instantaneous value + 0 + V + Voltage + 0.000000 + + + + Minimum value + 0 + V + Voltage + 187.400000 + + + + Minimum value + 0 + V + Voltage + 0.000000 + + + + Minimum value + 0 + V + Voltage + 0.000000 + + + + Maximum value + 0 + V + Voltage + 241.000000 + + + + Maximum value + 0 + V + Voltage + 0.000000 + + + + Maximum value + 0 + V + Voltage + 0.000000 + + + + Instantaneous value + 0 + A + Current + -0.066000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + A + Current + -0.066000 + + + + Instantaneous value + 0 + + Manufacturer specific + 13.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 500.000000 + + + + Instantaneous value + 0 + + Reset counter + 56.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + diff --git a/test/test-frames/Elster-F2.norm.xml b/test/test-frames/Elster-F2.norm.xml new file mode 100644 index 00000000..c8fdec54 --- /dev/null +++ b/test/test-frames/Elster-F2.norm.xml @@ -0,0 +1,133 @@ + + + + + 802657 + SVM + 8 + Elster F2 / Deltamess F2 + Heat: Outlet + 70 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 5272000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 1204.270000 + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 917.690000 + + + + Instantaneous value + 0 + °C + Flow temperature + 28.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 34.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + s + On time + 149014800.000000 + + + + Instantaneous value + 0 + s + Operating time + 149014800.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2013-06-29T12:12:00Z + + + + Instantaneous value + 0 + 0 + 1 + Units for H.C.A. + H.C.A. + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + Units for H.C.A. + H.C.A. + 0.000000 + + + + More records follow + 0 + + + C4 09 01 01 12 00 01 01 01 07 57 26 80 00 CD 4E 08 04 07 A3 FF 03 57 26 80 00 04 04 0D 02 FF 0F 05 3C FF 62 E7 62 96 0A 89 0A 02 00 15 40 17 01 00 00 63 42 + + + diff --git a/test/test-frames/FIN-Finder-7E.23.8.230.0020.norm.xml b/test/test-frames/FIN-Finder-7E.23.8.230.0020.norm.xml new file mode 100644 index 00000000..118a1f5c --- /dev/null +++ b/test/test-frames/FIN-Finder-7E.23.8.230.0020.norm.xml @@ -0,0 +1,69 @@ + + + + + 23006207 + FIN + 35 + + Electricity + 146 + 00 + 0000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 1728680.000000 + + + + Instantaneous value + 2 + 1 + 0 + Wh + Energy + 1728680.000000 + + + + Instantaneous value + 0 + V + Voltage + 230.000000 + + + + Instantaneous value + 0 + A + Current + 0.600000 + + + + Instantaneous value + 0 + W + Power + 90.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -30.000000 + + + diff --git a/test/test-frames/GWF-MTKcoder.norm.xml b/test/test-frames/GWF-MTKcoder.norm.xml new file mode 100644 index 00000000..6cadee12 --- /dev/null +++ b/test/test-frames/GWF-MTKcoder.norm.xml @@ -0,0 +1,31 @@ + + + + + 182007 + GWF + 53 + + Water + 76 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 182007.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 269.000000 + + + diff --git a/test/test-frames/LGB_G350.norm.xml b/test/test-frames/LGB_G350.norm.xml new file mode 100644 index 00000000..acc91446 --- /dev/null +++ b/test/test-frames/LGB_G350.norm.xml @@ -0,0 +1,65 @@ + + + + + 12082058 + LGB + 64 + + Gas + 64 + 00 + 0000 + + + + Instantaneous value + 1 + m^3 + Volume + 10834.092000 + + + + Instantaneous value + 1 + - + Time point (date & time) + 2016-07-22T08:00:00Z + + + + Instantaneous value + 0 + + Fabrication No + G0017591208205814 + + + + Instantaneous value + 0 + 0 + 1 + + Digital Output + 1.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + + Special supplier information + 15.000000 + + + diff --git a/test/test-frames/REL-Relay-Padpuls2.norm.xml b/test/test-frames/REL-Relay-Padpuls2.norm.xml new file mode 100644 index 00000000..b5b14405 --- /dev/null +++ b/test/test-frames/REL-Relay-Padpuls2.norm.xml @@ -0,0 +1,63 @@ + + + + + 11216301 + REL + 65 + + Gas + 177 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 28760.810000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 1900-01-00T00:00:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2014-12-31 + + + + Instantaneous value + 1 + m^3 + Volume + 25973.820000 + + + + Instantaneous value + 1 + - + Time point (date) + 2015-12-31 + + + + Manufacturer specific + 0 + + + C0 01 01 0C + + + diff --git a/test/test-frames/SBC_Saia-Burgess-ALE3.norm.xml b/test/test-frames/SBC_Saia-Burgess-ALE3.norm.xml new file mode 100644 index 00000000..cc646d79 --- /dev/null +++ b/test/test-frames/SBC_Saia-Burgess-ALE3.norm.xml @@ -0,0 +1,191 @@ + + + + + 19000055 + SBC + 22 + Saia-Burgess ALE3 + Electricity + 191 + 00 + 0000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 2930.000000 + + + + Instantaneous value + 2 + 1 + 0 + Wh + Energy + 2930.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 60.000000 + + + + Instantaneous value + 2 + 2 + 0 + Wh + Energy + 60.000000 + + + + Instantaneous value + 0 + V + Voltage + 223.000000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + V + Voltage + 0.000000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + V + Voltage + 0.000000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + diff --git a/test/test-frames/SEN_Pollustat.norm.xml b/test/test-frames/SEN_Pollustat.norm.xml new file mode 100644 index 00000000..a69a6eec --- /dev/null +++ b/test/test-frames/SEN_Pollustat.norm.xml @@ -0,0 +1,143 @@ + + + + + 11788 + SEN + 6 + + Heat / Cooling load meter + 62 + 00 + 0000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2015-04-07T14:59:00Z + + + + Value during error state + 0 + - + Time point (date & time) + 2000-01-01T00:00:00Z + + + + Value during error state + 0 + + Error flags + 67108864.000000 + + + + Instantaneous value + 0 + s + On time + 15803026.000000 + + + + Instantaneous value + 0 + s + Operating time + 15145636.000000 + + + + Instantaneous value + 0 + Wh + Energy + 39831000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 6162.878000 + + + + Instantaneous value + 0 + W + Power + -170.721784 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 3.230039 + + + + Instantaneous value + 0 + °C + Flow temperature + 31.147324 + + + + Instantaneous value + 0 + °C + Return temperature + 31.193100 + + + + Instantaneous value + 0 + K + Temperature difference + -0.045776 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 11582321.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 756.000000 + + + + Instantaneous value + 0 + + Fabrication No + 11788.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + -19184.000000 + + + diff --git a/test/test-frames/SEN_Sensus-PolluStat-E.norm.xml b/test/test-frames/SEN_Sensus-PolluStat-E.norm.xml new file mode 100644 index 00000000..e0ac268c --- /dev/null +++ b/test/test-frames/SEN_Sensus-PolluStat-E.norm.xml @@ -0,0 +1,95 @@ + + + + + 21265095 + SEN + 14 + Sensus PolluStat E + Heat: Outlet + 181 + 10 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 20.100000 + + + + Instantaneous value + 0 + °C + Return temperature + 20.200000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + + Fabrication No + 21265095.000000 + + + + Instantaneous value + 0 + + Customer location + 21265095.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/SEN_Sensus-PolluTherm.norm.xml b/test/test-frames/SEN_Sensus-PolluTherm.norm.xml new file mode 100644 index 00000000..c46e40da --- /dev/null +++ b/test/test-frames/SEN_Sensus-PolluTherm.norm.xml @@ -0,0 +1,87 @@ + + + + + 24351689 + SEN + 11 + Sensus PolluTherm + Heat: Outlet + 84 + 10 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Value during error state + 0 + °C + Flow temperature + 0.000000 + + + + Value during error state + 0 + °C + Return temperature + 0.000000 + + + + Value during error state + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + + Fabrication No + 24351689.000000 + + + + Instantaneous value + 0 + + Customer location + 24351689.000000 + + + diff --git a/test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.norm.xml b/test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.norm.xml new file mode 100644 index 00000000..a5e4a4a8 --- /dev/null +++ b/test/test-frames/SLB_CF-Compact-Integral-MK-MaXX.norm.xml @@ -0,0 +1,139 @@ + + + + + 11817314 + SLB + 6 + CF Compact / Integral MK MaXX + Heat: Outlet + 3 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11817314.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.020000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 21.800000 + + + + Instantaneous value + 0 + °C + Return temperature + 22.000000 + + + + Instantaneous value + 0 + K + Temperature difference + -0.180000 + + + + Value during error state + 0 + s + Operating time + 0.000000 + + + + Instantaneous value + 0 + s + Operating time + 101606400.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T14:02:00Z + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 1.230000 + + + + Instantaneous value + 0 + 0 + 2 + m^3 + Volume + 3.210000 + + + + Instantaneous value + 0 + + Firmware version + 3.000000 + + + + Instantaneous value + 0 + + Software version + 18.000000 + + + + Manufacturer specific + 0 + + + 00 16 + + + diff --git a/test/test-frames/THI_cma10.norm.xml b/test/test-frames/THI_cma10.norm.xml new file mode 100644 index 00000000..86e149a6 --- /dev/null +++ b/test/test-frames/THI_cma10.norm.xml @@ -0,0 +1,121 @@ + + + + + 2 + ELV + 21 + Elvaco CMa10 + Other + 13 + 00 + 0000 + + + + Instantaneous value + 0 + + Digital Input + 2.000000 + + + + Instantaneous value + 0 + - + %RH + 46.600000 + + + + Minimum value + 0 + - + %RH + 37.820000 + + + + Maximum value + 0 + - + %RH + 51.220000 + + + + Instantaneous value + 0 + °C + External temperature + 22.620000 + + + + Minimum value + 0 + °C + External temperature + 22.500000 + + + + Maximum value + 0 + °C + External temperature + 23.260000 + + + + Instantaneous value + 0 + s + Averaging Duration + 0.000000 + + + + Value during error state + 1 + °C + External temperature + 0.000000 + + + + Value during error state + 2 + 0 + 0 + °C + External temperature + 0.000000 + + + + Instantaneous value + 0 + + Fabrication No + 2.000000 + + + + Instantaneous value + 0 + + Software version + 772.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/ZRM_Minol-Minocal-C2.norm.xml b/test/test-frames/ZRM_Minol-Minocal-C2.norm.xml new file mode 100644 index 00000000..7ac242fe --- /dev/null +++ b/test/test-frames/ZRM_Minol-Minocal-C2.norm.xml @@ -0,0 +1,335 @@ + + + + + 31425084 + ZRM + 129 + Minol Minocal C2 + Heat: Outlet + 115 + 27 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 8 + 0 + 0 + - + Time point (date & time) + 2015-01-01T00:00:00Z + + + + Instantaneous value + 8 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 10 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.074000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 1 + m^3/h + Volume flow + 0.043000 + + + + Maximum value + 1 + - + Time point (date & time) + 2011-09-01T08:30:00Z + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Maximum value + 2 + 0 + 0 + W + Power + 2000.000000 + + + + Maximum value + 2 + 0 + 0 + - + Time point (date & time) + 2011-09-01T08:30:00Z + + + + Instantaneous value + 0 + °C + Flow temperature + 20.710000 + + + + Instantaneous value + 0 + °C + Return temperature + 20.380000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2014-03-13T12:45:00Z + + + + Instantaneous value + 32 + 0 + 0 + - + Time point (date) + 2014-03-01 + + + + Instantaneous value + 32 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 33 + 0 + 0 + - + Time point (date) + 2014-02-01 + + + + Instantaneous value + 33 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 34 + 0 + 0 + - + Time point (date) + 2014-01-01 + + + + Instantaneous value + 34 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 35 + 0 + 0 + - + Time point (date) + 2013-12-01 + + + + Instantaneous value + 35 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 36 + 0 + 0 + - + Time point (date) + 2013-11-01 + + + + Instantaneous value + 36 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 37 + 0 + 0 + - + Time point (date) + 2013-10-01 + + + + Instantaneous value + 37 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 38 + 0 + 0 + - + Time point (date) + 2013-09-01 + + + + Instantaneous value + 38 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 39 + 0 + 0 + - + Time point (date) + 2013-08-01 + + + + Instantaneous value + 39 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Maximum value + 32 + 0 + 0 + - + Time point (date) + 2014-03-01 + + + + Maximum value + 32 + 0 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 32 + 0 + 0 + W + Power + 0.000000 + + + diff --git a/test/test-frames/abb_delta.norm.xml b/test/test-frames/abb_delta.norm.xml new file mode 100644 index 00000000..6b82deb6 --- /dev/null +++ b/test/test-frames/abb_delta.norm.xml @@ -0,0 +1,153 @@ + + + + + 78563412 + ABB + 2 + ABB Delta-Meter + Electricity + 69 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 4 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 4 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 1000000.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/abb_f95.norm.xml b/test/test-frames/abb_f95.norm.xml new file mode 100644 index 00000000..52f18667 --- /dev/null +++ b/test/test-frames/abb_f95.norm.xml @@ -0,0 +1,131 @@ + + + + + 26718590 + HYD + 40 + ABB F95 Typ US770 + Heat: Outlet + 115 + 50 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.074200 + + + + Value during error state + 0 + W + Power + 1311041.300000 + + + + Value during error state + 0 + m^3/h + Volume flow + 11.041300 + + + + Instantaneous value + 0 + °C + Flow temperature + 20.400000 + + + + Instantaneous value + 0 + °C + Return temperature + 20.400000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-13T16:34:00Z + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date & time) + 2011-04-30T23:59:00Z + + + + Instantaneous value + 1 + - + Time point (date & time) + 2012-04-30T23:59:00Z + + + + Instantaneous value + 2 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 0 + 0 + - + Time point (date & time) + 2011-12-31T23:59:00Z + + + + Instantaneous value + 0 + s + Operating time + 311590800.000000 + + + diff --git a/test/test-frames/allmess_cf50.norm.xml b/test/test-frames/allmess_cf50.norm.xml new file mode 100644 index 00000000..2195924e --- /dev/null +++ b/test/test-frames/allmess_cf50.norm.xml @@ -0,0 +1,95 @@ + + + + + 2205100 + SLB + 2 + Allmess Megacontrol CF-50 + Heat: Outlet + 0 + 88 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.300000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 128.800000 + + + + Instantaneous value + 0 + °C + Return temperature + 51.600000 + + + + Instantaneous value + 0 + K + Temperature difference + 77.230000 + + + + Instantaneous value + 0 + - + Time point (date) + 2012-01-12 + + + + Instantaneous value + 0 + s + Operating time + 292291200.000000 + + + + Manufacturer specific + 0 + + + 60 00 + + + diff --git a/test/test-frames/berg_dz_plus.norm.xml b/test/test-frames/berg_dz_plus.norm.xml new file mode 100644 index 00000000..b4def167 --- /dev/null +++ b/test/test-frames/berg_dz_plus.norm.xml @@ -0,0 +1,169 @@ + + + + + 0 + ABB + 2 + ABB Delta-Meter + Electricity + 0 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 4 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 1 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 4 + 2 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + More records follow + 0 + + + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + + diff --git a/test/test-frames/electricity-meter-1.norm.xml b/test/test-frames/electricity-meter-1.norm.xml new file mode 100644 index 00000000..49b42973 --- /dev/null +++ b/test/test-frames/electricity-meter-1.norm.xml @@ -0,0 +1,191 @@ + + + + + 500023E + SBC + 18 + + Electricity + 19 + 00 + 0000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 12520.000000 + + + + Instantaneous value + 2 + 1 + 0 + Wh + Energy + 12520.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 17744330.000000 + + + + Instantaneous value + 2 + 2 + 0 + Wh + Energy + 17744330.000000 + + + + Instantaneous value + 0 + V + Voltage + 237.000000 + + + + Instantaneous value + 0 + A + Current + 3.200000 + + + + Instantaneous value + 0 + W + Power + 790.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -180.000000 + + + + Instantaneous value + 0 + V + Voltage + 231.000000 + + + + Instantaneous value + 0 + A + Current + 3.500000 + + + + Instantaneous value + 0 + W + Power + 810.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -150.000000 + + + + Instantaneous value + 0 + V + Voltage + 228.000000 + + + + Instantaneous value + 0 + A + Current + 6.900000 + + + + Instantaneous value + 0 + W + Power + 1600.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -320.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + W + Power + 3200.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -650.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 4.000000 + + + diff --git a/test/test-frames/electricity-meter-2.norm.xml b/test/test-frames/electricity-meter-2.norm.xml new file mode 100644 index 00000000..c8d95e23 --- /dev/null +++ b/test/test-frames/electricity-meter-2.norm.xml @@ -0,0 +1,191 @@ + + + + + 50002E5 + @@@ + 18 + + Electricity + 37 + 00 + 0000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 2540.000000 + + + + Instantaneous value + 2 + 1 + 0 + Wh + Energy + 2540.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 4441280.000000 + + + + Instantaneous value + 2 + 2 + 0 + Wh + Energy + 4441280.000000 + + + + Instantaneous value + 0 + V + Voltage + 233.000000 + + + + Instantaneous value + 0 + A + Current + 0.100000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + V + Voltage + 234.000000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + V + Voltage + 235.000000 + + + + Instantaneous value + 0 + A + Current + 0.100000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Manufacturer specific + 4.000000 + + + diff --git a/test/test-frames/els_falcon.norm.xml b/test/test-frames/els_falcon.norm.xml new file mode 100644 index 00000000..c0f2ff4d --- /dev/null +++ b/test/test-frames/els_falcon.norm.xml @@ -0,0 +1,87 @@ + + + + + 70112345 + ELS + 10 + Elster Falcon + Water + 2 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 1234.567000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2007-02-06T13:58:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2007-01-01 + + + + Instantaneous value + 1 + m^3 + Volume + 456.951000 + + + + Instantaneous value + 1 + - + Time point (date) + 2008-01-01 + + + + Maximum value + 0 + m^3/h + Volume flow + 5.945000 + + + + Instantaneous value + 1 + - + Time point (date) + 2008-01-01 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 6.137000 + + + + Manufacturer specific + 0 + + + 0E 42 20 01 01 01 00 05 08 5E 01 20 3D 12 08 3D 12 08 00 + + + diff --git a/test/test-frames/els_tmpa_telegramm1.norm.xml b/test/test-frames/els_tmpa_telegramm1.norm.xml new file mode 100644 index 00000000..16a06819 --- /dev/null +++ b/test/test-frames/els_tmpa_telegramm1.norm.xml @@ -0,0 +1,63 @@ + + + + + 70112345 + ELS + 2 + Elster TMP-A + Water + 2 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 1234.567000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2007-02-06T13:58:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2007-01-01 + + + + Instantaneous value + 1 + m^3 + Volume + 456.951000 + + + + Instantaneous value + 1 + - + Time point (date) + 2008-01-01 + + + + Manufacturer specific + 0 + + + 00 + + + diff --git a/test/test-frames/elv_temp_humid.norm.xml b/test/test-frames/elv_temp_humid.norm.xml new file mode 100644 index 00000000..369720a5 --- /dev/null +++ b/test/test-frames/elv_temp_humid.norm.xml @@ -0,0 +1,121 @@ + + + + + 54000834 + ELV + 50 + Elvaco CMa11 + Other + 242 + 00 + 0000 + + + + Instantaneous value + 0 + + Digital Input + 0.000000 + + + + Instantaneous value + 0 + - + %RH + 45.640000 + + + + Minimum value + 0 + - + %RH + 45.520000 + + + + Maximum value + 0 + - + %RH + 58.120000 + + + + Instantaneous value + 0 + °C + External temperature + 22.560000 + + + + Minimum value + 0 + °C + External temperature + 21.600000 + + + + Maximum value + 0 + °C + External temperature + 23.390000 + + + + Instantaneous value + 0 + s + Averaging Duration + 86400.000000 + + + + Instantaneous value + 1 + °C + External temperature + 22.760000 + + + + Instantaneous value + 2 + 0 + 0 + °C + External temperature + 22.690000 + + + + Instantaneous value + 0 + + Fabrication No + 54000834.000000 + + + + Instantaneous value + 0 + + Software version + 262144.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/emh_diz.norm.xml b/test/test-frames/emh_diz.norm.xml new file mode 100644 index 00000000..7a9a6fc9 --- /dev/null +++ b/test/test-frames/emh_diz.norm.xml @@ -0,0 +1,43 @@ + + + + + 623702 + EMH + 0 + EMH DIZ + Electricity + 7 + 00 + 0000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 4090.000000 + + + + Instantaneous value + 1 + 0 + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + diff --git a/test/test-frames/engelmann_sensostar2c.norm.xml b/test/test-frames/engelmann_sensostar2c.norm.xml new file mode 100644 index 00000000..97331437 --- /dev/null +++ b/test/test-frames/engelmann_sensostar2c.norm.xml @@ -0,0 +1,225 @@ + + + + + 10380010 + EFE + 1 + Engelmann SensoStar 2C + Heat: Outlet + 30 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 10380010.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-06-06T20:50:00Z + + + + Instantaneous value + 0 + m^3 + Volume + 12.900000 + + + + Instantaneous value + 0 + Wh + Energy + 800000.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 95.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 43.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 52.580000 + + + + Instantaneous value + 0 + s + Operating time + 43718400.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.100000 + + + + Instantaneous value + 1 + - + Time point (date) + 2011-12-31 + + + + Instantaneous value + 1 + m^3 + Volume + 12.900000 + + + + Instantaneous value + 1 + Wh + Energy + 800000.000000 + + + + Instantaneous value + 1 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 0 + 0 + - + Time point (date) + 2010-12-31 + + + + Instantaneous value + 2 + 0 + 0 + m^3 + Volume + 8.400000 + + + + Instantaneous value + 2 + 0 + 0 + Wh + Energy + 500000.000000 + + + + Instantaneous value + 2 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 3 + 0 + Wh + Energy + 0.000000 + + + diff --git a/test/test-frames/example_data_01.norm.xml b/test/test-frames/example_data_01.norm.xml new file mode 100644 index 00000000..54ba0bb1 --- /dev/null +++ b/test/test-frames/example_data_01.norm.xml @@ -0,0 +1,63 @@ + + + + + 3575845 + AMT + 52 + + Heat: Outlet + 158 + 00 + B627 + + + + Instantaneous value + 0 + Wh + Energy + 1389817000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 504647.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 41.737434 + + + + Instantaneous value + 0 + °C + Return temperature + 35.463650 + + + diff --git a/test/test-frames/example_data_02.norm.xml b/test/test-frames/example_data_02.norm.xml new file mode 100644 index 00000000..d135aae2 --- /dev/null +++ b/test/test-frames/example_data_02.norm.xml @@ -0,0 +1,63 @@ + + + + + 3575845 + AMT + 52 + + Heat: Outlet + 161 + 00 + B627 + + + + Instantaneous value + 0 + Wh + Energy + 1389817000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 504647.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 41.211052 + + + + Instantaneous value + 0 + °C + Return temperature + 35.385593 + + + diff --git a/test/test-frames/filler.norm.xml b/test/test-frames/filler.norm.xml new file mode 100644 index 00000000..f7a01342 --- /dev/null +++ b/test/test-frames/filler.norm.xml @@ -0,0 +1,23 @@ + + + + + 17677731 + KAM + 1 + Kamstrup 382 (6850-005) + Electricity + 0 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 5000.000000 + + + diff --git a/test/test-frames/frame1.norm.xml b/test/test-frames/frame1.norm.xml new file mode 100644 index 00000000..92877062 --- /dev/null +++ b/test/test-frames/frame1.norm.xml @@ -0,0 +1,23 @@ + + + + + 10060958 + LSE + 22 + + Bus/System + 123 + 00 + 0000 + + + + Manufacturer specific + 0 + + + 5F 42 01 11 FF FF FF FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + + + diff --git a/test/test-frames/frame2.norm.xml b/test/test-frames/frame2.norm.xml new file mode 100644 index 00000000..0b29cb81 --- /dev/null +++ b/test/test-frames/frame2.norm.xml @@ -0,0 +1,43 @@ + + + + + 12345678 + PAD + 1 + + Water + 85 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 12.565000 + + + + Maximum value + 5 + 0 + 0 + m^3/h + Volume flow + 0.113000 + + + + Instantaneous value + 0 + 2 + 1 + Wh + Energy + 218370.000000 + + + diff --git a/test/test-frames/gmc_emmod206.norm.xml b/test/test-frames/gmc_emmod206.norm.xml new file mode 100644 index 00000000..da2ec220 --- /dev/null +++ b/test/test-frames/gmc_emmod206.norm.xml @@ -0,0 +1,215 @@ + + + + + 12345678 + GMC + 230 + GMC-I A230 EMMOD 206 + Electricity + 2 + 00 + 0000 + + + + Instantaneous value + 0 + 0 + 1 + V + Voltage + 86.400000 + + + + Instantaneous value + 0 + 0 + 2 + V + Voltage + 95.900000 + + + + Instantaneous value + 0 + 0 + 3 + V + Voltage + 105.600000 + + + + Instantaneous value + 0 + 0 + 1 + A + Current + 0.957000 + + + + Instantaneous value + 0 + 0 + 2 + A + Current + 1.055000 + + + + Instantaneous value + 0 + 0 + 3 + A + Current + 1.150000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + 224.000000 + + + + Instantaneous value + 0 + 0 + 1 + W + Power + -202.000000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 103880.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 150000.000000 + + + + Instantaneous value + 0 + 1 + 1 + Wh + Energy + 201590.000000 + + + + Instantaneous value + 0 + 2 + 1 + Wh + Energy + 250000.000000 + + + + Instantaneous value + 0 + 1 + 2 + Wh + Energy + 300910.000000 + + + + Instantaneous value + 0 + 2 + 2 + Wh + Energy + 350000.000000 + + + + Instantaneous value + 0 + 1 + 3 + Wh + Energy + 402370.000000 + + + + Instantaneous value + 0 + 2 + 3 + Wh + Energy + 450000.000000 + + + + Instantaneous value + 2 + 0 + 1 + W + Power + 224.000000 + + + + Instantaneous value + 4 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 6 + 0 + 1 + W + Power + 0.000000 + + + + Instantaneous value + 8 + 0 + 1 + W + Power + 202.000000 + + + diff --git a/test/test-frames/itron_bm_+m.norm.xml b/test/test-frames/itron_bm_+m.norm.xml new file mode 100644 index 00000000..cfe33275 --- /dev/null +++ b/test/test-frames/itron_bm_+m.norm.xml @@ -0,0 +1,87 @@ + + + + + 11490378 + ACW + 14 + Itron BM +m + Cold water + 41 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11490378.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 54.321000 + + + + Instantaneous value + 1 + - + Time point (date) + 2000-00-00 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T13:29:00Z + + + + Instantaneous value + 0 + s + Operating time + 0.000000 + + + + Instantaneous value + 0 + + Firmware version + 2.000000 + + + + Instantaneous value + 0 + + Software version + 6.000000 + + + + Manufacturer specific + 0 + + + 00 00 8F 13 + + + diff --git a/test/test-frames/itron_cf_51.norm.xml b/test/test-frames/itron_cf_51.norm.xml new file mode 100644 index 00000000..88f69345 --- /dev/null +++ b/test/test-frames/itron_cf_51.norm.xml @@ -0,0 +1,147 @@ + + + + + 11155185 + ACW + 10 + Itron CF 51 + Heat / Cooling load meter + 27 + 10 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11155185.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Value during error state + 0 + W + Power + 99999900.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Value during error state + 0 + °C + Flow temperature + 999.900000 + + + + Value during error state + 0 + °C + Return temperature + 999.900000 + + + + Value during error state + 0 + K + Temperature difference + 9999.990000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T13:24:00Z + + + + Instantaneous value + 0 + s + Operating time + 8985600.000000 + + + + Instantaneous value + 0 + + Firmware version + 11.000000 + + + + Instantaneous value + 0 + + Software version + 26.000000 + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 321.000000 + + + + Instantaneous value + 0 + 0 + 2 + m^3 + Volume + 1.230000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Manufacturer specific + 0 + + + 03 20 + + + diff --git a/test/test-frames/itron_cf_55.norm.xml b/test/test-frames/itron_cf_55.norm.xml new file mode 100644 index 00000000..f035c35d --- /dev/null +++ b/test/test-frames/itron_cf_55.norm.xml @@ -0,0 +1,119 @@ + + + + + 11127667 + ACW + 11 + Itron CF 55 + Heat: Inlet + 11 + 10 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11127667.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Value during error state + 0 + W + Power + 99999900.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Value during error state + 0 + °C + Flow temperature + 999.900000 + + + + Value during error state + 0 + °C + Return temperature + 999.900000 + + + + Value during error state + 0 + K + Temperature difference + 9999.990000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T11:47:00Z + + + + Instantaneous value + 0 + s + Operating time + 21772800.000000 + + + + Instantaneous value + 0 + + Firmware version + 10.000000 + + + + Instantaneous value + 0 + + Software version + 21.000000 + + + + Manufacturer specific + 0 + + + 03 20 + + + diff --git a/test/test-frames/itron_cf_echo_2.norm.xml b/test/test-frames/itron_cf_echo_2.norm.xml new file mode 100644 index 00000000..d8ec6093 --- /dev/null +++ b/test/test-frames/itron_cf_echo_2.norm.xml @@ -0,0 +1,119 @@ + + + + + 11100091 + ACW + 9 + Itron CF Echo 2 + Heat: Outlet + 81 + 10 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11100091.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Value during error state + 0 + W + Power + 99999900.000000 + + + + Value during error state + 0 + m^3/h + Volume flow + 999.999000 + + + + Instantaneous value + 0 + °C + Flow temperature + 20.500000 + + + + Instantaneous value + 0 + °C + Return temperature + 20.600000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.090000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T13:29:00Z + + + + Instantaneous value + 0 + s + Operating time + 33264000.000000 + + + + Instantaneous value + 0 + + Firmware version + 19.000000 + + + + Instantaneous value + 0 + + Software version + 45.000000 + + + + Manufacturer specific + 0 + + + 20 00 + + + diff --git a/test/test-frames/itron_cyble_m-bus_v1.4_cold_water.norm.xml b/test/test-frames/itron_cyble_m-bus_v1.4_cold_water.norm.xml new file mode 100644 index 00000000..da7eb622 --- /dev/null +++ b/test/test-frames/itron_cyble_m-bus_v1.4_cold_water.norm.xml @@ -0,0 +1,79 @@ + + + + + 10020380 + ACW + 20 + Itron CYBLE M-Bus 1.4 + Cold water + 161 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 10020380.000000 + + + + Instantaneous value + 0 + - + cust. ID + + + + + Instantaneous value + 0 + - + Time point (date & time) + 2011-10-25T15:39:00Z + + + + Instantaneous value + 0 + - + bat. time + 4050.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 453.500000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 453.500000 + + + + Manufacturer specific + 0 + + + 00 04 1F + + + diff --git a/test/test-frames/itron_cyble_m-bus_v1.4_gas.norm.xml b/test/test-frames/itron_cyble_m-bus_v1.4_gas.norm.xml new file mode 100644 index 00000000..a325227b --- /dev/null +++ b/test/test-frames/itron_cyble_m-bus_v1.4_gas.norm.xml @@ -0,0 +1,79 @@ + + + + + 10020387 + ACW + 20 + Itron CYBLE M-Bus 1.4 + Gas + 154 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 10020387.000000 + + + + Instantaneous value + 0 + - + cust. ID + + + + + Instantaneous value + 0 + - + Time point (date & time) + 2011-10-25T15:43:00Z + + + + Instantaneous value + 0 + - + bat. time + 4050.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.260000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.250000 + + + + Manufacturer specific + 0 + + + 00 02 1F + + + diff --git a/test/test-frames/itron_cyble_m-bus_v1.4_water.norm.xml b/test/test-frames/itron_cyble_m-bus_v1.4_water.norm.xml new file mode 100644 index 00000000..4e120cdc --- /dev/null +++ b/test/test-frames/itron_cyble_m-bus_v1.4_water.norm.xml @@ -0,0 +1,79 @@ + + + + + 12000071 + ACW + 20 + Itron CYBLE M-Bus 1.4 + Water + 10 + 30 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 12000071.000000 + + + + Instantaneous value + 0 + - + cust. ID + TEST CYBLE + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T13:43:00Z + + + + Instantaneous value + 0 + - + bat. time + 4338.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 123.490000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.200000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Manufacturer specific + 0 + + + 10 01 1F + + + diff --git a/test/test-frames/itron_integral_mk_maxx.norm.xml b/test/test-frames/itron_integral_mk_maxx.norm.xml new file mode 100644 index 00000000..bfc94867 --- /dev/null +++ b/test/test-frames/itron_integral_mk_maxx.norm.xml @@ -0,0 +1,139 @@ + + + + + 11817314 + SLB + 6 + CF Compact / Integral MK MaXX + Heat: Outlet + 93 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 11817314.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.020000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 21.200000 + + + + Instantaneous value + 0 + °C + Return temperature + 21.100000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.070000 + + + + Value during error state + 0 + s + Operating time + 0.000000 + + + + Instantaneous value + 0 + s + Operating time + 34300800.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-24T14:17:00Z + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 1.230000 + + + + Instantaneous value + 0 + 0 + 2 + m^3 + Volume + 3.210000 + + + + Instantaneous value + 0 + + Firmware version + 3.000000 + + + + Instantaneous value + 0 + + Software version + 18.000000 + + + + Manufacturer specific + 0 + + + 00 16 + + + diff --git a/test/test-frames/kamstrup_382_005.norm.xml b/test/test-frames/kamstrup_382_005.norm.xml new file mode 100644 index 00000000..d3246e19 --- /dev/null +++ b/test/test-frames/kamstrup_382_005.norm.xml @@ -0,0 +1,75 @@ + + + + + 14839120 + KAM + 1 + Kamstrup 382 (6850-005) + Electricity + 4 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + s + On time + 32400.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Maximum value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + 1 + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 1 + Wh + Energy + 0.000000 + + + + Manufacturer specific + 0 + + + 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 + + + diff --git a/test/test-frames/kamstrup_multical_601.norm.xml b/test/test-frames/kamstrup_multical_601.norm.xml new file mode 100644 index 00000000..769a90b4 --- /dev/null +++ b/test/test-frames/kamstrup_multical_601.norm.xml @@ -0,0 +1,259 @@ + + + + + 6855817 + KAM + 8 + Kamstrup Multical 601 + Heat: Outlet + 4 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 6855817.000000 + + + + Instantaneous value + 0 + Wh + Energy + 37351000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 561.080000 + + + + Instantaneous value + 0 + s + On time + 3546000.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 101.690000 + + + + Instantaneous value + 0 + °C + Return temperature + 46.160000 + + + + Instantaneous value + 0 + K + Temperature difference + 55.530000 + + + + Instantaneous value + 0 + W + Power + 34700.000000 + + + + Maximum value + 0 + W + Power + 44800.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.543000 + + + + Maximum value + 0 + m^3/h + Volume flow + 0.628000 + + + + Instantaneous value + 0 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + 0 + 3 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2011-01-05T15:26:00Z + + + + Instantaneous value + 1 + Wh + Energy + 33361000.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 500.980000 + + + + Maximum value + 1 + W + Power + 55000.000000 + + + + Maximum value + 1 + m^3/h + Volume flow + 1.027000 + + + + Instantaneous value + 1 + 1 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 0 + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + 0 + 2 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + 0 + 3 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2010-12-31 + + + + Manufacturer specific + 0 + + + 00 00 00 00 E7 E4 00 00 63 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5B C9 A5 02 34 53 00 00 E0 B2 03 00 89 9C 68 00 00 00 00 00 01 00 01 07 07 09 01 03 00 00 00 00 00 + + + diff --git a/test/test-frames/landis+gyr_ultraheat_t230.norm.xml b/test/test-frames/landis+gyr_ultraheat_t230.norm.xml new file mode 100644 index 00000000..d30f1cd5 --- /dev/null +++ b/test/test-frames/landis+gyr_ultraheat_t230.norm.xml @@ -0,0 +1,327 @@ + + + + + 66660205 + LUG + 7 + Landis & Gyr Ultraheat T230 + Heat: Outlet + 1 + 10 + 0000 + + + + Instantaneous value + 0 + s + Averaging Duration + 4.000000 + + + + Instantaneous value + 0 + s + Averaging Duration + 8.000000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 19.500000 + + + + Instantaneous value + 0 + °C + Return temperature + 19.700000 + + + + Instantaneous value + 0 + K + Temperature difference + -0.200000 + + + + Instantaneous value + 0 + + Fabrication No + 66660205.000000 + + + + Instantaneous value + 0 + 1 + 0 + s + Averaging Duration + 420.000000 + + + + Value during error state + 0 + s + On time + 13568400.000000 + + + + Instantaneous value + 0 + s + On time + 13568400.000000 + + + + Instantaneous value + 0 + s + Operating time + 0.000000 + + + + Instantaneous value + 0 + 5 + 0 + Wh + Energy + 0.000000 + + + + Maximum value + 0 + 1 + 0 + W + Power + 0.000000 + + + + Maximum value + 0 + 1 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 0 + 1 + 0 + °C + Flow temperature + 30.700000 + + + + Maximum value + 0 + 1 + 0 + °C + Return temperature + 50.700000 + + + + Maximum value + 0 + 1 + 0 + W + Power + 0.000000 + + + + Maximum value + 0 + 1 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 0 + 1 + 0 + °C + Flow temperature + 41065374.600000 + + + + Maximum value + 0 + 1 + 0 + °C + Return temperature + 40953732.300000 + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Value during error state + 1 + s + On time + 12488400.000000 + + + + Instantaneous value + 1 + s + Operating time + 0.000000 + + + + Instantaneous value + 1 + 5 + 0 + Wh + Energy + 0.000000 + + + + Maximum value + 1 + 1 + 0 + W + Power + 0.000000 + + + + Maximum value + 1 + 1 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 1 + 1 + 0 + °C + Flow temperature + 30.700000 + + + + Maximum value + 1 + 1 + 0 + °C + Return temperature + 50.700000 + + + + Instantaneous value + 510 + 0 + 0 + - + Time point (date & time) + 2127-01-01T00:00:00Z + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-13T12:04:00Z + + + + Manufacturer specific + 0 + + + 09 07 00 66 01 + + + diff --git a/test/test-frames/manual_frame2.norm.xml b/test/test-frames/manual_frame2.norm.xml new file mode 100644 index 00000000..c6124757 --- /dev/null +++ b/test/test-frames/manual_frame2.norm.xml @@ -0,0 +1,23 @@ + + + + + 12345678 + Water + 10 + 00 + + + + Actual value + l + 1 + + + + Actual value + reserved but historic + 135 + + + diff --git a/test/test-frames/manual_frame3.norm.xml b/test/test-frames/manual_frame3.norm.xml new file mode 100644 index 00000000..0b29cb81 --- /dev/null +++ b/test/test-frames/manual_frame3.norm.xml @@ -0,0 +1,43 @@ + + + + + 12345678 + PAD + 1 + + Water + 85 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 12.565000 + + + + Maximum value + 5 + 0 + 0 + m^3/h + Volume flow + 0.113000 + + + + Instantaneous value + 0 + 2 + 1 + Wh + Energy + 218370.000000 + + + diff --git a/test/test-frames/manual_frame7.norm.xml b/test/test-frames/manual_frame7.norm.xml new file mode 100644 index 00000000..28c78ac5 --- /dev/null +++ b/test/test-frames/manual_frame7.norm.xml @@ -0,0 +1,23 @@ + + + + + 12345678 + PAD + 1 + + Water + 19 + 00 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 1020304.000000 + + + diff --git a/test/test-frames/metrona_pollutherm.norm.xml b/test/test-frames/metrona_pollutherm.norm.xml new file mode 100644 index 00000000..b3f74934 --- /dev/null +++ b/test/test-frames/metrona_pollutherm.norm.xml @@ -0,0 +1,95 @@ + + + + + 44950146 + SPX + 52 + Sensus PolluTherm + Heat: Outlet + 84 + 10 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 0.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 0.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + + Fabrication No + 44950146.000000 + + + + Instantaneous value + 0 + + Customer location + 44950146.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/metrona_ultraheat_xs.norm.xml b/test/test-frames/metrona_ultraheat_xs.norm.xml new file mode 100644 index 00000000..82423fe9 --- /dev/null +++ b/test/test-frames/metrona_ultraheat_xs.norm.xml @@ -0,0 +1,379 @@ + + + + + 1810054 + LUG + 2 + Landis & Gyr Ultraheat 2WR5 + Heat: Outlet + 15 + 10 + 0000 + + + + Instantaneous value + 0 + s + Averaging Duration + 4.000000 + + + + Instantaneous value + 0 + s + Averaging Duration + 4.000000 + + + + Instantaneous value + 0 + Wh + Energy + 19969000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 26492.180000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 0.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 0.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 26492.180000 + + + + Instantaneous value + 1 + Wh + Energy + 19969000.000000 + + + + Instantaneous value + 0 + + Fabrication No + 65110054.000000 + + + + Instantaneous value + 0 + 1 + 0 + s + Averaging Duration + 3600.000000 + + + + Maximum value + 0 + 1 + 0 + W + Power + 31600.000000 + + + + Maximum value + 1 + 1 + 0 + W + Power + 31600.000000 + + + + Maximum value + 0 + 1 + 0 + m^3/h + Volume flow + 8.820000 + + + + Maximum value + 0 + 1 + 0 + °C + Flow temperature + 44.000000 + + + + Maximum value + 0 + 1 + 0 + °C + Return temperature + 40.000000 + + + + Instantaneous value + 0 + s + On time + 252241200.000000 + + + + Value during error state + 0 + s + On time + 185792400.000000 + + + + Value during error state + 1 + s + On time + 172141200.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2000-01-01 + + + + Instantaneous value + 0 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + 4 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + 4 + 0 + Wh + Energy + 0.000000 + + + + Maximum value + 2 + 1 + 0 + °C + Flow temperature + 36.000000 + + + + Maximum value + 2 + 1 + 0 + °C + Return temperature + 40.000000 + + + + Maximum value + 2 + 1 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 2 + 1 + 0 + W + Power + 0.000000 + + + + Value during error state + 2 + 0 + 0 + s + On time + 185274000.000000 + + + + Instantaneous value + 2 + 0 + 0 + Wh + Energy + 19969000.000000 + + + + Instantaneous value + 2 + 2 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 3 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 4 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 2 + 0 + 0 + m^3 + Volume + 26492.180000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-06-07T00:38:00Z + + + + Manufacturer specific + 0 + + + 03 02 00 00 23 + + + diff --git a/test/test-frames/minol_minocal_c2.norm.xml b/test/test-frames/minol_minocal_c2.norm.xml new file mode 100644 index 00000000..bb7cafb7 --- /dev/null +++ b/test/test-frames/minol_minocal_c2.norm.xml @@ -0,0 +1,335 @@ + + + + + 31425084 + ZRM + 129 + Minol Minocal C2 + Heat: Outlet + 36 + 27 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + + Instantaneous value + 8 + 0 + 0 + - + Time point (date & time) + 2013-01-01T00:00:00Z + + + + Instantaneous value + 8 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 10 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.073000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 1 + m^3/h + Volume flow + 0.043000 + + + + Maximum value + 1 + - + Time point (date & time) + 2011-09-01T08:30:00Z + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Maximum value + 2 + 0 + 0 + W + Power + 2000.000000 + + + + Maximum value + 2 + 0 + 0 + - + Time point (date & time) + 2011-09-01T08:30:00Z + + + + Instantaneous value + 0 + °C + Flow temperature + 20.090000 + + + + Instantaneous value + 0 + °C + Return temperature + 19.270000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-13T11:53:00Z + + + + Instantaneous value + 32 + 0 + 0 + - + Time point (date) + 2012-01-01 + + + + Instantaneous value + 32 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 33 + 0 + 0 + - + Time point (date) + 2011-12-01 + + + + Instantaneous value + 33 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 34 + 0 + 0 + - + Time point (date) + 2011-11-01 + + + + Instantaneous value + 34 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 35 + 0 + 0 + - + Time point (date) + 2011-10-01 + + + + Instantaneous value + 35 + 0 + 0 + Wh + Energy + 3000.000000 + + + + Instantaneous value + 36 + 0 + 0 + - + Time point (date) + 2011-09-01 + + + + Instantaneous value + 36 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 37 + 0 + 0 + - + Time point (date) + 2011-08-01 + + + + Instantaneous value + 37 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 38 + 0 + 0 + - + Time point (date) + 2011-07-01 + + + + Instantaneous value + 38 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 39 + 0 + 0 + - + Time point (date) + 2011-06-01 + + + + Instantaneous value + 39 + 0 + 0 + Wh + Energy + 0.000000 + + + + Maximum value + 32 + 0 + 0 + - + Time point (date) + 2012-01-01 + + + + Maximum value + 32 + 0 + 0 + m^3/h + Volume flow + 0.001000 + + + + Maximum value + 32 + 0 + 0 + W + Power + 0.000000 + + + diff --git a/test/test-frames/minol_minocal_wr3.norm.xml b/test/test-frames/minol_minocal_wr3.norm.xml new file mode 100644 index 00000000..19ddead9 --- /dev/null +++ b/test/test-frames/minol_minocal_wr3.norm.xml @@ -0,0 +1,285 @@ + + + + + 31802759 + ZRM + 130 + Minol Minocal WR3 + Heat: Outlet + 43 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.010000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 0.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 0.000000 + + + + Instantaneous value + 8 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 9 + 0 + 0 + - + Time point (date & time) + 2012-01-01T00:00:00Z + + + + Maximum value + 2 + 0 + 0 + W + Power + 0.000000 + + + + Maximum value + 2 + 0 + 0 + - + Time point (date & time) + 2012-01-13T11:30:00Z + + + + Maximum value + 1 + m^3/h + Volume flow + 0.010000 + + + + Maximum value + 1 + - + Time point (date & time) + 2011-03-24T07:30:00Z + + + + Instantaneous value + 0 + 0 + 1 + + (Enhanced) Identification + 0.000000 + + + + Instantaneous value + 0 + 0 + 1 + + Device type + 7.000000 + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 0.001000 + + + + Instantaneous value + 9 + 0 + 0 + m^3 + Volume + 0.001000 + + + + Instantaneous value + 0 + 0 + 2 + + (Enhanced) Identification + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + m^3 + Volume + 0.001000 + + + + Instantaneous value + 0 + 0 + 2 + + Device type + 7.000000 + + + + Instantaneous value + 10 + 0 + 0 + m^3 + Volume + 0.001000 + + + + Instantaneous value + 0 + + Error flags + 4.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2012-01-13T12:01:00Z + + + + Instantaneous value + 32 + 0 + 0 + - + Time point (date) + 2012-01-01 + + + + Instantaneous value + 32 + 0 + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 32 + 0 + 1 + m^3 + Volume + 0.001000 + + + + Instantaneous value + 32 + 0 + 2 + m^3 + Volume + 0.001000 + + + + Maximum value + 32 + 0 + 0 + - + Time point (date) + 2012-01-01 + + + + Maximum value + 32 + 0 + 0 + m^3/h + Volume flow + 0.000000 + + + + Maximum value + 32 + 0 + 0 + W + Power + 0.000000 + + + diff --git a/test/test-frames/nzr_dhz_5_63.norm.xml b/test/test-frames/nzr_dhz_5_63.norm.xml new file mode 100644 index 00000000..46dfb585 --- /dev/null +++ b/test/test-frames/nzr_dhz_5_63.norm.xml @@ -0,0 +1,71 @@ + + + + + 30100608 + NZR + 1 + NZR DHZ 5/63 + Electricity + 1 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 1274.000000 + + + + Instantaneous value + 0 + Wh + Energy + 1274.000000 + + + + Instantaneous value + 0 + V + Voltage + 237.200000 + + + + Instantaneous value + 0 + A + Current + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + + Fabrication No + 30100608.000000 + + + + Manufacturer specific + 0 + + + 0E + + + diff --git a/test/test-frames/oms_frame1.norm.xml b/test/test-frames/oms_frame1.norm.xml new file mode 100644 index 00000000..1dfd8649 --- /dev/null +++ b/test/test-frames/oms_frame1.norm.xml @@ -0,0 +1,39 @@ + + + + + 12345678 + ELS + 51 + + Gas + 42 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 28504.270000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2008-05-31T23:50:00Z + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + diff --git a/test/test-frames/oms_frame2.norm.xml b/test/test-frames/oms_frame2.norm.xml new file mode 100644 index 00000000..480c8920 --- /dev/null +++ b/test/test-frames/oms_frame2.norm.xml @@ -0,0 +1,55 @@ + + + + + 92752244 + HYD + 41 + + Water + 31 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 2850.427000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.127000 + + + + Instantaneous value + 1 + m^3 + Volume + 1445.419000 + + + + Instantaneous value + 1 + - + Time point (date) + 2007-12-31 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + diff --git a/test/test-frames/oms_frame3.norm.xml b/test/test-frames/oms_frame3.norm.xml new file mode 100644 index 00000000..f144e0ee --- /dev/null +++ b/test/test-frames/oms_frame3.norm.xml @@ -0,0 +1,87 @@ + + + + + 12345678 + HYD + 42 + + Heat: Outlet + 38 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 2850427000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 703.476000 + + + + Instantaneous value + 1 + Wh + Energy + 1445419000.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2007-12-31 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.127000 + + + + Instantaneous value + 0 + W + Power + 329.700000 + + + + Instantaneous value + 0 + °C + Flow temperature + 44.300000 + + + + Instantaneous value + 0 + °C + Return temperature + 25.100000 + + + + Instantaneous value + 0 + + Error flags + 0.000000 + + + diff --git a/test/test-frames/ram_modularis.norm.xml b/test/test-frames/ram_modularis.norm.xml new file mode 100644 index 00000000..3f6b3f9c --- /dev/null +++ b/test/test-frames/ram_modularis.norm.xml @@ -0,0 +1,311 @@ + + + + + 25776 + RAM + 3 + Rossweiner ETK/ETW Modularis + Water + 139 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 10.116000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2013-10-18T21:40:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2013-09-28 + + + + Instantaneous value + 1 + m^3 + Volume + 8.393000 + + + + Instantaneous value + 1 + - + Time point (date) + 2014-09-28 + + + + Instantaneous value + 0 + + Fabrication No + 25776.000000 + + + + Instantaneous value + 2 + 0 + 0 + - + Time point (date) + 2013-09-30 + + + + Instantaneous value + 2 + 0 + 0 + m^3 + Volume + 8.527000 + + + + Instantaneous value + 3 + 0 + 0 + - + Time point (date) + 2012-10-31 + + + + Instantaneous value + 3 + 0 + 0 + m^3 + Volume + 99999.995000 + + + + Instantaneous value + 4 + 0 + 0 + - + Time point (date) + 2012-11-30 + + + + Instantaneous value + 4 + 0 + 0 + m^3 + Volume + 99999.993000 + + + + Instantaneous value + 5 + 0 + 0 + - + Time point (date) + 2012-12-31 + + + + Instantaneous value + 5 + 0 + 0 + m^3 + Volume + 0.782000 + + + + Instantaneous value + 6 + 0 + 0 + - + Time point (date) + 2013-01-31 + + + + Instantaneous value + 6 + 0 + 0 + m^3 + Volume + 1.929000 + + + + Instantaneous value + 7 + 0 + 0 + - + Time point (date) + 2013-02-28 + + + + Instantaneous value + 7 + 0 + 0 + m^3 + Volume + 3.092000 + + + + Instantaneous value + 8 + 0 + 0 + - + Time point (date) + 2013-03-31 + + + + Instantaneous value + 8 + 0 + 0 + m^3 + Volume + 4.661000 + + + + Instantaneous value + 9 + 0 + 0 + - + Time point (date) + 2013-04-30 + + + + Instantaneous value + 9 + 0 + 0 + m^3 + Volume + 4.767000 + + + + Instantaneous value + 10 + 0 + 0 + - + Time point (date) + 2013-05-31 + + + + Instantaneous value + 10 + 0 + 0 + m^3 + Volume + 5.124000 + + + + Instantaneous value + 11 + 0 + 0 + - + Time point (date) + 2013-06-30 + + + + Instantaneous value + 11 + 0 + 0 + m^3 + Volume + 5.176000 + + + + Instantaneous value + 12 + 0 + 0 + - + Time point (date) + 2013-07-31 + + + + Instantaneous value + 12 + 0 + 0 + m^3 + Volume + 5.246000 + + + + Instantaneous value + 13 + 0 + 0 + - + Time point (date) + 2013-08-31 + + + + Instantaneous value + 13 + 0 + 0 + m^3 + Volume + 5.668000 + + + + Manufacturer specific + 0 + + + 01 00 00 + + + diff --git a/test/test-frames/rel_padpuls2.norm.xml b/test/test-frames/rel_padpuls2.norm.xml new file mode 100644 index 00000000..14f88c8c --- /dev/null +++ b/test/test-frames/rel_padpuls2.norm.xml @@ -0,0 +1,63 @@ + + + + + 4 + REL + 18 + Relay PadPuls M4 + Other + 1 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2001-09-20T13:16:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2000-12-31 + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2001-12-31 + + + + Manufacturer specific + 0 + + + 43 01 01 00 + + + diff --git a/test/test-frames/rel_padpuls3.norm.xml b/test/test-frames/rel_padpuls3.norm.xml new file mode 100644 index 00000000..b6dafa74 --- /dev/null +++ b/test/test-frames/rel_padpuls3.norm.xml @@ -0,0 +1,63 @@ + + + + + 1030101 + REL + 64 + Relay PadPuls M2 + Heat Cost Allocator + 30 + 00 + 0000 + + + + Instantaneous value + 0 + Units for H.C.A. + H.C.A. + 1987.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2000-12-31T10:41:00Z + + + + Instantaneous value + 1 + - + Time point (date) + 2000-12-31 + + + + Instantaneous value + 1 + Units for H.C.A. + H.C.A. + 1302.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2001-12-31 + + + + Manufacturer specific + 0 + + + C0 01 01 0C + + + diff --git a/test/test-frames/sen_pollusonic_2.norm.xml b/test/test-frames/sen_pollusonic_2.norm.xml new file mode 100644 index 00000000..1605e327 --- /dev/null +++ b/test/test-frames/sen_pollusonic_2.norm.xml @@ -0,0 +1,23 @@ + + + + + 90919293 + Heat + 16 + 00 + + + + Actual value + kWh + 6531 + + + + Actual value + l + 69 + + + diff --git a/test/test-frames/sen_pollutherm.norm.xml b/test/test-frames/sen_pollutherm.norm.xml new file mode 100644 index 00000000..56b08c30 --- /dev/null +++ b/test/test-frames/sen_pollutherm.norm.xml @@ -0,0 +1,90 @@ + + + + + 21050076 + SPX + 49 + Sensus PolluTherm + Heat: Outlet + 81 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 8640000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 7998.920000 + + + + + + + Instantaneous value + 0 + W + Power + 54580.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 75.500000 + + + + Instantaneous value + 0 + °C + Return temperature + 59.400000 + + + + Instantaneous value + 0 + K + Temperature difference + 16.076000 + + + + Instantaneous value + 0 + + Fabrication No + 21050076.000000 + + + + Instantaneous value + 0 + + Customer location + 21050076.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/siemens_water.norm.xml b/test/test-frames/siemens_water.norm.xml new file mode 100644 index 00000000..895a7a5d --- /dev/null +++ b/test/test-frames/siemens_water.norm.xml @@ -0,0 +1,95 @@ + + + + + 8021382 + LSE + 153 + Siemens WFH21 + Warm water (30-90°C) + 235 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.101000 + + + + Instantaneous value + 0 + s + On time + 75427200.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2011-09-14T08:56:00Z + + + + Value during error state + 0 + - + Time point (date) + 2000-00-00 + + + + Instantaneous value + 0 + + Fabrication No + 8021382.000000 + + + + Instantaneous value + 0 + + Device type + 2173253517322.000000 + + + + Instantaneous value + 0 + + Parameter set identification + WFH21 + + + + Instantaneous value + 0 + + Firmware version + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Manufacturer specific + 0 + + + 37 FD 17 00 00 00 00 00 00 00 00 02 7A 0D 00 02 78 0D 00 + + + diff --git a/test/test-frames/siemens_wfh21.norm.xml b/test/test-frames/siemens_wfh21.norm.xml new file mode 100644 index 00000000..afd7f9fc --- /dev/null +++ b/test/test-frames/siemens_wfh21.norm.xml @@ -0,0 +1,103 @@ + + + + + 8006491 + LSE + 153 + Siemens WFH21 + Warm water (30-90°C) + 218 + 00 + 0000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + s + On time + 158709600.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2011-12-01T10:36:00Z + + + + Value during error state + 0 + - + Time point (date) + 2000-00-00 + + + + Instantaneous value + 0 + + Fabrication No + 8006491.000000 + + + + Instantaneous value + 0 + + Device type + 2173253517322.000000 + + + + Instantaneous value + 0 + + Parameter set identification + WFH21 + + + + Instantaneous value + 0 + + Firmware version + 0.000000 + + + + Instantaneous value + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2010-12-31 + + + + Manufacturer specific + 0 + + + 37 FD 17 00 00 00 00 00 00 00 00 02 7A 25 00 02 78 25 00 + + + diff --git a/test/test-frames/sontex_supercal_531_telegram1.norm.xml b/test/test-frames/sontex_supercal_531_telegram1.norm.xml new file mode 100644 index 00000000..be48c61d --- /dev/null +++ b/test/test-frames/sontex_supercal_531_telegram1.norm.xml @@ -0,0 +1,111 @@ + + + + + 8420624 + SON + 13 + Sontex Supercal 531 + Heat: Outlet + 44 + 30 + 0000 + + + + Instantaneous value + 0 + J + Energy + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 0.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 0.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 1 + 0 + 0 + J + Energy + 0.000000 + + + + Instantaneous value + 1 + 0 + 0 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + 0 + 1 + m^3 + Volume + 0.000000 + + + + Instantaneous value + 1 + 0 + 2 + m^3 + Volume + 0.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/svm_f22_telegram1.norm.xml b/test/test-frames/svm_f22_telegram1.norm.xml new file mode 100644 index 00000000..48b84043 --- /dev/null +++ b/test/test-frames/svm_f22_telegram1.norm.xml @@ -0,0 +1,133 @@ + + + + + 1006089 + SVM + 9 + Elster F4 / Kamstrup SVM F22 + Heat: Inlet + 148 + 70 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 28014000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 640.581000 + + + + Instantaneous value + 0 + 0 + 1 + m^3 + Volume + 640.581000 + + + + Instantaneous value + 0 + °C + Flow temperature + 243.000000 + + + + Instantaneous value + 0 + °C + Return temperature + 243.000000 + + + + Instantaneous value + 0 + K + Temperature difference + 0.000000 + + + + Instantaneous value + 0 + s + On time + 22932000.000000 + + + + Instantaneous value + 0 + s + Operating time + 22906800.000000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2021-02-08T21:12:00Z + + + + Instantaneous value + 0 + 0 + 1 + Units for H.C.A. + H.C.A. + 0.000000 + + + + Instantaneous value + 0 + 0 + 2 + Units for H.C.A. + H.C.A. + 0.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/tch_telegramm1.norm.xml b/test/test-frames/tch_telegramm1.norm.xml new file mode 100644 index 00000000..bdaaa224 --- /dev/null +++ b/test/test-frames/tch_telegramm1.norm.xml @@ -0,0 +1,95 @@ + + + + + 21519982 + TCH + 38 + Techem m-bus S + Heat: Outlet + 133 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 0.000000 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2000-09-29T13:50:00Z + + + + Instantaneous value + 1 + Wh + Energy + 0.000000 + + + + Instantaneous value + 1 + - + Time point (date) + 2000-05-29 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 23.400000 + + + + Instantaneous value + 0 + °C + Return temperature + 22.400000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 0.064000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/wmbus-converted.norm.xml b/test/test-frames/wmbus-converted.norm.xml new file mode 100644 index 00000000..f7a01342 --- /dev/null +++ b/test/test-frames/wmbus-converted.norm.xml @@ -0,0 +1,23 @@ + + + + + 17677731 + KAM + 1 + Kamstrup 382 (6850-005) + Electricity + 0 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 5000.000000 + + + From a7fb39fa23b8d5fe82ae42ee2d37701980ab2e9d Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 6 Jul 2020 14:10:25 +0200 Subject: [PATCH 06/29] Fix VIF descriptions --- mbus/mbus-protocol-aux.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index c932f7e1..8479d063 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -201,10 +201,10 @@ mbus_variable_vif vif_table[] = { { 0x73, 86400.0, "s", "Averaging Duration" }, /* days */ /* E111 01nn Actuality Duration s */ - { 0x74, 1.0, "s", "Averaging Duration" }, /* seconds */ - { 0x75, 60.0, "s", "Averaging Duration" }, /* minutes */ - { 0x76, 3600.0, "s", "Averaging Duration" }, /* hours */ - { 0x77, 86400.0, "s", "Averaging Duration" }, /* days */ + { 0x74, 1.0, "s", "Actuality Duration" }, /* seconds */ + { 0x75, 60.0, "s", "Actuality Duration" }, /* minutes */ + { 0x76, 3600.0, "s", "Actuality Duration" }, /* hours */ + { 0x77, 86400.0, "s", "Actuality Duration" }, /* days */ /* Fabrication No */ { 0x78, 1.0, "", "Fabrication No" }, @@ -247,7 +247,7 @@ mbus_variable_vif vif_table[] = { { 0x108, 1.0e0, "", "Access Number (transmission count)" }, /* E000 1001 Medium (as in fixed header) */ - { 0x109, 1.0e0, "", "Device type" }, + { 0x109, 1.0e0, "", "Medium" }, /* E000 1010 Manufacturer (as in fixed header) */ { 0x10A, 1.0e0, "", "Manufacturer" }, @@ -256,7 +256,7 @@ mbus_variable_vif vif_table[] = { { 0x10B, 1.0e0, "", "Parameter set identification" }, /* E000 1100 Model / Version */ - { 0x10C, 1.0e0, "", "Device type" }, + { 0x10C, 1.0e0, "", "Model / Version" }, /* E000 1101 Hardware version # */ { 0x10D, 1.0e0, "", "Hardware version" }, @@ -356,9 +356,9 @@ mbus_variable_vif vif_table[] = { { 0x130, 1.0e0, "Reserved", "Reserved" }, /* ???? */ /* E011 00nn Duration of tariff (nn=01 ..11: min to days) */ - { 0x131, 60.0, "s", "Storage interval" }, /* minute(s) */ - { 0x132, 3600.0, "s", "Storage interval" }, /* hour(s) */ - { 0x133, 86400.0, "s", "Storage interval" }, /* day(s) */ + { 0x131, 60.0, "s", "Duration of tariff" }, /* minute(s) */ + { 0x132, 3600.0, "s", "Duration of tariff" }, /* hour(s) */ + { 0x133, 86400.0, "s", "Duration of tariff" }, /* day(s) */ /* E011 01nn Period of tariff [sec(s) to day(s)] */ { 0x134, 1.0, "s", "Period of tariff" }, /* seconds */ From d0406df92a238741c2d6842ef8d7ea47370ab593 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Mon, 6 Jul 2020 14:13:27 +0200 Subject: [PATCH 07/29] Update normalized XML files This updates the affected XML files after the recent fixes to the VIF description. --- test/test-frames/landis+gyr_ultraheat_t230.norm.xml | 2 +- test/test-frames/metrona_ultraheat_xs.norm.xml | 2 +- test/test-frames/minol_minocal_wr3.norm.xml | 4 ++-- test/test-frames/siemens_water.norm.xml | 2 +- test/test-frames/siemens_wfh21.norm.xml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test-frames/landis+gyr_ultraheat_t230.norm.xml b/test/test-frames/landis+gyr_ultraheat_t230.norm.xml index d30f1cd5..70309869 100644 --- a/test/test-frames/landis+gyr_ultraheat_t230.norm.xml +++ b/test/test-frames/landis+gyr_ultraheat_t230.norm.xml @@ -16,7 +16,7 @@ Instantaneous value 0 s - Averaging Duration + Actuality Duration 4.000000 diff --git a/test/test-frames/metrona_ultraheat_xs.norm.xml b/test/test-frames/metrona_ultraheat_xs.norm.xml index 82423fe9..55779d2c 100644 --- a/test/test-frames/metrona_ultraheat_xs.norm.xml +++ b/test/test-frames/metrona_ultraheat_xs.norm.xml @@ -16,7 +16,7 @@ Instantaneous value 0 s - Averaging Duration + Actuality Duration 4.000000 diff --git a/test/test-frames/minol_minocal_wr3.norm.xml b/test/test-frames/minol_minocal_wr3.norm.xml index 19ddead9..6db54925 100644 --- a/test/test-frames/minol_minocal_wr3.norm.xml +++ b/test/test-frames/minol_minocal_wr3.norm.xml @@ -132,7 +132,7 @@ 0 1 - Device type + Medium 7.000000 @@ -182,7 +182,7 @@ 0 2 - Device type + Medium 7.000000 diff --git a/test/test-frames/siemens_water.norm.xml b/test/test-frames/siemens_water.norm.xml index 895a7a5d..a49f1d3a 100644 --- a/test/test-frames/siemens_water.norm.xml +++ b/test/test-frames/siemens_water.norm.xml @@ -56,7 +56,7 @@ Instantaneous value 0 - Device type + Model / Version 2173253517322.000000 diff --git a/test/test-frames/siemens_wfh21.norm.xml b/test/test-frames/siemens_wfh21.norm.xml index afd7f9fc..cac68af0 100644 --- a/test/test-frames/siemens_wfh21.norm.xml +++ b/test/test-frames/siemens_wfh21.norm.xml @@ -56,7 +56,7 @@ Instantaneous value 0 - Device type + Model / Version 2173253517322.000000 From 8fe42f9ede656f5dfd1c23682e7afb0afe851bc3 Mon Sep 17 00:00:00 2001 From: Anders Wennmo Date: Thu, 4 Jun 2020 12:35:58 +0200 Subject: [PATCH 08/29] Implement all of VIF extensions for 0xFD (#166) --- mbus/mbus-protocol.c | 453 ++++++++++++++---- .../EMU_EMU-Professional-375-M-Bus.xml | 2 +- test/test-frames/LGB_G350.xml | 2 +- 3 files changed, 363 insertions(+), 94 deletions(-) diff --git a/mbus/mbus-protocol.c b/mbus/mbus-protocol.c index 311abbba..0d813a20 100755 --- a/mbus/mbus-protocol.c +++ b/mbus/mbus-protocol.c @@ -2438,6 +2438,356 @@ mbus_data_error_lookup(int error) return buff; } +static const char * +mbus_unit_duration_nn(int nn) +{ + switch (nn) + { + case 0: + return "second(s)"; + case 1: + return "minute(s)"; + case 2: + return "hour(s)"; + case 3: + return "day(s)"; + } + return "error: out-of-range"; +} + +static const char * +mbus_unit_duration_pp(int pp) +{ + switch (pp) + { + case 0: + return "hour(s)"; + + case 1: + return "day(s)"; + + case 2: + return "month(s)"; + + case 3: + return "year(s)"; + } + return "error: out-of-range"; +} + +static const char * +mbus_vib_unit_lookup_fb(mbus_value_information_block *vib) +{ + static char buff[256]; + snprintf(buff, sizeof(buff), "Unrecognized VIF extension: 0xFB,0x%.2X", vib->vife[0]); + return buff; +} + +static const char * +mbus_vib_unit_lookup_fd(mbus_value_information_block *vib) +{ + static char buff[256]; + int n; + + // ignore the extension bit in this selection + const unsigned char masked_vife0 = vib->vife[0] & MBUS_DIB_VIF_WITHOUT_EXTENSION; + + if ((masked_vife0 & 0x7C) == 0x00) + { + // VIFE = E000 00nn Credit of 10nn-3 of the nominal local legal currency units + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Credit of %s of the nominal local legal currency units", mbus_unit_prefix(n - 3)); + } + else if ((masked_vife0 & 0x7C) == 0x04) + { + // VIFE = E000 01nn Debit of 10nn-3 of the nominal local legal currency units + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Debit of %s of the nominal local legal currency units", mbus_unit_prefix(n - 3)); + } + else if (masked_vife0 == 0x08) + { + // E000 1000 + snprintf(buff, sizeof(buff), "Access Number (transmission count)"); + } + else if (masked_vife0 == 0x09) + { + // E000 1001 + snprintf(buff, sizeof(buff), "Medium (as in fixed header)"); + } + else if (masked_vife0 == 0x0A) + { + // E000 1010 + snprintf(buff, sizeof(buff), "Manufacturer (as in fixed header)"); + } + else if (masked_vife0 == 0x0B) + { + // E000 1010 + snprintf(buff, sizeof(buff), "Parameter set identification"); + } + else if (masked_vife0 == 0x0C) + { + // E000 1100 + snprintf(buff, sizeof(buff), "Model / Version"); + } + else if (masked_vife0 == 0x0D) + { + // E000 1100 + snprintf(buff, sizeof(buff), "Hardware version"); + } + else if (masked_vife0 == 0x0E) + { + // E000 1101 + snprintf(buff, sizeof(buff), "Firmware version"); + } + else if (masked_vife0 == 0x0F) + { + // E000 1101 + snprintf(buff, sizeof(buff), "Software version"); + } + else if (masked_vife0 == 0x10) + { + // VIFE = E001 0000 Customer location + snprintf(buff, sizeof(buff), "Customer location"); + } + else if (masked_vife0 == 0x11) + { + // VIFE = E001 0001 Customer + snprintf(buff, sizeof(buff), "Customer"); + } + else if (masked_vife0 == 0x12) + { + // VIFE = E001 0010 Access Code User + snprintf(buff, sizeof(buff), "Access Code User"); + } + else if (masked_vife0 == 0x13) + { + // VIFE = E001 0011 Access Code Operator + snprintf(buff, sizeof(buff), "Access Code Operator"); + } + else if (masked_vife0 == 0x14) + { + // VIFE = E001 0100 Access Code System Operator + snprintf(buff, sizeof(buff), "Access Code System Operator"); + } + else if (masked_vife0 == 0x15) + { + // VIFE = E001 0101 Access Code Developer + snprintf(buff, sizeof(buff), "Access Code Developer"); + } + else if (masked_vife0 == 0x16) + { + // VIFE = E001 0110 Password + snprintf(buff, sizeof(buff), "Password"); + } + else if (masked_vife0 == 0x17) + { + // VIFE = E001 0111 Error flags + snprintf(buff, sizeof(buff), "Error flags"); + } + else if (masked_vife0 == 0x18) + { + // VIFE = E001 1000 Error mask + snprintf(buff, sizeof(buff), "Error mask"); + } + else if (masked_vife0 == 0x19) + { + // VIFE = E001 1001 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if (masked_vife0 == 0x1A) + { + // VIFE = E001 1010 Digital output (binary) + snprintf(buff, sizeof(buff), "Digital output (binary)"); + } + else if (masked_vife0 == 0x1B) + { + // VIFE = E001 1011 Digital input (binary) + snprintf(buff, sizeof(buff), "Digital input (binary)"); + } + else if (masked_vife0 == 0x1C) + { + // VIFE = E001 1100 Baudrate [Baud] + snprintf(buff, sizeof(buff), "Baudrate"); + } + else if (masked_vife0 == 0x1D) + { + // VIFE = E001 1101 response delay time [bittimes] + snprintf(buff, sizeof(buff), "response delay time"); + } + else if (masked_vife0 == 0x1E) + { + // VIFE = E001 1110 Retry + snprintf(buff, sizeof(buff), "Retry"); + } + else if (masked_vife0 == 0x1F) + { + // VIFE = E001 1111 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if (masked_vife0 == 0x20) + { + // VIFE = E010 0000 First storage # for cyclic storage + snprintf(buff, sizeof(buff), "First storage # for cyclic storage"); + } + else if (masked_vife0 == 0x21) + { + // VIFE = E010 0001 Last storage # for cyclic storage + snprintf(buff, sizeof(buff), "Last storage # for cyclic storage"); + } + else if (masked_vife0 == 0x22) + { + // VIFE = E010 0010 Size of storage block + snprintf(buff, sizeof(buff), "Size of storage block"); + } + else if (masked_vife0 == 0x23) + { + // VIFE = E010 0011 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if ((masked_vife0 & 0x7C) == 0x24) + { + // VIFE = E010 01nn Storage interval [sec(s)..day(s)] + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Storage interval %s", mbus_unit_duration_nn(n)); + } + else if (masked_vife0 == 0x28) + { + // VIFE = E010 1000 Storage interval month(s) + snprintf(buff, sizeof(buff), "Storage interval month(s)"); + } + else if (masked_vife0 == 0x29) + { + // VIFE = E010 1001 Storage interval year(s) + snprintf(buff, sizeof(buff), "Storage interval year(s)"); + } + else if (masked_vife0 == 0x2A) + { + // VIFE = E010 1010 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if (masked_vife0 == 0x2B) + { + // VIFE = E010 1011 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if ((masked_vife0 & 0x7C) == 0x2C) + { + // VIFE = E010 11nn Duration since last readout [sec(s)..day(s)] + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Duration since last readout %s", mbus_unit_duration_nn(n)); + } + else if (masked_vife0 == 0x30) + { + // VIFE = E011 0000 Start (date/time) of tariff + snprintf(buff, sizeof(buff), "Start (date/time) of tariff"); + } + else if ((masked_vife0 & 0x7C) == 0x30) + { + // VIFE = E011 00nn Duration of tariff (nn=01 ..11: min to days) + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Duration of tariff %s", mbus_unit_duration_nn(n)); + } + else if ((masked_vife0 & 0x7C) == 0x34) + { + // VIFE = E011 01nn Period of tariff [sec(s) to day(s)] + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Period of tariff %s", mbus_unit_duration_nn(n)); + } + else if (masked_vife0 == 0x38) + { + // VIFE = E011 1000 Period of tariff months(s) + snprintf(buff, sizeof(buff), "Period of tariff months(s)"); + } + else if (masked_vife0 == 0x39) + { + // VIFE = E011 1001 Period of tariff year(s) + snprintf(buff, sizeof(buff), "Period of tariff year(s)"); + } + else if (masked_vife0 == 0x3A) + { + // VIFE = E011 1010 dimensionless / no VIF + snprintf(buff, sizeof(buff), "dimensionless / no VIF"); + } + else if (masked_vife0 == 0x3B) + { + // VIFE = E011 1011 Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if ((masked_vife0 & 0x7C) == 0x3C) + { + // VIFE = E011 11xx Reserved + snprintf(buff, sizeof(buff), "Reserved"); + } + else if ((masked_vife0 & 0x70) == 0x40) + { + // VIFE = E100 nnnn 10^(nnnn-9) V + n = (masked_vife0 & 0x0F); + snprintf(buff, sizeof(buff), "%s V", mbus_unit_prefix(n - 9)); + } + else if ((masked_vife0 & 0x70) == 0x50) + { + // VIFE = E101 nnnn 10nnnn-12 A + n = (masked_vife0 & 0x0F); + snprintf(buff, sizeof(buff), "%s A", mbus_unit_prefix(n - 12)); + } + else if (masked_vife0 == 0x60) { + // VIFE = E110 0000 Reset counter + snprintf(buff, sizeof(buff), "Reset counter"); + } + else if (masked_vife0 == 0x61) { + // VIFE = E110 0001 Cumulation counter + snprintf(buff, sizeof(buff), "Cumulation counter"); + } + else if (masked_vife0 == 0x62) { + // VIFE = E110 0010 Control signal + snprintf(buff, sizeof(buff), "Control signal"); + } + else if (masked_vife0 == 0x63) { + // VIFE = E110 0011 Day of week + snprintf(buff, sizeof(buff), "Day of week"); + } + else if (masked_vife0 == 0x64) { + // VIFE = E110 0100 Week number + snprintf(buff, sizeof(buff), "Week number"); + } + else if (masked_vife0 == 0x65) { + // VIFE = E110 0101 Time point of day change + snprintf(buff, sizeof(buff), "Time point of day change"); + } + else if (masked_vife0 == 0x66) { + // VIFE = E110 0110 State of parameter activation + snprintf(buff, sizeof(buff), "State of parameter activation"); + } + else if (masked_vife0 == 0x67) { + // VIFE = E110 0111 Special supplier information + snprintf(buff, sizeof(buff), "Special supplier information"); + } + else if ((masked_vife0 & 0x7C) == 0x68) { + // VIFE = E110 10pp Duration since last cumulation [hour(s)..years(s)]Ž + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Duration since last cumulation %s", mbus_unit_duration_pp(n)); + } + else if ((masked_vife0 & 0x7C) == 0x6C) { + // VIFE = E110 11pp Operating time battery [hour(s)..years(s)]Ž + n = (masked_vife0 & 0x03); + snprintf(buff, sizeof(buff), "Operating time battery %s", mbus_unit_duration_pp(n)); + } + else if (masked_vife0 == 0x70) { + // VIFE = E111 0000 Date and time of battery change + snprintf(buff, sizeof(buff), "Date and time of battery change"); + } + else if ((masked_vife0 & 0x70) == 0x70) + { + // VIFE = E111 nnn Reserved + snprintf(buff, sizeof(buff), "Reserved VIF extension"); + } + else + { + snprintf(buff, sizeof(buff), "Unrecognized VIF 0xFD extension: 0x%.2x", masked_vife0); + } + + return buff; +} //------------------------------------------------------------------------------ /// Lookup the unit from the VIB (VIF or VIFE) @@ -2461,104 +2811,23 @@ mbus_vib_unit_lookup(mbus_value_information_block *vib) if (vib == NULL) return ""; - if (vib->vif == 0xFD || vib->vif == 0xFB) // first type of VIF extention: see table 8.4.4 + if (vib->vif == 0xFB) // first type of VIF extention: see table 8.4.4 { if (vib->nvife == 0) { - snprintf(buff, sizeof(buff), "Missing VIF extension"); - } - else if (vib->vife[0] == 0x08 || vib->vife[0] == 0x88) - { - // E000 1000 - snprintf(buff, sizeof(buff), "Access Number (transmission count)"); - } - else if (vib->vife[0] == 0x09|| vib->vife[0] == 0x89) - { - // E000 1001 - snprintf(buff, sizeof(buff), "Medium (as in fixed header)"); - } - else if (vib->vife[0] == 0x0A || vib->vife[0] == 0x8A) - { - // E000 1010 - snprintf(buff, sizeof(buff), "Manufacturer (as in fixed header)"); - } - else if (vib->vife[0] == 0x0B || vib->vife[0] == 0x8B) - { - // E000 1010 - snprintf(buff, sizeof(buff), "Parameter set identification"); + return "Missing VIF extension"; } - else if (vib->vife[0] == 0x0C || vib->vife[0] == 0x8C) - { - // E000 1100 - snprintf(buff, sizeof(buff), "Model / Version"); - } - else if (vib->vife[0] == 0x0D || vib->vife[0] == 0x8D) - { - // E000 1100 - snprintf(buff, sizeof(buff), "Hardware version"); - } - else if (vib->vife[0] == 0x0E || vib->vife[0] == 0x8E) - { - // E000 1101 - snprintf(buff, sizeof(buff), "Firmware version"); - } - else if (vib->vife[0] == 0x0F || vib->vife[0] == 0x8F) - { - // E000 1101 - snprintf(buff, sizeof(buff), "Software version"); - } - else if (vib->vife[0] == 0x16) - { - // VIFE = E001 0110 Password - snprintf(buff, sizeof(buff), "Password"); - } - else if (vib->vife[0] == 0x17 || vib->vife[0] == 0x97) - { - // VIFE = E001 0111 Error flags - snprintf(buff, sizeof(buff), "Error flags"); - } - else if (vib->vife[0] == 0x10) - { - // VIFE = E001 0000 Customer location - snprintf(buff, sizeof(buff), "Customer location"); - } - else if (vib->vife[0] == 0x11) - { - // VIFE = E001 0001 Customer - snprintf(buff, sizeof(buff), "Customer"); - } - else if (vib->vife[0] == 0x1A) - { - // VIFE = E001 1010 Digital output (binary) - snprintf(buff, sizeof(buff), "Digital output (binary)"); - } - else if (vib->vife[0] == 0x1B) - { - // VIFE = E001 1011 Digital input (binary) - snprintf(buff, sizeof(buff), "Digital input (binary)"); - } - else if ((vib->vife[0] & 0x70) == 0x40) - { - // VIFE = E100 nnnn 10^(nnnn-9) V - n = (vib->vife[0] & 0x0F); - snprintf(buff, sizeof(buff), "%s V", mbus_unit_prefix(n-9)); - } - else if ((vib->vife[0] & 0x70) == 0x50) - { - // VIFE = E101 nnnn 10nnnn-12 A - n = (vib->vife[0] & 0x0F); - snprintf(buff, sizeof(buff), "%s A", mbus_unit_prefix(n-12)); - } - else if ((vib->vife[0] & 0xF0) == 0x70) - { - // VIFE = E111 nnn Reserved - snprintf(buff, sizeof(buff), "Reserved VIF extension"); - } - else + + return mbus_vib_unit_lookup_fb(vib); + } + else if (vib->vif == 0xFD) // first type of VIF extention: see table 8.4.4 + { + if (vib->nvife == 0) { - snprintf(buff, sizeof(buff), "Unrecognized VIF extension: 0x%.2x", vib->vife[0]); + return "Missing VIF extension"; } - return buff; + + return mbus_vib_unit_lookup_fd(vib); } else if (vib->vif == 0x7C) { diff --git a/test/test-frames/EMU_EMU-Professional-375-M-Bus.xml b/test/test-frames/EMU_EMU-Professional-375-M-Bus.xml index 8b34fc2f..363ee2b4 100644 --- a/test/test-frames/EMU_EMU-Professional-375-M-Bus.xml +++ b/test/test-frames/EMU_EMU-Professional-375-M-Bus.xml @@ -241,7 +241,7 @@ Instantaneous value 0 - Unrecognized VIF extension: 0x60 + Reset counter 56 diff --git a/test/test-frames/LGB_G350.xml b/test/test-frames/LGB_G350.xml index d75231c6..45ef288d 100644 --- a/test/test-frames/LGB_G350.xml +++ b/test/test-frames/LGB_G350.xml @@ -52,7 +52,7 @@ Instantaneous value 0 - Unrecognized VIF extension: 0x67 + Special supplier information 15 From 8d049910f7fd1fbe71c642a3fa3575c7d0ea3076 Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Tue, 7 Jul 2020 14:44:35 +0200 Subject: [PATCH 09/29] Implement all of VIF extensions for 0xFB (#166) --- mbus/mbus-protocol.c | 245 ++++++++++++++++++++- test/test-frames/engelmann_sensostar2c.xml | 18 +- 2 files changed, 253 insertions(+), 10 deletions(-) diff --git a/mbus/mbus-protocol.c b/mbus/mbus-protocol.c index 0d813a20..80eb45cc 100755 --- a/mbus/mbus-protocol.c +++ b/mbus/mbus-protocol.c @@ -2479,7 +2479,250 @@ static const char * mbus_vib_unit_lookup_fb(mbus_value_information_block *vib) { static char buff[256]; - snprintf(buff, sizeof(buff), "Unrecognized VIF extension: 0xFB,0x%.2X", vib->vife[0]); + int n; + const char * prefix = ""; + switch (vib->vife[0] & MBUS_DIB_VIF_WITHOUT_EXTENSION) + { + case 0x0: + case 0x0 + 1: + // E000 000n + n = 0x01 & vib->vife[0]; + if (n == 0) + prefix = "0.1 "; + snprintf(buff, sizeof(buff), "Energy (%sMWh)", prefix); + break; + case 0x2: + case 0x2 + 1: + // E000 001n + case 0x4: + case 0x4 + 1: + case 0x4 + 2: + case 0x4 + 3: + // E000 01nn + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x8: + case 0x8 + 1: + // E000 100n + n = 0x01 & vib->vife[0]; + if (n == 0) + prefix = "0.1 "; + snprintf(buff, sizeof(buff), "Energy (%sGJ)", prefix); + break; + case 0xA: + case 0xA + 1: + case 0xC: + case 0xC + 1: + case 0xC + 2: + case 0xC + 3: + // E000 101n + // E000 11nn + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x10: + case 0x10 + 1: + // E001 000n + n = 0x01 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Volume (%sm3)", mbus_unit_prefix(n+2)); + break; + case 0x12: + case 0x12 + 1: + case 0x14: + case 0x14 + 1: + case 0x14 + 2: + case 0x14 + 3: + // E001 001n + // E001 01nn + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x18: + case 0x18 + 1: + // E001 100n + n = 0x01 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Mass (%st)", mbus_unit_prefix(n+2)); + break; + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + // E001 1010 to E010 0000, Reserved + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x21: + // E010 0001 + snprintf(buff, sizeof(buff), "Volume (0.1 feet^3)"); + break; + case 0x22: + case 0x23: + // E010 0010 + // E010 0011 + n = 0x01 & vib->vife[0]; + if (n == 0) + prefix = "0.1 "; + snprintf(buff, sizeof(buff), "Volume (%samerican gallon)", prefix); + break; + + case 0x24: + // E010 0100 + snprintf(buff, sizeof(buff), "Volume flow (0.001 american gallon/min)"); + break; + case 0x25: + // E010 0101 + snprintf(buff, sizeof(buff), "Volume flow (american gallon/min)"); + break; + case 0x26: + // E010 0110 + snprintf(buff, sizeof(buff), "Volume flow (american gallon/h)"); + break; + case 0x27: + // E010 0111, Reserved + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x28: + case 0x28 + 1: + // E010 100n + n = 0x01 & vib->vife[0]; + if (n == 0) + prefix = "0.1 "; + snprintf(buff, sizeof(buff), "Power (%sMW)", prefix); + break; + case 0x2A: + case 0x2A + 1: + case 0x2C: + case 0x2C + 1: + case 0x2C + 2: + case 0x2C + 3: + // E010 101n, Reserved + // E010 11nn, Reserved + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x30: + case 0x30 + 1: + // E011 000n + n = 0x01 & vib->vife[0]; + if (n == 0) + prefix = "0.1 "; + snprintf(buff, sizeof(buff), "Power (%sGJ/h)", prefix); + break; + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + // E011 0010 to E101 0111 + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x58: + case 0x58 + 1: + case 0x58 + 2: + case 0x58 + 3: + // E101 10nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Flow Temperature (%s degree F)", mbus_unit_prefix(n -3)); + break; + case 0x5C: + case 0x5C + 1: + case 0x5C + 2: + case 0x5C + 3: + // E101 11nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Return Temperature (%s degree F)", mbus_unit_prefix(n -3)); + break; + case 0x60: + case 0x60 + 1: + case 0x60 + 2: + case 0x60 + 3: + // E110 00nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Temperature Difference (%s degree F)", mbus_unit_prefix(n -3)); + break; + case 0x64: + case 0x64 + 1: + case 0x64 + 2: + case 0x64 + 3: + // E110 01nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "External Temperature (%s degree F)", mbus_unit_prefix(n -3)); + break; + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + // E110 1nnn + snprintf(buff, sizeof(buff), "Reserved (0x%.2x)", vib->vife[0]); + break; + case 0x70: + case 0x70 + 1: + case 0x70 + 2: + case 0x70 + 3: + // E111 00nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Cold / Warm Temperature Limit (%s degree F)", mbus_unit_prefix(n -3)); + break; + case 0x74: + case 0x74 + 1: + case 0x74 + 2: + case 0x74 + 3: + // E111 00nn + n = 0x03 & vib->vife[0]; + snprintf(buff, sizeof(buff), "Cold / Warm Temperature Limit (%s degree C)", mbus_unit_prefix(n -3)); + break; + case 0x78: + case 0x78 + 1: + case 0x78 + 2: + case 0x78 + 3: + case 0x78 + 4: + case 0x78 + 5: + case 0x78 + 6: + case 0x78 + 7: + // E111 1nnn + n = 0x07 & vib->vife[0]; + snprintf(buff, sizeof(buff), "cumul. count max power (%s W)", mbus_unit_prefix(n - 3)); + break; + default: + snprintf(buff, sizeof(buff), "Unrecognized VIF 0xFB extension: 0x%.2x", vib->vife[0]); + break; + } return buff; } diff --git a/test/test-frames/engelmann_sensostar2c.xml b/test/test-frames/engelmann_sensostar2c.xml index c8476339..b33e52e8 100644 --- a/test/test-frames/engelmann_sensostar2c.xml +++ b/test/test-frames/engelmann_sensostar2c.xml @@ -36,7 +36,7 @@ Instantaneous value 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 8 @@ -45,7 +45,7 @@ 0 2 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 @@ -54,7 +54,7 @@ 0 3 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 @@ -131,7 +131,7 @@ Instantaneous value 1 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 8 @@ -140,7 +140,7 @@ 1 2 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 @@ -149,7 +149,7 @@ 1 3 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 @@ -176,7 +176,7 @@ 2 0 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 5 @@ -185,7 +185,7 @@ 2 2 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 @@ -194,7 +194,7 @@ 2 3 0 - Unrecognized VIF extension: 0x00 + Energy (0.1 MWh) 0 From 36a4fbd02199fc53ea012ed9532850a276af9536 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 8 Jul 2020 11:44:17 +0200 Subject: [PATCH 10/29] Improve product strings for Aquametro and Sensus --- mbus/mbus-protocol.c | 28 +++++++++++++++-------- test/test-frames/example_data_01.norm.xml | 2 +- test/test-frames/example_data_01.xml | 2 +- test/test-frames/example_data_02.norm.xml | 2 +- test/test-frames/example_data_02.xml | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/mbus/mbus-protocol.c b/mbus/mbus-protocol.c index 80eb45cc..93123644 100755 --- a/mbus/mbus-protocol.c +++ b/mbus/mbus-protocol.c @@ -955,14 +955,21 @@ mbus_data_product_name(mbus_data_variable_header *header) } else if (manufacturer == mbus_manufacturer_id("AMT")) { - switch (header->version) + if (header->version >= 0xC0) { - case 0x80: - strcpy(buff,"Aquametro CALEC MB"); - break; - case 0xC0: - strcpy(buff,"Aquametro CALEC ST"); - break; + strcpy(buff,"Aquametro CALEC ST"); + } + else if (header->version >= 0x80) + { + strcpy(buff,"Aquametro CALEC MB"); + } + else if (header->version >= 0x40) + { + strcpy(buff,"Aquametro SAPHIR"); + } + else + { + strcpy(buff,"Aquametro AMTRON"); } } else if (manufacturer == mbus_manufacturer_id("BEC")) @@ -1266,15 +1273,16 @@ mbus_data_product_name(mbus_data_variable_header *header) { switch (header->version) { + case 0x08: + case 0x19: + strcpy(buff,"Sensus PolluCom E"); + break; case 0x0B: strcpy(buff,"Sensus PolluTherm"); break; case 0x0E: strcpy(buff,"Sensus PolluStat E"); break; - case 0x19: - strcpy(buff,"Sensus PolluCom E"); - break; } } else if (manufacturer == mbus_manufacturer_id("SON")) diff --git a/test/test-frames/example_data_01.norm.xml b/test/test-frames/example_data_01.norm.xml index 54ba0bb1..587ce57e 100644 --- a/test/test-frames/example_data_01.norm.xml +++ b/test/test-frames/example_data_01.norm.xml @@ -5,7 +5,7 @@ 3575845 AMT 52 - + Aquametro AMTRON Heat: Outlet 158 00 diff --git a/test/test-frames/example_data_01.xml b/test/test-frames/example_data_01.xml index dbfede82..a344e785 100644 --- a/test/test-frames/example_data_01.xml +++ b/test/test-frames/example_data_01.xml @@ -5,7 +5,7 @@ 3575845 AMT 52 - + Aquametro AMTRON Heat: Outlet 158 00 diff --git a/test/test-frames/example_data_02.norm.xml b/test/test-frames/example_data_02.norm.xml index d135aae2..87022161 100644 --- a/test/test-frames/example_data_02.norm.xml +++ b/test/test-frames/example_data_02.norm.xml @@ -5,7 +5,7 @@ 3575845 AMT 52 - + Aquametro AMTRON Heat: Outlet 161 00 diff --git a/test/test-frames/example_data_02.xml b/test/test-frames/example_data_02.xml index ad6236fc..fda38dfc 100644 --- a/test/test-frames/example_data_02.xml +++ b/test/test-frames/example_data_02.xml @@ -5,7 +5,7 @@ 3575845 AMT 52 - + Aquametro AMTRON Heat: Outlet 161 00 From 7b10dc2fd4d1cf33bb6c008dec3c182567276e64 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 8 Jul 2020 11:47:54 +0200 Subject: [PATCH 11/29] Add more test frames Aquametro CALEC MB (Heat) Eastron SDM630 (Electricity) Sensus PolluCom E (Heat) Tecson (Oil) --- test/test-frames/amt_calec_mb.hex | 1 + test/test-frames/amt_calec_mb.norm.xml | 71 ++++++++ test/test-frames/amt_calec_mb.xml | 64 ++++++++ test/test-frames/eastron_sdm630.hex | 1 + test/test-frames/eastron_sdm630.norm.xml | 199 +++++++++++++++++++++++ test/test-frames/eastron_sdm630.xml | 176 ++++++++++++++++++++ test/test-frames/sen_pollucom_e.hex | 1 + test/test-frames/sen_pollucom_e.norm.xml | 95 +++++++++++ test/test-frames/sen_pollucom_e.xml | 83 ++++++++++ test/test-frames/tecson.hex | 1 + test/test-frames/tecson.norm.xml | 41 +++++ test/test-frames/tecson.xml | 38 +++++ 12 files changed, 771 insertions(+) create mode 100644 test/test-frames/amt_calec_mb.hex create mode 100644 test/test-frames/amt_calec_mb.norm.xml create mode 100644 test/test-frames/amt_calec_mb.xml create mode 100644 test/test-frames/eastron_sdm630.hex create mode 100644 test/test-frames/eastron_sdm630.norm.xml create mode 100644 test/test-frames/eastron_sdm630.xml create mode 100644 test/test-frames/sen_pollucom_e.hex create mode 100644 test/test-frames/sen_pollucom_e.norm.xml create mode 100644 test/test-frames/sen_pollucom_e.xml create mode 100644 test/test-frames/tecson.hex create mode 100644 test/test-frames/tecson.norm.xml create mode 100644 test/test-frames/tecson.xml diff --git a/test/test-frames/amt_calec_mb.hex b/test/test-frames/amt_calec_mb.hex new file mode 100644 index 00000000..942b40d0 --- /dev/null +++ b/test/test-frames/amt_calec_mb.hex @@ -0,0 +1 @@ +68 38 38 68 08 C8 72 09 31 54 03 B4 05 B0 04 C9 10 FF FF 03 22 9A 00 00 05 2E A0 C8 51 46 05 3E B4 E3 D7 42 05 5B 90 D3 07 43 05 5F 0E AA E7 41 05 63 9C BC D5 42 04 6D 10 09 05 C5 77 16 diff --git a/test/test-frames/amt_calec_mb.norm.xml b/test/test-frames/amt_calec_mb.norm.xml new file mode 100644 index 00000000..4eef3de4 --- /dev/null +++ b/test/test-frames/amt_calec_mb.norm.xml @@ -0,0 +1,71 @@ + + + + + 3543109 + AMT + 176 + Aquametro CALEC MB + Heat: Outlet + 201 + 10 + FFFF + + + + Instantaneous value + 0 + s + On time + 554400.000000 + + + + Instantaneous value + 0 + W + Power + 13426156.250000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 107.944733 + + + + Instantaneous value + 0 + °C + Flow temperature + 135.826416 + + + + Instantaneous value + 0 + °C + Return temperature + 28.958035 + + + + Instantaneous value + 0 + K + Temperature difference + 106.868378 + + + + Instantaneous value + 0 + - + Time point (date & time) + 2096-05-05T09:16:00Z + + + diff --git a/test/test-frames/amt_calec_mb.xml b/test/test-frames/amt_calec_mb.xml new file mode 100644 index 00000000..6e4ab730 --- /dev/null +++ b/test/test-frames/amt_calec_mb.xml @@ -0,0 +1,64 @@ + + + + + 3543109 + AMT + 176 + Aquametro CALEC MB + Heat: Outlet + 201 + 10 + FFFF + + + + Instantaneous value + 0 + On time (hours) + 154 + + + + Instantaneous value + 0 + Power (kW) + 13426.156250 + + + + Instantaneous value + 0 + Volume flow ( m^3/h) + 107.944733 + + + + Instantaneous value + 0 + Flow temperature (deg C) + 135.826416 + + + + Instantaneous value + 0 + Return temperature (deg C) + 28.958035 + + + + Instantaneous value + 0 + Temperature Difference ( deg C) + 106.868378 + + + + Instantaneous value + 0 + Time Point (time & date) + 2096-05-05T09:16:00 + + + diff --git a/test/test-frames/eastron_sdm630.hex b/test/test-frames/eastron_sdm630.hex new file mode 100644 index 00000000..5666f2e1 --- /dev/null +++ b/test/test-frames/eastron_sdm630.hex @@ -0,0 +1 @@ +68 90 90 68 08 0A 72 78 65 34 21 24 40 01 02 55 00 00 00 0B FD 47 56 34 12 0B FD 47 56 34 12 0B FD 47 56 34 12 0B FD 47 56 34 12 0B FD 47 56 34 12 0B FD 47 56 34 12 0B FD 59 56 34 12 0B FD 59 56 34 12 0B FD 59 56 34 12 0B FD 59 56 34 12 0B 2A 56 34 12 0B 2A 56 34 12 0B 2A 56 34 12 0B 2A 56 34 12 0B FD 3A 56 34 12 0B FD 3A 56 34 12 0B FD 3A 56 34 12 0B FD 3A 56 34 12 0A FD 3A 00 05 0A FD 3A 05 00 0A FD 3A 05 00 0A FD 3A 05 00 0A FD 3A 50 00 4D 16 diff --git a/test/test-frames/eastron_sdm630.norm.xml b/test/test-frames/eastron_sdm630.norm.xml new file mode 100644 index 00000000..f3fbbeb1 --- /dev/null +++ b/test/test-frames/eastron_sdm630.norm.xml @@ -0,0 +1,199 @@ + + + + + 21346578 + PAD + 1 + + Electricity + 85 + 00 + 0000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + V + Voltage + 1234.560000 + + + + Instantaneous value + 0 + A + Current + 123.456000 + + + + Instantaneous value + 0 + A + Current + 123.456000 + + + + Instantaneous value + 0 + A + Current + 123.456000 + + + + Instantaneous value + 0 + A + Current + 123.456000 + + + + Instantaneous value + 0 + W + Power + 12345.600000 + + + + Instantaneous value + 0 + W + Power + 12345.600000 + + + + Instantaneous value + 0 + W + Power + 12345.600000 + + + + Instantaneous value + 0 + W + Power + 12345.600000 + + + + Instantaneous value + 0 + + Dimensionless + 123456.000000 + + + + Instantaneous value + 0 + + Dimensionless + 123456.000000 + + + + Instantaneous value + 0 + + Dimensionless + 123456.000000 + + + + Instantaneous value + 0 + + Dimensionless + 123456.000000 + + + + Instantaneous value + 0 + + Dimensionless + 500.000000 + + + + Instantaneous value + 0 + + Dimensionless + 5.000000 + + + + Instantaneous value + 0 + + Dimensionless + 5.000000 + + + + Instantaneous value + 0 + + Dimensionless + 5.000000 + + + + Instantaneous value + 0 + + Dimensionless + 50.000000 + + + diff --git a/test/test-frames/eastron_sdm630.xml b/test/test-frames/eastron_sdm630.xml new file mode 100644 index 00000000..2de43526 --- /dev/null +++ b/test/test-frames/eastron_sdm630.xml @@ -0,0 +1,176 @@ + + + + + 21346578 + PAD + 1 + + Electricity + 85 + 00 + 0000 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + 1e-2 V + 123456 + + + + Instantaneous value + 0 + m A + 123456 + + + + Instantaneous value + 0 + m A + 123456 + + + + Instantaneous value + 0 + m A + 123456 + + + + Instantaneous value + 0 + m A + 123456 + + + + Instantaneous value + 0 + Power (1e-1 W) + 123456 + + + + Instantaneous value + 0 + Power (1e-1 W) + 123456 + + + + Instantaneous value + 0 + Power (1e-1 W) + 123456 + + + + Instantaneous value + 0 + Power (1e-1 W) + 123456 + + + + Instantaneous value + 0 + dimensionless / no VIF + 123456 + + + + Instantaneous value + 0 + dimensionless / no VIF + 123456 + + + + Instantaneous value + 0 + dimensionless / no VIF + 123456 + + + + Instantaneous value + 0 + dimensionless / no VIF + 123456 + + + + Instantaneous value + 0 + dimensionless / no VIF + 500 + + + + Instantaneous value + 0 + dimensionless / no VIF + 5 + + + + Instantaneous value + 0 + dimensionless / no VIF + 5 + + + + Instantaneous value + 0 + dimensionless / no VIF + 5 + + + + Instantaneous value + 0 + dimensionless / no VIF + 50 + + + diff --git a/test/test-frames/sen_pollucom_e.hex b/test/test-frames/sen_pollucom_e.hex new file mode 100644 index 00000000..76f0a877 --- /dev/null +++ b/test/test-frames/sen_pollucom_e.hex @@ -0,0 +1 @@ +68 42 42 68 08 00 72 45 00 94 63 AE 4C 08 04 F9 00 00 00 0C 06 19 90 01 00 0C 13 19 11 62 01 0C 3B 00 00 00 00 0C 2B 00 00 00 00 02 5A 67 01 02 5E E9 00 03 60 46 31 00 0C 78 45 00 94 63 0C FD 10 45 00 94 63 1F B6 16 diff --git a/test/test-frames/sen_pollucom_e.norm.xml b/test/test-frames/sen_pollucom_e.norm.xml new file mode 100644 index 00000000..1c79a730 --- /dev/null +++ b/test/test-frames/sen_pollucom_e.norm.xml @@ -0,0 +1,95 @@ + + + + + 63940045 + SEN + 8 + Sensus PolluCom E + Heat: Outlet + 249 + 00 + 0000 + + + + Instantaneous value + 0 + Wh + Energy + 19019000.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 1621.119000 + + + + Instantaneous value + 0 + m^3/h + Volume flow + 0.000000 + + + + Instantaneous value + 0 + W + Power + 0.000000 + + + + Instantaneous value + 0 + °C + Flow temperature + 35.900000 + + + + Instantaneous value + 0 + °C + Return temperature + 23.300000 + + + + Instantaneous value + 0 + K + Temperature difference + 12.614000 + + + + Instantaneous value + 0 + + Fabrication No + 63940045.000000 + + + + Instantaneous value + 0 + + Customer location + 63940045.000000 + + + + More records follow + 0 + + + + + + diff --git a/test/test-frames/sen_pollucom_e.xml b/test/test-frames/sen_pollucom_e.xml new file mode 100644 index 00000000..1c3653bb --- /dev/null +++ b/test/test-frames/sen_pollucom_e.xml @@ -0,0 +1,83 @@ + + + + + 63940045 + SEN + 8 + Sensus PolluCom E + Heat: Outlet + 249 + 00 + 0000 + + + + Instantaneous value + 0 + Energy (kWh) + 19019 + + + + Instantaneous value + 0 + Volume (m m^3) + 1621119 + + + + Instantaneous value + 0 + Volume flow (m m^3/h) + 0 + + + + Instantaneous value + 0 + Power (W) + 0 + + + + Instantaneous value + 0 + Flow temperature (1e-1 deg C) + 359 + + + + Instantaneous value + 0 + Return temperature (1e-1 deg C) + 233 + + + + Instantaneous value + 0 + Temperature Difference (m deg C) + 12614 + + + + Instantaneous value + 0 + Fabrication number + 63940045 + + + + Instantaneous value + 0 + Customer location + 63940045 + + + + More records follow + + + + diff --git a/test/test-frames/tecson.hex b/test/test-frames/tecson.hex new file mode 100644 index 00000000..2f082269 --- /dev/null +++ b/test/test-frames/tecson.hex @@ -0,0 +1 @@ +68 1B 1B 68 08 00 72 12 34 56 78 A3 50 10 01 01 00 00 00 01 67 09 0A 14 60 45 92 10 14 88 13 18 16 diff --git a/test/test-frames/tecson.norm.xml b/test/test-frames/tecson.norm.xml new file mode 100644 index 00000000..3d04e662 --- /dev/null +++ b/test/test-frames/tecson.norm.xml @@ -0,0 +1,41 @@ + + + + + 78563412 + TEC + 16 + + Oil + 1 + 00 + 0000 + + + + Instantaneous value + 0 + °C + External temperature + 9.000000 + + + + Instantaneous value + 0 + m^3 + Volume + 45.600000 + + + + Maximum value + 0 + 1 + 0 + m^3 + Volume + 50.000000 + + + diff --git a/test/test-frames/tecson.xml b/test/test-frames/tecson.xml new file mode 100644 index 00000000..201cdfd4 --- /dev/null +++ b/test/test-frames/tecson.xml @@ -0,0 +1,38 @@ + + + + + 78563412 + TEC + 16 + + Oil + 1 + 00 + 0000 + + + + Instantaneous value + 0 + External temperature ( deg C) + 9 + + + + Instantaneous value + 0 + Volume (1e-2 m^3) + 4560 + + + + Maximum value + 0 + 1 + 0 + Volume (1e-2 m^3) + 5000 + + + From be23bda7a2bbbd9f8e4644510b86b5721143cced Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 8 Jul 2020 12:30:22 +0200 Subject: [PATCH 12/29] Remove duplicate rvd235.hex is the same as siemens_rvd235.hex --- test/unsupported-frames/rvd235.hex | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test/unsupported-frames/rvd235.hex diff --git a/test/unsupported-frames/rvd235.hex b/test/unsupported-frames/rvd235.hex deleted file mode 100644 index 113ab5f4..00000000 --- a/test/unsupported-frames/rvd235.hex +++ /dev/null @@ -1 +0,0 @@ -68 96 96 68 08 00 72 04 11 29 00 7A 32 29 20 0C 28 00 00 0C 78 20 71 04 00 06 FD 0C FC 03 6D 00 2D 00 0D FD 0B 06 35 33 32 44 56 52 81 30 FD 7C 01 81 20 FD 7C 00 01 FD 7C 00 0F 02 78 04 00 02 7A 04 00 32 00 1E 09 32 08 00 00 34 10 00 00 00 00 31 18 00 34 18 FF FF FF FF 71 18 00 74 18 FF FF FF FF B1 01 18 00 B4 01 18 FF FF FF FF F1 01 18 00 F4 01 18 FF FF FF FF B1 02 18 00 B4 02 18 FF FF FF FF F1 02 18 00 31 28 00 34 28 FF FF FF FF 71 28 00 01 01 00 01 09 00 24 16 From 647cedefe3eaf31789d87e04c8a79880a1e8d203 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 8 Jul 2020 12:34:38 +0200 Subject: [PATCH 13/29] Move RVD235 out of unsupported Especially after the recent changes, we can consider Siemens RVD235 as supported. --- .../siemens_rvd235.hex | 0 test/test-frames/siemens_rvd235.norm.xml | 75 +++++++++++++++++++ test/test-frames/siemens_rvd235.xml | 66 ++++++++++++++++ 3 files changed, 141 insertions(+) rename test/{unsupported-frames => test-frames}/siemens_rvd235.hex (100%) create mode 100644 test/test-frames/siemens_rvd235.norm.xml create mode 100644 test/test-frames/siemens_rvd235.xml diff --git a/test/unsupported-frames/siemens_rvd235.hex b/test/test-frames/siemens_rvd235.hex similarity index 100% rename from test/unsupported-frames/siemens_rvd235.hex rename to test/test-frames/siemens_rvd235.hex diff --git a/test/test-frames/siemens_rvd235.norm.xml b/test/test-frames/siemens_rvd235.norm.xml new file mode 100644 index 00000000..c9105b8d --- /dev/null +++ b/test/test-frames/siemens_rvd235.norm.xml @@ -0,0 +1,75 @@ + + + + + 291104 + LSZ + 41 + + Breaker: Electricity + 12 + 28 + 0000 + + + + Instantaneous value + 0 + + Fabrication No + 47120.000000 + + + + Instantaneous value + 0 + + Model / Version + 193280672764.000000 + + + + Instantaneous value + 0 + + Parameter set identification + RVD235 + + + + Instantaneous value + 0 + 3 + 0 + Reserved + Reserved + 1.000000 + + + + Instantaneous value + 0 + 2 + 0 + Reserved + Reserved + 0.000000 + + + + Instantaneous value + 0 + Reserved + Reserved + 0.000000 + + + + Manufacturer specific + 0 + + + 02 78 04 00 02 7A 04 00 32 00 1E 09 32 08 00 00 34 10 00 00 00 00 31 18 00 34 18 FF FF FF FF 71 18 00 74 18 FF FF FF FF B1 01 18 00 B4 01 18 FF FF FF FF F1 01 18 00 F4 01 18 FF FF FF FF B1 02 18 00 B4 02 18 FF FF FF FF F1 02 18 00 31 28 00 34 28 FF FF FF FF 71 28 00 01 01 00 01 09 00 + + + diff --git a/test/test-frames/siemens_rvd235.xml b/test/test-frames/siemens_rvd235.xml new file mode 100644 index 00000000..3b570d37 --- /dev/null +++ b/test/test-frames/siemens_rvd235.xml @@ -0,0 +1,66 @@ + + + + + 291104 + LSZ + 41 + + Breaker: Electricity + 12 + 28 + 0000 + + + + Instantaneous value + 0 + Fabrication number + 47120 + + + + Instantaneous value + 0 + Model / Version + 193280672764 + + + + Instantaneous value + 0 + Parameter set identification + RVD235 + + + + Instantaneous value + 0 + 3 + 0 + Reserved VIF extension + 1 + + + + Instantaneous value + 0 + 2 + 0 + Reserved VIF extension + 0 + + + + Instantaneous value + 0 + Reserved VIF extension + 0 + + + + Manufacturer specific + 02 78 04 00 02 7A 04 00 32 00 1E 09 32 08 00 00 34 10 00 00 00 00 31 18 00 34 18 FF FF FF FF 71 18 00 74 18 FF FF FF FF B1 01 18 00 B4 01 18 FF FF FF FF F1 01 18 00 F4 01 18 FF FF FF FF B1 02 18 00 B4 02 18 FF FF FF FF F1 02 18 00 31 28 00 34 28 FF FF FF FF 71 28 00 01 01 00 01 09 00 + + + From db42619e0e7454da84ff76321358edba05c8642d Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Tue, 7 Jul 2020 15:40:23 +0200 Subject: [PATCH 14/29] Move invalid_length*.hex to test/unsupported-frames (#165) --- test/{test-frames => unsupported-frames}/invalid_length.hex | 0 test/{test-frames => unsupported-frames}/invalid_length2.hex | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/{test-frames => unsupported-frames}/invalid_length.hex (100%) rename test/{test-frames => unsupported-frames}/invalid_length2.hex (100%) diff --git a/test/test-frames/invalid_length.hex b/test/unsupported-frames/invalid_length.hex similarity index 100% rename from test/test-frames/invalid_length.hex rename to test/unsupported-frames/invalid_length.hex diff --git a/test/test-frames/invalid_length2.hex b/test/unsupported-frames/invalid_length2.hex similarity index 100% rename from test/test-frames/invalid_length2.hex rename to test/unsupported-frames/invalid_length2.hex From 2dc6c6b1f98ac10ddbc224d9704eeae9296fc4fa Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Wed, 1 Jul 2020 12:36:45 +0200 Subject: [PATCH 15/29] Enforce tests execute ok (#165) --- .github/workflows/ccpp.yml | 6 +++++- .travis.yml | 2 ++ test/generate-xml.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 1478bc32..53147de9 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -12,7 +12,11 @@ jobs: run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && cmake --build . -j && cd .. - name: generate test frames - run: ./test/generate-xml.sh test/test-frames + run: | + ./test/generate-xml.sh test/test-frames + echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" + ./test/generate-xml.sh test/error-frames || true + ./test/generate-xml.sh test/unsupported-frames || true - name: install and run gcovr run: sudo pip install gcovr && gcovr build/. diff --git a/.travis.yml b/.travis.yml index 39fe165c..70b00795 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,5 @@ os: script: - ./build.sh - cd test && make && ./generate-xml.sh test-frames + - cd test && make && ./generate-xml.sh test/error-frames || true + - cd test && make && ./generate-xml.sh test/unsupported-frames || true diff --git a/test/generate-xml.sh b/test/generate-xml.sh index b9662d93..b504fad0 100755 --- a/test/generate-xml.sh +++ b/test/generate-xml.sh @@ -12,6 +12,12 @@ # #------------------------------------------------------------------------------ +NUMBER_OF_PARSING_ERRORS=0 +FAILING_TESTS=failing_tests.txt +NEW_TESTS=new_tests.txt +touch $FAILING_TESTS +touch $NEW_TESTS + # Check commandline parameter if [ $# -ne 1 ]; then echo "usage: $0 path_to_directory_with_xml_files" @@ -64,6 +70,7 @@ generate_xml() { # Check parsing result if [ $result -ne 0 ]; then + NUMBER_OF_PARSING_ERRORS=$((NUMBER_OF_PARSING_ERRORS + 1)) echo "Unable to generate XML for $hexfile" rm "$directory/$filename$mode.xml.new" return 1 @@ -81,14 +88,17 @@ generate_xml() { ;; 1) # different -> print diff + echo "== $directory/$filename$mode failed" cat "$directory/$filename$mode.dif" && rm "$directory/$filename$mode.dif" echo "" + echo "$filename$mode" >> $FAILING_TESTS ;; *) # no old -> rename XML echo "Create $filename$mode.xml" mv "$directory/$filename$mode.xml.new" "$directory/$filename$mode.xml" rm "$directory/$filename$mode.dif" + echo "$filename$mode" >> $NEW_TESTS ;; esac @@ -105,3 +115,27 @@ for hexfile in "$directory"/*.hex; do generate_xml "$directory" "$hexfile" "normalized" done +# Check the size of the file $FAILING_TESTS. Make sure to indicate failure. +if [ -s $FAILING_TESTS ]; then + echo "** There were errors in the following file(s):" + cat $FAILING_TESTS + exit 1 +else + rm $FAILING_TESTS +fi +if [ -s $NEW_TESTS ]; then + echo "** There were new test in the following file(s):" + cat $NEW_TESTS +else + rm $NEW_TESTS +fi + +# Check that there was no files that failed to parse +if [ $NUMBER_OF_PARSING_ERRORS -ne 0 ]; then + echo "** There were $NUMBER_OF_PARSING_ERRORS files that did not parse, expected 0 files." + echo + exit $NUMBER_OF_PARSING_ERRORS +fi +DIRECTORY_BASENAME="$(basename "$directory")" +echo "** Tests executed successfully in \"$DIRECTORY_BASENAME\"." +echo From 8ab5d9ebd003f1ebd5a8d38b889b965672d25c08 Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Wed, 1 Jul 2020 12:53:50 +0200 Subject: [PATCH 16/29] Fix bug, test script should accept both 1 and 2 arguments (#165) Usefull when placing the output in another directory. --- test/generate-xml.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/generate-xml.sh b/test/generate-xml.sh index b504fad0..f6c79ff7 100755 --- a/test/generate-xml.sh +++ b/test/generate-xml.sh @@ -19,7 +19,7 @@ touch $FAILING_TESTS touch $NEW_TESTS # Check commandline parameter -if [ $# -ne 1 ]; then +if [ $# -lt 1 ] || [ $# -gt 2 ]; then echo "usage: $0 path_to_directory_with_xml_files" echo "or" echo "usage: $0 path_to_directory_with_xml_files path_to_mbus_parse_hex_with_filename" From 48c03109d742a3cc49d2ad65510066ba545487c9 Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Wed, 1 Jul 2020 13:05:31 +0200 Subject: [PATCH 17/29] Rewrite ccpp.yml to use multi-line command (#165) For enhanced readability, split the commands over several lines. --- .github/workflows/ccpp.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 53147de9..df0398ab 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -9,7 +9,12 @@ jobs: steps: - uses: actions/checkout@v2 - name: build examples and tests - run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && cmake --build . -j && cd .. + run: | + rm -rf build || true + mkdir -p build + cd build + cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && cmake --build . -j + cd .. - name: generate test frames run: | @@ -27,7 +32,14 @@ jobs: steps: - uses: actions/checkout@v2 - name: build debian package - run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_PACKAGE_DEB=ON && cpack .. && sudo dpkg -i *.deb && ls /usr/lib + run: | + rm -rf build || true + mkdir -p build + cd build + cmake .. -DLIBMBUS_PACKAGE_DEB=ON + cpack .. + sudo dpkg -i *.deb + ls /usr/lib doc: runs-on: ubuntu-latest @@ -38,5 +50,9 @@ jobs: run: sudo apt install -y doxygen - name: build doxygen documentation - run: rm -rf build || true && mkdir build && cd build && cmake .. -DLIBMBUS_BUILD_DOCS=ON && cmake --build . --target doc - + run: | + rm -rf build || true + mkdir build + cd build + cmake .. -DLIBMBUS_BUILD_DOCS=ON + cmake --build . --target doc From c8940fa267c816a57d79e5eb7b05836d3d4829d8 Mon Sep 17 00:00:00 2001 From: Fredrik Skold Date: Thu, 4 Jun 2020 16:11:52 +0200 Subject: [PATCH 18/29] Add Dockerfile.test to run tests from docker (#165) --- Dockerfile.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile.test diff --git a/Dockerfile.test b/Dockerfile.test new file mode 100644 index 00000000..52ee1792 --- /dev/null +++ b/Dockerfile.test @@ -0,0 +1,18 @@ +# docker build . -f Dockerfile.test -t test_builder + +FROM ubuntu + +RUN apt update -y && apt install -y cmake gcc g++ make +COPY . /tmp +RUN cd /tmp && \ + mkdir build && \ + cd build && \ + cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && \ + cmake --build . -j && \ + cd .. && \ + ./test/generate-xml.sh test/test-frames + +RUN cd /tmp && \ + echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" && \ + ./test/generate-xml.sh test/error-frames || true ; \ + ./test/generate-xml.sh test/unsupported-frames || true From 0b4ada12d4a42d2cbdecd557a5cfdd5e7251525c Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 19 Jul 2020 12:53:59 +0200 Subject: [PATCH 19/29] build: temporary revert to autotools (#174) As long as cmake doesn't generate suitable deb packages, we need to switch back :( --- .github/workflows/ccpp.yml | 58 -------- CMakeLists.txt | 296 ------------------------------------- Dockerfile.deb | 14 -- Dockerfile.rpm | 14 -- Dockerfile.test | 18 --- Makefile-static | 25 ++++ Makefile.am | 20 +++ README.md | 32 +--- bin/CMakeLists.txt | 19 --- bin/Makefile-static | 24 +++ bin/Makefile.am | 102 +++++++++++++ build-deb.sh | 25 ++++ build.sh | 37 +++-- cmake-format.yaml | 15 -- cmake/Config.cmake.in | 4 - configure.ac | 44 ++++++ Doxyfile.in => doxygen.cfg | 9 +- libmbus.pc.in | 12 +- libmbus.spec | 87 +++++++++++ mbus/Makefile.am | 20 +++ mbus/config.h.in | 56 ------- test/CMakeLists.txt | 5 - test/Makefile.am | 25 ++++ 23 files changed, 399 insertions(+), 562 deletions(-) delete mode 100644 .github/workflows/ccpp.yml delete mode 100644 CMakeLists.txt delete mode 100644 Dockerfile.deb delete mode 100644 Dockerfile.rpm delete mode 100644 Dockerfile.test create mode 100644 Makefile-static create mode 100644 Makefile.am delete mode 100644 bin/CMakeLists.txt create mode 100644 bin/Makefile-static create mode 100644 bin/Makefile.am create mode 100755 build-deb.sh delete mode 100644 cmake-format.yaml delete mode 100644 cmake/Config.cmake.in create mode 100644 configure.ac rename Doxyfile.in => doxygen.cfg (99%) create mode 100644 libmbus.spec create mode 100644 mbus/Makefile.am delete mode 100644 mbus/config.h.in delete mode 100644 test/CMakeLists.txt create mode 100644 test/Makefile.am diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index df0398ab..00000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: CMake - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: build examples and tests - run: | - rm -rf build || true - mkdir -p build - cd build - cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && cmake --build . -j - cd .. - - - name: generate test frames - run: | - ./test/generate-xml.sh test/test-frames - echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" - ./test/generate-xml.sh test/error-frames || true - ./test/generate-xml.sh test/unsupported-frames || true - - - name: install and run gcovr - run: sudo pip install gcovr && gcovr build/. - - debian: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: build debian package - run: | - rm -rf build || true - mkdir -p build - cd build - cmake .. -DLIBMBUS_PACKAGE_DEB=ON - cpack .. - sudo dpkg -i *.deb - ls /usr/lib - - doc: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: build doxygen documentation - run: sudo apt install -y doxygen - - - name: build doxygen documentation - run: | - rm -rf build || true - mkdir build - cd build - cmake .. -DLIBMBUS_BUILD_DOCS=ON - cmake --build . --target doc diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index c47a94c3..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,296 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project( - libmbus - LANGUAGES CXX C - VERSION "0.9.0") - -if(CMAKE_BUILD_TYPE STREQUAL "") - message(STATUS "CMAKE_BUILD_TYPE empty setting to Debug") - set(CMAKE_BUILD_TYPE "Debug") -endif() - -# ############################################################################## -# default options -> changed with e.g. cd build && cmake .. -# -DLIBMBUS_BUILD_TESTS=ON -# ############################################################################## - -option(LIBMBUS_BUILD_EXAMPLES "build examples" OFF) -option(LIBMBUS_BUILD_TESTS "build tests" OFF) -option(LIBMBUS_ENABLE_COVERAGE "build with coverage support" OFF) -option(LIBMBUS_RUN_CLANG_TIDY "use Clang-Tidy for static analysis" OFF) -option(LIBMBUS_PACKAGE_DEB "build debian package" OFF) -option(LIBMBUS_PACKAGE_RPM "build rpm package" OFF) -option(LIBMBUS_BUILD_DOCS "build documentation" OFF) -option(BUILD_SHARED_LIBS "build shared lib" ON) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_C_STANDARD 11) - -# Append our module directory to CMake -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_BINARY_DIR}") - -# Set the output of the libraries and executables. -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) - -# ############################################################################## -# static analysis -# ############################################################################## - -if(LIBMBUS_RUN_CLANG_TIDY) - find_program( - CLANG_TIDY_EXE - NAMES "clang-tidy" - DOC "/usr/bin/clang-tidy") - if(NOT CLANG_TIDY_EXE) - message(WARNING "clang-tidy not found.") - else() - message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}") - endif() -endif(LIBMBUS_RUN_CLANG_TIDY) - -if(LIBMBUS_ENABLE_COVERAGE) - if(NOT CMAKE_BUILD_TYPE MATCHES "(Debug)|(RelWithDebInfo)") - message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading") - endif() - - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - # using Clang - message(STATUS "Not doing coverage...") - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # using GCC - message(STATUS "Building with code coverage...") - set(CMAKE_BUILD_TYPE DEBUG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -ggdb3 -O0 --coverage -fprofile-arcs -ftest-coverage") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ggdb3 -O0 --coverage -fprofile-arcs -ftest-coverage ") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage ") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage ") - link_libraries(-lgcov) - endif() -endif() - -include(CheckIncludeFile) - -check_include_file(dlfcn.h HAVE_DLFCN_H) -check_include_file(inttypes.h HAVE_INTTYPES_H) -check_include_file(memory.h HAVE_MEMORY_H) -check_include_file(stdlib.h HAVE_STDINT_H) -check_include_file(stdint.h HAVE_STDLIB_H) -check_include_file(strings.h HAVE_STRINGS_H) -check_include_file(string.h HAVE_STRING_H) -check_include_file(sys/stat.h HAVE_SYS_STAT_H) -check_include_file(sys/types.h HAVE_SYS_TYPES_H) -check_include_file(unistd.h HAVE_UNISTD_H) - -# ############################################################################## -# library -# ############################################################################## - -set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") - -set(PACKAGE_VERSION "${PROJECT_VERSION}") -set(VERSION "${PROJECT_VERSION}") -configure_file(${CMAKE_CURRENT_LIST_DIR}/mbus/config.h.in ${CMAKE_CURRENT_LIST_DIR}/config.h @ONLY) - -add_library( - ${PROJECT_NAME} - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-protocol.c" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-protocol.h" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-tcp.c" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-tcp.h" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus.c" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus.h" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-protocol-aux.c" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-protocol-aux.h" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-serial.c" - "${CMAKE_CURRENT_LIST_DIR}/mbus/mbus-serial.h") -target_include_directories( - ${PROJECT_NAME} - PUBLIC "$" "$" - "$") -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") - target_link_libraries(${PROJECT_NAME} PRIVATE m) -endif() -if(NOT MSVC) - target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-pedantic) -endif() - -set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") - -if(CLANG_TIDY_EXE) - set_target_properties(${PROJECT_NAME} PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE}") -endif() - -add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) - -# ############################################################################## -# examples -# ############################################################################## - -if(LIBMBUS_BUILD_EXAMPLES) - message(STATUS "building examples") - add_subdirectory(bin) -endif() - -# ############################################################################## -# tests -# ############################################################################## - -if(LIBMBUS_BUILD_TESTS) - message(STATUS "building tests") - enable_testing() - add_subdirectory(test) -endif() - -# ############################################################################## -# install -# ############################################################################## - -include(GNUInstallDirs) -include(CMakePackageConfigHelpers) - -set(INSTALL_PKGCONFIG_DIR - "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig" - CACHE PATH "Installation directory for pkgconfig (.pc) files") -set(INSTALL_INC_DIR - "${CMAKE_INSTALL_INCLUDEDIR}/mbus" - CACHE PATH "Installation directory for headers") -set(INSTALL_LIB_DIR - "${CMAKE_INSTALL_LIBDIR}" - CACHE PATH "Installation directory for libraries") - -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libmbus.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libmbus.pc @ONLY) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/libmbus.pc - DESTINATION "${INSTALL_PKGCONFIG_DIR}" - COMPONENT dev) - -set(LIBMBUS_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) -install( - TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME}Targets - LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib - ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT dev - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib) -install( - EXPORT ${PROJECT_NAME}Targets - DESTINATION "${LIBMBUS_CONFIG_INSTALL_DIR}" - NAMESPACE ${PROJECT_NAME}:: - COMPONENT dev) - -configure_package_config_file(cmake/Config.cmake.in ${PROJECT_NAME}Config.cmake INSTALL_DESTINATION - "${LIBMBUS_CONFIG_INSTALL_DIR}") -write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY SameMajorVersion) -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake - DESTINATION "${LIBMBUS_CONFIG_INSTALL_DIR}" - COMPONENT dev) - -install( - DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/mbus/" - DESTINATION "${INSTALL_INC_DIR}" - COMPONENT dev - FILES_MATCHING - PATTERN "*.h") - -# ############################################################################## -# package -# mkdir build ; cd build ; cmake .. -DLIBMBUS_PACKAGE_DEB=ON ; cpack .. -# ############################################################################## - -include(InstallRequiredSystemLibraries) - -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open source M-bus (Meter-Bus) library.") -set(CPACK_PACKAGE_DESCRIPTION - "libmbus is an open source library for the M-bus (Meter-Bus) protocol. -The Meter-Bus is a standard for reading out meter data from electricity meters, -heat meters, gas meters, etc. The M-bus standard deals with both the electrical -signals on the M-Bus, and the protocol and data format used in transmissions -on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle -the communication with M-Bus devices. - -For more information see http://www.rscada.se/libmbus") - -set(CPACK_PACKAGE_VENDOR "Raditex Control AB") -set(CPACK_PACKAGE_CONTACT "Stefan Wahren ") -set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/rscada/libmbus/") -set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE) -set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") -set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_PACKAGE_DEBUG ON) -set(CPACK_PACKAGE_RELEASE 1) - -# create 2 components, libmbus, libmbus-dev -set(CPACK_COMPONENTS_ALL lib dev) -set(CPACK_COMPONENT_LIB_DESCRIPTION "FreeSCADA M-Bus Library. - A free and open-source library for M-Bus (Meter Bus) from the rSCADA project.") -set(CPACK_DEBIAN_LIB_PACKAGE_SECTION libs) - -set(CPACK_COMPONENT_DEVEL_DESCRIPTION - "FreeSCADA M-Bus Library Development files. -A free and open-source library for M-Bus (Meter Bus) from the rSCADA project, -including development files.") -set(CPACK_DEBIAN_DEVEL_PACKAGE_SECTION libdevel) - -set(CPACK_COMPONENT_DEVEL_DEPENDS lib) - -set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") -set(CPACK_PACKAGE_FILE_NAME - "${CMAKE_PROJECT_NAME}_${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") - -if(LIBMBUS_PACKAGE_DEB) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Stefan Wahren ") - set(CPACK_DEBIAN_PACKAGE_SECTION "Development/Languages/C and C++") - set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) - set(CPACK_DEBIAN_PACKAGE_VERSION - "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CPACK_PACKAGE_RELEASE}" - ) -endif() - -if(LIBMBUS_PACKAGE_RPM) - set(CPACK_GENERATOR "RPM") - set(CPACK_RPM_PACKAGE_LICENSE "BSD") -endif() - -include(CPack) - -# ############################################################################## -# doc -# mkdir build ; cd build ; cmake .. -DLIBMBUS_BUILD_DOCS=ON ; cmake --build . --target doc -# ############################################################################## - -if(LIBMBUS_BUILD_DOCS) - message(STATUS "building with documentation") - # Generate targets for documentation - # check if Doxygen is installed - find_package(Doxygen) - - if(Doxygen_FOUND) - # set input and output files - set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) - set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) - - # request to configure the file - configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) - - # note the option ALL which allows to build the docs together with the application - add_custom_target( - doc ALL - COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" - VERBATIM) - - message(STATUS "Setup up the Doxygen documention build") - - else(Doxygen_FOUND) - message(WARNING "Doxygen need to be installed to generate the doxygen documentation") - endif(Doxygen_FOUND) -endif() diff --git a/Dockerfile.deb b/Dockerfile.deb deleted file mode 100644 index 1db6923d..00000000 --- a/Dockerfile.deb +++ /dev/null @@ -1,14 +0,0 @@ -# docker build . -f Dockerfile.deb -t deb_builder - -FROM ubuntu - -RUN apt update -y && apt install -y cmake gcc g++ make -COPY . /tmp -RUN cd /tmp && \ - mkdir build && \ - cd build && \ - cmake .. -DLIBMBUS_PACKAGE_DEB=ON && \ - cpack .. && \ - ls -al && \ - dpkg -i *.deb - diff --git a/Dockerfile.rpm b/Dockerfile.rpm deleted file mode 100644 index 2f70df96..00000000 --- a/Dockerfile.rpm +++ /dev/null @@ -1,14 +0,0 @@ -# docker build . -f Dockerfile.rpm -t rpm_builder - -FROM fedora - -RUN dnf install -y cmake gcc g++ make rpm-build -COPY . /tmp -RUN cd /tmp && \ - mkdir build && \ - cd build && \ - cmake .. -DLIBMBUS_PACKAGE_RPM=ON && \ - cpack .. && \ - ls -al && \ - rpm -i *.rpm - diff --git a/Dockerfile.test b/Dockerfile.test deleted file mode 100644 index 52ee1792..00000000 --- a/Dockerfile.test +++ /dev/null @@ -1,18 +0,0 @@ -# docker build . -f Dockerfile.test -t test_builder - -FROM ubuntu - -RUN apt update -y && apt install -y cmake gcc g++ make -COPY . /tmp -RUN cd /tmp && \ - mkdir build && \ - cd build && \ - cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -DLIBMBUS_ENABLE_COVERAGE=ON && \ - cmake --build . -j && \ - cd .. && \ - ./test/generate-xml.sh test/test-frames - -RUN cd /tmp && \ - echo "NOTE: error-frames have about 30 parse errors, and unsupported-frames have 12" && \ - ./test/generate-xml.sh test/error-frames || true ; \ - ./test/generate-xml.sh test/unsupported-frames || true diff --git a/Makefile-static b/Makefile-static new file mode 100644 index 00000000..93da7516 --- /dev/null +++ b/Makefile-static @@ -0,0 +1,25 @@ +# Copyright (c) 2010 +# Robert Johansson +# Raditex AB. +# All rights reserved. + +LIB = libmbus.so + +CFLAGS = -Wall -W -g -fPIC -I. +HEADERS = mbus.h mbus-protocol.h +OBJS = mbus.o mbus-protocol.o + +$(LIB): $(OBJS) + gcc -shared -o $(LIB) $(OBJS) + +all: $(LIB) + +clean: + rm -rf *.o *core core $(LIB) + +test: + (cd test && make) + +install: all + cp $(LIB) /usr/local/freescada/lib + cp $(HEADERS) /usr/local/freescada/include diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..fd519e14 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,20 @@ +# +# +# +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libmbus.pc + + +docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) +dist_docdir = $(DESTDIR)$(docdir) +doc_DATA = README.md \ + COPYING \ + hardware/MBus_USB.pdf \ + hardware/MBus_USB.txt + +SUBDIRS = mbus bin +ACLOCAL = aclocal -I . +ACLOCAL_AMFLAGS = -Werror -I m4 diff --git a/README.md b/README.md index 133c243d..27d393c0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -# libmbus: M-bus Library from Raditex Control (http://www.rscada.se) - -![Build Status](https://travis-ci.org/rscada/libmbus.svg?branch=master) +# libmbus: M-bus Library from Raditex Control (http://www.rscada.se) ![Build Status](https://travis-ci.org/rscada/libmbus.svg?branch=master) libmbus is an open source library for the M-bus (Meter-Bus) protocol. @@ -10,32 +8,4 @@ signals on the M-Bus, and the protocol and data format used in transmissions on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle the communication with M-Bus devices. - -## BUILD - -with cmake - -```bash -rm -rf _build -mkdir _build -cd _build -# configure -# e.g. on linux -cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -# e.g. for a target device -cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain/foo-bar-baz.cmake -# compile -cmake --build . -j -# install - optional -cmake --build . --target install -``` - -## CONSUME - -```cmake -find_package(libmbus) -add_executable(my_app main.cpp) -target_link_libraries(my_app libmbus::libmbus) -``` - For more information see http://www.rscada.se/libmbus diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt deleted file mode 100644 index 73e15002..00000000 --- a/bin/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -function(add_example SRCS) - add_executable(${SRCS} ${CMAKE_CURRENT_LIST_DIR}/${SRCS}.c) - target_link_libraries(${SRCS} PRIVATE libmbus::libmbus) -endfunction() - -add_example(mbus-serial-request-data) -add_example(mbus-serial-request-data-multi-reply) -add_example(mbus-serial-scan) -add_example(mbus-serial-scan-secondary) -add_example(mbus-serial-select-secondary) -add_example(mbus-serial-set-address) -add_example(mbus-serial-switch-baudrate) -add_example(mbus-tcp-application-reset) -add_example(mbus-tcp-raw-send) -add_example(mbus-tcp-request-data) -add_example(mbus-tcp-request-data-multi-reply) -add_example(mbus-tcp-scan) -add_example(mbus-tcp-scan-secondary) -add_example(mbus-tcp-select-secondary) diff --git a/bin/Makefile-static b/bin/Makefile-static new file mode 100644 index 00000000..2b04b493 --- /dev/null +++ b/bin/Makefile-static @@ -0,0 +1,24 @@ +# +# Copyright (C) 2011, Robert Johansson, Raditex AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# +CFLAGS=-Wall -g -I.. +LDFLAGS=-L.. -lm -lmbus + +all: mbus-tcp-scan mbus-tcp-request-data + +%.o: %.c + $(CC) -c $(CFLAGS) $< -o $@ + +mbus-tcp-scan: mbus-tcp-scan.o mbus-tcp.o + gcc -o $@ $^ $(LDFLAGS) + +mbus-tcp-request-data: mbus-tcp-request-data.o mbus-tcp.o + gcc -o $@ $^ $(LDFLAGS) + +clean: + rm -rf mbus-tcp-request-data mbus-tcp-scan *.o *~ diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 00000000..7c9ce412 --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2010, Raditex AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# +# ------------------------------------------------------------------------------ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/src + +noinst_HEADERS = +bin_PROGRAMS = mbus-tcp-scan mbus-tcp-request-data mbus-tcp-request-data-multi-reply \ + mbus-tcp-select-secondary mbus-tcp-scan-secondary \ + mbus-serial-scan mbus-serial-request-data mbus-serial-request-data-multi-reply \ + mbus-serial-select-secondary mbus-serial-scan-secondary \ + mbus-serial-switch-baudrate mbus-tcp-raw-send mbus-tcp-application-reset \ + mbus-serial-set-address + +# tcp +mbus_tcp_scan_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_scan_LDADD = -lmbus -lm +mbus_tcp_scan_SOURCES = mbus-tcp-scan.c + +mbus_tcp_request_data_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_request_data_LDADD = -lmbus -lm +mbus_tcp_request_data_SOURCES = mbus-tcp-request-data.c + +mbus_tcp_request_data_multi_reply_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_request_data_multi_reply_LDADD = -lmbus -lm +mbus_tcp_request_data_multi_reply_SOURCES = mbus-tcp-request-data-multi-reply.c + +mbus_tcp_select_secondary_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_select_secondary_LDADD = -lmbus -lm +mbus_tcp_select_secondary_SOURCES = mbus-tcp-select-secondary.c + +mbus_tcp_scan_secondary_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_scan_secondary_LDADD = -lmbus -lm +mbus_tcp_scan_secondary_SOURCES = mbus-tcp-scan-secondary.c + +mbus_tcp_raw_send_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_raw_send_LDADD = -lmbus -lm +mbus_tcp_raw_send_SOURCES = mbus-tcp-raw-send.c + +mbus_tcp_application_reset_LDFLAGS = -L$(top_builddir)/mbus +mbus_tcp_application_reset_LDADD = -lmbus -lm +mbus_tcp_application_reset_SOURCES = mbus-tcp-application-reset.c + +# serial +mbus_serial_scan_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_scan_LDADD = -lmbus -lm +mbus_serial_scan_SOURCES = mbus-serial-scan.c + +mbus_serial_request_data_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_request_data_LDADD = -lmbus -lm +mbus_serial_request_data_SOURCES = mbus-serial-request-data.c + +mbus_serial_request_data_multi_reply_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_request_data_multi_reply_LDADD = -lmbus -lm +mbus_serial_request_data_multi_reply_SOURCES = mbus-serial-request-data-multi-reply.c + +mbus_serial_select_secondary_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_select_secondary_LDADD = -lmbus -lm +mbus_serial_select_secondary_SOURCES = mbus-serial-select-secondary.c + +mbus_serial_scan_secondary_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_scan_secondary_LDADD = -lmbus -lm +mbus_serial_scan_secondary_SOURCES = mbus-serial-scan-secondary.c + +mbus_serial_switch_baudrate_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_switch_baudrate_LDADD = -lmbus -lm +mbus_serial_switch_baudrate_SOURCES = mbus-serial-switch-baudrate.c + +mbus_serial_set_address_LDFLAGS = -L$(top_builddir)/mbus +mbus_serial_set_address_LDADD = -lmbus -lm +mbus_serial_set_address_SOURCES = mbus-serial-set-address.c + +# man pages +dist_man_MANS = libmbus.1 \ + mbus-tcp-scan.1 \ + mbus-tcp-request-data.1 \ + mbus-tcp-request-data-multi-reply.1 \ + mbus-tcp-select-secondary.1 \ + mbus-tcp-scan-secondary.1 \ + mbus-tcp-raw-send.1 \ + mbus-serial-scan.1 \ + mbus-serial-request-data.1 \ + mbus-serial-request-data-multi-reply.1 \ + mbus-serial-select-secondary.1 \ + mbus-serial-scan-secondary.1 \ + mbus-serial-switch-baudrate.1 + +.pod.1: + pod2man --release=$(VERSION) --center=$(PACKAGE) $< \ + >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true + @if grep '\' $@ >/dev/null 2>&1; \ + then \ + echo "$@ has some POD errors!"; false; \ + fi diff --git a/build-deb.sh b/build-deb.sh new file mode 100755 index 00000000..77f3a6be --- /dev/null +++ b/build-deb.sh @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2012, Robert Johansson , Raditex Control AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@raditex.nu +# +# ------------------------------------------------------------------------------ + +if [ ! -f Makefile ]; then + # + # regenerate automake files + # + echo "Running autotools..." + + autoheader \ + && aclocal \ + && libtoolize --ltdl --copy --force \ + && automake --add-missing --copy \ + && autoconf +fi + +debuild -i -us -uc -b +#sudo pbuilder build $(NAME)_$(VERSION)-1.dsc diff --git a/build.sh b/build.sh index 04ea869c..34c2799b 100755 --- a/build.sh +++ b/build.sh @@ -1,24 +1,21 @@ #!/bin/sh +# +if [ -f Makefile ]; then + # use existing automake files + echo >> /dev/null +else + # regenerate automake files + echo "Running autotools..." -rm -rf build -mkdir build -cd build -cmake .. -DLIBMBUS_BUILD_EXAMPLES=ON -DLIBMBUS_BUILD_TESTS=ON -cmake --build . + autoheader \ + && aclocal \ + && case \ + $(uname) in Darwin*) glibtoolize --ltdl --copy --force ;; \ + *) libtoolize --ltdl --copy --force ;; esac \ + && automake --add-missing --copy \ + && autoconf \ + && ./configure +fi -# build deb - -# rm -rf build -# mkdir build -# cd build -# cmake .. -DLIBMBUS_PACKAGE_DEB=ON -# cpack .. -# dpkg -i *.deb - -# build doc - -# mkdir build -# cd build -# cmake .. -DLIBMBUS_BUILD_DOCS=ON -# cmake --build . --target doc +make diff --git a/cmake-format.yaml b/cmake-format.yaml deleted file mode 100644 index 60329ed6..00000000 --- a/cmake-format.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# https://github.com/cheshirekow/cmake_format - -# How wide to allow formatted cmake files -line_width: 120 - -# How many spaces to tab for indent -tab_size: 2 - -# Format command names consistently as 'lower' or 'upper' case -command_case: "lower" - -first_comment_is_literal: False - -# enable comment markup parsing and reflow -enable_markup: False diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in deleted file mode 100644 index 9c15f36a..00000000 --- a/cmake/Config.cmake.in +++ /dev/null @@ -1,4 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") -check_required_components("@PROJECT_NAME@") diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..d14d0e2c --- /dev/null +++ b/configure.ac @@ -0,0 +1,44 @@ +dnl ---------------------------------------------------------------------------- +dnl Copyright (C) 2010, Raditex AB +dnl All rights reserved. +dnl +dnl rSCADA +dnl http://www.rSCADA.se +dnl info@rscada.se +dnl +dnl ---------------------------------------------------------------------------- + +LT_CONFIG_LTDL_DIR([libltdl]) + +AC_INIT([libmbus], [0.9.0], [info@rscada.se], [libmbus], [http://www.rscada.se/libmbus/]) +AC_CONFIG_AUX_DIR([libltdl/config]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) + +AM_PROG_LIBTOOL +# fix for automake 1.11 & 1.12 +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + +LDFLAGS="$LDFLAGS -version-info 0:9:0" + +dnl ---------------------- +dnl +AC_PROG_CC + +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_FILES([Makefile mbus/Makefile test/Makefile bin/Makefile libmbus.pc]) +AC_OUTPUT + + +echo \ +"---------------------------------------------------------- +Configuration: + + Source location: ${srcdir} + Compile: ${CC} + Compiler flags: ${CFLAGS} + Linker flags: ${LDFLAGS} + Host system type: ${host} + Install path: ${prefix} + + See config.h for further configuration. +----------------------------------------------------------" diff --git a/Doxyfile.in b/doxygen.cfg similarity index 99% rename from Doxyfile.in rename to doxygen.cfg index b8393df7..ea1b569d 100644 --- a/Doxyfile.in +++ b/doxygen.cfg @@ -25,13 +25,13 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = "@CMAKE_PROJECT_NAME@" +PROJECT_NAME = libmbus # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ +PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -581,7 +581,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @CMAKE_CURRENT_LIST_DIR@/mbus +INPUT = mbus # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -1628,6 +1628,3 @@ GENERATE_LEGEND = YES # the various graphs. DOT_CLEANUP = YES - - -USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_LIST_DIR@/README.md diff --git a/libmbus.pc.in b/libmbus.pc.in index 1baf5a3e..6c1b7d8b 100644 --- a/libmbus.pc.in +++ b/libmbus.pc.in @@ -1,12 +1,12 @@ -prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ Name: libmbus Description: Open source M-bus (Meter-Bus) library. Requires: -Version: @PROJECT_VERSION@ +Version: @PACKAGE_VERSION@ URL: http://www.rscada.se/libmbus/ Libs: -L${libdir} -lmbus -lm -Cflags: -I${includedir} \ No newline at end of file +Cflags: -I${includedir} diff --git a/libmbus.spec b/libmbus.spec new file mode 100644 index 00000000..06160f75 --- /dev/null +++ b/libmbus.spec @@ -0,0 +1,87 @@ +# +# spec file for package libmbus +# +# Copyright (c) 2010-2013, Raditex Control AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# + +Summary: Open source M-bus (Meter-Bus) library +Name: libmbus +Version: 0.9.0 +Release: 1 +Source: https://github.com/rscada/%{name}/archive/%{version}.tar.gz +URL: https://github.com/rscada/libmbus/ +License: BSD +Vendor: Raditex Control AB +Packager: Stefan Wahren +Group: Development/Languages/C and C++ +BuildRoot: {_tmppath}/%{name}-%{version}-build +AutoReqProv: on + +%description +libmbus: M-bus Library from Raditex Control (http://www.rscada.se) + +libmbus is an open source library for the M-bus (Meter-Bus) protocol. +The Meter-Bus is a standard for reading out meter data from electricity meters, +heat meters, gas meters, etc. The M-bus standard deals with both the electrical +signals on the M-Bus, and the protocol and data format used in transmissions +on the M-Bus. The role of libmbus is to decode/encode M-bus data, and to handle +the communication with M-Bus devices. + +For more information see http://www.rscada.se/libmbus + +%package devel +License: BSD +Summary: Development libraries and header files for using the M-bus library +Group: Development/Libraries/C and C++ +AutoReqProv: on +Requires: %{name} = %{version} + +%description devel +This package contains all necessary include files and libraries needed +to compile and link applications which use the M-bus (Meter-Bus) library. + +%prep -q +%setup -q +# workaround to get it's build +autoreconf + +%build +./configure --prefix=/usr +make + +%install +rm -Rf "%buildroot" +mkdir "%buildroot" +make install DESTDIR="%buildroot" + +%clean +rm -rf "%buildroot" + +%files +%defattr (-,root,root) +%doc COPYING README.md +%{_bindir}/mbus-serial-* +%{_bindir}/mbus-tcp-* +%{_libdir}/libmbus.so* +%{_mandir}/man1/libmbus.1 +%{_mandir}/man1/mbus-* + +%files devel +%defattr (-,root,root) +%{_includedir}/mbus +%{_libdir}/libmbus.a +%{_libdir}/libmbus.la +%{_libdir}/pkgconfig/libmbus.pc + +%changelog +* Fri Feb 22 2019 Stefan Wahren - 0.9.0-1 +- switch to github repo +- enable man pages + +* Fri Mar 29 2013 Stefan Wahren - 0.8.0-1 +- Initial package based on the last official release diff --git a/mbus/Makefile.am b/mbus/Makefile.am new file mode 100644 index 00000000..b0749871 --- /dev/null +++ b/mbus/Makefile.am @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2010, Raditex AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# +# ------------------------------------------------------------------------------ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) + +includedir = $(prefix)/include/mbus +include_HEADERS = mbus.h mbus-protocol.h mbus-tcp.h mbus-serial.h mbus-protocol-aux.h + +lib_LTLIBRARIES = libmbus.la +libmbus_la_SOURCES = mbus.c mbus-protocol.c mbus-tcp.c mbus-serial.c mbus-protocol-aux.c + diff --git a/mbus/config.h.in b/mbus/config.h.in deleted file mode 100644 index 9b818f65..00000000 --- a/mbus/config.h.in +++ /dev/null @@ -1,56 +0,0 @@ -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_DLFCN_H "@HAVE_DLFCN_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_INTTYPES_H "@HAVE_INTTYPES_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MEMORY_H "@HAVE_MEMORY_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H "@HAVE_STDINT_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H "@HAVE_STDLIB_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRINGS_H "@HAVE_STRINGS_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H "@HAVE_STRING_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STAT_H "@HAVE_SYS_STAT_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H "@HAVE_SYS_TYPES_H@" - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H "@HAVE_UNISTD_H@" - -/* Define to the sub-directory where libtool stores uninstalled libraries. */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "@PROJECT_NAME@" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "info@rscada.se" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "@PROJECT_NAME@" - -/* Define to the full name and version of this package. */ -#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "@PROJECT_NAME@" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.rscada.se/libmbus/" - -/* Define to the version of this package. */ -#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" - -/* Version number of package */ -#cmakedefine VERSION "@PACKAGE_VERSION@" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index 0303d236..00000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_executable(mbus_parse ${CMAKE_CURRENT_LIST_DIR}/mbus_parse.c) -target_link_libraries(mbus_parse PRIVATE libmbus::libmbus) - -add_executable(mbus_parse_hex ${CMAKE_CURRENT_LIST_DIR}/mbus_parse_hex.c) -target_link_libraries(mbus_parse_hex PRIVATE libmbus::libmbus) diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 00000000..c373fa48 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2010, Raditex AB +# All rights reserved. +# +# rSCADA +# http://www.rSCADA.se +# info@rscada.se +# +# ------------------------------------------------------------------------------ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/mbus + +noinst_HEADERS = +noinst_PROGRAMS = mbus_parse mbus_parse_hex + +mbus_parse_LDFLAGS = -L$(top_builddir)/mbus +mbus_parse_LDADD = -lmbus -lm +mbus_parse_SOURCES = mbus_parse.c + +mbus_parse_hex_LDFLAGS = -L$(top_builddir)/mbus +mbus_parse_hex_LDADD = -lmbus -lm +mbus_parse_hex_SOURCES = mbus_parse_hex.c + From fcfa11dd976189dfc065375017aad1a8bc0f3d70 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 19 Jul 2020 12:24:27 +0200 Subject: [PATCH 20/29] changelog: Add release 0.9.0 --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5dce9087..8c177b90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +libmbus (0.9.0) xenial; urgency=medium + + * New official release + - major improvement to frame decoding + - new binaries: mbus-tcp-raw-send, mbus-tcp-application-reset, + mbus-serial-set-address + - simple echo cancellation + - replace CUnit test with test/generate-xml.sh + * debian/control: new package libmbus1-dbg + + -- Stefan Wahren Fri, 22 Feb 2019 19:08:04 +0100 + libmbus (0.8.0) precise; urgency=low * New official release. Includes support for multi-telegram communication. From 17b2c1d2bd820b8e3960795f503c1165eb41af8e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Mon, 23 Apr 2018 22:38:30 +0200 Subject: [PATCH 21/29] try offering FCB function --- mbus/mbus-protocol-aux.c | 36 ++++++++++++++++++++++++++++++++++++ mbus/mbus-protocol-aux.h | 5 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/mbus/mbus-protocol-aux.c b/mbus/mbus-protocol-aux.c index 60b5fa66..8479d063 100755 --- a/mbus/mbus-protocol-aux.c +++ b/mbus/mbus-protocol-aux.c @@ -1924,6 +1924,42 @@ mbus_send_request_frame(mbus_handle * handle, int address) return retval; } +//------------------------------------------------------------------------------ +// send a request packet to from master to slave +//------------------------------------------------------------------------------ +int +mbus_send_request_frame_fcb(mbus_handle * handle, int address) +{ + int retval = 0; + mbus_frame *frame; + + if (mbus_is_primary_address(address) == 0) + { + MBUS_ERROR("%s: invalid address %d\n", __PRETTY_FUNCTION__, address); + return -1; + } + + frame = mbus_frame_new(MBUS_FRAME_TYPE_SHORT); + + if (frame == NULL) + { + MBUS_ERROR("%s: failed to allocate mbus frame.\n", __PRETTY_FUNCTION__); + return -1; + } + + frame->control = MBUS_CONTROL_MASK_REQ_UD2 | MBUS_CONTROL_MASK_DIR_M2S | MBUS_CONTROL_MASK_FCB; + frame->address = address; + + if (mbus_send_frame(handle, frame) == -1) + { + MBUS_ERROR("%s: failed to send mbus frame.\n", __PRETTY_FUNCTION__); + retval = -1; + } + + mbus_frame_free(frame); + return retval; +} + //------------------------------------------------------------------------------ // send a user data packet from master to slave //------------------------------------------------------------------------------ diff --git a/mbus/mbus-protocol-aux.h b/mbus/mbus-protocol-aux.h index 4dacef4c..143c7eee 100755 --- a/mbus/mbus-protocol-aux.h +++ b/mbus/mbus-protocol-aux.h @@ -97,7 +97,7 @@ typedef struct _mbus_handle { void (*recv_event) (unsigned char src_type, const char *buff, size_t len); void (*send_event) (unsigned char src_type, const char *buff, size_t len); void (*scan_progress) (struct _mbus_handle *handle, const char *mask); - void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); + void (*found_event) (struct _mbus_handle *handle, mbus_frame *frame); void *auxdata; } mbus_handle; @@ -293,7 +293,8 @@ int mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baud * * @return Zero when successful. */ -int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame(mbus_handle * handle, int address); + int mbus_send_request_frame_fcb(mbus_handle * handle, int address); /** * Sends user data frame (SND_UD) to given slave using "unified" handle From a5b256575b1acf48b7965653b945aedab969fd0e Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:08:47 +0200 Subject: [PATCH 22/29] * add github action build and tests --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..fc7b95a1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test + +# Run this job on all pushes and pull requests +# as well as tags with a semantic version +on: + push: + branches: + - '*' + pull_request: {} + +jobs: + + # Runs lib tests on all supported node versions and OSes + build-and-test: + if: contains(github.event.head_commit.message, '[skip ci]') == false + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - name: Build + run: ./build.sh + + - name: Test Success Frames + run: cd test && make && ./generate-xml.sh test-frames + + - name: Test Error Frames + run: cd test && make && ./generate-xml.sh test/error-frames || true + + - name: Test Unsupported Frames + run: cd test && make && ./generate-xml.sh test/unsupported-frames || true From c98829ba3747af2b038f82358484171e235ec256 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:10:26 +0200 Subject: [PATCH 23/29] * add github action build and tests --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc7b95a1..e1d3a0ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,8 @@ jobs: os: [ubuntu-latest, macos-latest] steps: + - uses: actions/checkout@v1 + - name: Build run: ./build.sh From 3d59ab3b28c7a20961eb69cf1f5e44a7b5c85df1 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:20:39 +0200 Subject: [PATCH 24/29] * add automake on macos --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1d3a0ae..af35fb93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,10 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Install automake (macos) + if: startsWith(runner.OS, 'darwin') + run: brew install automake + - name: Build run: ./build.sh From 28f3e607aa9617a0ea0b663a26eef2738a24ea4b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:24:24 +0200 Subject: [PATCH 25/29] * add automake on macos --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af35fb93..d87e6841 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v1 - name: Install automake (macos) - if: startsWith(runner.OS, 'darwin') + if: startsWith(runner.OS, 'macOS') run: brew install automake - name: Build From 23168648d65245648518c697f6cee8b66ef91648 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:27:11 +0200 Subject: [PATCH 26/29] * adjust testing --- .github/workflows/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d87e6841..70a576a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,11 +29,14 @@ jobs: - name: Build run: ./build.sh + - name: Build tests + run: cd test && make + - name: Test Success Frames - run: cd test && make && ./generate-xml.sh test-frames + run: ./generate-xml.sh test-frames - name: Test Error Frames - run: cd test && make && ./generate-xml.sh test/error-frames || true + run: ./generate-xml.sh error-frames || true - name: Test Unsupported Frames - run: cd test && make && ./generate-xml.sh test/unsupported-frames || true + run: ./generate-xml.sh unsupported-frames || true From 83689c7f6d7dd6ef1d185a59d2f503a9a7d8bd4b Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:28:52 +0200 Subject: [PATCH 27/29] * adjust testing --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70a576a0..93bd579e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,10 +33,10 @@ jobs: run: cd test && make - name: Test Success Frames - run: ./generate-xml.sh test-frames + run: ./test/generate-xml.sh test/test-frames - name: Test Error Frames - run: ./generate-xml.sh error-frames || true + run: ./test/generate-xml.sh test/error-frames || true - name: Test Unsupported Frames - run: ./generate-xml.sh unsupported-frames || true + run: ./test/generate-xml.sh test/unsupported-frames || true From b15defbf41fc90fe404b17dfd9494ac740f4e6c3 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:30:05 +0200 Subject: [PATCH 28/29] * adjust testing --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93bd579e..2ac1d690 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,10 +33,10 @@ jobs: run: cd test && make - name: Test Success Frames - run: ./test/generate-xml.sh test/test-frames + run: cd test && ./generate-xml.sh test-frames - name: Test Error Frames - run: ./test/generate-xml.sh test/error-frames || true + run: cd test && ./generate-xml.sh error-frames || true - name: Test Unsupported Frames - run: ./test/generate-xml.sh test/unsupported-frames || true + run: cd test && ./generate-xml.sh unsupported-frames || true From fc8bb5ec1d058aeea1bd9a25f9c4f6cb0d9d2b04 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Wed, 29 Jun 2022 14:32:32 +0200 Subject: [PATCH 29/29] * remove travis --- .travis.yml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 70b00795..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: c - -compiler: - - gcc - - clang - -os: - - linux - - osx - -script: - - ./build.sh - - cd test && make && ./generate-xml.sh test-frames - - cd test && make && ./generate-xml.sh test/error-frames || true - - cd test && make && ./generate-xml.sh test/unsupported-frames || true