├── .gitattributes ├── .github └── workflows │ └── dotnet-core.yml ├── .gitignore ├── DataExamples ├── Docs │ ├── 108048_1_Protocol GNM3D-MBUS.PDF │ ├── MBDOC48.PDF │ ├── Mbus_DEM.pdf │ ├── u180b-mbus-sb_gb.pdf │ └── w4b21021.pdf ├── ELV-Elvaco-CMa10.hex ├── ValuesFromDevices.txt ├── error-frames │ ├── application_busy.hex │ ├── application_busy.xml │ ├── buffer_too_long.hex │ ├── buffer_too_long.xml │ ├── error.hex │ ├── error.xml │ ├── premature_end_of_data1.hex │ ├── premature_end_of_data2.hex │ ├── premature_end_of_dif1.hex │ ├── premature_end_of_dif2.hex │ ├── premature_end_of_record.hex │ ├── premature_end_of_record.xml │ ├── premature_end_of_var_vif1.hex │ ├── premature_end_of_vif1.hex │ ├── too_long_var_vif.hex │ ├── too_many_dife.hex │ ├── too_many_difes.hex │ ├── too_many_difes.xml │ ├── too_many_readouts.hex │ ├── too_many_readouts.xml │ ├── too_many_records.hex │ ├── too_many_records.xml │ ├── too_many_vife.hex │ ├── too_many_vifes.hex │ ├── too_many_vifes.xml │ ├── too_short_header.hex │ ├── unimplemented_ci.hex │ ├── unimplemented_ci.xml │ ├── unspecified_error.hex │ └── unspecified_error.xml ├── test-frames │ ├── ACW_Itron-BM-plus-m.hex │ ├── ACW_Itron-BM-plus-m.xml │ ├── ACW_Itron-CYBLE-M-Bus-14.hex │ ├── ACW_Itron-CYBLE-M-Bus-14.xml │ ├── EDC.hex │ ├── EDC.xml │ ├── EFE_Engelmann-Elster-SensoStar-2.hex │ ├── EFE_Engelmann-Elster-SensoStar-2.xml │ ├── EFE_Engelmann-WaterStar.hex │ ├── EFE_Engelmann-WaterStar.xml │ ├── ELS_Elster-F96-Plus.hex │ ├── ELS_Elster-F96-Plus.xml │ ├── ELV-Elvaco-CMa10.hex │ ├── ELV-Elvaco-CMa10.xml │ ├── EMU_EMU-Professional-375-M-Bus.hex │ ├── EMU_EMU-Professional-375-M-Bus.xml │ ├── Elster-F2.hex │ ├── Elster-F2.xml │ ├── FIN-Finder-7E.23.8.230.0020.hex │ ├── FIN-Finder-7E.23.8.230.0020.xml │ ├── GWF-MTKcoder.hex │ ├── GWF-MTKcoder.xml │ ├── LGB_G350.hex │ ├── LGB_G350.xml │ ├── REL-Relay-Padpuls2.hex │ ├── REL-Relay-Padpuls2.xml │ ├── SBC_Saia-Burgess-ALE3.hex │ ├── SBC_Saia-Burgess-ALE3.xml │ ├── SEN_Pollustat.hex │ ├── SEN_Pollustat.xml │ ├── SEN_Sensus-PolluStat-E.hex │ ├── SEN_Sensus-PolluStat-E.xml │ ├── SEN_Sensus-PolluTherm.hex │ ├── SEN_Sensus-PolluTherm.xml │ ├── SLB_CF-Compact-Integral-MK-MaXX.hex │ ├── SLB_CF-Compact-Integral-MK-MaXX.xml │ ├── THI_cma10.hex │ ├── THI_cma10.xml │ ├── ZRM_Minol-Minocal-C2.hex │ ├── ZRM_Minol-Minocal-C2.xml │ ├── abb_delta.hex │ ├── abb_delta.xml │ ├── abb_f95.hex │ ├── abb_f95.xml │ ├── allmess_cf50.hex │ ├── allmess_cf50.xml │ ├── berg_dz_plus.hex │ ├── berg_dz_plus.xml │ ├── electricity-meter-1.hex │ ├── electricity-meter-1.xml │ ├── electricity-meter-2.hex │ ├── electricity-meter-2.xml │ ├── els_falcon.hex │ ├── els_falcon.xml │ ├── els_tmpa_telegramm1.hex │ ├── els_tmpa_telegramm1.xml │ ├── elv_temp_humid.hex │ ├── elv_temp_humid.xml │ ├── emh_diz.hex │ ├── emh_diz.xml │ ├── engelmann_sensostar2c.hex │ ├── engelmann_sensostar2c.xml │ ├── example_data_01.hex │ ├── example_data_01.xml │ ├── example_data_02.hex │ ├── example_data_02.xml │ ├── filler.hex │ ├── filler.xml │ ├── frame1.hex │ ├── frame1.xml │ ├── frame2.hex │ ├── frame2.xml │ ├── gmc_emmod206.hex │ ├── gmc_emmod206.xml │ ├── invalid_length.hex │ ├── invalid_length2.hex │ ├── itron_bm_+m.hex │ ├── itron_bm_+m.xml │ ├── itron_cf_51.hex │ ├── itron_cf_51.xml │ ├── itron_cf_55.hex │ ├── itron_cf_55.xml │ ├── itron_cf_echo_2.hex │ ├── itron_cf_echo_2.xml │ ├── itron_cyble_m-bus_v1.4_cold_water.hex │ ├── itron_cyble_m-bus_v1.4_cold_water.xml │ ├── itron_cyble_m-bus_v1.4_gas.hex │ ├── itron_cyble_m-bus_v1.4_gas.xml │ ├── itron_cyble_m-bus_v1.4_water.hex │ ├── itron_cyble_m-bus_v1.4_water.xml │ ├── itron_integral_mk_maxx.hex │ ├── itron_integral_mk_maxx.xml │ ├── kamstrup_382_005.hex │ ├── kamstrup_382_005.xml │ ├── kamstrup_multical_601.hex │ ├── kamstrup_multical_601.xml │ ├── landis+gyr_ultraheat_t230.hex │ ├── landis+gyr_ultraheat_t230.xml │ ├── manual_frame2.hex │ ├── manual_frame2.xml │ ├── manual_frame3.hex │ ├── manual_frame3.xml │ ├── manual_frame7.hex │ ├── manual_frame7.xml │ ├── metrona_pollutherm.hex │ ├── metrona_pollutherm.xml │ ├── metrona_ultraheat_xs.hex │ ├── metrona_ultraheat_xs.xml │ ├── minol_minocal_c2.hex │ ├── minol_minocal_c2.xml │ ├── minol_minocal_wr3.hex │ ├── minol_minocal_wr3.xml │ ├── nzr_dhz_5_63.hex │ ├── nzr_dhz_5_63.xml │ ├── oms_frame1.hex │ ├── oms_frame1.xml │ ├── oms_frame2.hex │ ├── oms_frame2.xml │ ├── oms_frame3.hex │ ├── oms_frame3.xml │ ├── ram_modularis.hex │ ├── ram_modularis.xml │ ├── rel_padpuls2.hex │ ├── rel_padpuls2.xml │ ├── rel_padpuls3.hex │ ├── rel_padpuls3.xml │ ├── sen_pollusonic_2.hex │ ├── sen_pollusonic_2.xml │ ├── sen_pollutherm.hex │ ├── sen_pollutherm.xml │ ├── siemens_water.hex │ ├── siemens_water.xml │ ├── siemens_wfh21.hex │ ├── siemens_wfh21.xml │ ├── sontex_supercal_531_telegram1.hex │ ├── sontex_supercal_531_telegram1.xml │ ├── svm_f22_telegram1.hex │ ├── svm_f22_telegram1.xml │ ├── tch_telegramm1.hex │ ├── tch_telegramm1.xml │ ├── test.hex │ ├── wmbus-converted.hex │ └── wmbus-converted.xml ├── test.hex └── unsupported-frames │ ├── manual_frame1.hex │ ├── manual_frame4.hex │ ├── manual_frame5.hex │ ├── manual_frame6.hex │ ├── rvd235.hex │ ├── siemens_rvd235.hex │ └── svm_f22_telegram2.hex ├── LICENSE ├── MBusLogo240.jpg ├── MBusLogo240.svg ├── README.md ├── Valley.Net.Protocols.MeterBus.Test ├── PacketSerializationTests.cs ├── QueryPacket.cs ├── QuerySerializer.cs ├── SerialTests.cs ├── TcpTests.cs ├── UdpTests.cs ├── Valley.Net.Protocols.MeterBus.Test.csproj └── XmlSerializationTests.cs ├── Valley.Net.Protocols.MeterBus.sln └── Valley.Net.Protocols.MeterBus ├── BinaryReaderExtensions.cs ├── ByteExtensions.cs ├── EN13757_2 ├── AckFrame.cs ├── ByteExtensions.cs ├── Constants.cs ├── ControlFrame.cs ├── ControlInformation.cs ├── ControlMask.cs ├── DIF.cs ├── DIFE.cs ├── DataTypes.cs ├── DeviceType.cs ├── FixedDataLongFrame.cs ├── FixedDataUnits.cs ├── Frame.cs ├── Function.cs ├── LongFrame.cs ├── ManufactureSpecific.cs ├── Manufacturer.cs ├── MeterbusFrameSerializer.cs ├── Part.cs ├── ShortFrame.cs ├── UnitPrefix.cs ├── VIF.cs ├── VIFE.cs ├── VIFE_FB.cs ├── VIFE_FD.cs ├── Value.cs ├── VariableDataLongFrame.cs ├── VariableDataQuantityUnit.cs └── VariableDataRecordType.cs ├── EN13757_3 ├── AlarmStatusPacket.cs ├── ApplicationErrorPacket.cs ├── DataPacket.cs ├── EmptyPacket.cs ├── FixedDataPacket.cs ├── FrameExtensions.cs ├── Packet.cs ├── TimeMagnitudes.cs └── VariableDataPacket.cs ├── EnumerableExtensions.cs ├── MBusMaster.cs ├── MeterEventArgs.cs ├── MeterbusXmlWriter.cs ├── PacketEventArgs.cs ├── StringExtensions.cs ├── UnixTime.cs └── Valley.Net.Protocols.MeterBus.csproj /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-core.yml: -------------------------------------------------------------------------------- 1 | name: .NET Core 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Setup .NET Core 17 | uses: actions/setup-dotnet@v1 18 | with: 19 | dotnet-version: 3.1.101 20 | - name: Install dependencies 21 | run: dotnet restore 22 | - name: Build 23 | run: dotnet build --configuration Release --no-restore 24 | - name: Test 25 | run: dotnet test --no-restore --verbosity normal 26 | -------------------------------------------------------------------------------- /DataExamples/Docs/108048_1_Protocol GNM3D-MBUS.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/DataExamples/Docs/108048_1_Protocol GNM3D-MBUS.PDF -------------------------------------------------------------------------------- /DataExamples/Docs/MBDOC48.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/DataExamples/Docs/MBDOC48.PDF -------------------------------------------------------------------------------- /DataExamples/Docs/Mbus_DEM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/DataExamples/Docs/Mbus_DEM.pdf -------------------------------------------------------------------------------- /DataExamples/Docs/u180b-mbus-sb_gb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/DataExamples/Docs/u180b-mbus-sb_gb.pdf -------------------------------------------------------------------------------- /DataExamples/Docs/w4b21021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/DataExamples/Docs/w4b21021.pdf -------------------------------------------------------------------------------- /DataExamples/ELV-Elvaco-CMa10.hex: -------------------------------------------------------------------------------- 1 | 68 53 53 68 08 0B 72 61 15 01 24 96 15 16 00 3F 00 00 00 01 FD 1B 02 02 FC 03 48 52 25 74 22 15 22 FC 03 48 52 25 74 24 0D 12 FC 03 48 52 25 74 C3 1C 02 65 2E 08 22 65 5C 05 12 65 A2 0B 01 72 18 42 65 2C 08 82 01 65 1F 08 0C 78 61 15 01 24 03 FD 0F 00 00 04 1F BD 16 -------------------------------------------------------------------------------- /DataExamples/ValuesFromDevices.txt: -------------------------------------------------------------------------------- 1 | IdentificationNo: 1668122, AccessNo: 131, Medium: HotWater2, Items: NormalizedValue: (FabricationNo.Instantaneous.Tariff0.SubUnit0, 1668122) 2 | NormalizedValue: (TimePoint.Instantaneous.Tariff0.SubUnit0, 11-Jan-2018 00:00:00) 3 | NormalizedValue: (ErrorFlags.Instantaneous.Tariff0.SubUnit0, 1024) 4 | NormalizedValue: (kcal.Instantaneous.Tariff0.SubUnit0, 99051.5) 5 | NormalizedValue: (Volume_m3.Instantaneous.Tariff0.SubUnit0, 5.099) 6 | NormalizedValue: (Volume_m3.Instantaneous.Tariff1.SubUnit0, 0.040) 7 | NormalizedValue: (Volume_m3.Instantaneous.Tariff2.SubUnit0, 0.120) 8 | NormalizedValue: (Volume_m3.Instantaneous.Tariff3.SubUnit0, 0.220) 9 | NormalizedValue: (Volume_m3.Instantaneous.Tariff4.SubUnit0, 0.090) 10 | NormalizedValue: (VolumeFlowM3_per_h.Instantaneous.Tariff0.SubUnit0, 0.000) 11 | NormalizedValue: (PowerW.Instantaneous.Tariff0.SubUnit0, 0) 12 | NormalizedValue: (FlowTemperatureC.Instantaneous.Tariff0.SubUnit0, 27.3) 13 | NormalizedValue: (ReturnTemperatureC.Instantaneous.Tariff0.SubUnit0, 27.8) 14 | NormalizedValue: (OnTime.Instantaneous.Tariff0.SubUnit0, 9.10:00:00) 15 | NormalizedValue: (OnTime.ValueDuringError.Tariff0.SubUnit0, 262.02:00:00) 16 | NormalizedValue: (AnyVIF.Instantaneous.Tariff0.SubUnit0, 0) 17 | IdentificationNo: 1477827, AccessNo: 71, Medium: HotWater2, Items: NormalizedValue: (FabricationNo.Instantaneous.Tariff0.SubUnit0, 1477827) 18 | NormalizedValue: (TimePoint.Instantaneous.Tariff0.SubUnit0, 11-Jan-2018 00:00:00) 19 | NormalizedValue: (ErrorFlags.Instantaneous.Tariff0.SubUnit0, 0) 20 | NormalizedValue: (kcal.Instantaneous.Tariff0.SubUnit0, 22769318.5) 21 | NormalizedValue: (Volume_m3.Instantaneous.Tariff0.SubUnit0, 2358.891) 22 | NormalizedValue: (Volume_m3.Instantaneous.Tariff1.SubUnit0, 7285055) 23 | NormalizedValue: (Volume_m3.Instantaneous.Tariff2.SubUnit0, 26502.80) 24 | NormalizedValue: (Volume_m3.Instantaneous.Tariff3.SubUnit0, 6216476) 25 | NormalizedValue: (Volume_m3.Instantaneous.Tariff4.SubUnit0, 0.015) 26 | NormalizedValue: (VolumeFlowM3_per_h.Instantaneous.Tariff0.SubUnit0, 0.000) 27 | NormalizedValue: (PowerW.Instantaneous.Tariff0.SubUnit0, 0) 28 | NormalizedValue: (FlowTemperatureC.Instantaneous.Tariff0.SubUnit0, 25.6) 29 | NormalizedValue: (ReturnTemperatureC.Instantaneous.Tariff0.SubUnit0, 25.8) 30 | NormalizedValue: (OnTime.Instantaneous.Tariff0.SubUnit0, 1130.03:00:00) 31 | NormalizedValue: (OnTime.ValueDuringError.Tariff0.SubUnit0, 114.13:00:00) 32 | NormalizedValue: (AnyVIF.Instantaneous.Tariff0.SubUnit0, 0) 33 | -------------------------------------------------------------------------------- /DataExamples/error-frames/application_busy.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 08 81 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/application_busy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Application busy 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/buffer_too_long.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 02 7B 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/buffer_too_long.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Buffer too long, truncated 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/error.hex: -------------------------------------------------------------------------------- 1 | 68 03 03 68 08 01 70 79 16 -------------------------------------------------------------------------------- /DataExamples/error-frames/error.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unspecified error 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_data1.hex: -------------------------------------------------------------------------------- 1 | 68 1C 1C 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 C7 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_data2.hex: -------------------------------------------------------------------------------- 1 | 68 1E 1E 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 37 18 16 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_dif1.hex: -------------------------------------------------------------------------------- 1 | 68 1A 1A 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 63 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_dif2.hex: -------------------------------------------------------------------------------- 1 | 68 1B 1B 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 8B EE 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_record.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 04 7D 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_record.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Premature end of record 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_var_vif1.hex: -------------------------------------------------------------------------------- 1 | 68 2E 2E 68 08 05 72 34 08 00 54 96 15 32 00 F2 00 00 00 01 FD 1B 00 02 FC 03 48 52 25 74 D4 11 22 FC 03 48 52 25 74 C8 11 12 FC 13 48 52 25 74 B4 16 5B 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/premature_end_of_vif1.hex: -------------------------------------------------------------------------------- 1 | 68 1B 1B 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 C3 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_long_var_vif.hex: -------------------------------------------------------------------------------- 1 | 68 2E 2E 68 08 05 72 34 08 00 54 96 15 32 00 F2 00 00 00 01 FD 1B 00 02 FC 03 48 52 25 74 D4 11 22 FC 03 48 52 25 74 C8 11 12 FC F3 48 52 25 74 B4 16 3B 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_dife.hex: -------------------------------------------------------------------------------- 1 | 68 29 29 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 8B 8B 8B 8B 8B 8B 8B 8B 8B 8B 60 04 37 18 02 86 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_difes.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 05 7E 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_difes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | More than 10 DIFE´s 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_readouts.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 09 82 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_readouts.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Too many readouts 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_records.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 03 7C 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_records.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Too many records 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_vife.hex: -------------------------------------------------------------------------------- 1 | 68 2A 2A 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 84 84 84 84 84 84 84 84 84 84 84 04 37 18 02 C4 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_vifes.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 06 7F 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_many_vifes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | More than 10 VIFE´s 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/too_short_header.hex: -------------------------------------------------------------------------------- 1 | 68 08 08 68 08 02 72 78 56 34 12 24 B4 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/unimplemented_ci.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 01 7A 16 2 | -------------------------------------------------------------------------------- /DataExamples/error-frames/unimplemented_ci.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unimplemented CI-Field 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/error-frames/unspecified_error.hex: -------------------------------------------------------------------------------- 1 | 68 04 04 68 08 01 70 00 79 16 -------------------------------------------------------------------------------- /DataExamples/error-frames/unspecified_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Unspecified error 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ACW_Itron-BM-plus-m.hex: -------------------------------------------------------------------------------- 1 | 68 3C 3C 68 08 08 72 78 03 49 11 77 04 0E 16 0A 00 00 00 0C 78 78 03 49 11 04 13 31 D4 00 00 42 6C 00 00 44 13 00 00 00 00 04 6D 0B 0B CD 13 02 27 00 00 09 FD 0E 02 09 FD 0F 06 0F 00 01 75 13 D3 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/ACW_Itron-BM-plus-m.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11490378 6 | ACW 7 | 14 8 | Itron BM +m 9 | Cold water 10 | 10 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 11490378 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (m m^3) 26 | 54321 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2000-00-00 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (m m^3) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Time Point (time & date) 47 | 2014-03-13T11:11:00 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Operating time (days) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Firmware version 61 | 2 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Software version 68 | 6 69 | 70 | 71 | 72 | Manufacturer specific 73 | 00 01 75 13 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ACW_Itron-CYBLE-M-Bus-14.hex: -------------------------------------------------------------------------------- 1 | 68 56 56 68 08 01 72 23 15 01 09 77 04 14 07 25 00 00 00 0C 78 23 15 01 09 0D 7C 08 44 49 20 2E 74 73 75 63 0A 35 35 37 36 37 30 41 4C 39 30 04 6D 1A 0E CD 13 02 7C 09 65 6D 69 74 20 2E 74 61 62 D4 09 04 13 1F 00 00 00 04 93 7F 00 00 00 00 44 13 1F 00 00 00 0F 00 01 1F A9 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/ACW_Itron-CYBLE-M-Bus-14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9011523 6 | ACW 7 | 20 8 | Itron CYBLE M-Bus 1.4 9 | Water 10 | 37 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 9011523 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | cust. ID 26 | 09LA076755 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2014-03-13T14:26:00 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | bat. time 40 | 2516 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume (m m^3) 47 | 31 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Volume (m m^3) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | Volume (m m^3) 61 | 31 62 | 63 | 64 | 65 | Manufacturer specific 66 | 00 01 1F 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /DataExamples/test-frames/EDC.hex: -------------------------------------------------------------------------------- 1 | 68 AE AE 68 28 01 72 95 08 12 11 83 14 02 04 17 00 00 00 84 00 86 3B 23 00 00 00 84 00 86 3C D1 01 00 00 84 40 86 3B 00 00 00 00 84 40 86 3C 00 00 00 00 85 00 5B 2B 4B AC 41 85 00 5F 20 D7 AC 41 85 40 5B 00 00 B8 42 85 40 5F 00 00 B8 42 85 00 3B 84 00 35 3F 85 40 3B 00 00 00 00 95 00 3B 95 CF B2 43 95 40 3B 00 00 00 00 85 00 2B 00 00 00 00 85 40 2B 00 00 00 00 95 00 2B D3 9F 90 46 95 40 2B 00 00 00 00 04 6D 19 0F 8A 17 84 00 7C 01 43 F3 0D 00 00 84 40 7C 01 43 9D 01 00 00 84 00 7C 01 63 01 00 00 00 84 40 7C 01 63 01 00 00 00 0F 2F 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/EFE_Engelmann-Elster-SensoStar-2.hex: -------------------------------------------------------------------------------- 1 | 68 A1 A1 68 08 00 72 45 33 08 24 C5 14 00 04 66 27 00 00 04 78 91 7B 6F 01 04 6D 17 2E CC 13 04 15 00 00 00 00 44 15 00 00 00 00 84 01 15 00 00 00 00 04 06 00 00 00 00 44 06 00 00 00 00 84 01 06 00 00 00 00 84 10 06 00 00 00 00 C4 10 06 00 00 00 00 84 11 06 00 00 00 00 42 6C BF 1C 02 6C DF 1C 84 20 06 00 00 00 00 84 30 06 00 00 00 00 04 3B 00 00 00 00 14 3B 19 00 00 00 04 2B 00 00 00 00 14 2B 0B 00 00 00 02 5B 16 00 02 5F 15 00 04 61 09 00 00 00 02 23 0C 02 01 FD 17 00 04 90 28 0B 00 00 00 EB 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/EFE_Engelmann-WaterStar.hex: -------------------------------------------------------------------------------- 1 | 68 51 51 68 08 0B 72 54 02 99 04 C5 14 00 06 0C 27 00 00 04 78 2E 25 4C 00 04 6D 0A 0C CD 13 04 13 4C 01 00 00 44 13 4B 01 00 00 84 01 13 4C 01 00 00 42 6C BF 1C 02 6C DF 1C 04 3B 00 00 00 00 14 3B 16 08 00 00 02 23 A7 04 01 FD 17 00 04 90 28 08 00 00 00 3F 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/EFE_Engelmann-WaterStar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 4990254 6 | EFE 7 | 0 8 | Engelmann WaterStar 9 | Hot water 10 | 12 11 | 27 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 4990254 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2014-03-13T12:10:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume (m m^3) 33 | 332 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (m m^3) 40 | 331 41 | 42 | 43 | 44 | Instantaneous value 45 | 2 46 | 0 47 | 0 48 | Volume (m m^3) 49 | 332 50 | 51 | 52 | 53 | Instantaneous value 54 | 1 55 | Time Point (date) 56 | 2013-12-31 57 | 58 | 59 | 60 | Instantaneous value 61 | 0 62 | Time Point (date) 63 | 2014-12-31 64 | 65 | 66 | 67 | Instantaneous value 68 | 0 69 | Volume flow (m m^3/h) 70 | 0 71 | 72 | 73 | 74 | Maximum value 75 | 0 76 | Volume flow (m m^3/h) 77 | 2070 78 | 79 | 80 | 81 | Instantaneous value 82 | 0 83 | On time (days) 84 | 1191 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Error flags 91 | 0 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | Volume (my m^3) 98 | 8 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ELS_Elster-F96-Plus.hex: -------------------------------------------------------------------------------- 1 | 68 68 68 68 08 00 72 51 39 49 44 93 15 2F 04 A1 70 00 00 0C 06 00 00 00 00 8C 10 06 00 00 00 00 8C 20 13 00 00 00 00 0C 13 00 00 00 00 3C 2B BD EB DD DD 3B 3B BD EB DD 0A 5A 27 02 0A 5E 26 02 0A 62 01 00 0A 27 30 07 04 6D 09 0D CD 13 4C 06 00 00 00 00 4C 13 00 00 00 00 CC 10 06 00 00 00 00 CC 20 13 00 00 00 00 42 6C BF 15 40 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/ELV-Elvaco-CMa10.hex: -------------------------------------------------------------------------------- 1 | 68 53 53 68 08 0B 72 61 15 01 24 96 15 16 00 3F 00 00 00 01 FD 1B 02 02 FC 03 48 52 25 74 22 15 22 FC 03 48 52 25 74 24 0D 12 FC 03 48 52 25 74 C3 1C 02 65 2E 08 22 65 5C 05 12 65 A2 0B 01 72 18 42 65 2C 08 82 01 65 1F 08 0C 78 61 15 01 24 03 FD 0F 00 00 04 1F BD 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ELV-Elvaco-CMa10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24011561 6 | ELV 7 | 22 8 | Elvaco CMa10 9 | Other 10 | 63 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Digital input (binary) 19 | 2 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | 1e-2 %RH 26 | 5410 27 | 28 | 29 | 30 | Minimum value 31 | 0 32 | 1e-2 %RH 33 | 3364 34 | 35 | 36 | 37 | Maximum value 38 | 0 39 | 1e-2 %RH 40 | 7363 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | External temperature (1e-2 deg C) 47 | 2094 48 | 49 | 50 | 51 | Minimum value 52 | 0 53 | External temperature (1e-2 deg C) 54 | 1372 55 | 56 | 57 | 58 | Maximum value 59 | 0 60 | External temperature (1e-2 deg C) 61 | 2978 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Averaging Duration (hours) 68 | 24 69 | 70 | 71 | 72 | Instantaneous value 73 | 1 74 | External temperature (1e-2 deg C) 75 | 2092 76 | 77 | 78 | 79 | Instantaneous value 80 | 2 81 | 0 82 | 0 83 | External temperature (1e-2 deg C) 84 | 2079 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Fabrication number 91 | 24011561 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | Software version 98 | 262144 99 | 100 | 101 | 102 | More records follow 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /DataExamples/test-frames/EMU_EMU-Professional-375-M-Bus.hex: -------------------------------------------------------------------------------- 1 | 68 F4 F4 68 08 00 72 29 26 03 00 B5 15 10 02 02 00 00 00 0C 78 29 26 03 00 84 10 03 54 05 00 00 84 20 03 00 00 00 00 84 90 40 03 AE 1E 00 00 84 A0 40 03 00 00 00 00 04 AB FF 01 FE FF FF FF 04 AB FF 02 00 00 00 00 04 AB FF 03 00 00 00 00 04 2B FE FF FF FF 84 80 40 AB FF 01 0E 00 00 00 84 80 40 AB FF 02 00 00 00 00 84 80 40 AB FF 03 00 00 00 00 84 80 40 2B 0E 00 00 00 02 FD C8 FF 01 D1 08 02 FD C8 FF 02 00 00 02 FD C8 FF 03 00 00 22 FD C8 FF 01 52 07 22 FD C8 FF 02 00 00 22 FD C8 FF 03 00 00 12 FD C8 FF 01 6A 09 12 FD C8 FF 02 00 00 12 FD C8 FF 03 00 00 03 FD D9 FF 01 BE FF FF 03 FD D9 FF 02 00 00 00 03 FD D9 FF 03 00 00 00 03 FD 59 BE FF FF 01 FF E1 FF 01 0D 01 FF E1 FF 02 00 01 FF E1 FF 03 00 02 FF 52 F4 01 02 FD 60 38 00 01 FD 17 00 74 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/Elster-F2.hex: -------------------------------------------------------------------------------- 1 | 68 90 90 68 08 01 72 57 26 80 00 CD 4E 08 04 46 00 00 00 04 06 98 14 00 00 04 14 6B D6 01 00 84 40 14 79 66 01 00 02 5B 1C 00 02 5F 22 00 02 62 00 00 04 22 B1 A1 00 00 04 26 B1 A1 00 00 04 3B 00 00 00 00 04 2C 00 00 00 00 04 6D 0C 0C BD 16 84 40 6E 00 00 00 00 84 80 40 6E 00 00 00 00 1F 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 DE 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/Elster-F2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 802657 6 | SVM 7 | 8 8 | Elster F2 / Deltamess F2 9 | Heat: Outlet 10 | 70 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 5272 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-2 m^3) 26 | 120427 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | 0 33 | 1 34 | Volume (1e-2 m^3) 35 | 91769 36 | 37 | 38 | 39 | Instantaneous value 40 | 0 41 | Flow temperature (deg C) 42 | 28 43 | 44 | 45 | 46 | Instantaneous value 47 | 0 48 | Return temperature (deg C) 49 | 34 50 | 51 | 52 | 53 | Instantaneous value 54 | 0 55 | Temperature Difference (1e-1 deg C) 56 | 0 57 | 58 | 59 | 60 | Instantaneous value 61 | 0 62 | On time (hours) 63 | 41393 64 | 65 | 66 | 67 | Instantaneous value 68 | 0 69 | Operating time (hours) 70 | 41393 71 | 72 | 73 | 74 | Instantaneous value 75 | 0 76 | Volume flow (m m^3/h) 77 | 0 78 | 79 | 80 | 81 | Instantaneous value 82 | 0 83 | Power (10 W) 84 | 0 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Time Point (time & date) 91 | 2013-06-29T12:12:00 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | 0 98 | 1 99 | Units for H.C.A. 100 | 0 101 | 102 | 103 | 104 | Instantaneous value 105 | 0 106 | 0 107 | 2 108 | Units for H.C.A. 109 | 0 110 | 111 | 112 | 113 | More records follow 114 | 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 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /DataExamples/test-frames/FIN-Finder-7E.23.8.230.0020.hex: -------------------------------------------------------------------------------- 1 | 68 38 38 68 08 19 72 07 62 00 23 2E 19 23 02 92 00 00 00 8C 10 04 68 28 17 00 8C 11 04 68 28 17 00 02 FD C9 FF 01 E6 00 02 FD DB FF 01 06 00 02 AC FF 01 09 00 82 40 AC FF 01 FD FF 5B 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/FIN-Finder-7E.23.8.230.0020.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23006207 6 | FIN 7 | 35 8 | 9 | Electricity 10 | 146 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | 1 19 | 0 20 | Energy (10 Wh) 21 | 172868 22 | 23 | 24 | 25 | Instantaneous value 26 | 2 27 | 1 28 | 0 29 | Energy (10 Wh) 30 | 172868 31 | 32 | 33 | 34 | Instantaneous value 35 | 0 36 | V 37 | 230 38 | 39 | 40 | 41 | Instantaneous value 42 | 0 43 | 1e-1 A 44 | 6 45 | 46 | 47 | 48 | Instantaneous value 49 | 0 50 | Power (10 W) 51 | 9 52 | 53 | 54 | 55 | Instantaneous value 56 | 0 57 | 0 58 | 1 59 | Power (10 W) 60 | -3 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /DataExamples/test-frames/GWF-MTKcoder.hex: -------------------------------------------------------------------------------- 1 | 68 1B 1B 68 08 01 72 07 20 18 00 E6 1E 35 07 4C 00 00 00 0C 78 07 20 18 00 0C 16 69 02 00 00 96 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/GWF-MTKcoder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 182007 6 | GWF 7 | 53 8 | 9 | Water 10 | 76 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 182007 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume ( m^3) 26 | 269 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DataExamples/test-frames/LGB_G350.hex: -------------------------------------------------------------------------------- 1 | 68 40 40 68 08 01 72 58 20 08 12 E2 30 40 03 40 00 00 00 2F 2F 4C 13 92 40 83 10 46 6D 00 00 08 16 27 00 0D 78 11 34 31 38 35 30 32 38 30 32 31 39 35 37 31 30 30 47 89 40 FD 1A 01 01 FD 17 00 01 FD 67 0F 38 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/LGB_G350.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12082058 6 | LGB 7 | 64 8 | 9 | Gas 10 | 64 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 1 18 | Volume (m m^3) 19 | 10834092 20 | 21 | 22 | 23 | Instantaneous value 24 | 1 25 | Time Point (time & date) 26 | 2016-07-22T08:00:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Fabrication number 33 | G0017591208205814 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | 0 40 | 1 41 | Digital output (binary) 42 | 1 43 | 44 | 45 | 46 | Instantaneous value 47 | 0 48 | Error flags 49 | 0 50 | 51 | 52 | 53 | Instantaneous value 54 | 0 55 | Unrecognized VIF extension: 0x67 56 | 15 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /DataExamples/test-frames/REL-Relay-Padpuls2.hex: -------------------------------------------------------------------------------- 1 | 68 2F 2F 68 08 16 72 01 63 21 11 AC 48 41 03 B1 00 00 00 0C 14 81 60 87 02 04 6D A1 15 E9 17 42 6C DF 1C 4C 14 82 73 59 02 42 EC 7E FF 1C 0F C0 01 01 0C BD 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/REL-Relay-Padpuls2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11216301 6 | REL 7 | 65 8 | 9 | Gas 10 | 177 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (1e-2 m^3) 19 | 2876081 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 1900-01-00T00:00:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2014-12-31 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (1e-2 m^3) 40 | 2597382 41 | 42 | 43 | 44 | Instantaneous value 45 | 1 46 | Time Point (date) 47 | 2015-12-31 48 | 49 | 50 | 51 | Manufacturer specific 52 | C0 01 01 0C 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /DataExamples/test-frames/SBC_Saia-Burgess-ALE3.hex: -------------------------------------------------------------------------------- 1 | 68 92 92 68 08 28 72 55 00 00 19 43 4C 16 02 BF 00 00 00 8C 10 04 93 02 00 00 8C 11 04 93 02 00 00 8C 20 04 06 00 00 00 8C 21 04 06 00 00 00 02 FD C9 FF 01 DF 00 02 FD DB FF 01 00 00 02 AC FF 01 00 00 82 40 AC FF 01 00 00 02 FD C9 FF 02 00 00 02 FD DB FF 02 00 00 02 AC FF 02 00 00 82 40 AC FF 02 00 00 02 FD C9 FF 03 00 00 02 FD DB FF 03 00 00 02 AC FF 03 00 00 82 40 AC FF 03 00 00 02 FF 68 00 00 02 AC FF 00 00 00 82 40 AC FF 00 00 00 01 FF 14 00 0A 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/SEN_Pollustat.hex: -------------------------------------------------------------------------------- 1 | 68 71 71 68 08 04 72 88 17 01 00 AE 4C 06 0D 3E 00 00 00 04 6D 3B 0E E7 14 34 6D 00 00 01 01 34 FD 17 00 00 00 04 04 20 92 22 F1 00 04 24 A4 1A E7 00 04 86 3B 97 9B 00 00 04 13 BE 09 5E 00 05 2E B1 D1 2E BE 05 3E F5 B8 4E 40 05 5B B8 2D F9 41 05 5F 78 8B F9 41 05 63 00 80 3B BD 04 BE 50 71 BB B0 00 04 BE 58 F4 02 00 00 0C 78 88 17 01 00 02 7F 10 B5 5D 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/SEN_Sensus-PolluStat-E.hex: -------------------------------------------------------------------------------- 1 | 68 42 42 68 08 00 72 95 50 26 21 AE 4C 0E 04 B5 10 00 00 0C 06 00 00 00 00 0C 13 00 00 00 00 0C 3B 00 00 00 00 0C 2B 00 00 00 00 02 5A C9 00 02 5E CA 00 03 60 00 00 00 0C 78 95 50 26 21 0C FD 10 95 50 26 21 1F EC 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/SEN_Sensus-PolluStat-E.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21265095 6 | SEN 7 | 14 8 | Sensus PolluStat E 9 | Heat: Outlet 10 | 181 11 | 10 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (m m^3) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume flow (m m^3/h) 33 | 0 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Power (W) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 201 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 202 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Temperature Difference (m deg C) 61 | 0 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Fabrication number 68 | 21265095 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Customer location 75 | 21265095 76 | 77 | 78 | 79 | More records follow 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/SEN_Sensus-PolluTherm.hex: -------------------------------------------------------------------------------- 1 | 68 41 41 68 08 00 72 89 16 35 24 AE 4C 0B 04 54 10 00 00 0C 07 00 00 00 00 0C 14 00 00 00 00 0C 3C 00 00 00 00 0C 2C 00 00 00 00 32 5A 00 00 32 5E 00 00 33 60 00 00 00 0C 78 89 16 35 24 0C FD 10 89 16 35 24 CE 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/SEN_Sensus-PolluTherm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24351689 6 | SEN 7 | 11 8 | Sensus PolluTherm 9 | Heat: Outlet 10 | 84 11 | 10 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (10 kWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-2 m^3) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume flow (1e-2 m^3/h) 33 | 0 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Power (10 W) 40 | 0 41 | 42 | 43 | 44 | Value during error state 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 0 48 | 49 | 50 | 51 | Value during error state 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 0 55 | 56 | 57 | 58 | Value during error state 59 | 0 60 | Temperature Difference (m deg C) 61 | 0 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Fabrication number 68 | 24351689 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Customer location 75 | 24351689 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /DataExamples/test-frames/SLB_CF-Compact-Integral-MK-MaXX.hex: -------------------------------------------------------------------------------- 1 | 68 5C 5C 68 08 04 72 14 73 81 11 82 4D 06 04 03 00 00 00 0C 78 14 73 81 11 0C 06 00 00 00 00 0C 14 02 00 00 00 0A 3B 00 00 0B 5A 18 02 00 0B 5E 20 02 00 0B 61 18 00 F0 32 26 00 00 02 27 98 04 04 6D 02 0E CD 13 84 40 14 7B 00 00 00 84 80 40 14 41 01 00 00 09 FD 0E 03 09 FD 0F 18 0F 00 16 DB 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/THI_cma10.hex: -------------------------------------------------------------------------------- 1 | 68 52 52 68 08 E6 72 02 00 00 00 96 15 15 00 0D 00 00 00 01 FD 1B 02 02 FC 03 48 52 25 74 34 12 22 FC 03 48 52 25 74 C6 0E 12 FC 03 48 52 25 74 02 14 02 65 D6 08 22 65 CA 08 12 65 16 09 01 72 00 72 65 00 00 B2 01 65 00 00 0C 78 02 00 00 00 02 FD 0F 04 03 1F 96 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/THI_cma10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 2 6 | ELV 7 | 21 8 | Elvaco CMa10 9 | Other 10 | 13 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Digital input (binary) 19 | 2 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | 1e-2 %RH 26 | 4660 27 | 28 | 29 | 30 | Minimum value 31 | 0 32 | 1e-2 %RH 33 | 3782 34 | 35 | 36 | 37 | Maximum value 38 | 0 39 | 1e-2 %RH 40 | 5122 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | External temperature (1e-2 deg C) 47 | 2262 48 | 49 | 50 | 51 | Minimum value 52 | 0 53 | External temperature (1e-2 deg C) 54 | 2250 55 | 56 | 57 | 58 | Maximum value 59 | 0 60 | External temperature (1e-2 deg C) 61 | 2326 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Averaging Duration (hours) 68 | 0 69 | 70 | 71 | 72 | Value during error state 73 | 1 74 | External temperature (1e-2 deg C) 75 | 0 76 | 77 | 78 | 79 | Value during error state 80 | 2 81 | 0 82 | 0 83 | External temperature (1e-2 deg C) 84 | 0 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Fabrication number 91 | 2 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | Software version 98 | 772 99 | 100 | 101 | 102 | More records follow 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ZRM_Minol-Minocal-C2.hex: -------------------------------------------------------------------------------- 1 | 68 EF EF 68 08 02 72 84 50 42 31 4D 6A 81 04 73 27 00 00 04 06 03 00 00 00 02 FD 17 00 00 84 04 6D 00 00 E1 11 84 04 06 03 00 00 00 84 05 06 03 00 00 00 04 13 4A 00 00 00 04 3B 00 00 00 00 54 3B 2B 00 00 00 54 6D 1E 08 61 19 04 2D 00 00 00 00 94 01 2D 14 00 00 00 94 01 6D 1E 08 61 19 02 59 17 08 02 5D F6 07 04 6D 2D 0C CD 13 82 80 01 6C C1 13 84 80 01 06 03 00 00 00 C2 80 01 6C C1 12 C4 80 01 06 03 00 00 00 82 81 01 6C C1 11 84 81 01 06 03 00 00 00 C2 81 01 6C A1 1C C4 81 01 06 03 00 00 00 82 82 01 6C A1 1B 84 82 01 06 03 00 00 00 C2 82 01 6C A1 1A C4 82 01 06 03 00 00 00 82 83 01 6C A1 19 84 83 01 06 03 00 00 00 C2 83 01 6C A1 18 C4 83 01 06 03 00 00 00 92 80 01 6C C1 13 94 80 01 3B 00 00 00 00 94 80 01 2D 00 00 00 00 8F 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/abb_delta.hex: -------------------------------------------------------------------------------- 1 | 68 98 98 68 08 01 72 12 34 56 78 42 04 02 02 45 00 00 00 0E 84 00 00 00 00 00 00 00 8E 10 84 00 00 00 00 00 00 00 8E 20 84 00 00 00 00 00 00 00 8E B0 00 84 00 00 00 00 00 00 00 8E 80 10 84 00 00 00 00 00 00 00 8E 80 40 84 00 00 00 00 00 00 00 8E 90 40 84 00 00 00 00 00 00 00 8E A0 40 84 00 00 00 00 00 00 00 8E B0 40 84 00 00 00 00 00 00 00 8E 80 50 84 00 00 00 00 00 00 00 01 FF 93 00 00 0C FF 92 00 00 00 00 01 07 FD 97 00 00 00 00 00 00 00 00 00 01 FF 98 00 00 1F 75 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/abb_f95.hex: -------------------------------------------------------------------------------- 1 | 68 5E 5E 68 08 00 72 90 85 71 26 24 23 28 04 73 50 00 00 0C 05 00 00 00 00 0C 12 42 07 00 00 3C 2A DD B4 EB DD 3B 3A DD B4 EB 0A 5A 04 02 0A 5E 04 02 0A 62 00 00 04 6D 22 10 8D 11 4C 05 00 00 00 00 44 6D 3B 17 7E 14 44 ED 7E 3B 17 9E 14 8C 01 05 00 00 00 00 84 01 6D 3B 17 7F 1C 0B 26 53 65 08 04 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/abb_f95.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26718590 6 | HYD 7 | 40 8 | ABB F95 Typ US770 9 | Heat: Outlet 10 | 115 11 | 50 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (100 Wh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-4 m^3) 26 | 742 27 | 28 | 29 | 30 | Value during error state 31 | 0 32 | Power (1e-1 W) 33 | 144521543 34 | 35 | 36 | 37 | Value during error state 38 | 0 39 | Volume flow (1e-4 m^3/h) 40 | 1521543 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 204 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 204 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Temperature Difference (1e-1 deg C) 61 | 0 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Time Point (time & date) 68 | 2012-01-13T16:34:00 69 | 70 | 71 | 72 | Instantaneous value 73 | 1 74 | Energy (100 Wh) 75 | 0 76 | 77 | 78 | 79 | Instantaneous value 80 | 1 81 | Time Point (time & date) 82 | 2011-04-30T23:59:00 83 | 84 | 85 | 86 | Instantaneous value 87 | 1 88 | Time Point (time & date) 89 | 2012-04-30T23:59:00 90 | 91 | 92 | 93 | Instantaneous value 94 | 2 95 | 0 96 | 0 97 | Energy (100 Wh) 98 | 0 99 | 100 | 101 | 102 | Instantaneous value 103 | 2 104 | 0 105 | 0 106 | Time Point (time & date) 107 | 2011-12-31T23:59:00 108 | 109 | 110 | 111 | Instantaneous value 112 | 0 113 | Operating time (hours) 114 | 86553 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /DataExamples/test-frames/allmess_cf50.hex: -------------------------------------------------------------------------------- 1 | 68 3D 3D 68 08 01 72 00 51 20 02 82 4D 02 04 00 88 00 00 04 07 00 00 00 00 0C 15 03 00 00 00 0B 2E 00 00 00 0B 3B 00 00 00 0A 5A 88 12 0A 5E 16 05 0B 61 23 77 00 02 6C 8C 11 02 27 37 0D 0F 60 00 67 16 2 | 3 | -------------------------------------------------------------------------------- /DataExamples/test-frames/allmess_cf50.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 2205100 6 | SLB 7 | 2 8 | Allmess Megacontrol CF-50 9 | Heat: Outlet 10 | 0 11 | 88 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (10 kWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-1 m^3) 26 | 3 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Power (kW) 33 | 0 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Volume flow (m m^3/h) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 1288 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 516 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Temperature Difference (1e-2 deg C) 61 | 7723 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Time Point (date) 68 | 2012-01-12 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Operating time (days) 75 | 3383 76 | 77 | 78 | 79 | Manufacturer specific 80 | 60 00 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/berg_dz_plus.hex: -------------------------------------------------------------------------------- 1 | 68 A3 A3 68 08 00 72 00 00 00 00 42 04 02 02 00 00 00 00 0E 04 00 00 00 00 00 00 8E 10 04 00 00 00 00 00 00 8E 20 04 00 00 00 00 00 00 8E B0 00 04 00 00 00 00 00 00 8E 80 10 04 00 00 00 00 00 00 8E 80 40 04 00 00 00 00 00 00 8E 90 40 04 00 00 00 00 00 00 8E A0 40 04 00 00 00 00 00 00 8E B0 40 04 00 00 00 00 00 00 8E 80 50 04 00 00 00 00 00 00 01 FF 13 00 0B FF 12 00 00 00 0A FF 68 00 00 0A FF 69 00 00 07 FD 17 00 00 00 00 00 00 00 00 01 FF 18 00 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FC 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/electricity-meter-1.hex: -------------------------------------------------------------------------------- 1 | 68 92 92 68 08 01 72 3E 02 00 05 43 4C 12 02 13 00 00 00 8C 10 04 52 12 00 00 8C 11 04 52 12 00 00 8C 20 04 33 44 77 01 8C 21 04 33 44 77 01 02 FD C9 FF 01 ED 00 02 FD DB FF 01 20 00 02 AC FF 01 4F 00 82 40 AC FF 01 EE FF 02 FD C9 FF 02 E7 00 02 FD DB FF 02 23 00 02 AC FF 02 51 00 82 40 AC FF 02 F1 FF 02 FD C9 FF 03 E4 00 02 FD DB FF 03 45 00 02 AC FF 03 A0 00 82 40 AC FF 03 E0 FF 02 FF 68 00 00 02 AC FF 00 40 01 82 40 AC FF 00 BF FF 01 FF 13 04 D9 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/electricity-meter-2.hex: -------------------------------------------------------------------------------- 1 | 68 92 92 68 08 02 72 E5 02 00 05 00 00 12 02 25 00 00 00 8C 10 04 54 02 00 00 8C 11 04 54 02 00 00 8C 20 04 28 41 44 00 8C 21 04 28 41 44 00 02 FD C9 FF 01 E9 00 02 FD DB FF 01 01 00 02 AC FF 01 00 00 82 40 AC FF 01 00 00 02 FD C9 FF 02 EA 00 02 FD DB FF 02 00 00 02 AC FF 02 00 00 82 40 AC FF 02 00 00 02 FD C9 FF 03 EB 00 02 FD DB FF 03 01 00 02 AC FF 03 00 00 82 40 AC FF 03 00 00 02 FF 68 00 00 02 AC FF 00 00 00 82 40 AC FF 00 00 00 01 FF 13 04 E9 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/els_falcon.hex: -------------------------------------------------------------------------------- 1 | 68 4A 4A 68 08 01 72 45 23 11 70 93 15 0A 07 02 00 00 00 0C 13 67 45 23 01 04 6D 3A 0D E6 02 42 6C E1 01 4C 13 51 69 45 00 42 EC 7E 01 11 12 3B 39 17 42 6C 01 11 02 3B F9 17 0F 0E 42 20 01 01 01 00 05 08 5E 01 20 3D 12 08 3D 12 08 00 C0 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/els_falcon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 70112345 6 | ELS 7 | 10 8 | Elster Falcon 9 | Water 10 | 2 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 1234567 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2007-02-06T13:58:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2007-01-01 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (m m^3) 40 | 456951 41 | 42 | 43 | 44 | Instantaneous value 45 | 1 46 | Time Point (date) 47 | 2008-01-01 48 | 49 | 50 | 51 | Maximum value 52 | 0 53 | Volume flow (m m^3/h) 54 | 5945 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | Time Point (date) 61 | 2008-01-01 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Volume flow (m m^3/h) 68 | 6137 69 | 70 | 71 | 72 | Manufacturer specific 73 | 0E 42 20 01 01 01 00 05 08 5E 01 20 3D 12 08 3D 12 08 00 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /DataExamples/test-frames/els_tmpa_telegramm1.hex: -------------------------------------------------------------------------------- 1 | 68 2C 2C 68 08 01 72 45 23 11 70 93 15 02 07 02 00 00 00 0C 13 67 45 23 01 04 6D 3A 0D E6 02 42 6C E1 01 4C 13 51 69 45 00 42 EC 7E 01 11 0F 00 61 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/els_tmpa_telegramm1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 70112345 6 | ELS 7 | 2 8 | Elster TMP-A 9 | Water 10 | 2 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 1234567 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2007-02-06T13:58:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2007-01-01 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (m m^3) 40 | 456951 41 | 42 | 43 | 44 | Instantaneous value 45 | 1 46 | Time Point (date) 47 | 2008-01-01 48 | 49 | 50 | 51 | Manufacturer specific 52 | 00 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /DataExamples/test-frames/elv_temp_humid.hex: -------------------------------------------------------------------------------- 1 | 68 53 53 68 08 05 72 34 08 00 54 96 15 32 00 F2 00 00 00 01 FD 1B 00 02 FC 03 48 52 25 74 D4 11 22 FC 03 48 52 25 74 C8 11 12 FC 03 48 52 25 74 B4 16 02 65 D0 08 22 65 70 08 12 65 23 09 01 72 18 42 65 E4 08 82 01 65 DD 08 0C 78 34 08 00 54 03 FD 0F 00 00 04 1F 5D 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/elv_temp_humid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 54000834 6 | ELV 7 | 50 8 | Elvaco CMa11 9 | Other 10 | 242 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Digital input (binary) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | 1e-2 %RH 26 | 4564 27 | 28 | 29 | 30 | Minimum value 31 | 0 32 | 1e-2 %RH 33 | 4552 34 | 35 | 36 | 37 | Maximum value 38 | 0 39 | 1e-2 %RH 40 | 5812 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | External temperature (1e-2 deg C) 47 | 2256 48 | 49 | 50 | 51 | Minimum value 52 | 0 53 | External temperature (1e-2 deg C) 54 | 2160 55 | 56 | 57 | 58 | Maximum value 59 | 0 60 | External temperature (1e-2 deg C) 61 | 2339 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Averaging Duration (hours) 68 | 24 69 | 70 | 71 | 72 | Instantaneous value 73 | 1 74 | External temperature (1e-2 deg C) 75 | 2276 76 | 77 | 78 | 79 | Instantaneous value 80 | 2 81 | 0 82 | 0 83 | External temperature (1e-2 deg C) 84 | 2269 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Fabrication number 91 | 54000834 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | Software version 98 | 262144 99 | 100 | 101 | 102 | More records follow 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /DataExamples/test-frames/emh_diz.hex: -------------------------------------------------------------------------------- 1 | 68 21 21 68 08 01 72 02 37 62 00 A8 15 00 02 07 00 00 00 8C 10 04 09 04 00 00 C4 00 2A 00 00 00 00 01 FD 17 00 8C 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/emh_diz.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 623702 6 | EMH 7 | 0 8 | EMH DIZ 9 | Electricity 10 | 7 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | 1 19 | 0 20 | Energy (10 Wh) 21 | 409 22 | 23 | 24 | 25 | Instantaneous value 26 | 1 27 | 0 28 | 0 29 | Power (1e-1 W) 30 | 0 31 | 32 | 33 | 34 | Instantaneous value 35 | 0 36 | Error flags 37 | 0 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /DataExamples/test-frames/engelmann_sensostar2c.hex: -------------------------------------------------------------------------------- 1 | 68 A6 A6 68 08 03 72 10 00 38 10 C5 14 01 04 1E 00 00 00 04 78 EA 62 9E 00 04 6D 32 14 86 16 04 15 81 00 00 00 04 FB 00 08 00 00 00 84 20 FB 00 00 00 00 00 84 30 FB 00 00 00 00 00 04 3D 00 00 00 00 04 2D 00 00 00 00 02 5B 5F 00 02 5F 2B 00 04 61 8A 14 00 00 02 27 FA 01 01 FD 17 00 04 90 28 A0 86 01 00 42 6C 7F 1C 44 15 81 00 00 00 44 FB 00 08 00 00 00 C4 20 FB 00 00 00 00 00 C4 30 FB 00 00 00 00 00 82 01 6C 5F 1C 84 01 15 54 00 00 00 84 01 FB 00 05 00 00 00 84 21 FB 00 00 00 00 00 84 31 FB 00 00 00 00 00 B7 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/example_data_01.hex: -------------------------------------------------------------------------------- 1 | 68 31 31 68 08 01 72 45 58 57 03 B4 05 34 04 9E 00 27 B6 03 06 F9 34 15 03 15 C6 00 4D 05 2E 00 00 00 00 05 3D 00 00 00 00 05 5B 22 F3 26 42 05 5F C7 DA 0D 42 FA 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/example_data_01.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3575845 6 | AMT 7 | 52 8 | 9 | Heat: Outlet 10 | 158 11 | 00 12 | B627 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 1389817 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-1 m^3) 26 | 5046470 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Power (kW) 33 | 0.000000 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Volume flow (1e-1 m^3/h) 40 | 0.000000 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (deg C) 47 | 41.737434 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (deg C) 54 | 35.463650 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /DataExamples/test-frames/example_data_02.hex: -------------------------------------------------------------------------------- 1 | 68 31 31 68 08 01 72 45 58 57 03 B4 05 34 04 A1 00 27 B6 03 06 F9 34 15 03 15 C6 00 4D 05 2E 00 00 00 00 05 3D 00 00 00 00 05 5B 1E D8 24 42 05 5F D9 8A 0D 42 9E 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/example_data_02.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 3575845 6 | AMT 7 | 52 8 | 9 | Heat: Outlet 10 | 161 11 | 00 12 | B627 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 1389817 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-1 m^3) 26 | 5046470 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Power (kW) 33 | 0.000000 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Volume flow (1e-1 m^3/h) 40 | 0.000000 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (deg C) 47 | 41.211052 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (deg C) 54 | 35.385593 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /DataExamples/test-frames/filler.hex: -------------------------------------------------------------------------------- 1 | 68 1F 1F 68 08 00 72 31 77 67 17 2D 2C 01 02 00 00 00 00 2F 2F 04 83 3B 88 13 00 00 2F 2F 2F 2F 2F 2F 2F 00 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/filler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17677731 6 | KAM 7 | 1 8 | Kamstrup 382 (6850-005) 9 | Electricity 10 | 0 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (Wh) 19 | 5000 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DataExamples/test-frames/frame1.hex: -------------------------------------------------------------------------------- 1 | 68 54 54 68 08 00 72 58 09 06 10 65 32 16 0E 7B 00 00 00 0F 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 E6 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/frame1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10060958 6 | LSE 7 | 22 8 | 9 | Bus/System 10 | 123 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Manufacturer specific 17 | 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 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DataExamples/test-frames/frame2.hex: -------------------------------------------------------------------------------- 1 | 68 1F 1F 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 37 18 02 18 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/frame2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | PAD 7 | 1 8 | 9 | Water 10 | 85 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 12565 20 | 21 | 22 | 23 | Maximum value 24 | 5 25 | 0 26 | 0 27 | Volume flow (m m^3/h) 28 | 113 29 | 30 | 31 | 32 | Instantaneous value 33 | 0 34 | 2 35 | 1 36 | Energy (10 Wh) 37 | 21837 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /DataExamples/test-frames/gmc_emmod206.hex: -------------------------------------------------------------------------------- 1 | 68 91 91 68 08 03 72 78 56 34 12 A3 1D E6 02 02 00 00 00 82 40 FD 48 60 03 82 80 40 FD 48 BF 03 82 C0 40 FD 48 20 04 82 40 FD 59 BD 03 82 80 40 FD 59 1F 04 82 C0 40 FD 59 7E 04 82 40 2B E0 00 82 40 2B 36 FF 84 10 04 94 28 00 00 84 20 04 98 3A 00 00 84 50 04 BF 4E 00 00 84 60 04 A8 61 00 00 84 90 40 04 8B 75 00 00 84 A0 40 04 B8 88 00 00 84 D0 40 04 2D 9D 00 00 84 E0 40 04 C8 AF 00 00 82 41 2B E0 00 82 42 2B 00 00 82 43 2B 00 00 82 44 2B CA 00 42 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/invalid_length.hex: -------------------------------------------------------------------------------- 1 | 68 00 00 68 08 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/invalid_length2.hex: -------------------------------------------------------------------------------- 1 | 68 12 12 68 08 01 73 93 92 91 90 10 00 05 69 31 65 00 00 69 00 00 3F 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_bm_+m.hex: -------------------------------------------------------------------------------- 1 | 68 3C 3C 68 08 08 72 78 03 49 11 77 04 0E 16 29 00 00 00 0C 78 78 03 49 11 04 13 31 D4 00 00 42 6C 00 00 44 13 00 00 00 00 04 6D 1D 0D 98 11 02 27 00 00 09 FD 0E 02 09 FD 0F 06 0F 00 00 8F 13 E8 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_bm_+m.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11490378 6 | ACW 7 | 14 8 | Itron BM +m 9 | Cold water 10 | 41 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 11490378 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (m m^3) 26 | 54321 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2000-00-00 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Volume (m m^3) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Time Point (time & date) 47 | 2012-01-24T13:29:00 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Operating time (days) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Firmware version 61 | 2 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Software version 68 | 6 69 | 70 | 71 | 72 | Manufacturer specific 73 | 00 00 8F 13 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cf_51.hex: -------------------------------------------------------------------------------- 1 | 68 64 64 68 08 06 72 85 51 15 11 77 04 0A 0D 1B 10 00 00 0C 78 85 51 15 11 04 06 00 00 00 00 0C 14 00 00 00 00 3B 2D 99 99 99 0B 3B 00 00 00 3A 5A 99 99 3A 5E 99 99 3B 61 99 99 99 04 6D 18 0D 98 11 02 27 68 00 09 FD 0E 11 09 FD 0F 26 8C C0 00 16 21 03 00 00 8C 80 40 14 23 01 00 00 04 86 3C 00 00 00 00 0F 03 20 85 16 2 | 3 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cf_55.hex: -------------------------------------------------------------------------------- 1 | 68 4D 4D 68 08 07 72 67 76 12 11 77 04 0B 0C 0B 10 00 00 0C 78 67 76 12 11 04 07 00 00 00 00 0C 16 00 00 00 00 3B 2D 99 99 99 0B 3B 00 00 00 3A 5A 99 99 3A 5E 99 99 3B 61 99 99 99 04 6D 2F 0B 98 11 02 27 FC 00 09 FD 0E 10 09 FD 0F 21 0F 03 20 54 16 2 | 3 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cf_55.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11127667 6 | ACW 7 | 11 8 | Itron CF 55 9 | Heat: Inlet 10 | 11 11 | 10 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 11127667 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Energy (10 kWh) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume ( m^3) 33 | 0 34 | 35 | 36 | 37 | Value during error state 38 | 0 39 | Power (100 W) 40 | 999999 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume flow (m m^3/h) 47 | 0 48 | 49 | 50 | 51 | Value during error state 52 | 0 53 | Flow temperature (1e-1 deg C) 54 | 9999 55 | 56 | 57 | 58 | Value during error state 59 | 0 60 | Return temperature (1e-1 deg C) 61 | 9999 62 | 63 | 64 | 65 | Value during error state 66 | 0 67 | Temperature Difference (1e-2 deg C) 68 | 999999 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Time Point (time & date) 75 | 2012-01-24T11:47:00 76 | 77 | 78 | 79 | Instantaneous value 80 | 0 81 | Operating time (days) 82 | 252 83 | 84 | 85 | 86 | Instantaneous value 87 | 0 88 | Firmware version 89 | 10 90 | 91 | 92 | 93 | Instantaneous value 94 | 0 95 | Software version 96 | 21 97 | 98 | 99 | 100 | Manufacturer specific 101 | 03 20 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cf_echo_2.hex: -------------------------------------------------------------------------------- 1 | 68 4D 4D 68 08 09 72 91 00 10 11 77 04 09 04 51 10 00 00 0C 78 91 00 10 11 04 06 00 00 00 00 0C 14 00 00 00 00 3B 2D 99 99 99 3B 3B 99 99 99 0A 5A 05 02 0A 5E 06 02 0B 61 09 00 00 04 6D 1D 0D 98 11 02 27 81 01 09 FD 0E 19 09 FD 0F 45 0F 20 00 E7 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cf_echo_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11100091 6 | ACW 7 | 9 8 | Itron CF Echo 2 9 | Heat: Outlet 10 | 81 11 | 10 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 11100091 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Energy (kWh) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume (1e-2 m^3) 33 | 0 34 | 35 | 36 | 37 | Value during error state 38 | 0 39 | Power (100 W) 40 | 999999 41 | 42 | 43 | 44 | Value during error state 45 | 0 46 | Volume flow (m m^3/h) 47 | 999999 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Flow temperature (1e-1 deg C) 54 | 205 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Return temperature (1e-1 deg C) 61 | 206 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Temperature Difference (1e-2 deg C) 68 | 9 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Time Point (time & date) 75 | 2012-01-24T13:29:00 76 | 77 | 78 | 79 | Instantaneous value 80 | 0 81 | Operating time (days) 82 | 385 83 | 84 | 85 | 86 | Instantaneous value 87 | 0 88 | Firmware version 89 | 19 90 | 91 | 92 | 93 | Instantaneous value 94 | 0 95 | Software version 96 | 45 97 | 98 | 99 | 100 | Manufacturer specific 101 | 20 00 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_cold_water.hex: -------------------------------------------------------------------------------- 1 | 68 56 56 68 08 08 72 80 03 02 10 77 04 14 16 A1 00 00 00 0C 78 80 03 02 10 0D 7C 08 44 49 20 2E 74 73 75 63 0A 20 20 20 20 20 20 20 20 20 20 04 6D 27 0F 79 1A 02 7C 09 65 6D 69 74 20 2E 74 61 62 D2 0F 04 15 B7 11 00 00 04 95 7F 00 00 00 00 44 15 B7 11 00 00 0F 00 04 1F 0D 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_cold_water.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10020380 6 | ACW 7 | 20 8 | Itron CYBLE M-Bus 1.4 9 | Cold water 10 | 161 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 10020380 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | cust. ID 26 | 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2011-10-25T15:39:00 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | bat. time 40 | 4050 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume (1e-1 m^3) 47 | 4535 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Volume (1e-1 m^3) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | Volume (1e-1 m^3) 61 | 4535 62 | 63 | 64 | 65 | Manufacturer specific 66 | 00 04 1F 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_gas.hex: -------------------------------------------------------------------------------- 1 | 68 56 56 68 08 04 72 87 03 02 10 77 04 14 03 9A 00 00 00 0C 78 87 03 02 10 0D 7C 08 44 49 20 2E 74 73 75 63 0A 20 20 20 20 20 20 20 20 20 20 04 6D 2B 0F 79 1A 02 7C 09 65 6D 69 74 20 2E 74 61 62 D2 0F 04 14 1A 00 00 00 04 94 7F 00 00 00 00 44 14 19 00 00 00 0F 00 02 1F 9F 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_gas.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10020387 6 | ACW 7 | 20 8 | Itron CYBLE M-Bus 1.4 9 | Gas 10 | 154 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 10020387 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | cust. ID 26 | 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2011-10-25T15:43:00 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | bat. time 40 | 4050 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume (1e-2 m^3) 47 | 26 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Volume (1e-2 m^3) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | Volume (1e-2 m^3) 61 | 25 62 | 63 | 64 | 65 | Manufacturer specific 66 | 00 02 1F 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_water.hex: -------------------------------------------------------------------------------- 1 | 68 56 56 68 08 01 72 71 00 00 12 77 04 14 07 0A 30 00 00 0C 78 71 00 00 12 0D 7C 08 44 49 20 2E 74 73 75 63 0A 45 4C 42 59 43 20 54 53 45 54 04 6D 2B 0D 98 11 02 7C 09 65 6D 69 74 20 2E 74 61 62 F2 10 04 14 3D 30 00 00 04 94 7F 14 00 00 00 44 14 00 00 00 00 0F 10 01 1F 2F 16 2 | 3 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_cyble_m-bus_v1.4_water.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12000071 6 | ACW 7 | 20 8 | Itron CYBLE M-Bus 1.4 9 | Water 10 | 10 11 | 30 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 12000071 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | cust. ID 26 | TEST CYBLE 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2012-01-24T13:43:00 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | bat. time 40 | 4338 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume (1e-2 m^3) 47 | 12349 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Volume (1e-2 m^3) 54 | 20 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | Volume (1e-2 m^3) 61 | 0 62 | 63 | 64 | 65 | Manufacturer specific 66 | 10 01 1F 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /DataExamples/test-frames/itron_integral_mk_maxx.hex: -------------------------------------------------------------------------------- 1 | 68 5C 5C 68 08 04 72 14 73 81 11 82 4D 06 04 5D 00 00 00 0C 78 14 73 81 11 0C 06 00 00 00 00 0C 14 02 00 00 00 0A 3B 00 00 0B 5A 12 02 00 0B 5E 11 02 00 0B 61 07 00 00 32 26 00 00 02 27 8D 01 04 6D 11 0E 98 11 84 40 14 7B 00 00 00 84 80 40 14 41 01 00 00 09 FD 0E 03 09 FD 0F 18 0F 00 16 E9 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/kamstrup_382_005.hex: -------------------------------------------------------------------------------- 1 | 68 46 46 68 08 78 72 20 91 83 14 2D 2C 01 02 04 00 00 00 04 06 00 00 00 00 04 22 09 00 00 00 04 2B 00 00 00 00 14 2B 00 00 00 00 84 50 06 00 00 00 00 84 60 06 00 00 00 00 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 24 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/kamstrup_382_005.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14839120 6 | KAM 7 | 1 8 | Kamstrup 382 (6850-005) 9 | Electricity 10 | 4 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | On time (hours) 26 | 9 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Power (W) 33 | 0 34 | 35 | 36 | 37 | Maximum value 38 | 0 39 | Power (W) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | 1 47 | 1 48 | Energy (kWh) 49 | 0 50 | 51 | 52 | 53 | Instantaneous value 54 | 0 55 | 2 56 | 1 57 | Energy (kWh) 58 | 0 59 | 60 | 61 | 62 | Manufacturer specific 63 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /DataExamples/test-frames/kamstrup_multical_601.hex: -------------------------------------------------------------------------------- 1 | 68 F7 F7 68 08 11 72 17 58 85 06 2D 2C 08 04 04 00 00 00 0C 78 17 58 85 06 04 06 E7 91 00 00 04 14 2C DB 00 00 04 22 D9 03 00 00 04 59 B9 27 00 00 04 5D 08 12 00 00 04 61 B1 15 00 00 04 2D 5B 01 00 00 14 2D C0 01 00 00 04 3B 1F 02 00 00 14 3B 74 02 00 00 84 10 06 00 00 00 00 84 20 06 00 00 00 00 84 40 14 00 00 00 00 84 80 40 14 00 00 00 00 84 C0 40 06 00 00 00 00 04 6D 1A 2F 65 11 44 06 51 82 00 00 44 14 B2 C3 00 00 54 2D 26 02 00 00 54 3B 03 04 00 00 C4 10 06 00 00 00 00 C4 20 06 00 00 00 00 C4 40 14 00 00 00 00 C4 80 40 14 00 00 00 00 C4 C0 40 06 00 00 00 00 42 6C 5F 1C 0F 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 98 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/landis+gyr_ultraheat_t230.hex: -------------------------------------------------------------------------------- 1 | 68 E2 E2 68 08 00 72 05 02 66 66 A7 32 07 04 01 10 00 00 09 74 04 09 70 08 0C 06 00 00 00 00 0C 14 00 00 00 00 0B 2D 00 00 00 0B 3B 00 00 00 0B 5A 95 01 00 0B 5E 97 01 00 0B 62 02 00 F0 0C 78 05 02 66 66 89 10 71 07 3C 22 69 37 00 00 0C 22 69 37 00 00 0C 26 00 00 00 00 8C 90 10 06 00 00 00 00 9B 10 2D 00 00 00 9B 10 3B 00 00 00 9B 10 5A 07 03 00 9B 10 5E 07 05 00 94 10 AD 6F 00 00 00 00 94 10 BB 6F 00 00 00 00 94 10 DA 6F 32 14 7A 18 94 10 DE 6F 2B 0B 69 18 4C 06 00 00 00 00 4C 14 00 00 00 00 7C 22 69 34 00 00 4C 26 00 00 00 00 CC 90 10 06 00 00 00 00 DB 10 2D 00 00 00 DB 10 3B 00 00 00 DB 10 5A 07 03 00 DB 10 5E 07 05 00 84 8F 0F 6D 00 00 E1 F1 04 6D 04 0C 8D 11 0F 09 07 00 66 01 7D 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame2.hex: -------------------------------------------------------------------------------- 1 | 68 13 13 68 08 05 73 78 56 34 12 0A 00 E9 7E 01 00 00 00 35 01 00 00 3C 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | Water 7 | 10 8 | 00 9 | 10 | 11 | 12 | Actual value 13 | l 14 | 1 15 | 16 | 17 | 18 | Actual value 19 | reserved but historic 20 | 135 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame3.hex: -------------------------------------------------------------------------------- 1 | 68 1F 1F 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 37 18 02 18 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | PAD 7 | 1 8 | 9 | Water 10 | 85 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 12565 20 | 21 | 22 | 23 | Maximum value 24 | 5 25 | 0 26 | 0 27 | Volume flow (m m^3/h) 28 | 113 29 | 30 | 31 | 32 | Instantaneous value 33 | 0 34 | 2 35 | 1 36 | Energy (10 Wh) 37 | 21837 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame7.hex: -------------------------------------------------------------------------------- 1 | 68 15 15 68 08 02 72 78 56 34 12 24 40 01 07 13 00 00 00 0C 78 04 03 02 01 9D 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/manual_frame7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | PAD 7 | 1 8 | 9 | Water 10 | 19 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Fabrication number 19 | 1020304 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DataExamples/test-frames/metrona_pollutherm.hex: -------------------------------------------------------------------------------- 1 | 68 42 42 68 08 00 72 46 01 95 44 18 4E 34 04 54 10 00 00 0C 07 00 00 00 00 0C 14 00 00 00 00 0C 3C 00 00 00 00 0C 2C 00 00 00 00 0A 5A 00 00 0A 5E 00 00 0B 60 00 00 00 0C 78 46 01 95 44 0C FD 10 46 01 95 44 1F 82 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/metrona_pollutherm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 44950146 6 | SPX 7 | 52 8 | Sensus PolluTherm 9 | Heat: Outlet 10 | 84 11 | 10 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (10 kWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-2 m^3) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Volume flow (1e-2 m^3/h) 33 | 0 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Power (10 W) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 0 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 0 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Temperature Difference (m deg C) 61 | 0 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Fabrication number 68 | 44950146 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Customer location 75 | 44950146 76 | 77 | 78 | 79 | More records follow 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/metrona_ultraheat_xs.hex: -------------------------------------------------------------------------------- 1 | 68 F8 F8 68 08 64 72 54 00 81 01 A7 32 02 04 0F 10 00 00 09 74 04 09 70 04 0C 06 69 99 01 00 0C 14 18 92 64 02 0B 2E 00 00 00 0B 3B 00 00 00 0A 5B 00 00 0A 5F 00 00 0A 62 00 00 4C 14 18 92 64 02 4C 06 69 99 01 00 0C 78 54 00 11 65 89 10 71 60 9B 10 2D 16 03 00 DB 10 2D 16 03 00 9B 10 3B 20 88 00 9A 10 5B 44 00 9A 10 5F 40 00 0C 22 67 00 07 00 3C 22 09 16 05 00 7C 22 17 78 04 00 42 6C 01 01 8C 20 06 00 00 00 00 8C 30 06 00 00 00 00 8C 80 10 06 00 00 00 00 CC 20 06 00 00 00 00 CC 30 06 00 00 00 00 CC 80 10 06 00 00 00 00 9A 11 5B 36 00 9A 11 5F 40 00 9B 11 3B 00 00 00 9B 11 2D 00 00 00 BC 01 22 65 14 05 00 8C 01 06 69 99 01 00 8C 21 06 00 00 00 00 8C 31 06 00 00 00 00 8C 81 10 06 00 00 00 00 8C 01 14 18 92 64 02 04 6D 26 00 87 16 0F 03 02 00 00 23 46 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/minol_minocal_c2.hex: -------------------------------------------------------------------------------- 1 | 68 EF EF 68 08 02 72 84 50 42 31 4D 6A 81 04 24 27 00 00 04 06 03 00 00 00 02 FD 17 00 00 84 04 6D 00 00 A1 11 84 04 06 03 00 00 00 84 05 06 00 00 00 00 04 13 49 00 00 00 04 3B 00 00 00 00 54 3B 2B 00 00 00 54 6D 1E 08 61 19 04 2D 00 00 00 00 94 01 2D 14 00 00 00 94 01 6D 1E 08 61 19 02 59 D9 07 02 5D 87 07 04 6D 35 0B 8D 11 82 80 01 6C 81 11 84 80 01 06 03 00 00 00 C2 80 01 6C 61 1C C4 80 01 06 03 00 00 00 82 81 01 6C 61 1B 84 81 01 06 03 00 00 00 C2 81 01 6C 61 1A C4 81 01 06 03 00 00 00 82 82 01 6C 61 19 84 82 01 06 00 00 00 00 C2 82 01 6C 61 18 C4 82 01 06 00 00 00 00 82 83 01 6C 61 17 84 83 01 06 00 00 00 00 C2 83 01 6C 61 16 C4 83 01 06 00 00 00 00 92 80 01 6C 81 11 94 80 01 3B 01 00 00 00 94 80 01 2D 00 00 00 00 8E 16 2 | 3 | 4 | -------------------------------------------------------------------------------- /DataExamples/test-frames/minol_minocal_wr3.hex: -------------------------------------------------------------------------------- 1 | 68 CD CD 68 08 00 72 59 27 80 31 4D 6A 82 04 2B 00 00 00 04 06 00 00 00 00 04 14 01 00 00 00 04 2D 00 00 00 00 04 3C 00 00 00 00 02 59 00 00 02 5D 00 00 84 04 06 00 00 00 00 C4 04 6D 00 00 81 11 94 01 2D 00 00 00 00 94 01 6D 1E 0B 8D 11 54 3C 01 00 00 00 54 6D 1E 07 78 13 8C 40 79 00 00 00 00 81 40 FD 09 07 84 40 13 01 00 00 00 C4 04 13 01 00 00 00 8C 80 40 79 00 00 00 00 84 80 40 13 01 00 00 00 81 80 40 FD 09 07 84 05 13 01 00 00 00 02 FD 17 04 00 04 6D 01 0C 8D 11 82 80 01 6C 81 11 84 80 01 06 00 00 00 00 84 C0 01 13 01 00 00 00 84 80 41 13 01 00 00 00 92 80 01 6C 81 11 94 80 01 3C 00 00 00 00 94 80 01 2D 00 00 00 00 AA 16 2 | 3 | -------------------------------------------------------------------------------- /DataExamples/test-frames/nzr_dhz_5_63.hex: -------------------------------------------------------------------------------- 1 | 68 32 32 68 08 05 72 08 06 10 30 52 3B 01 02 01 00 00 00 04 03 FA 04 00 00 04 83 7F FA 04 00 00 02 FD 48 44 09 02 FD 5B 00 00 02 2B 00 00 0C 78 08 06 10 30 0F 0E 71 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/nzr_dhz_5_63.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30100608 6 | NZR 7 | 1 8 | NZR DHZ 5/63 9 | Electricity 10 | 1 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (Wh) 19 | 1274 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Energy (Wh) 26 | 1274 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | 1e-1 V 33 | 2372 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | 1e-1 A 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Power (W) 47 | 0 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Fabrication number 54 | 30100608 55 | 56 | 57 | 58 | Manufacturer specific 59 | 0E 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame1.hex: -------------------------------------------------------------------------------- 1 | 68 20 20 68 08 FD 72 78 56 34 12 93 15 33 03 2A 00 00 00 0C 14 27 04 85 02 04 6D 32 37 1F 15 02 FD 17 00 00 89 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | ELS 7 | 51 8 | 9 | Gas 10 | 42 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (1e-2 m^3) 19 | 2850427 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2008-05-31T23:50:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Error flags 33 | 0 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame2.hex: -------------------------------------------------------------------------------- 1 | 68 29 29 68 08 FD 72 44 22 75 92 24 23 29 07 1F 00 00 00 0C 13 27 04 85 02 0B 3B 27 01 00 4C 13 19 54 44 01 42 6C FF 0C 02 FD 17 00 00 99 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 92752244 6 | HYD 7 | 41 8 | 9 | Water 10 | 31 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 2850427 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume flow (m m^3/h) 26 | 127 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Volume (m m^3) 33 | 1445419 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Time Point (date) 40 | 2007-12-31 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Error flags 47 | 0 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame3.hex: -------------------------------------------------------------------------------- 1 | 68 3C 3C 68 08 FD 72 78 56 34 12 24 23 2A 04 26 00 00 00 0C 06 27 04 85 02 0C 13 76 34 70 00 4C 06 19 54 44 01 42 6C FF 0C 0B 3B 27 01 00 0B 2A 97 32 00 0A 5A 43 04 0A 5E 51 02 02 FD 17 00 00 C8 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/oms_frame3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12345678 6 | HYD 7 | 42 8 | 9 | Heat: Outlet 10 | 38 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 2850427 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (m m^3) 26 | 703476 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Energy (kWh) 33 | 1445419 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Time Point (date) 40 | 2007-12-31 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume flow (m m^3/h) 47 | 127 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Power (1e-1 W) 54 | 3297 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Flow temperature (1e-1 deg C) 61 | 443 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Return temperature (1e-1 deg C) 68 | 251 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Error flags 75 | 0 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /DataExamples/test-frames/ram_modularis.hex: -------------------------------------------------------------------------------- 1 | 68 C4 C4 68 08 00 72 76 57 02 00 2D 48 03 07 8B 00 00 00 04 13 84 27 00 00 04 6D 28 15 B2 1A 42 6C BC 19 44 13 C9 20 00 00 42 EC 7E DC 19 0C 78 76 57 02 00 82 01 6C BE 19 84 01 13 4F 21 00 00 C2 01 6C 9F 1A C4 01 13 FB E0 F5 05 82 02 6C 9E 1B 84 02 13 F9 E0 F5 05 C2 02 6C 9F 1C C4 02 13 0E 03 00 00 82 03 6C BF 11 84 03 13 89 07 00 00 C2 03 6C BC 12 C4 03 13 14 0C 00 00 82 04 6C BF 13 84 04 13 35 12 00 00 C2 04 6C BE 14 C4 04 13 9F 12 00 00 82 05 6C BF 15 84 05 13 04 14 00 00 C2 05 6C BE 16 C4 05 13 38 14 00 00 82 06 6C BF 17 84 06 13 7E 14 00 00 C2 06 6C BF 18 C4 06 13 24 16 00 00 0F 01 00 00 82 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/rel_padpuls2.hex: -------------------------------------------------------------------------------- 1 | 68 2F 2F 68 08 04 72 04 00 00 00 AC 48 12 00 01 00 00 00 0C 00 00 00 00 00 04 6D 10 0D 34 09 42 6C 1F 0C 4C 00 00 00 00 00 42 EC 7E 3F 0C 0F 43 01 01 00 D0 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/rel_padpuls2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 4 6 | REL 7 | 18 8 | Relay PadPuls M4 9 | Other 10 | 1 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (mWh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2001-09-20T13:16:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2000-12-31 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Energy (mWh) 40 | 0 41 | 42 | 43 | 44 | Instantaneous value 45 | 1 46 | Time Point (date) 47 | 2001-12-31 48 | 49 | 50 | 51 | Manufacturer specific 52 | 43 01 01 00 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /DataExamples/test-frames/rel_padpuls3.hex: -------------------------------------------------------------------------------- 1 | 68 2F 2F 68 08 01 72 01 01 03 01 AC 48 40 08 1E 00 00 00 0C 6E 87 19 00 00 04 6D 29 0A 1F 0C 42 6C 1F 0C 4C 6E 02 13 00 00 42 EC 7E 3F 0C 0F C0 01 01 0C 40 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/rel_padpuls3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1030101 6 | REL 7 | 64 8 | Relay PadPuls M2 9 | Heat Cost Allocator 10 | 30 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Units for H.C.A. 19 | 1987 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2000-12-31T10:41:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Time Point (date) 33 | 2000-12-31 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Units for H.C.A. 40 | 1302 41 | 42 | 43 | 44 | Instantaneous value 45 | 1 46 | Time Point (date) 47 | 2001-12-31 48 | 49 | 50 | 51 | Manufacturer specific 52 | C0 01 01 0C 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /DataExamples/test-frames/sen_pollusonic_2.hex: -------------------------------------------------------------------------------- 1 | 68 13 13 68 08 01 73 93 92 91 90 10 00 05 69 31 65 00 00 69 00 00 00 3F 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/sen_pollusonic_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 90919293 6 | Heat 7 | 16 8 | 00 9 | 10 | 11 | 12 | Actual value 13 | kWh 14 | 6531 15 | 16 | 17 | 18 | Actual value 19 | l 20 | 69 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /DataExamples/test-frames/sen_pollutherm.hex: -------------------------------------------------------------------------------- 1 | 68 42 42 68 08 08 72 76 00 05 21 18 4E 31 04 51 00 00 00 0C 07 64 08 00 00 0C 14 92 98 79 00 0C 7B 02 03 00 00 0C 2C 58 54 00 00 0A 5A 55 07 0A 5E 94 05 0B 60 76 60 01 0C 78 76 00 05 21 0C FD 10 76 00 05 21 1F B3 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/sen_pollutherm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21050076 6 | SPX 7 | 49 8 | Sensus PolluTherm 9 | Heat: Outlet 10 | 81 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (10 kWh) 19 | 864 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-2 m^3) 26 | 799892 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Unknown (VIF=0x7B) 33 | 302 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Power (10 W) 40 | 5458 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Flow temperature (1e-1 deg C) 47 | 755 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Return temperature (1e-1 deg C) 54 | 594 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Temperature Difference (m deg C) 61 | 16076 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Fabrication number 68 | 21050076 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Customer location 75 | 21050076 76 | 77 | 78 | 79 | More records follow 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/siemens_water.hex: -------------------------------------------------------------------------------- 1 | 68 59 59 68 08 00 72 82 13 02 08 65 32 99 06 EB 00 00 00 0C 13 01 01 00 00 0B 22 52 09 02 04 6D 38 08 6E 19 32 6C 00 00 0C 78 82 13 02 08 06 FD 0C 0A 00 01 00 FA 01 0D FD 0B 05 31 32 48 46 57 01 FD 0E 00 0B 3B 00 00 00 0F 37 FD 17 00 00 00 00 00 00 00 00 02 7A 0D 00 02 78 0D 00 11 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/siemens_water.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8021382 6 | LSE 7 | 153 8 | Siemens WFH21 9 | Hot water 10 | 235 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 101 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | On time (hours) 26 | 20952 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2011-09-14T08:56:00 34 | 35 | 36 | 37 | Value during error state 38 | 0 39 | Time Point (date) 40 | 2000-00-00 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Fabrication number 47 | 8021382 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Model / Version 54 | 2173253517322 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Parameter set identification 61 | WFH21 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Firmware version 68 | 0 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Volume flow (m m^3/h) 75 | 0 76 | 77 | 78 | 79 | Manufacturer specific 80 | 37 FD 17 00 00 00 00 00 00 00 00 02 7A 0D 00 02 78 0D 00 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/siemens_wfh21.hex: -------------------------------------------------------------------------------- 1 | 68 5E 5E 68 08 05 72 91 64 00 08 65 32 99 06 DA 00 00 00 0C 13 00 00 00 00 0B 22 86 40 04 04 6D 24 0A 61 1C 32 6C 00 00 0C 78 91 64 00 08 06 FD 0C 0A 00 01 00 FA 01 0D FD 0B 05 31 32 48 46 57 01 FD 0E 00 4C 13 00 00 00 00 42 6C 5F 1C 0F 37 FD 17 00 00 00 00 00 00 00 00 02 7A 25 00 02 78 25 00 82 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/siemens_wfh21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8006491 6 | LSE 7 | 153 8 | Siemens WFH21 9 | Hot water 10 | 218 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Volume (m m^3) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | On time (hours) 26 | 44086 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Time Point (time & date) 33 | 2011-12-01T10:36:00 34 | 35 | 36 | 37 | Value during error state 38 | 0 39 | Time Point (date) 40 | 2000-00-00 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Fabrication number 47 | 8006491 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Model / Version 54 | 2173253517322 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Parameter set identification 61 | WFH21 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Firmware version 68 | 0 69 | 70 | 71 | 72 | Instantaneous value 73 | 1 74 | Volume (m m^3) 75 | 0 76 | 77 | 78 | 79 | Instantaneous value 80 | 1 81 | Time Point (date) 82 | 2010-12-31 83 | 84 | 85 | 86 | Manufacturer specific 87 | 37 FD 17 00 00 00 00 00 00 00 00 02 7A 25 00 02 78 25 00 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /DataExamples/test-frames/sontex_supercal_531_telegram1.hex: -------------------------------------------------------------------------------- 1 | 68 51 51 68 08 01 72 24 06 42 08 EE 4D 0D 04 2C 30 00 00 04 0E 00 00 00 00 04 14 00 00 00 00 05 5B 00 00 00 00 05 5F 00 00 00 00 05 3E 00 00 00 00 05 2B 00 00 00 00 C4 00 0E 00 00 00 00 C4 00 14 00 00 00 00 C4 40 14 00 00 00 00 C4 80 40 14 00 00 00 00 1F 71 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/sontex_supercal_531_telegram1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8420624 6 | SON 7 | 13 8 | Sontex Supercal 531 9 | Heat: Outlet 10 | 44 11 | 30 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (MJ) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (1e-2 m^3) 26 | 0 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | Flow temperature (deg C) 33 | 0.000000 34 | 35 | 36 | 37 | Instantaneous value 38 | 0 39 | Return temperature (deg C) 40 | 0.000000 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume flow ( m^3/h) 47 | 0.000000 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Power (W) 54 | 0.000000 55 | 56 | 57 | 58 | Instantaneous value 59 | 1 60 | 0 61 | 0 62 | Energy (MJ) 63 | 0 64 | 65 | 66 | 67 | Instantaneous value 68 | 1 69 | 0 70 | 0 71 | Volume (1e-2 m^3) 72 | 0 73 | 74 | 75 | 76 | Instantaneous value 77 | 1 78 | 0 79 | 1 80 | Volume (1e-2 m^3) 81 | 0 82 | 83 | 84 | 85 | Instantaneous value 86 | 1 87 | 0 88 | 2 89 | Volume (1e-2 m^3) 90 | 0 91 | 92 | 93 | 94 | More records follow 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /DataExamples/test-frames/svm_f22_telegram1.hex: -------------------------------------------------------------------------------- 1 | 68 5C 5C 68 08 01 72 89 60 00 01 CD 4E 09 0C 94 70 00 00 04 06 6E 6D 00 00 04 13 45 C6 09 00 84 40 13 45 C6 09 00 02 5B F3 00 02 5F F3 00 02 62 00 00 04 22 E2 18 00 00 04 26 DB 18 00 00 04 3B 00 00 00 00 04 2C 00 00 00 00 04 6D 0C 15 A8 22 84 40 6E 00 00 00 00 84 80 40 6E 00 00 00 00 1F A7 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/svm_f22_telegram1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1006089 6 | SVM 7 | 9 8 | Elster F4 / Kamstrup SVM F22 9 | Heat: Inlet 10 | 148 11 | 70 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (kWh) 19 | 28014 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Volume (m m^3) 26 | 640581 27 | 28 | 29 | 30 | Instantaneous value 31 | 0 32 | 0 33 | 1 34 | Volume (m m^3) 35 | 640581 36 | 37 | 38 | 39 | Instantaneous value 40 | 0 41 | Flow temperature (deg C) 42 | 243 43 | 44 | 45 | 46 | Instantaneous value 47 | 0 48 | Return temperature (deg C) 49 | 243 50 | 51 | 52 | 53 | Instantaneous value 54 | 0 55 | Temperature Difference (1e-1 deg C) 56 | 0 57 | 58 | 59 | 60 | Instantaneous value 61 | 0 62 | On time (hours) 63 | 6370 64 | 65 | 66 | 67 | Instantaneous value 68 | 0 69 | Operating time (hours) 70 | 6363 71 | 72 | 73 | 74 | Instantaneous value 75 | 0 76 | Volume flow (m m^3/h) 77 | 0 78 | 79 | 80 | 81 | Instantaneous value 82 | 0 83 | Power (10 W) 84 | 0 85 | 86 | 87 | 88 | Instantaneous value 89 | 0 90 | Time Point (time & date) 91 | 2021-02-08T21:12:00 92 | 93 | 94 | 95 | Instantaneous value 96 | 0 97 | 0 98 | 1 99 | Units for H.C.A. 100 | 0 101 | 102 | 103 | 104 | Instantaneous value 105 | 0 106 | 0 107 | 2 108 | Units for H.C.A. 109 | 0 110 | 111 | 112 | 113 | More records follow 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /DataExamples/test-frames/tch_telegramm1.hex: -------------------------------------------------------------------------------- 1 | 68 3F 3F 68 08 4E 72 82 99 51 21 68 50 26 04 85 00 00 00 0C 05 00 00 00 00 04 6D 32 0D 1D 09 4C 05 00 00 00 00 42 6C 1D 05 0B 3A 00 00 00 0A 5A 34 02 0A 5E 24 02 0C 2A 00 00 00 00 0C 13 64 00 00 00 1F 09 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/tch_telegramm1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21519982 6 | TCH 7 | 38 8 | Techem m-bus S 9 | Heat: Outlet 10 | 133 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (100 Wh) 19 | 0 20 | 21 | 22 | 23 | Instantaneous value 24 | 0 25 | Time Point (time & date) 26 | 2000-09-29T13:50:00 27 | 28 | 29 | 30 | Instantaneous value 31 | 1 32 | Energy (100 Wh) 33 | 0 34 | 35 | 36 | 37 | Instantaneous value 38 | 1 39 | Time Point (date) 40 | 2000-05-29 41 | 42 | 43 | 44 | Instantaneous value 45 | 0 46 | Volume flow (1e-4 m^3/h) 47 | 0 48 | 49 | 50 | 51 | Instantaneous value 52 | 0 53 | Flow temperature (1e-1 deg C) 54 | 234 55 | 56 | 57 | 58 | Instantaneous value 59 | 0 60 | Return temperature (1e-1 deg C) 61 | 224 62 | 63 | 64 | 65 | Instantaneous value 66 | 0 67 | Power (1e-1 W) 68 | 0 69 | 70 | 71 | 72 | Instantaneous value 73 | 0 74 | Volume (m m^3) 75 | 64 76 | 77 | 78 | 79 | More records follow 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /DataExamples/test-frames/test.hex: -------------------------------------------------------------------------------- 1 | 68 35 35 68 08 0A 72 64 81 02 15 B4 09 05 07 1C 00 00 00 0C 78 05 49 78 16 03 74 03 00 00 01 FD 71 A7 06 6D 1A 2F 4A 51 27 1D 0C 13 42 01 00 00 0F 09 2E 37 24 12 17 07 18 3B 16 -------------------------------------------------------------------------------- /DataExamples/test-frames/wmbus-converted.hex: -------------------------------------------------------------------------------- 1 | 68 1f 1f 68 08 00 72 31 77 67 17 2d 2c 01 02 00 00 00 00 2f 2f 04 83 3b 88 13 00 00 2f 2f 2f 2f 2f 2f 2f 00 16 2 | -------------------------------------------------------------------------------- /DataExamples/test-frames/wmbus-converted.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17677731 6 | KAM 7 | 1 8 | Kamstrup 382 (6850-005) 9 | Electricity 10 | 0 11 | 00 12 | 0000 13 | 14 | 15 | 16 | Instantaneous value 17 | 0 18 | Energy (Wh) 19 | 5000 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DataExamples/test.hex: -------------------------------------------------------------------------------- 1 | 68 35 35 68 08 0A 72 64 81 02 15 B4 09 05 07 1C 00 00 00 0C 78 05 49 78 16 03 74 03 00 00 01 FD 71 A7 06 6D 1A 2F 4A 51 27 1D 0C 13 42 01 00 00 0F 09 2E 37 24 12 17 07 18 3B 16 -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/manual_frame1.hex: -------------------------------------------------------------------------------- 1 | D 04 04 68 53 FE 50 10 B1 16 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/manual_frame4.hex: -------------------------------------------------------------------------------- 1 | 68 06 06 68 53 FE 51 01 7A 08 25 16 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/manual_frame5.hex: -------------------------------------------------------------------------------- 1 | 68 0D 0D 68 53 FE 51 07 79 04 03 02 01 24 40 01 04 95 16 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/manual_frame6.hex: -------------------------------------------------------------------------------- 1 | 68 0F 0F 68 53 FE 51 0C 79 78 56 34 12 0C 06 07 01 00 00 55 16 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/rvd235.hex: -------------------------------------------------------------------------------- 1 | 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 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/siemens_rvd235.hex: -------------------------------------------------------------------------------- 1 | 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 2 | -------------------------------------------------------------------------------- /DataExamples/unsupported-frames/svm_f22_telegram2.hex: -------------------------------------------------------------------------------- 1 | 68 DE DE 68 08 01 72 89 60 00 01 CD 4E 09 04 18 70 00 00 1F 45 00 3C 01 7F B0 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C5 00 84 11 98 A1 01 00 C9 18 00 00 00 00 00 01 58 04 87 24 81 01 5B 00 00 48 18 00 63 60 7D 7F 3E 5F 60 01 00 0A 01 02 99 00 00 0E 50 C3 00 00 7F 7F 80 01 0A 00 00 FF 02 00 02 18 00 00 00 00 28 10 36 20 06 02 BE 23 BF 23 0A 0B 10 28 10 36 20 06 02 BE 23 BF 23 0A 0B 10 28 10 36 00 00 00 00 00 93 92 C9 00 10 00 00 02 89 60 00 01 FF FF FF FF FF FF FF FF 08 06 08 13 08 5A 08 5E 08 62 08 3D 00 00 00 00 00 00 00 10 01 00 0D 01 45 00 46 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 0A 02 25 6E 02 6E 6D 00 00 F6 16 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Martin Dahlstedt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MBusLogo240.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sympthom/Valley.Net.Protocols.MeterBus/b62c80ab02f7dbf69b88eb9a9391bdf62751bcf5/MBusLogo240.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![record screenshot](MBusLogo240.jpg) 2 | 3 | M-Bus (Meter Bus) project for communicating and parsing M-Bus over udp, tcp and serial. Implementation of protocol EN 13757-2 and EN 13757-3 (https://ec.europa.eu/eip/ageing/standards/ict-and-communication/data/en-13757_en). 4 | 5 | M-Bus (Meter-Bus) is a European standard (EN 13757-2 physical and link layer, EN 13757-3 application layer) for the remote reading of gas, water or electricity meters. M-Bus is also usable for other types of consumption meters. The M-Bus interface is made for communication on two wires, making it cost-effective. A radio variant of M-Bus (Wireless M-Bus) is also specified in EN 13757-4. 6 | 7 | The M-Bus was developed to fill the need for a system for the networking and remote reading of utility meters, for example to measure the consumption of gas or water in the home. This bus fulfills the special requirements of remotely powered or battery-driven systems, including consumer utility meters. When interrogated, the meters deliver the data they have collected to a common master, such as a hand-held computer, connected at periodic intervals to read all utility meters of a building. An alternative method of collecting data centrally is to transmit meter readings via a modem. 8 | 9 | Other applications for the M-Bus such as alarm systems, flexible illumination installations, heating control, etc. are suitable. 10 | 11 | ## Retrieving meter telemetry 12 | 13 | ``` 14 | var serialiser = new MeterbusFrameSerializer(); 15 | var endpoint = new IPEndPoint(IPAddress.Parse("192.168.1.135"), 502); 16 | 17 | // binding to the collector/gateway 18 | var binding = new UdpBinding(endpoint, serializer); 19 | 20 | // reqeust for telemetry on meter with address 0x0a 21 | var response = await new MeterBusMaster(binding) 22 | .RequestData(0x0a, TimeSpan.FromSeconds(3)); 23 | ``` 24 | 25 | ## Low level control 26 | 27 | ``` 28 | var serialiser = new MeterbusFrameSerializer(); 29 | var endpoint = new IPEndPoint(IPAddress.Parse("192.168.1.135"), 502); 30 | 31 | // binding to the collector/gateway 32 | var binding = new UdpBinding(endpoint, serialiser); 33 | binding.PacketReceived += (sender, e) => Debug.WriteLine("M-Bus packet received."); 34 | 35 | // send a short frame/SND_NKE to the meter with address 0x0a 36 | await binding.SendAsync(new ShortFrame((byte)ControlMask.SND_NKE, 0x0a)); 37 | ``` 38 | 39 | ## Deserialize M-Bus frame and payload 40 | 41 | ``` 42 | var packet = "68 1F 1F 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 37 18 02 18 16" 43 | .HexToBytes() 44 | .ToFrame() // EN13757_2 45 | .ToPacket(); // EN13757_3 46 | ``` 47 | 48 | ## Changelog 49 | 50 | ### v1.0.2 (2019.10.13) 51 | * serial communication capability 52 | 53 | ### v1.0.1 (2019.10.12) 54 | * bug fixes 55 | 56 | ### v1.0.0 (2018.09.29) 57 | * initial release 58 | 59 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/QueryPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Valley.Net.Bindings; 7 | 8 | namespace Valley.Net.Protocols.MeterBus.Test 9 | { 10 | internal sealed class QueryPacket : INetworkPacket 11 | { 12 | public byte[] Data { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/QuerySerializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Valley.Net.Bindings; 8 | 9 | namespace Valley.Net.Protocols.MeterBus.Test 10 | { 11 | internal sealed class QuerySerializer : IPacketSerializer 12 | { 13 | public INetworkPacket Deserialize(byte[] data, int index, int count) 14 | { 15 | throw new NotImplementedException(); 16 | } 17 | 18 | public INetworkPacket Deserialize(Stream stream) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | 23 | public INetworkPacket Deserialize(BinaryReader reader) 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | 28 | public T Deserialize(byte[] data, int index, int count) where T : INetworkPacket 29 | { 30 | throw new NotImplementedException(); 31 | } 32 | 33 | public T Deserialize(Stream stream) where T : INetworkPacket 34 | { 35 | throw new NotImplementedException(); 36 | } 37 | 38 | public T Deserialize(BinaryReader reader) where T : INetworkPacket 39 | { 40 | throw new NotImplementedException(); 41 | } 42 | 43 | public INetworkPacket Deserialize(byte[] data) 44 | { 45 | throw new NotImplementedException(); 46 | } 47 | 48 | public T Deserialize(byte[] data) where T : INetworkPacket 49 | { 50 | throw new NotImplementedException(); 51 | } 52 | 53 | public int Serialize(INetworkPacket package, Stream stream) 54 | { 55 | using (var writer = new BinaryWriter(stream)) 56 | return Serialize(package, writer); 57 | } 58 | 59 | public int Serialize(INetworkPacket packet, BinaryWriter writer) 60 | { 61 | var queryPackage = packet as QueryPacket; 62 | 63 | writer.Write(queryPackage.Data); 64 | 65 | return queryPackage.Data.Length; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/SerialTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.IO.Ports; 6 | using System.Net; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using Microsoft.VisualStudio.TestTools.UnitTesting; 10 | using Valley.Net.Bindings.Serial; 11 | using Valley.Net.Protocols.MeterBus.EN13757_2; 12 | using Valley.Net.Protocols.MeterBus.EN13757_3; 13 | 14 | namespace Valley.Net.Protocols.MeterBus.Test 15 | { 16 | [TestClass] 17 | public sealed class SerialTests 18 | { 19 | private const int TIMEOUT_IN_SECONDS = 3; 20 | 21 | [TestMethod] 22 | public async Task Meter_Should_Respond_With_Ack_When_Sending_SND_NKE() 23 | { 24 | var resetEvent = new AutoResetEvent(false); 25 | 26 | var port = new SerialPort(); 27 | port.BaudRate = 1200; 28 | 29 | var endpoint = new SerialBinding(port, (x, y) => 30 | { 31 | return null; 32 | }, new MeterbusFrameSerializer()); 33 | 34 | endpoint.PacketReceived += (sender, e) => resetEvent.Set(); 35 | 36 | await endpoint.ConnectAsync(); 37 | 38 | await endpoint.SendAsync(new ShortFrame((byte)ControlMask.SND_NKE, 0x0a)); 39 | 40 | Assert.IsTrue(resetEvent.WaitOne(TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS))); 41 | 42 | await endpoint.DisconnectAsync(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/TcpTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Net; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using Microsoft.VisualStudio.TestTools.UnitTesting; 9 | using Valley.Net.Bindings.Tcp; 10 | using Valley.Net.Protocols.MeterBus.EN13757_2; 11 | using Valley.Net.Protocols.MeterBus.EN13757_3; 12 | 13 | namespace Valley.Net.Protocols.MeterBus.Test 14 | { 15 | [TestClass] 16 | public sealed class TcpTests 17 | { 18 | private const string COLLECTOR_IP_ADDRESS = "192.168.1.66"; 19 | private const int COLLECTOR_PORT = 502; 20 | private const int TIMEOUT_IN_SECONDS = 3; 21 | 22 | [TestMethod] 23 | public async Task Meter_Should_Respond_With_Ack_When_Sending_SND_NKE() 24 | { 25 | var resetEvent = new AutoResetEvent(false); 26 | 27 | var endpoint = new TcpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 28 | endpoint.PacketReceived += (sender, e) => resetEvent.Set(); 29 | 30 | await endpoint.ConnectAsync(); 31 | 32 | await endpoint.SendAsync(new ShortFrame((byte)ControlMask.SND_NKE, 0x0a)); 33 | 34 | Assert.IsTrue(resetEvent.WaitOne(TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS))); 35 | 36 | await endpoint.DisconnectAsync(); 37 | } 38 | 39 | [TestMethod] 40 | public async Task Meter_Should_Respond_When_Pinging_The_Meter() 41 | { 42 | var binding = new TcpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 43 | 44 | var master = new MBusMaster(binding); 45 | 46 | var result = await master.Ping(0x0a, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)); 47 | 48 | Assert.IsTrue(result); 49 | } 50 | 51 | [TestMethod] 52 | public async Task Meter_Scanner_Should_Find_Meter_When_Meter_Is_Connected_To_Collector() 53 | { 54 | var binding = new TcpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 55 | 56 | var master = new MBusMaster(binding); 57 | master.Meter += (sender, e) => Debug.WriteLine($"Found meter on address {e.Address.ToString("x2")}."); 58 | 59 | await master.Scan(new byte[] { 0x0a }, TimeSpan.FromSeconds(100)); 60 | } 61 | 62 | [TestMethod] 63 | public async Task Meter_Should_Have_The_Address_Changed_When_Meter_Address_Is_Reconfigured() 64 | { 65 | var binding = new TcpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 66 | 67 | var master = new MBusMaster(binding); 68 | 69 | await master.SetMeterAddress(0x0a, 0x09); 70 | } 71 | 72 | [TestMethod] 73 | public async Task Meter_Telemetry_Should_Be_Retrieved_When_Querying_The_Collector() 74 | { 75 | var binding = new TcpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 76 | 77 | var master = new MBusMaster(binding); 78 | 79 | var response = await master.RequestData(0x0a, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)) as VariableDataPacket; 80 | 81 | Assert.IsNotNull(response); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/UdpTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Net; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using Microsoft.VisualStudio.TestTools.UnitTesting; 9 | using Valley.Net.Bindings.Udp; 10 | using Valley.Net.Protocols.MeterBus.EN13757_2; 11 | using Valley.Net.Protocols.MeterBus.EN13757_3; 12 | 13 | namespace Valley.Net.Protocols.MeterBus.Test 14 | { 15 | [TestClass] 16 | public sealed class UdpTests 17 | { 18 | private const string COLLECTOR_IP_ADDRESS = "192.168.1.135"; 19 | private const int COLLECTOR_PORT = 502; 20 | private const int TIMEOUT_IN_SECONDS = 3; 21 | 22 | [TestMethod] 23 | public async Task Meter_Should_Respond_With_Ack_When_Sending_SND_NKE() 24 | { 25 | var resetEvent = new AutoResetEvent(false); 26 | 27 | var binding = new UdpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 28 | binding.PacketReceived += (sender, e) => resetEvent.Set(); 29 | 30 | await binding.ConnectAsync(); 31 | 32 | await binding.SendAsync(new ShortFrame((byte)ControlMask.SND_NKE, 0x0a)); 33 | 34 | Assert.IsTrue(resetEvent.WaitOne(TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS))); 35 | } 36 | 37 | [TestMethod] 38 | public async Task Meter_Should_Respond_When_Pinging_The_Meter() 39 | { 40 | var binding = new UdpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 41 | 42 | var master = new MBusMaster(binding); 43 | 44 | var result = await master.Ping(0x0a, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)); 45 | 46 | Assert.IsTrue(result); 47 | } 48 | 49 | [TestMethod] 50 | public async Task Meter_Scanner_Should_Find_Meter_When_Meter_Is_Connected_To_Collector() 51 | { 52 | var binding = new UdpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 53 | 54 | var master = new MBusMaster(binding); 55 | master.Meter += (sender, e) => Debug.WriteLine($"Found meter on address {e.Address.ToString("x2")}."); 56 | 57 | await master.Scan(new byte[] { 0x09, 0x0a, 0x0b }, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)); 58 | } 59 | 60 | [TestMethod] 61 | public async Task Meter_Should_Have_The_Address_Changed_When_Meter_Address_Is_Reconfigured() 62 | { 63 | var binding = new UdpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 64 | 65 | var master = new MBusMaster(binding); 66 | 67 | await master.SetMeterAddress(0x0a, 0x09); 68 | } 69 | 70 | [TestMethod] 71 | public async Task Meter_Telemetry_Should_Be_Retrieved_When_Querying_The_Collector() 72 | { 73 | var binding = new UdpBinding(new IPEndPoint(IPAddress.Parse(COLLECTOR_IP_ADDRESS), COLLECTOR_PORT), new MeterbusFrameSerializer()); 74 | 75 | var master = new MBusMaster(binding); 76 | 77 | var response = await master 78 | .RequestData(0x0a, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)); 79 | 80 | response = await master 81 | .RequestData(0x0a, TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS)); 82 | 83 | Assert.IsNotNull(response); 84 | } 85 | 86 | [TestMethod] 87 | public void Collector_Should_Respond_When_Querying_The_Broadcast_Domain() 88 | { 89 | var binding = new UdpBroadcastBinding(30718, new QuerySerializer()); 90 | 91 | binding 92 | .Send(new QueryPacket { Data = "00 00 00 F6".HexToBytes() }); 93 | 94 | //Assert.IsTrue(resetEvent.WaitOne(TimeSpan.FromSeconds(TIMEOUT_IN_SECONDS))); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/Valley.Net.Protocols.MeterBus.Test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | NET461 5 | Martin Dahlstedt 6 | Valley 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus.Test/XmlSerializationTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Net; 6 | using System.Threading; 7 | using System.Threading.Tasks; 8 | using Microsoft.VisualStudio.TestTools.UnitTesting; 9 | using Valley.Net.Protocols.MeterBus.EN13757_2; 10 | using Valley.Net.Protocols.MeterBus.EN13757_3; 11 | 12 | namespace Valley.Net.Protocols.MeterBus.Test 13 | { 14 | [TestClass] 15 | public sealed class XmlSerializationTests 16 | { 17 | [TestMethod] 18 | public void Test() 19 | { 20 | var data = "68 1F 1F 68 08 02 72 78 56 34 12 24 40 01 07 55 00 00 00 03 13 15 31 00 DA 02 3B 13 01 8B 60 04 37 18 02 18 16" 21 | .HexToBytes(); 22 | 23 | var frame = new MeterbusFrameSerializer() 24 | .Deserialize(data); 25 | 26 | Assert.IsNotNull(frame); 27 | 28 | var xml = frame.AsXml(); 29 | 30 | Assert.IsNotNull(xml); 31 | } 32 | } 33 | 34 | public static class XmlSerialiser 35 | { 36 | public static string AsXml(this Frame frame) 37 | { 38 | return null; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/ByteExtensions.cs: -------------------------------------------------------------------------------- 1 | using Valley.Net.Protocols.MeterBus.EN13757_2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Valley.Net.Protocols.MeterBus 8 | { 9 | public static class ByteExtensions 10 | { 11 | public static Frame AsMeterBusFrame(this byte[] buffer) 12 | { 13 | var frame = new MeterbusFrameSerializer() 14 | .Deserialize(buffer, 0, buffer.Length); 15 | 16 | return frame as Frame; 17 | } 18 | 19 | public static byte CheckSum(this byte[] buffer) 20 | { 21 | return (byte)buffer.Sum(b => b); 22 | } 23 | 24 | public static byte CheckSum(this byte[] buffer, byte control, byte address) 25 | { 26 | return (byte)new byte[] { control, address }.Merge(buffer).Sum(b => b); 27 | } 28 | 29 | public static byte CheckSum(this byte[] buffer, byte control, byte address, byte controlInformation) 30 | { 31 | return (byte)new byte[] { control, address, controlInformation }.Merge(buffer).Sum(b => b); 32 | } 33 | 34 | public static byte CheckSum(this byte[] buffer, int offset, int length) 35 | { 36 | return (byte)buffer.Skip(offset).Take(length).Sum(b => b); 37 | } 38 | 39 | public static byte[] Merge(this byte[] source, byte[] arrayB) 40 | { 41 | var buffer = new byte[source.Length + arrayB.Length]; 42 | 43 | Buffer.BlockCopy(source.ToArray(), 0, buffer, 0, source.Count()); 44 | Buffer.BlockCopy(arrayB, 0, buffer, source.Count(), arrayB.Length); 45 | 46 | return buffer; 47 | } 48 | 49 | public static string ToHex(this byte[] source, string separator = " ") 50 | { 51 | return source != null ? string.Join(separator, source.Select(x => x.ToString("x2"))) : null; 52 | } 53 | 54 | public static string BCDDecode(this byte[] bytes, int length) 55 | { 56 | long val = 0; 57 | 58 | for (int i = length; i > 0; i--) 59 | { 60 | val = (val * 10) + ((bytes[i - 1] >> 4) & 0xF); 61 | val = (val * 10) + (bytes[i - 1] & 0xF); 62 | } 63 | 64 | return val.ToString(); 65 | } 66 | 67 | public static string BCDToString(this byte[] bytes) 68 | { 69 | return string.Join(string.Empty, bytes.Reverse().Select(b => b.ToString("x2"))); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/AckFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public sealed class AckFrame : Frame 9 | { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ByteExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public static class ByteExtensions 8 | { 9 | public static Frame ToFrame(this byte[] data) 10 | { 11 | return new MeterbusFrameSerializer() 12 | .Deserialize(data, 0, data.Length); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ControlFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public sealed class ControlFrame : Frame 9 | { 10 | public byte Start => Constants.MBUS_FRAME_CONTROL_START; 11 | 12 | public ControlMask Control { get; } 13 | 14 | public ControlInformation ControlInformation { get; } 15 | 16 | public byte Address { get; } 17 | 18 | public byte Length => 0x03; 19 | 20 | public byte Crc { get; } 21 | 22 | public byte Stop => Constants.MBUS_FRAME_STOP; 23 | 24 | public ControlFrame(byte control, byte controlInformation, byte address) 25 | { 26 | Control = (ControlMask)control; 27 | ControlInformation = (ControlInformation)controlInformation; 28 | Address = address; 29 | Crc = new byte[] { control, address, controlInformation }.CheckSum(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ControlInformation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public enum ControlInformation 8 | { 9 | //Mode 1 Mode 2 Application Definition in 10 | // 51h 55h data send EN1434-3 11 | // 52h 56h selection of slaves Usergroup July ́93 12 | // 50h application reset Usergroup March ́94 13 | // 54h synronize action suggestion 14 | // B8h set baudrate to 300 baud Usergroup July ́93 15 | // B9h set baudrate to 600 baud Usergroup July ́93 16 | // BAh set baudrate to 1200 baud Usergroup July ́93 17 | // BBh set baudrate to 2400 baud Usergroup July ́93 18 | // BCh set baudrate to 4800 baud Usergroup July ́93 19 | // BDh set baudrate to 9600 baud Usergroup July ́93 20 | // BEh set baudrate to 19200 baud suggestion 21 | // BFh set baudrate to 38400 baud suggestion 22 | // B1h request readout of complete RAM content Techem suggestion 23 | // B2h send user data (not standardized RAM write) Techem suggestion 24 | // B3h initialize test calibration mode Usergroup July ́93 25 | // B4h EEPROM read Techem suggestion 26 | // B6h start software test Techem suggestion 27 | // 90h to 97h codes used for hashing longer recommended 28 | DATA_SEND = 0x51, 29 | DATA_SEND_MSB = 0x55, 30 | SELECT_SLAVE = 0x52, 31 | SELECT_SLAVE_MSB = 0x56, 32 | APPLICATION_RESET = 0x50, 33 | SYNC_ACTION = 0x54, 34 | SET_BAUDRATE_300 = 0xB8, 35 | SET_BAUDRATE_600 = 0xB9, 36 | SET_BAUDRATE_1200 = 0xBA, 37 | SET_BAUDRATE_2400 = 0xBB, 38 | SET_BAUDRATE_4800 = 0xBC, 39 | SET_BAUDRATE_9600 = 0xBD, 40 | SET_BAUDRATE_19200 = 0xBE, 41 | SET_BAUDRATE_38400 = 0xBF, 42 | REQUEST_RAM_READ = 0xB1, 43 | SEND_USER_DATA = 0xB2, 44 | INIT_TEST_CALIB = 0xB3, 45 | EEPROM_READ = 0xB4, 46 | SW_TEST_START = 0xB6, 47 | 48 | //Mode 1 Mode 2 Application Definition in 49 | // 70h report of general application errors Usergroup March 94 50 | // 71h report of alarm status Usergroup March 94 51 | // 72h 76h variable data respond EN1434-3 52 | // 73h 77h fixed data respond EN1434-3 53 | ERROR_GENERAL = 0x70, 54 | STATUS_ALARM = 0x71, 55 | 56 | RESP_FIXED = 0x73, 57 | RESP_FIXED_MSB = 0x77, 58 | 59 | RESP_VARIABLE = 0x72, 60 | RESP_VARIABLE_MSB = 0x76, 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ControlMask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public enum ControlMask 8 | { 9 | /// 10 | /// Initialization of Slave (SHORT FRAME) 11 | /// 12 | SND_NKE = 0x40, 13 | 14 | /// 15 | /// Send User Data to Slave (LONG/CONTROL FRAME) 16 | /// 17 | SND_UD = 0x53, 18 | 19 | /// 20 | /// Request for Class 2 Data: 0x4b | 0x5b | 0x6b | 0x7b (SHORT FRAME) 21 | /// 22 | REQ_UD2 = 0x7b, 23 | 24 | /// 25 | /// Request for Class 1 Data: 0x5a | 0x7a (SHORT FRAME) 26 | /// 27 | REQ_UD1 = 0x7a, 28 | 29 | /// 30 | /// Data Transfer from Slave: 0x08 | 0x18 | 0x28 | 0x38 (LONG/CONTROL FRAME) 31 | /// 32 | RSP_UD = 0x08, 33 | 34 | FCB = 0x20, 35 | FCV = 0x10, 36 | 37 | ACD = 0x20, 38 | DFC = 0x10, 39 | 40 | DIR = 0x40, 41 | DIR_M2S = 0x40, 42 | DIR_S2M = 0x00, 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/DIF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | /// 9 | /// Data Information Field. 10 | /// 11 | public sealed class DIF : Part 12 | { 13 | public VariableDataRecordType Data { get; private set; } 14 | 15 | public DataTypes DataType { get; private set; } 16 | 17 | public Function Function { get; private set; } 18 | 19 | public bool StorageLSB { get; private set; } 20 | 21 | public bool Extension { get; private set; } 22 | 23 | public DIF(byte data) 24 | { 25 | Data = (VariableDataRecordType)data; 26 | DataType = (DataTypes)(data & 0x0f); 27 | Function = (Function)(data & 0x30); 28 | StorageLSB = (data & 0x40) != 0; 29 | Extension = (data & 0x80) != 0; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/DIFE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public sealed class DIFE : Part 9 | { 10 | public int StorageNumber { get; private set; } 11 | 12 | public int Tariff { get; private set; } 13 | 14 | public int Device { get; private set; } 15 | 16 | public bool Extension { get; private set; } 17 | 18 | public byte Data { get; private set; } 19 | 20 | public DIFE(byte data) 21 | { 22 | Data = data; 23 | StorageNumber = data & 0x0f; 24 | Tariff = (data & 0x30) >> 4; 25 | Device = (data & 0x40) >> 6; 26 | Extension = (data & 0x80) != 0; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/DataTypes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public enum DataTypes : byte 9 | { 10 | _No_data = 0, // No data 11 | _8_Bit_Integer = 1, // 8 Bit Integer 12 | _16_Bit_Integer = 2, // 16 Bit Integer 13 | _24_Bit_Integer = 3, // 24 Bit Integer 14 | _32_Bit_Integer = 4, // 32 Bit Integer 15 | _32_Bit_Real = 5, // 32 Bit Real 16 | _48_Bit_Integer = 6, // 48 Bit Integer 17 | _64_Bit_Integer = 7, // 64 Bit Integer 18 | _Selection_for_Readout = 8, // Selection for Readout 19 | _2_digit_BCD = 9, // 2 digit BCD 20 | _4_digit_BCD = 10, // 4 digit BCD 21 | _6_digit_BCD = 11, // 6 digit BCD 22 | _8_digit_BCD = 12, // 8 digit BCD 23 | _variable_length = 13, // variable length 24 | _12_digit_BCD = 14, // 12 digit BCD 25 | _Unknown = 15, // Special Functions 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/FixedDataLongFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public sealed class FixedDataLongFrame : LongFrame 9 | { 10 | public bool CountersFixed { get; set; } 11 | 12 | public FixedDataUnits Units1 { get; set; } 13 | 14 | public FixedDataUnits Units2 { get; set; } 15 | 16 | public UInt32 Counter1 { get; set; } 17 | 18 | public UInt32 Counter2 { get; set; } 19 | 20 | public FixedDataLongFrame(byte control, byte controlInformation, byte address, byte[] data, byte length) : base(control, controlInformation, address, data, length) 21 | { 22 | if ((ControlInformation)controlInformation != ControlInformation.RESP_FIXED) 23 | throw new InvalidDataException(); 24 | 25 | using (var stream = new MemoryStream(data)) 26 | using (var reader = new BinaryReader(stream)) 27 | { 28 | if (reader.Read(IdentificationNo, 0, IdentificationNo.Length) != IdentificationNo.Length) 29 | throw new InvalidDataException(); 30 | 31 | TransmissionCounter = reader.ReadByte(); 32 | Status = reader.ReadByte(); 33 | var countersBCD = (Status & 0x01) == 0; 34 | 35 | CountersFixed = (Status & 0x02) != 0; 36 | 37 | var buf6 = reader.ReadByte(); 38 | var buf7 = reader.ReadByte(); 39 | 40 | Units1 = (FixedDataUnits)(buf6 & 0x3F); 41 | Units2 = (FixedDataUnits)(buf7 & 0x3F); 42 | DeviceType = (byte)(((buf6 & 0xc0) >> 6) | ((buf7 & 0xc0) >> 4)); 43 | 44 | if (countersBCD) 45 | { 46 | var buf8 = new byte[4]; 47 | 48 | if (reader.Read(buf8, 0, buf8.Length) != buf8.Length) 49 | throw new InvalidDataException(); 50 | 51 | Counter1 = UInt32.Parse(buf8.BCDToString()); 52 | 53 | var buf12 = new byte[4]; 54 | 55 | if (reader.Read(buf12, 0, buf12.Length) != buf12.Length) 56 | throw new InvalidDataException(); 57 | 58 | Counter2 = UInt32.Parse(buf12.BCDToString()); 59 | } 60 | else 61 | { 62 | Counter1 = reader.ReadUInt32(); 63 | Counter2 = reader.ReadUInt32(); 64 | } 65 | } 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/FixedDataUnits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public enum FixedDataUnits : byte 8 | { 9 | hms = 0x0, // h,m,s   10 | DMY = 0x1, // D,M,Y   11 | Wh = 0x2, // Wh   12 | Wh10 = 0x3, // Wh * 10 13 | Wh100 = 0x4, // Wh * 100 14 | kWh = 0x5, // kWh   15 | kWh10 = 0x6, // kWh * 10 16 | kWh100 = 0x7, // kWh * 100 17 | MWh = 0x8, // MWh   18 | MWh10 = 0x9, // MWh * 10 19 | MWh100 = 0x0A, // MWh * 100 20 | kJ = 0x0B, // kJ   21 | kJ10 = 0x0C, // kJ * 10 22 | kJ100 = 0x0D, // kJ * 100 23 | MJ = 0x0E, // MJ   24 | MJ10 = 0x0F, // MJ * 10 25 | MJ100 = 0x10, // MJ * 100 26 | GJ = 0x11, // GJ   27 | GJ10 = 0x12, // GJ * 10 28 | GJ100 = 0x13, // GJ * 100 29 | W = 0x14, // W   30 | W10 = 0x15, // W * 10 31 | W100 = 0x16, // W * 100 32 | kW = 0x17, // kW   33 | kW10 = 0x18, // kW * 10 34 | kW100 = 0x19, // kW * 100 35 | MW = 0x1A, // MW   36 | MW10 = 0x1B, // MW * 10 37 | MW100 = 0x1C, // MW * 100 38 | kJ_per_h = 0x1D, // kJ/h   39 | kJ_per_h10 = 0x1E, // kJ/h * 10 40 | kJ_per_h100 = 0x1F, // kJ/h * 100 41 | MJ_per_h = 0x20, // MJ/h   42 | MJ_per_h10 = 0x21, // MJ/h * 10 43 | MJ_per_h100 = 0x22, // MJ/h * 100 44 | GJ_per_h = 0x23, // GJ/h   45 | GJ_per_h10 = 0x24, // GJ/h * 10 46 | GJ_per_h100 = 0x25, // GJ/h * 100 47 | ml = 0x26, // ml   48 | ml10 = 0x27, // ml * 10 49 | ml100 = 0x28, // ml * 100 50 | l = 0x29, // l   51 | l10 = 0x2A, // l * 10 52 | l100 = 0x2B, // l * 100 53 | m3 = 0x2C, // m3   54 | m310 = 0x2D, // m3 * 10 55 | m3100 = 0x2E, // m3 * 100 56 | ml_per_h = 0x2F, // ml/h   57 | ml_per_h10 = 0x30, // ml/h * 10 58 | ml_per_h100 = 0x31, // ml/h * 100 59 | l_per_h = 0x32, // l/h   60 | l_per_h10 = 0x33, // l/h * 10 61 | l_per_h100 = 0x34, // l/h * 100 62 | m3_per_h = 0x35, // m3/h   63 | m3_per_h10 = 0x36, // m3/h * 10 64 | m3_per_h100 = 0x37, // m3/h * 100 65 | C001 = 0x38, // �C * 10-3 66 | UnitsForHCA = 0x39, // units for HCA 67 | reserved3A = 0x3A, // reserved   68 | reserved3B = 0x3B, // reserved   69 | reserved3C = 0x3C, // reserved   70 | reserved3D = 0x3D, // reserved   71 | sameButHistoric = 0x3E, // same but historic 72 | withoutUnits = 0x3F, // without units 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/Frame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Valley.Net.Bindings; 8 | 9 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 10 | { 11 | public abstract class Frame : INetworkPacket 12 | { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/Function.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public enum Function : byte 9 | { 10 | Instantaneous = 0x00, //Instantaneous value 11 | 12 | Maximum = 0x10, //Maximum value 13 | 14 | Minimum = 0x20, //Minimum value 15 | 16 | ValueDuringError = 0x30, //Value during error state 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/LongFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public class LongFrame : Frame 9 | { 10 | public byte Start => Constants.MBUS_FRAME_LONG_START; 11 | 12 | public ControlMask Control { get; } 13 | 14 | public byte Address { get; } 15 | 16 | public ControlInformation ControlInformation { get; } 17 | 18 | public byte[] IdentificationNo { get; } = new byte[4]; 19 | 20 | public byte DeviceType { get; protected set; } 21 | 22 | public byte TransmissionCounter { get; protected set; } 23 | 24 | public byte Status { get; protected set; } 25 | 26 | public byte[] Data { get; } 27 | 28 | public byte Length { get; } 29 | 30 | public byte Crc { get; } 31 | 32 | public byte Stop => Constants.MBUS_FRAME_STOP; 33 | 34 | protected static readonly Dictionary LenghtsInBitsTable = new Dictionary() 35 | { 36 | { DataTypes._No_data, 0 }, 37 | { DataTypes._8_Bit_Integer, 8 }, 38 | { DataTypes._16_Bit_Integer, 16 }, 39 | { DataTypes._24_Bit_Integer, 24 }, 40 | { DataTypes._32_Bit_Integer, 32 }, 41 | { DataTypes._32_Bit_Real, 32 }, 42 | { DataTypes._48_Bit_Integer, 48 }, 43 | { DataTypes._64_Bit_Integer, 64 }, 44 | { DataTypes._Selection_for_Readout, 0 }, 45 | { DataTypes._2_digit_BCD, 8 }, 46 | { DataTypes._4_digit_BCD, 16 }, 47 | { DataTypes._6_digit_BCD, 24 }, 48 | { DataTypes._8_digit_BCD, 32 }, 49 | { DataTypes._variable_length, 0 /*N*/ }, 50 | { DataTypes._12_digit_BCD, 48 }, 51 | { DataTypes._Unknown, 64 }, 52 | }; 53 | 54 | public LongFrame(byte control, byte controlInformation, byte address, byte[] data, byte length) 55 | { 56 | Control = (ControlMask)control; 57 | ControlInformation = (ControlInformation)controlInformation; 58 | Address = address; 59 | Data = data ?? new byte[0]; 60 | Length = length; 61 | Crc = new byte[] { control, address, controlInformation }.Merge(data).CheckSum(); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ManufactureSpecific.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public sealed class ManufactureSpecific : Part 8 | { 9 | public byte Type { get; private set; } 10 | 11 | public byte[] Data { get; private set; } 12 | 13 | public ManufactureSpecific(byte type, byte[] data) 14 | { 15 | Type = type; 16 | Data = data; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/Part.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public abstract class Part 8 | { 9 | 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/ShortFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 7 | { 8 | public sealed class ShortFrame : Frame 9 | { 10 | public byte Start => Constants.MBUS_FRAME_SHORT_START; 11 | 12 | public ControlMask Control { get; } 13 | 14 | public byte Address { get; } 15 | 16 | public byte Crc { get; } 17 | 18 | public byte Stop => Constants.MBUS_FRAME_STOP; 19 | 20 | public ShortFrame(byte control, byte address) 21 | { 22 | Control = (ControlMask)control; 23 | Address = address; 24 | Crc = new byte[] { control, address }.CheckSum(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/UnitPrefix.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public static class UnitPrefix 8 | { 9 | public static string GetUnitPrefix(int magnitude) 10 | { 11 | switch (magnitude) 12 | { 13 | case 0: return string.Empty; 14 | case -3: return "m"; 15 | case -6: return "my"; 16 | case 1: return "10 "; 17 | case 2: return "100 "; 18 | case 3: return "k"; 19 | case 4: return "10 k"; 20 | case 5: return "100 k"; 21 | case 6: return "M"; 22 | case 9: return "T"; 23 | default: return $"1e{magnitude}"; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/Value.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public sealed class Value : Part 8 | { 9 | public byte[] Data { get; private set; } 10 | 11 | public Value(byte[] data) 12 | { 13 | Data = data; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_2/VariableDataRecordType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus.EN13757_2 6 | { 7 | public enum VariableDataRecordType : byte 8 | { 9 | MBUS_DIB_DIF_WITHOUT_EXTENSION = 0x7F, 10 | 11 | MBUS_DIB_DIF_EXTENSION_BIT = 0x80, 12 | 13 | MBUS_DIB_VIF_WITHOUT_EXTENSION = 0x7F, 14 | 15 | MBUS_DIB_VIF_EXTENSION_BIT = 0x80, 16 | 17 | MBUS_DIB_DIF_MANUFACTURER_SPECIFIC = 0x0F, 18 | 19 | MBUS_DIB_DIF_MORE_RECORDS_FOLLOW = 0x1F, 20 | 21 | MBUS_DIB_DIF_IDLE_FILLER = 0x2F, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/AlarmStatusPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 7 | { 8 | public sealed class AlarmStatusPacket : Packet 9 | { 10 | public byte Status { get; set; } 11 | 12 | public AlarmStatusPacket(byte address) 13 | { 14 | Address = address; 15 | } 16 | 17 | public override string ToString() 18 | { 19 | return string.Format("{0}({1}):{2:x2}", this.GetType().Name, base.ToString(), Status); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/ApplicationErrorPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 7 | { 8 | public sealed class ApplicationErrorPacket : Packet 9 | { 10 | public enum Codes : byte 11 | { 12 | Unspecified = 0, //Unspecified error: also if data field is missing 13 | Unimplemented_CI = 1, //Unimplemented CI-Field 14 | BufferTooLong = 2, //Buffer too long, truncated 15 | TooManyRecords = 3, //Too many records 16 | PrematureEnd = 4, //Premature end of record 17 | TooManyDIFEs = 5, //More than 10 DIFE´s 18 | TooManyVIFEs = 6, //More than 10 VIFE´s 19 | Reserved = 7, //Reserved 20 | Busy = 8, //Application too busy for handling readout request 21 | TooManyReadouts = 9, //Too many readouts(for slaves with limited readouts per time) 22 | } 23 | 24 | public Codes Code { get; set; } 25 | 26 | public ApplicationErrorPacket(byte address, byte code) 27 | { 28 | Address = address; 29 | Code = (Codes)code; 30 | } 31 | 32 | public override string ToString() 33 | { 34 | return string.Format("{0}({1}):{2}", this.GetType().Name, base.ToString(), Code); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/DataPacket.cs: -------------------------------------------------------------------------------- 1 | using Valley.Net.Protocols.MeterBus.EN13757_2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 8 | { 9 | public abstract class DataPacket : Packet 10 | { 11 | public UInt16 Manufr { get; set; } 12 | 13 | public UInt32 IdentificationNo { get; set; } 14 | 15 | public byte TransmissionCounter { get; set; } 16 | 17 | public DeviceType DeviceType { get; set; } 18 | 19 | public DataPacket(byte address) 20 | { 21 | Address = address; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/EmptyPacket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 7 | { 8 | public sealed class EmptyPacket : Packet 9 | { 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/FixedDataPacket.cs: -------------------------------------------------------------------------------- 1 | using Valley.Net.Protocols.MeterBus.EN13757_2; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Text; 7 | 8 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 9 | { 10 | public sealed class FixedDataPacket : DataPacket 11 | { 12 | public bool CountersFixed { get; set; } 13 | 14 | public FixedDataUnits Units1 { get; set; } 15 | 16 | public FixedDataUnits Units2 { get; set; } 17 | 18 | public UInt32 Counter1 { get; set; } 19 | 20 | public UInt32 Counter2 { get; set; } 21 | 22 | public FixedDataPacket(byte address) : base(address) 23 | { 24 | 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/Packet.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 7 | { 8 | public abstract class Packet 9 | { 10 | public bool AccessDemand { get; set; } 11 | 12 | public bool DataFlowControl { get; set; } 13 | 14 | public byte Address { get; set; } 15 | 16 | internal Packet() 17 | { 18 | 19 | } 20 | 21 | public override string ToString() 22 | { 23 | return string.Format("Address={0:x2}, AccessDemand={1}, DataFlowControl={2}", Address, AccessDemand, DataFlowControl); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EN13757_3/TimeMagnitudes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus.EN13757_3 7 | { 8 | public enum TimeMagnitudes : byte 9 | { 10 | Seconds = 0, 11 | Minutes = 1, 12 | Hours = 2, 13 | Days = 3 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/EnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus 6 | { 7 | public static class EnumerableExtensions 8 | { 9 | public static IEnumerable> GroupAdjacentBy(this IEnumerable source, Func separator) 10 | { 11 | using (var e = source.GetEnumerator()) 12 | { 13 | if (e.MoveNext()) 14 | { 15 | var list = new List { e.Current }; 16 | 17 | while (e.MoveNext()) 18 | { 19 | if (!separator(e.Current)) 20 | { 21 | list.Add(e.Current); 22 | } 23 | else 24 | { 25 | yield return list; 26 | 27 | list = new List { e.Current }; 28 | } 29 | } 30 | 31 | yield return list; 32 | } 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/MeterEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus 6 | { 7 | public sealed class MeterEventArgs : EventArgs 8 | { 9 | public byte Address { get; } 10 | 11 | public MeterEventArgs(byte address) 12 | { 13 | Address = address; 14 | } 15 | 16 | public MeterEventArgs() 17 | { 18 | 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/MeterbusXmlWriter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Xml; 5 | 6 | namespace Valley.Net.Protocols.MeterBus 7 | { 8 | public sealed class MeterbusXmlWriter : XmlWriter 9 | { 10 | public override WriteState WriteState => throw new NotImplementedException(); 11 | 12 | public override void Flush() 13 | { 14 | throw new NotImplementedException(); 15 | } 16 | 17 | public override string LookupPrefix(string ns) 18 | { 19 | throw new NotImplementedException(); 20 | } 21 | 22 | public override void WriteBase64(byte[] buffer, int index, int count) 23 | { 24 | throw new NotImplementedException(); 25 | } 26 | 27 | public override void WriteCData(string text) 28 | { 29 | throw new NotImplementedException(); 30 | } 31 | 32 | public override void WriteCharEntity(char ch) 33 | { 34 | throw new NotImplementedException(); 35 | } 36 | 37 | public override void WriteChars(char[] buffer, int index, int count) 38 | { 39 | throw new NotImplementedException(); 40 | } 41 | 42 | public override void WriteComment(string text) 43 | { 44 | throw new NotImplementedException(); 45 | } 46 | 47 | public override void WriteDocType(string name, string pubid, string sysid, string subset) 48 | { 49 | throw new NotImplementedException(); 50 | } 51 | 52 | public override void WriteEndAttribute() 53 | { 54 | throw new NotImplementedException(); 55 | } 56 | 57 | public override void WriteEndDocument() 58 | { 59 | throw new NotImplementedException(); 60 | } 61 | 62 | public override void WriteEndElement() 63 | { 64 | throw new NotImplementedException(); 65 | } 66 | 67 | public override void WriteEntityRef(string name) 68 | { 69 | throw new NotImplementedException(); 70 | } 71 | 72 | public override void WriteFullEndElement() 73 | { 74 | throw new NotImplementedException(); 75 | } 76 | 77 | public override void WriteProcessingInstruction(string name, string text) 78 | { 79 | throw new NotImplementedException(); 80 | } 81 | 82 | public override void WriteRaw(char[] buffer, int index, int count) 83 | { 84 | throw new NotImplementedException(); 85 | } 86 | 87 | public override void WriteRaw(string data) 88 | { 89 | throw new NotImplementedException(); 90 | } 91 | 92 | public override void WriteStartAttribute(string prefix, string localName, string ns) 93 | { 94 | throw new NotImplementedException(); 95 | } 96 | 97 | public override void WriteStartDocument() 98 | { 99 | throw new NotImplementedException(); 100 | } 101 | 102 | public override void WriteStartDocument(bool standalone) 103 | { 104 | throw new NotImplementedException(); 105 | } 106 | 107 | public override void WriteStartElement(string prefix, string localName, string ns) 108 | { 109 | throw new NotImplementedException(); 110 | } 111 | 112 | public override void WriteString(string text) 113 | { 114 | throw new NotImplementedException(); 115 | } 116 | 117 | public override void WriteSurrogateCharEntity(char lowChar, char highChar) 118 | { 119 | throw new NotImplementedException(); 120 | } 121 | 122 | public override void WriteWhitespace(string ws) 123 | { 124 | throw new NotImplementedException(); 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/PacketEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using Valley.Net.Bindings; 5 | 6 | namespace Valley.Net.Protocols.MeterBus 7 | { 8 | public sealed class PacketEventArgs : EventArgs 9 | { 10 | public INetworkPacket Packet { get; } 11 | 12 | public PacketEventArgs(INetworkPacket packet) 13 | { 14 | Packet = packet; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace Valley.Net.Protocols.MeterBus 7 | { 8 | public static class StringExtensions 9 | { 10 | public static byte[] HexToBytes(this string value) 11 | { 12 | value = value.Replace(" ", string.Empty); 13 | 14 | return Enumerable 15 | .Range(0, value.Length) 16 | .Where(x => x % 2 == 0) 17 | .Select(x => Convert.ToByte(value.Substring(x, 2), 16)) 18 | .ToArray(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/UnixTime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Valley.Net.Protocols.MeterBus 6 | { 7 | public static class UnixTime 8 | { 9 | private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0); 10 | 11 | public static DateTime UnixTimeToDateTime(double unixTimeStamp) 12 | { 13 | return Epoch.AddSeconds(unixTimeStamp).ToUniversalTime(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Valley.Net.Protocols.MeterBus/Valley.Net.Protocols.MeterBus.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | Martin Dahlstedt 6 | Valley 7 | 1.0.3 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | --------------------------------------------------------------------------------