Porównaj commity

...

6 Commity

Autor SHA1 Wiadomość Data
Álvaro Alonso 216175129e
Merge branch 'master' into master 2024-04-12 19:13:41 +02:00
Fredrik Öhrström efcc41d107 Add support for GJ VIF. 2024-04-09 20:47:42 +02:00
Fredrik Öhrström a69e547a17 Update drivers with signedness. Fix tests. 2024-04-09 11:11:17 +02:00
Fredrik Öhrström 23f2279a64 Separate VIF scaling and DIF signedness. Default to signed DIF binary integers. 2024-04-09 10:41:30 +02:00
Fredrik Öhrström 05edab0882 Add help on intsalling jq. 2024-04-08 17:02:35 +02:00
Fredrik Öhrström ff72e1debc Add dynamic driver lookup bits translation to strings. 2024-04-04 20:59:03 +02:00
94 zmienionych plików z 1638 dodań i 1125 usunięć

Wyświetl plik

@ -1,4 +1,11 @@
Fixed long standing confusion wether the DIF binary values are by
default signed or unsigned. It turns out that they are signed!
Thank you Mathias (Zeppelin500) and KaVauA for sorting this out!
For unknown VIFS and non-compliant meters the signedness
can be overriden to unsigned.
New improved address specification. E.g. use 12345678.M=KAM.V=1b.T=16 New improved address specification. E.g. use 12345678.M=KAM.V=1b.T=16
to listen to exactly the telegrams with id 12345678 manufacturer KAM, to listen to exactly the telegrams with id 12345678 manufacturer KAM,
version 0x1b and type 0x16. You if you do not specify any M,V or T, they version 0x1b and type 0x16. You if you do not specify any M,V or T, they

Wyświetl plik

@ -1,4 +1,4 @@
# Copyright (C) 2017-2023 Fredrik Öhrström (gpl-3.0-or-later) # Copyright (C) 2017-2024 Fredrik Öhrström (gpl-3.0-or-later)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

Wyświetl plik

@ -46,7 +46,7 @@ namespace
"Total cumulative active imported energy.", "Total cumulative active imported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -58,7 +58,7 @@ namespace
"Total cumulative active imported energy per tariff.", "Total cumulative active imported energy per tariff.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -71,7 +71,7 @@ namespace
"Total cumulative active exported energy.", "Total cumulative active exported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -85,7 +85,7 @@ namespace
"Total cumulative active exported energy per tariff.", "Total cumulative active exported energy per tariff.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -99,7 +99,7 @@ namespace
"Active tariff.", "Active tariff.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FF9300")), .set(DifVifKey("01FF9300")),
Unit::NUMBER Unit::NUMBER
@ -110,7 +110,7 @@ namespace
"Current transformer ratio (numerator).", "Current transformer ratio (numerator).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA015")), .set(DifVifKey("04FFA015")),
Unit::FACTOR Unit::FACTOR
@ -121,7 +121,7 @@ namespace
"Voltage transformer ratio (numerator).", "Voltage transformer ratio (numerator).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA115")), .set(DifVifKey("04FFA115")),
Unit::FACTOR Unit::FACTOR
@ -132,7 +132,7 @@ namespace
"Current transformer ratio (denominator).", "Current transformer ratio (denominator).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA215")), .set(DifVifKey("04FFA215")),
Unit::FACTOR Unit::FACTOR
@ -143,7 +143,7 @@ namespace
"Voltage transformer ratio (denominator).", "Voltage transformer ratio (denominator).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA315")), .set(DifVifKey("04FFA315")),
Unit::FACTOR Unit::FACTOR
@ -157,7 +157,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("07FFA600")), .set(DifVifKey("07FFA600")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xffffffffffffffff)) .set(MaskBits(0xffffffffffffffff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -170,7 +170,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("07FFA700")), .set(DifVifKey("07FFA700")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("WARNING_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("WARNING_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xffffffffffffffff)) .set(MaskBits(0xffffffffffffffff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -183,7 +183,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("07FFA800")), .set(DifVifKey("07FFA800")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INFORMATION_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("INFORMATION_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xffffffffffffffff)) .set(MaskBits(0xffffffffffffffff))
.set(DefaultMessage("")) .set(DefaultMessage(""))
)); ));
@ -196,7 +196,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("07FFA900")), .set(DifVifKey("07FFA900")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ALARM_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ALARM_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xfffffffffffffff)) .set(MaskBits(0xfffffffffffffff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -209,7 +209,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("01FFAD00")), .set(DifVifKey("01FFAD00")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("UNKNOWN", Translate::Type::BitToString) .add(Translate::Rule("UNKNOWN", Translate::MapType::BitToString)
.set(MaskBits(0xff)) .set(MaskBits(0xff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -236,7 +236,7 @@ namespace
"Power fail counter.", "Power fail counter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FF9800")) .set(DifVifKey("04FF9800"))
); );
@ -246,7 +246,7 @@ namespace
"Instantaneous total active imported power.", "Instantaneous total active imported power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -258,7 +258,7 @@ namespace
"Instantaneous active imported power for L1 phase.", "Instantaneous active imported power for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -271,7 +271,7 @@ namespace
"Instantaneous active imported power for L2 phase.", "Instantaneous active imported power for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -284,7 +284,7 @@ namespace
"Instantaneous active imported power for L3 phase.", "Instantaneous active imported power for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -297,7 +297,7 @@ namespace
"Instantaneous total reactive imported power.", "Instantaneous total reactive imported power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -310,7 +310,7 @@ namespace
"Instantaneous reactive imported power for L1 phase.", "Instantaneous reactive imported power for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -324,7 +324,7 @@ namespace
"Instantaneous reactive imported power for L2 phase.", "Instantaneous reactive imported power for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -338,7 +338,7 @@ namespace
"Instantaneous reactive imported power for L3 phase.", "Instantaneous reactive imported power for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -352,7 +352,7 @@ namespace
"Instantaneous total apparent imported power.", "Instantaneous total apparent imported power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -365,7 +365,7 @@ namespace
"Instantaneous apparent imported power for L1 phase.", "Instantaneous apparent imported power for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -379,7 +379,7 @@ namespace
"Instantaneous apparent imported power for L2 phase.", "Instantaneous apparent imported power for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -393,7 +393,7 @@ namespace
"Instantaneous apparent imported power for L3 phase.", "Instantaneous apparent imported power for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -407,7 +407,7 @@ namespace
"Instantaneous voltage between L1 and neutral.", "Instantaneous voltage between L1 and neutral.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -420,7 +420,7 @@ namespace
"Instantaneous voltage between L2 and neutral.", "Instantaneous voltage between L2 and neutral.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -433,7 +433,7 @@ namespace
"Instantaneous voltage between L3 and neutral.", "Instantaneous voltage between L3 and neutral.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -446,7 +446,7 @@ namespace
"Instantaneous voltage between L1 and L2.", "Instantaneous voltage between L1 and L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -459,7 +459,7 @@ namespace
"Instantaneous voltage between L2 and L3.", "Instantaneous voltage between L2 and L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -472,7 +472,7 @@ namespace
"Instantaneous voltage between L3 and L1.", "Instantaneous voltage between L3 and L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -485,7 +485,7 @@ namespace
"Instantaneous current in the L1 phase.", "Instantaneous current in the L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -498,7 +498,7 @@ namespace
"Instantaneous current in the L2 phase.", "Instantaneous current in the L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -511,7 +511,7 @@ namespace
"Instantaneous current in the L3 phase.", "Instantaneous current in the L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -524,7 +524,7 @@ namespace
"Frequency of AC", "Frequency of AC",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Frequency, Quantity::Frequency,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0AFFD900")), .set(DifVifKey("0AFFD900")),
Unit::HZ, Unit::HZ,
@ -536,7 +536,7 @@ namespace
"Power factor.", "Power factor.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFE000")), .set(DifVifKey("02FFE000")),
Unit::FACTOR, Unit::FACTOR,
@ -548,7 +548,7 @@ namespace
"Power factor for phase L1.", "Power factor for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFE0FF8100")), .set(DifVifKey("02FFE0FF8100")),
Unit::FACTOR, Unit::FACTOR,
@ -560,7 +560,7 @@ namespace
"Power factor for phase L2.", "Power factor for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFE0FF8200")), .set(DifVifKey("02FFE0FF8200")),
Unit::FACTOR, Unit::FACTOR,
@ -572,7 +572,7 @@ namespace
"Power factor.", "Power factor.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFE0FF8300")), .set(DifVifKey("02FFE0FF8300")),
Unit::FACTOR, Unit::FACTOR,
@ -584,7 +584,7 @@ namespace
"Total power phase angle.", "Total power phase angle.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Angle, Quantity::Angle,
VifScaling::NoneSigned, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFD200")), .set(DifVifKey("02FFD200")),
Unit::DEGREE, Unit::DEGREE,
@ -596,7 +596,7 @@ namespace
"Power phase angle for phase L1.", "Power phase angle for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Angle, Quantity::Angle,
VifScaling::NoneSigned, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFD2FF8100")), .set(DifVifKey("02FFD2FF8100")),
Unit::DEGREE, Unit::DEGREE,
@ -608,7 +608,7 @@ namespace
"Power phase angle for phase L2.", "Power phase angle for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Angle, Quantity::Angle,
VifScaling::NoneSigned, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFD2FF8200")), .set(DifVifKey("02FFD2FF8200")),
Unit::DEGREE, Unit::DEGREE,
@ -620,7 +620,7 @@ namespace
"Power phase angle for phase L3.", "Power phase angle for phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Angle, Quantity::Angle,
VifScaling::NoneSigned, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FFD2FF8300")), .set(DifVifKey("02FFD2FF8300")),
Unit::DEGREE, Unit::DEGREE,
@ -632,7 +632,7 @@ namespace
"Total cumulative reactive kvarh imported energy.", "Total cumulative reactive kvarh imported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Reactive_Energy, Quantity::Reactive_Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -646,7 +646,7 @@ namespace
"Total cumulative reactive kvarh imported energy per tariff.", "Total cumulative reactive kvarh imported energy per tariff.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -660,7 +660,7 @@ namespace
"Total cumulative reactive kvarh exported energy.", "Total cumulative reactive kvarh exported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Reactive_Energy, Quantity::Reactive_Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -674,7 +674,7 @@ namespace
"Total cumulative reactive kvarh exported energy per tariff.", "Total cumulative reactive kvarh exported energy per tariff.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -688,7 +688,7 @@ namespace
"The quadrant in which the current is measured.", "The quadrant in which the current is measured.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FF9700")), .set(DifVifKey("01FF9700")),
Unit::NUMBER Unit::NUMBER
@ -699,7 +699,7 @@ namespace
"The quadrant in which the current is measured for phase L1.", "The quadrant in which the current is measured for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FF97FF8100")), .set(DifVifKey("01FF97FF8100")),
Unit::NUMBER Unit::NUMBER
@ -710,7 +710,7 @@ namespace
"The quadrant in which the current is measured for phase L2.", "The quadrant in which the current is measured for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FF97FF8200")), .set(DifVifKey("01FF97FF8200")),
Unit::NUMBER Unit::NUMBER
@ -721,7 +721,7 @@ namespace
"The quadrant in which the current is measured for phase L3.", "The quadrant in which the current is measured for phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FF97FF8300")), .set(DifVifKey("01FF97FF8300")),
Unit::NUMBER Unit::NUMBER
@ -739,7 +739,7 @@ namespace
.set(SubUnitNr(1),SubUnitNr(2)) .set(SubUnitNr(1),SubUnitNr(2))
.add(VIFCombinableRaw(0)), .add(VIFCombinableRaw(0)),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("OUTPUT", Translate::Type::BitToString) .add(Translate::Rule("OUTPUT", Translate::MapType::BitToString)
.set(MaskBits(0xff)) .set(MaskBits(0xff))
)); ));
@ -753,7 +753,7 @@ namespace
.set(SubUnitNr(3),SubUnitNr(4)) .set(SubUnitNr(3),SubUnitNr(4))
.add(VIFCombinableRaw(0)), .add(VIFCombinableRaw(0)),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INPUT", Translate::Type::BitToString) .add(Translate::Rule("INPUT", Translate::MapType::BitToString)
.set(MaskBits(0xff)) .set(MaskBits(0xff))
)); ));
@ -768,7 +768,7 @@ namespace
.set(SubUnitNr(3),SubUnitNr(4)) .set(SubUnitNr(3),SubUnitNr(4))
.add(VIFCombinableRaw(0)), .add(VIFCombinableRaw(0)),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INPUT", Translate::Type::BitToString) .add(Translate::Rule("INPUT", Translate::MapType::BitToString)
.set(MaskBits(0xff)) .set(MaskBits(0xff))
)); ));
@ -777,7 +777,7 @@ namespace
"Number of times input 1-2 counted a 1.", "Number of times input 1-2 counted a 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(SubUnitNr(3),SubUnitNr(4)) .set(SubUnitNr(3),SubUnitNr(4))
@ -790,7 +790,7 @@ namespace
"Resettable cumulative active imported energy.", "Resettable cumulative active imported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -803,7 +803,7 @@ namespace
"Resettable cumulative active exported energy.", "Resettable cumulative active exported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -817,7 +817,7 @@ namespace
"Resettable cumulative reactive imported energy.", "Resettable cumulative reactive imported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -831,7 +831,7 @@ namespace
"Resettable cumulative reactive exported energy.", "Resettable cumulative reactive exported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -845,7 +845,7 @@ namespace
"Number of times the resettable energy imported value has been reset.", "Number of times the resettable energy imported value has been reset.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRaw(0x7f71)) .set(VIFRaw(0x7f71))
@ -857,7 +857,7 @@ namespace
"Number of times the resettable active energy exported value has been reset.", "Number of times the resettable active energy exported value has been reset.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRaw(0x7f71)) .set(VIFRaw(0x7f71))
@ -870,7 +870,7 @@ namespace
"Number of times the resettable reactive energy imported value has been reset.", "Number of times the resettable reactive energy imported value has been reset.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRaw(0x7f71)) .set(VIFRaw(0x7f71))
@ -883,7 +883,7 @@ namespace
"Number of times the resettable reactive energy exported value has been reset.", "Number of times the resettable reactive energy exported value has been reset.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRaw(0x7f71)) .set(VIFRaw(0x7f71))
@ -896,7 +896,7 @@ namespace
"Energy in co2.", "Energy in co2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Mass, Quantity::Mass,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0EFFF9C400")), .set(DifVifKey("0EFFF9C400")),
Unit::KG, Unit::KG,
@ -908,7 +908,7 @@ namespace
"CO2 conversion factor (kg * 10-3 /kWh).", "CO2 conversion factor (kg * 10-3 /kWh).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA400")), .set(DifVifKey("04FFA400")),
Unit::FACTOR Unit::FACTOR
@ -919,7 +919,7 @@ namespace
"Energy in currency.", "Energy in currency.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0EFFF9C900")) .set(DifVifKey("0EFFF9C900"))
); );
@ -929,7 +929,7 @@ namespace
"Currency conversion factor (curr * 10-3 /kWh).", "Currency conversion factor (curr * 10-3 /kWh).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FFA500")), .set(DifVifKey("04FFA500")),
Unit::FACTOR Unit::FACTOR
@ -940,7 +940,7 @@ namespace
"Total cumulative apparent kvah imported energy.", "Total cumulative apparent kvah imported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Apparent_Energy, Quantity::Apparent_Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -954,7 +954,7 @@ namespace
"Total cumulative apparent kvah exported energy.", "Total cumulative apparent kvah exported energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Apparent_Energy, Quantity::Apparent_Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -968,7 +968,7 @@ namespace
"Total imported active energy for L1 phase.", "Total imported active energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -981,7 +981,7 @@ namespace
"Total imported active energy for L2 phase.", "Total imported active energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -994,7 +994,7 @@ namespace
"Total imported active energy for L3 phase.", "Total imported active energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1007,7 +1007,7 @@ namespace
"Total imported reactive energy for L1 phase.", "Total imported reactive energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1021,7 +1021,7 @@ namespace
"Total imported reactive energy for L2 phase.", "Total imported reactive energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1035,7 +1035,7 @@ namespace
"Total imported reactive energy for L3 phase.", "Total imported reactive energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1049,7 +1049,7 @@ namespace
"Total imported apparent energy for L1 phase.", "Total imported apparent energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1063,7 +1063,7 @@ namespace
"Total imported apparent energy for L2 phase.", "Total imported apparent energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1077,7 +1077,7 @@ namespace
"Total imported apparent energy for L3 phase.", "Total imported apparent energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1091,7 +1091,7 @@ namespace
"Total exported active energy for L1 phase.", "Total exported active energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1105,7 +1105,7 @@ namespace
"Total exported active energy for L2 phase.", "Total exported active energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1119,7 +1119,7 @@ namespace
"Total exported active energy for L3 phase.", "Total exported active energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1133,7 +1133,7 @@ namespace
"Total exported reactive energy for L1 phase.", "Total exported reactive energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1147,7 +1147,7 @@ namespace
"Total exported reactive energy for L2 phase.", "Total exported reactive energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1161,7 +1161,7 @@ namespace
"Total exported reactive energy for L3 phase.", "Total exported reactive energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1175,7 +1175,7 @@ namespace
"Total exported apparent energy for L1 phase.", "Total exported apparent energy for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1189,7 +1189,7 @@ namespace
"Total exported apparent energy for L2 phase.", "Total exported apparent energy for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1203,7 +1203,7 @@ namespace
"Total exported apparent energy for L3 phase.", "Total exported apparent energy for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1217,7 +1217,7 @@ namespace
"Active net energy total.", "Active net energy total.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1230,7 +1230,7 @@ namespace
"Active net energy total for phase L1.", "Active net energy total for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1244,7 +1244,7 @@ namespace
"Active net energy total for phase L2.", "Active net energy total for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1258,7 +1258,7 @@ namespace
"Active net energy total for phase L3.", "Active net energy total for phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1272,7 +1272,7 @@ namespace
"Active net energy total.", "Active net energy total.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1286,7 +1286,7 @@ namespace
"Active net reactive energy total for phase L1.", "Active net reactive energy total for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1301,7 +1301,7 @@ namespace
"Active net reactive energy total for phase L2.", "Active net reactive energy total for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1316,7 +1316,7 @@ namespace
"Active net reactive energy total for phase L3.", "Active net reactive energy total for phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1331,7 +1331,7 @@ namespace
"Active net energy total.", "Active net energy total.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1345,7 +1345,7 @@ namespace
"Active net apparent energy total for phase L1.", "Active net apparent energy total for phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1360,7 +1360,7 @@ namespace
"Active net apparent energy total for phase L2.", "Active net apparent energy total for phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -1375,7 +1375,7 @@ namespace
"Active net apparent energy total for phase L3.", "Active net apparent energy total for phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)

Wyświetl plik

@ -41,7 +41,7 @@ namespace
"The total gas consumption recorded by this meter.", "The total gas consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -53,7 +53,7 @@ namespace
"The current gas flow.", "The current gas flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -64,7 +64,7 @@ namespace
"The current temperature.", "The current temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -75,7 +75,7 @@ namespace
"Date time when previous billing period ended.", "Date time when previous billing period ended.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -87,7 +87,7 @@ namespace
"The total gas consumption recorded when the previous billing period ended.", "The total gas consumption recorded when the previous billing period ended.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -43,7 +43,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -54,7 +54,7 @@ namespace
"Current power consumption.", "Current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -65,7 +65,7 @@ namespace
"The total energy production recorded by this meter.", "The total energy production recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0E833C")) .set(DifVifKey("0E833C"))
); );
@ -75,7 +75,7 @@ namespace
"Current power production.", "Current power production.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0BAB3C")) .set(DifVifKey("0BAB3C"))
); );
@ -85,7 +85,7 @@ namespace
"Voltage at phase L1.", "Voltage at phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0AFDC9FC01")) .set(DifVifKey("0AFDC9FC01"))
); );
@ -95,7 +95,7 @@ namespace
"Voltage at phase L2.", "Voltage at phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0AFDC9FC02")) .set(DifVifKey("0AFDC9FC02"))
); );
@ -105,7 +105,7 @@ namespace
"Voltage at phase L3.", "Voltage at phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0AFDC9FC03")) .set(DifVifKey("0AFDC9FC03"))
); );
@ -124,7 +124,7 @@ namespace
"The total energy consumption recorded by this meter on tariff 1.", "The total energy consumption recorded by this meter on tariff 1.",
DEFAULT_PRINT_PROPERTIES, // , DEFAULT_PRINT_PROPERTIES, // ,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -136,7 +136,7 @@ namespace
"The total energy consumption recorded by this meter on tariff 2.", "The total energy consumption recorded by this meter on tariff 2.",
DEFAULT_PRINT_PROPERTIES, // , DEFAULT_PRINT_PROPERTIES, // ,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -148,7 +148,7 @@ namespace
"The total energy consumption recorded by this meter on tariff 3.", "The total energy consumption recorded by this meter on tariff 3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -160,7 +160,7 @@ namespace
"The total energy production recorded by this meter on tariff 1.", "The total energy production recorded by this meter on tariff 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("8E10833C")) .set(DifVifKey("8E10833C"))
); );
@ -170,7 +170,7 @@ namespace
"The total energy production recorded by this meter on tariff 2.", "The total energy production recorded by this meter on tariff 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("8E20833C")) .set(DifVifKey("8E20833C"))
); );
@ -180,7 +180,7 @@ namespace
"The total energy production recorded by this meter on tariff 3.", "The total energy production recorded by this meter on tariff 3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("8E30833C")) .set(DifVifKey("8E30833C"))
); );
@ -190,7 +190,7 @@ namespace
"The maximum demand indicator (maximum 15-min average power consumption recorded this month).", "The maximum demand indicator (maximum 15-min average power consumption recorded this month).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -75,7 +75,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"", "",
{ {
@ -95,7 +95,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -106,7 +106,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -118,7 +118,7 @@ namespace
"The heat cost allocation at set date #.", "The heat cost allocation at set date #.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -69,7 +69,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -80,7 +80,7 @@ namespace
"Water consumption at the # billing period date.", "Water consumption at the # billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -100,7 +100,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"", "",
{ {

Wyświetl plik

@ -72,7 +72,7 @@ namespace
"The total heat energy consumption recorded by this meter.", "The total heat energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -94,7 +94,7 @@ namespace
"The total heating media volume recorded by this meter.", "The total heating media volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -113,7 +113,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::DecimalsToString, Translate::MapType::DecimalsToString,
AlwaysTrigger, MaskBits(9999), AlwaysTrigger, MaskBits(9999),
"OK", "OK",
{ {
@ -176,7 +176,7 @@ namespace
"The total heat energy consumption recorded at end of previous month.", "The total heat energy consumption recorded at end of previous month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(32+i)) .set(StorageNr(32+i))
@ -207,7 +207,7 @@ namespace
tostrprintf("Previous month %d last date.", i+1), tostrprintf("Previous month %d last date.", i+1),
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(32+i)) .set(StorageNr(32+i))
@ -236,7 +236,7 @@ namespace
"The total heat energy consumption at the due date.", "The total heat energy consumption at the due date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(8)) .set(StorageNr(8))
@ -283,7 +283,7 @@ namespace
"The current heat media volume flow.", "The current heat media volume flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -294,7 +294,7 @@ namespace
"The current Heat power consumption.", "The current Heat power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -317,7 +317,7 @@ namespace
"The total heat energy consumption recorded at end of last month.", "The total heat energy consumption recorded at end of last month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(32)) .set(StorageNr(32))
@ -351,7 +351,7 @@ namespace
"Maximum Heat power consumption last month.", "Maximum Heat power consumption last month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(StorageNr(32)) .set(StorageNr(32))
@ -379,7 +379,7 @@ namespace
"The current forward heat media temperature.", "The current forward heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -390,7 +390,7 @@ namespace
"The current return heat media temperature.", "The current return heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -402,17 +402,17 @@ namespace
// Test: Heat c5isf 55445555 NOKEY // Test: Heat c5isf 55445555 NOKEY
// telegram=|E544496A55554455880D7A320200002F2F_04060000000004130000000002FD17240084800106000000008280016C2124C480010600000080C280016CFFFF84810106000000808281016CFFFFC481010600000080C281016CFFFF84820106000000808282016CFFFFC482010600000080C282016CFFFF84830106000000808283016CFFFFC483010600000080C283016CFFFF84840106000000808284016CFFFFC484010600000080C284016CFFFF84850106000000808285016CFFFFC485010600000080C285016CFFFF84860106000000808286016CFFFFC486010600000080C286016CFFFF| // telegram=|E544496A55554455880D7A320200002F2F_04060000000004130000000002FD17240084800106000000008280016C2124C480010600000080C280016CFFFF84810106000000808281016CFFFFC481010600000080C281016CFFFF84820106000000808282016CFFFFC482010600000080C282016CFFFF84830106000000808283016CFFFFC483010600000080C283016CFFFF84840106000000808284016CFFFFC484010600000080C284016CFFFF84850106000000808285016CFFFFC485010600000080C285016CFFFF84860106000000808286016CFFFFC486010600000080C286016CFFFF|
// {"media":"heat/cooling load","meter":"c5isf","name":"Heat","id":"55445555","total_energy_consumption_kwh":0,"total_volume_m3":0,"status":"ERROR REVERSE_FLOW SUPPLY_SENSOR_INTERRUPTED","prev_1_month":"2017-04-01","prev_2_month":"2127-15-31","prev_3_month":"2127-15-31","prev_4_month":"2127-15-31","prev_5_month":"2127-15-31","prev_6_month":"2127-15-31","prev_7_month":"2127-15-31","prev_8_month":"2127-15-31","prev_9_month":"2127-15-31","prev_10_month":"2127-15-31","prev_11_month":"2127-15-31","prev_12_month":"2127-15-31","prev_13_month":"2127-15-31","prev_14_month":"2127-15-31","prev_1_month_kwh":0,"prev_2_month_kwh":2147483648,"prev_3_month_kwh":2147483648,"prev_4_month_kwh":2147483648,"prev_5_month_kwh":2147483648,"prev_6_month_kwh":2147483648,"prev_7_month_kwh":2147483648,"prev_8_month_kwh":2147483648,"prev_9_month_kwh":2147483648,"prev_10_month_kwh":2147483648,"prev_11_month_kwh":2147483648,"prev_12_month_kwh":2147483648,"prev_13_month_kwh":2147483648,"prev_14_month_kwh":2147483648,"total_energy_consumption_last_month_kwh":0,"timestamp":"1111-11-11T11:11:11Z"} // {"media":"heat/cooling load","meter":"c5isf","name":"Heat","id":"55445555","total_energy_consumption_kwh":0,"total_volume_m3":0,"status":"ERROR REVERSE_FLOW SUPPLY_SENSOR_INTERRUPTED","prev_1_month":"2017-04-01","prev_2_month":"2127-15-31","prev_3_month":"2127-15-31","prev_4_month":"2127-15-31","prev_5_month":"2127-15-31","prev_6_month":"2127-15-31","prev_7_month":"2127-15-31","prev_8_month":"2127-15-31","prev_9_month":"2127-15-31","prev_10_month":"2127-15-31","prev_11_month":"2127-15-31","prev_12_month":"2127-15-31","prev_13_month":"2127-15-31","prev_14_month":"2127-15-31","prev_1_month_kwh":0,"prev_2_month_kwh":-2147483648,"prev_3_month_kwh":-2147483648,"prev_4_month_kwh":-2147483648,"prev_5_month_kwh":-2147483648,"prev_6_month_kwh":-2147483648,"prev_7_month_kwh":-2147483648,"prev_8_month_kwh":-2147483648,"prev_9_month_kwh":-2147483648,"prev_10_month_kwh":-2147483648,"prev_11_month_kwh":-2147483648,"prev_12_month_kwh":-2147483648,"prev_13_month_kwh":-2147483648,"prev_14_month_kwh":-2147483648,"total_energy_consumption_last_month_kwh":0,"timestamp":"1111-11-11T11:11:11Z"}
// |Heat;55445555;0;0;ERROR REVERSE_FLOW SUPPLY_SENSOR_INTERRUPTED;1111-11-11 11:11.11 // |Heat;55445555;0;0;ERROR REVERSE_FLOW SUPPLY_SENSOR_INTERRUPTED;1111-11-11 11:11.11
// Type T1A2 telegram: // Type T1A2 telegram:
// telegram=|DA44496A5555445588077A320200002F2F_04140000000084800114000000008280016C2124C480011400000080C280016CFFFF84810114000000808281016CFFFFC481011400000080C281016CFFFF84820114000000808282016CFFFFC482011400000080C282016CFFFF84830114000000808283016CFFFFC483011400000080C283016CFFFF84840114000000808284016CFFFFC484011400000080C284016CFFFF84850114000000808285016CFFFFC485011400000080C285016CFFFF84860114000000808286016CFFFFC486011400000080C286016CFFFF| // telegram=|DA44496A5555445588077A320200002F2F_04140000000084800114000000008280016C2124C480011400000080C280016CFFFF84810114000000808281016CFFFFC481011400000080C281016CFFFF84820114000000808282016CFFFFC482011400000080C282016CFFFF84830114000000808283016CFFFFC483011400000080C283016CFFFF84840114000000808284016CFFFFC484011400000080C284016CFFFF84850114000000808285016CFFFFC485011400000080C285016CFFFF84860114000000808286016CFFFFC486011400000080C286016CFFFF|
// {"id": "55445555","media": "water","meter": "c5isf","name": "Heat","prev_10_month": "2127-15-31","prev_10_month_kwh": 2147483648,"prev_10_month_m3": 21474836.48,"prev_11_month": "2127-15-31","prev_11_month_kwh": 2147483648,"prev_11_month_m3": 21474836.48,"prev_12_month": "2127-15-31","prev_12_month_kwh": 2147483648,"prev_12_month_m3": 21474836.48,"prev_13_month": "2127-15-31","prev_13_month_kwh": 2147483648,"prev_13_month_m3": 21474836.48,"prev_14_month": "2127-15-31","prev_14_month_kwh": 2147483648,"prev_14_month_m3": 21474836.48,"prev_1_month": "2017-04-01","prev_1_month_kwh": 0,"prev_1_month_m3": 0,"prev_2_month": "2127-15-31","prev_2_month_kwh": 2147483648,"prev_2_month_m3": 21474836.48,"prev_3_month": "2127-15-31","prev_3_month_kwh": 2147483648,"prev_3_month_m3": 21474836.48,"prev_4_month": "2127-15-31","prev_4_month_kwh": 2147483648,"prev_4_month_m3": 21474836.48,"prev_5_month": "2127-15-31","prev_5_month_kwh": 2147483648,"prev_5_month_m3": 21474836.48,"prev_6_month": "2127-15-31","prev_6_month_kwh": 2147483648,"prev_6_month_m3": 21474836.48,"prev_7_month": "2127-15-31","prev_7_month_kwh": 2147483648,"prev_7_month_m3": 21474836.48,"prev_8_month": "2127-15-31","prev_8_month_kwh": 2147483648,"prev_8_month_m3": 21474836.48,"prev_9_month": "2127-15-31","prev_9_month_kwh": 2147483648,"prev_9_month_m3": 21474836.48,"status": "ERROR","timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 0,"total_energy_consumption_last_month_kwh": 0,"total_volume_m3": 0} // {"id": "55445555","media": "water","meter": "c5isf","name": "Heat","prev_10_month": "2127-15-31","prev_10_month_kwh":-2147483648,"prev_10_month_m3":-21474836.48,"prev_11_month": "2127-15-31","prev_11_month_kwh":-2147483648,"prev_11_month_m3":-21474836.48,"prev_12_month": "2127-15-31","prev_12_month_kwh":-2147483648,"prev_12_month_m3":-21474836.48,"prev_13_month": "2127-15-31","prev_13_month_kwh":-2147483648,"prev_13_month_m3":-21474836.48,"prev_14_month": "2127-15-31","prev_14_month_kwh":-2147483648,"prev_14_month_m3":-21474836.48,"prev_1_month": "2017-04-01","prev_1_month_kwh": 0,"prev_1_month_m3": 0,"prev_2_month": "2127-15-31","prev_2_month_kwh":-2147483648,"prev_2_month_m3":-21474836.48,"prev_3_month": "2127-15-31","prev_3_month_kwh":-2147483648,"prev_3_month_m3":-21474836.48,"prev_4_month": "2127-15-31","prev_4_month_kwh":-2147483648,"prev_4_month_m3":-21474836.48,"prev_5_month": "2127-15-31","prev_5_month_kwh":-2147483648,"prev_5_month_m3":-21474836.48,"prev_6_month": "2127-15-31","prev_6_month_kwh":-2147483648,"prev_6_month_m3":-21474836.48,"prev_7_month": "2127-15-31","prev_7_month_kwh":-2147483648,"prev_7_month_m3":-21474836.48,"prev_8_month": "2127-15-31","prev_8_month_kwh":-2147483648,"prev_8_month_m3":-21474836.48,"prev_9_month": "2127-15-31","prev_9_month_kwh":-2147483648,"prev_9_month_m3":-21474836.48,"status": "ERROR","timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 0,"total_energy_consumption_last_month_kwh": 0,"total_volume_m3": 0}
// |Heat;55445555;0;0;ERROR;1111-11-11 11:11.11 // |Heat;55445555;0;0;ERROR;1111-11-11 11:11.11
// Type T1B telegram: // Type T1B telegram:
// telegram=|5E44496A5555445588047A0A0050052F2F_04061A0000000413C20800008404060000000082046CC121043BA4000000042D1900000002591216025DE21002FD17000084800106000000008280016CC121948001AE25000000002F2F2F2F2F2F| // telegram=|5E44496A5555445588047A0A0050052F2F_04061A0000000413C20800008404060000000082046CC121043BA4000000042D1900000002591216025DE21002FD17000084800106000000008280016CC121948001AE25000000002F2F2F2F2F2F|
// {"due_date": "2022-01-01","due_energy_consumption_kwh": 0,"flow_temperature_c": 56.5,"id": "55445555","max_power_last_month_kw": 0,"media": "heat","meter": "c5isf","name": "Heat","power_kw": 2.5,"prev_10_month": "2127-15-31","prev_10_month_kwh": 2147483648,"prev_10_month_m3": 21474836.48,"prev_11_month": "2127-15-31","prev_11_month_kwh": 2147483648,"prev_11_month_m3": 21474836.48,"prev_12_month": "2127-15-31","prev_12_month_kwh": 2147483648,"prev_12_month_m3": 21474836.48,"prev_13_month": "2127-15-31","prev_13_month_kwh": 2147483648,"prev_13_month_m3": 21474836.48,"prev_14_month": "2127-15-31","prev_14_month_kwh": 2147483648,"prev_14_month_m3": 21474836.48,"prev_1_month": "2022-01-01","prev_1_month_kwh": 0,"prev_1_month_m3": 0,"prev_2_month": "2127-15-31","prev_2_month_kwh": 2147483648,"prev_2_month_m3": 21474836.48,"prev_3_month": "2127-15-31","prev_3_month_kwh": 2147483648,"prev_3_month_m3": 21474836.48,"prev_4_month": "2127-15-31","prev_4_month_kwh": 2147483648,"prev_4_month_m3": 21474836.48,"prev_5_month": "2127-15-31","prev_5_month_kwh": 2147483648,"prev_5_month_m3": 21474836.48,"prev_6_month": "2127-15-31","prev_6_month_kwh": 2147483648,"prev_6_month_m3": 21474836.48,"prev_7_month": "2127-15-31","prev_7_month_kwh": 2147483648,"prev_7_month_m3": 21474836.48,"prev_8_month": "2127-15-31","prev_8_month_kwh": 2147483648,"prev_8_month_m3": 21474836.48,"prev_9_month": "2127-15-31","prev_9_month_kwh": 2147483648,"prev_9_month_m3": 21474836.48,"return_temperature_c": 43.22,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 26,"total_energy_consumption_last_month_kwh": 0,"total_volume_m3": 2.242,"volume_flow_m3h": 0.164} // {"due_date": "2022-01-01","due_energy_consumption_kwh": 0,"flow_temperature_c": 56.5,"id": "55445555","max_power_last_month_kw": 0,"media": "heat","meter": "c5isf","name": "Heat","power_kw": 2.5,"prev_10_month": "2127-15-31","prev_10_month_kwh":-2147483648,"prev_10_month_m3":-21474836.48,"prev_11_month": "2127-15-31","prev_11_month_kwh":-2147483648,"prev_11_month_m3":-21474836.48,"prev_12_month": "2127-15-31","prev_12_month_kwh":-2147483648,"prev_12_month_m3":-21474836.48,"prev_13_month": "2127-15-31","prev_13_month_kwh":-2147483648,"prev_13_month_m3":-21474836.48,"prev_14_month": "2127-15-31","prev_14_month_kwh":-2147483648,"prev_14_month_m3":-21474836.48,"prev_1_month": "2022-01-01","prev_1_month_kwh": 0,"prev_1_month_m3": 0,"prev_2_month": "2127-15-31","prev_2_month_kwh":-2147483648,"prev_2_month_m3":-21474836.48,"prev_3_month": "2127-15-31","prev_3_month_kwh":-2147483648,"prev_3_month_m3":-21474836.48,"prev_4_month": "2127-15-31","prev_4_month_kwh":-2147483648,"prev_4_month_m3":-21474836.48,"prev_5_month": "2127-15-31","prev_5_month_kwh":-2147483648,"prev_5_month_m3":-21474836.48,"prev_6_month": "2127-15-31","prev_6_month_kwh":-2147483648,"prev_6_month_m3":-21474836.48,"prev_7_month": "2127-15-31","prev_7_month_kwh":-2147483648,"prev_7_month_m3":-21474836.48,"prev_8_month": "2127-15-31","prev_8_month_kwh":-2147483648,"prev_8_month_m3":-21474836.48,"prev_9_month": "2127-15-31","prev_9_month_kwh":-2147483648,"prev_9_month_m3":-21474836.48,"return_temperature_c": 43.22,"status": "OK","timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 26,"total_energy_consumption_last_month_kwh": 0,"total_volume_m3": 2.242,"volume_flow_m3h": 0.164}
// |Heat;55445555;26;2.242;OK;1111-11-11 11:11.11 // |Heat;55445555;26;2.242;OK;1111-11-11 11:11.11
// Test: Heat c5isf 32002044 NOKEY // Test: Heat c5isf 32002044 NOKEY

Wyświetl plik

@ -51,7 +51,7 @@ namespace
"The current temperature.", "The current temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -62,7 +62,7 @@ namespace
"The average temperature over the last hour.", "The average temperature over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -77,7 +77,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DigitalInput), .set(VIFRange::DigitalInput),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("BATTERY", Translate::Type::BitToString) .add(Translate::Rule("BATTERY", Translate::MapType::BitToString)
.set(MaskBits(0xffff))) .set(MaskBits(0xffff)))
); );
} }

Wyświetl plik

@ -47,7 +47,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -61,7 +61,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -30,16 +30,22 @@ void check_detection_triplets(DriverInfo *di, string file);
string check_field_name(const char *name, DriverDynamic *dd); string check_field_name(const char *name, DriverDynamic *dd);
Quantity check_field_quantity(const char *quantity_s, DriverDynamic *dd); Quantity check_field_quantity(const char *quantity_s, DriverDynamic *dd);
VifScaling check_vif_scaling(const char *vif_scaling_s, DriverDynamic *dd); VifScaling check_vif_scaling(const char *vif_scaling_s, DriverDynamic *dd);
DifSignedness check_dif_signedness(const char *dif_signedness_s, DriverDynamic *dd);
PrintProperties check_print_properties(const char *print_properties_s, DriverDynamic *dd); PrintProperties check_print_properties(const char *print_properties_s, DriverDynamic *dd);
string get_translation(XMQDoc *doc, XMQNode *node, string name, string lang); string get_translation(XMQDoc *doc, XMQNode *node, string name, string lang);
string check_calculate(const char *formula, DriverDynamic *dd); string check_calculate(const char *formula, DriverDynamic *dd);
Unit check_display_unit(const char *display_unit, DriverDynamic *dd); Unit check_display_unit(const char *display_unit, DriverDynamic *dd);
bool checked_set_difvifkey(const char *difvifkey_s, FieldMatcher *fm, DriverDynamic *dd);
void checked_set_measurement_type(const char *measurement_type_s, FieldMatcher *fm, DriverDynamic *dd); void checked_set_measurement_type(const char *measurement_type_s, FieldMatcher *fm, DriverDynamic *dd);
void checked_set_vif_range(const char *vif_range_s, FieldMatcher *fm, DriverDynamic *dd); void checked_set_vif_range(const char *vif_range_s, FieldMatcher *fm, DriverDynamic *dd);
void checked_set_storagenr_range(const char *storagenr_range_s, FieldMatcher *fm, DriverDynamic *dd); void checked_set_storagenr_range(const char *storagenr_range_s, FieldMatcher *fm, DriverDynamic *dd);
void checked_set_tariffnr_range(const char *tariffnr_range_s, FieldMatcher *fm, DriverDynamic *dd); void checked_set_tariffnr_range(const char *tariffnr_range_s, FieldMatcher *fm, DriverDynamic *dd);
void checked_set_subunitnr_range(const char *subunitnr_range_s, FieldMatcher *fm, DriverDynamic *dd); void checked_set_subunitnr_range(const char *subunitnr_range_s, FieldMatcher *fm, DriverDynamic *dd);
Translate::MapType checked_map_type(const char *map_type_s, DriverDynamic *dd);
uint64_t checked_mask_bits(const char *mask_bits_s, DriverDynamic *dd);
uint64_t checked_value(const char *value_s, DriverDynamic *dd);
TestBit checked_test_type(const char *test_s, DriverDynamic *dd);
void checked_add_vif_combinable(const char *vif_range_s, FieldMatcher *fm, DriverDynamic *dd); void checked_add_vif_combinable(const char *vif_range_s, FieldMatcher *fm, DriverDynamic *dd);
const char *line = "-------------------------------------------------------------------------------"; const char *line = "-------------------------------------------------------------------------------";
@ -59,12 +65,12 @@ bool DriverDynamic::load(DriverInfo *di, const string &file_name, const char *co
if (!content) if (!content)
{ {
ok = xmqParseFile(doc, file.c_str(), NULL); ok = xmqParseFile(doc, file.c_str(), NULL, 0);
} }
else else
{ {
file = "builtin"; file = "builtin";
ok = xmqParseBuffer(doc, content, content+strlen(content), NULL); ok = xmqParseBuffer(doc, content, content+strlen(content), NULL, 0);
} }
if (!ok) { if (!ok) {
@ -264,6 +270,9 @@ XMQProceed DriverDynamic::add_field(XMQDoc *doc, XMQNode *field, DriverDynamic *
// The vif scaling is by default Auto but can be overriden for pesky fields. // The vif scaling is by default Auto but can be overriden for pesky fields.
VifScaling vif_scaling = check_vif_scaling(xmqGetString(doc, field, "vif_scaling"), dd); VifScaling vif_scaling = check_vif_scaling(xmqGetString(doc, field, "vif_scaling"), dd);
// The dif signedness is by default Signed but can be overriden for pesky fields.
DifSignedness dif_signedness = check_dif_signedness(xmqGetString(doc, field, "dif_signedness"), dd);
// The properties are by default empty but can be specified for specific fields. // The properties are by default empty but can be specified for specific fields.
PrintProperties properties = check_print_properties(xmqGetString(doc, field, "attributes"), dd); PrintProperties properties = check_print_properties(xmqGetString(doc, field, "attributes"), dd);
@ -283,6 +292,21 @@ XMQProceed DriverDynamic::add_field(XMQDoc *doc, XMQNode *field, DriverDynamic *
// Check if there were any matches at all, if not, then disable the matcher. // Check if there were any matches at all, if not, then disable the matcher.
match.active = num_matches > 0; match.active = num_matches > 0;
// Now find all matchers.
Translate::Lookup lookup = Translate::Lookup();
/*
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString)
.set(MaskBits(0x000f))
.set(DefaultMessage("OK"))
.add(Translate::Map(0x01 ,"DRY", TestBit::Set))
.add(Translate::Map(0x02 ,"REVERSE", TestBit::Set))
.add(Translate::Map(0x04 ,"LEAK", TestBit::Set))
.add(Translate::Map(0x08 ,"BURST", TestBit::Set))
));
*/
dd->tmp_lookup_ = &lookup;
int num_lookups = xmqForeach(doc, field, "lookup", (XMQNodeCallback)add_lookup, dd);
if (is_numeric) if (is_numeric)
{ {
if (calculate == "") if (calculate == "")
@ -293,6 +317,7 @@ XMQProceed DriverDynamic::add_field(XMQDoc *doc, XMQNode *field, DriverDynamic *
properties, properties,
quantity, quantity,
vif_scaling, vif_scaling,
dif_signedness,
match, match,
display_unit display_unit
); );
@ -326,12 +351,25 @@ XMQProceed DriverDynamic::add_field(XMQDoc *doc, XMQNode *field, DriverDynamic *
} }
else else
{ {
dd->addStringFieldWithExtractor( if (num_lookups > 0)
name, {
info, dd->addStringFieldWithExtractorAndLookup(
properties, name,
match info,
); properties,
match,
lookup
);
}
else
{
dd->addStringFieldWithExtractor(
name,
info,
properties,
match
);
}
} }
return XMQ_CONTINUE; return XMQ_CONTINUE;
} }
@ -340,6 +378,8 @@ XMQProceed DriverDynamic::add_match(XMQDoc *doc, XMQNode *match, DriverDynamic *
{ {
FieldMatcher *fm = dd->tmp_matcher_; FieldMatcher *fm = dd->tmp_matcher_;
if (checked_set_difvifkey(xmqGetString(doc, match, "difvifkey"), fm, dd)) return XMQ_CONTINUE;
checked_set_measurement_type(xmqGetString(doc, match, "measurement_type"), fm, dd); checked_set_measurement_type(xmqGetString(doc, match, "measurement_type"), fm, dd);
checked_set_vif_range(xmqGetString(doc, match, "vif_range"), fm, dd); checked_set_vif_range(xmqGetString(doc, match, "vif_range"), fm, dd);
@ -360,6 +400,61 @@ XMQProceed DriverDynamic::add_combinable(XMQDoc *doc, XMQNode *match, DriverDyna
return XMQ_CONTINUE; return XMQ_CONTINUE;
} }
/**
add_map:
Add a mapping from a value (bits,index,decimal) to a string name.
map {
name = SURGE
info = 'Unexpected increase in pressure in relation to average pressure.'
value = 0x02
test = set
}
*/
XMQProceed DriverDynamic::add_map(XMQDoc *doc, XMQNode *map, DriverDynamic *dd)
{
const char *name = xmqGetString(doc, map, "name");
uint64_t value = checked_value(xmqGetString(doc, map, "value"), dd);
TestBit test_type = checked_test_type(xmqGetString(doc, map, "test"), dd);
dd->tmp_rule_->add(Translate::Map(value, name, test_type));
return XMQ_CONTINUE;
}
/**
add_lookup:
Add a lookup from bits,index or decimal to a sequence of string tokens.
Or fallback to the name (ERROR_FLAGS_8) suffixed by the untranslateable bits.
lookup {
name = ERROR_FLAGS
map_type = BitToString
mask_bits = 0xffff
default_message = OK
map { } map {}
}
*/
XMQProceed DriverDynamic::add_lookup(XMQDoc *doc, XMQNode *lookup, DriverDynamic *dd)
{
const char *name = xmqGetString(doc, lookup, "name");
Translate::MapType map_type = checked_map_type(xmqGetString(doc, lookup, "map_type"), dd);
uint64_t mask_bits = checked_mask_bits(xmqGetString(doc, lookup, "mask_bits"), dd);
const char *default_message = xmqGetString(doc, lookup, "default_message");
Translate::Rule rule = Translate::Rule(name, map_type);
dd->tmp_rule_ = &rule;
rule.set(MaskBits(mask_bits));
rule.set(DefaultMessage(default_message));
xmqForeach(doc, lookup, "map", (XMQNodeCallback)add_map, dd);
dd->tmp_lookup_->add(rule);
return XMQ_CONTINUE;
}
string check_driver_name(const char *name, string file) string check_driver_name(const char *name, string file)
{ {
if (!name) if (!name)
@ -545,12 +640,12 @@ VifScaling check_vif_scaling(const char *vif_scaling_s, DriverDynamic *dd)
warning("(driver) error in %s, bad vif scaling: %s\n", warning("(driver) error in %s, bad vif scaling: %s\n",
"%s\n" "%s\n"
"Available vif scalings:\n" "Available vif scalings:\n"
"%s\n" "Auto\n"
"None\n"
"%s\n", "%s\n",
dd->fileName().c_str(), dd->fileName().c_str(),
vif_scaling_s, vif_scaling_s,
line, line,
"???",
line); line);
throw 1; throw 1;
} }
@ -558,6 +653,33 @@ VifScaling check_vif_scaling(const char *vif_scaling_s, DriverDynamic *dd)
return vif_scaling; return vif_scaling;
} }
DifSignedness check_dif_signedness(const char *dif_signedness_s, DriverDynamic *dd)
{
if (!dif_signedness_s)
{
return DifSignedness::Signed;
}
DifSignedness dif_signedness = toDifSignedness(dif_signedness_s);
if (dif_signedness == DifSignedness::Unknown)
{
warning("(driver) error in %s, bad dif signedness: %s\n",
"%s\n"
"Available dif signedness:\n"
"Signed\n"
"Unsigned\n"
"%s\n",
dd->fileName().c_str(),
dif_signedness_s,
line,
line);
throw 1;
}
return dif_signedness;
}
PrintProperties check_print_properties(const char *print_properties_s, DriverDynamic *dd) PrintProperties check_print_properties(const char *print_properties_s, DriverDynamic *dd)
{ {
if (!print_properties_s) if (!print_properties_s)
@ -623,6 +745,31 @@ Unit check_display_unit(const char *display_unit_s, DriverDynamic *dd)
return u; return u;
} }
bool checked_set_difvifkey(const char *difvifkey_s, FieldMatcher *fm, DriverDynamic *dd)
{
if (!difvifkey_s) return false;
bool invalid_hex = false;
bool hex = isHexStringStrict(difvifkey_s, &invalid_hex);
if (!hex || invalid_hex)
{
warning("(driver) error in %s, bad divfikey: %s\n"
"%s\n"
"Should be all hex.\n"
"%s\n",
dd->fileName().c_str(),
difvifkey_s,
line,
line);
throw 1;
}
fm->set(DifVifKey(difvifkey_s));
return true;
}
void checked_set_measurement_type(const char *measurement_type_s, FieldMatcher *fm, DriverDynamic *dd) void checked_set_measurement_type(const char *measurement_type_s, FieldMatcher *fm, DriverDynamic *dd)
{ {
if (!measurement_type_s) if (!measurement_type_s)
@ -757,3 +904,118 @@ void checked_add_vif_combinable(const char *vif_combinable_s, FieldMatcher *fm,
fm->add(vif_combinable); fm->add(vif_combinable);
} }
Translate::MapType checked_map_type(const char *map_type_s, DriverDynamic *dd)
{
if (!map_type_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map_type\n"
"%s\n"
"Remember to add for example: lookup { map_type = BitToString ... }\n"
"Available map types:\n"
"BitToString\n"
"IndexToString\n"
"DecimalsToString\n"
"%s\n",
dd->fileName().c_str(),
line,
line);
throw 1;
}
Translate::MapType map_type = toMapType(map_type_s);
if (map_type == Translate::MapType::Unknown)
{
warning("(driver) error in %s, bad map_type: %s\n"
"%s\n"
"Available map types:\n"
"BitToString\n"
"IndexToString\n"
"DecimalToString\n"
"%s\n",
dd->fileName().c_str(),
map_type_s,
line,
line);
throw 1;
}
return map_type;
}
uint64_t checked_mask_bits(const char *mask_bits_s, DriverDynamic *dd)
{
if (!mask_bits_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/mask_bitse\n"
"%s\n"
"Remember to add for example: lookup { mask_bits = 0x00ff ... }\n"
"%s\n",
dd->fileName().c_str(),
line,
line);
throw 1;
}
uint64_t mask = strtol(mask_bits_s, NULL, 16);
return mask;
}
uint64_t checked_value(const char *value_s, DriverDynamic *dd)
{
if (!value_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map/value\n"
"%s\n"
"Remember to add for example: lookup { map { ... value = 0x01 ... }}\n"
"%s\n",
dd->fileName().c_str(),
line,
line);
throw 1;
}
uint64_t value = strtol(value_s, NULL, 16);
return value;
}
TestBit checked_test_type(const char *test_s, DriverDynamic *dd)
{
if (!test_s)
{
warning("(driver) error in %s, cannot find: driver/field/lookup/map/test\n"
"%s\n"
"Remember to add for example: lookup { map { test = Set } }\n"
"Available test types:\n"
"Set\n"
"NotSet\n"
"%s\n",
dd->fileName().c_str(),
line,
line);
throw 1;
}
TestBit test_type = toTestBit(test_s);
if (test_type == TestBit::Unknown)
{
warning("(driver) error in %s, bad test: %s\n"
"%s\n"
"Available test types:\n"
"Set\n"
"NotSet\n"
"%s\n",
dd->fileName().c_str(),
test_s,
line,
line);
throw 1;
}
return test_type;
}

Wyświetl plik

@ -1,5 +1,5 @@
/* /*
Copyright (C) 2023 Fredrik Öhrström (gpl-3.0-or-later) Copyright (C) 2023-2024 Fredrik Öhrström (gpl-3.0-or-later)
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -31,12 +31,17 @@ struct DriverDynamic : public virtual MeterCommonImplementation
static XMQProceed add_match(XMQDoc *doc, XMQNode *match, DriverDynamic *dd); static XMQProceed add_match(XMQDoc *doc, XMQNode *match, DriverDynamic *dd);
static XMQProceed add_combinable(XMQDoc *doc, XMQNode *match, DriverDynamic *dd); static XMQProceed add_combinable(XMQDoc *doc, XMQNode *match, DriverDynamic *dd);
static XMQProceed add_lookup(XMQDoc *doc, XMQNode *lookup, DriverDynamic *dd);
static XMQProceed add_map(XMQDoc *doc, XMQNode *map, DriverDynamic *dd);
const string &fileName() { return file_name_; } const string &fileName() { return file_name_; }
private: private:
string file_name_; string file_name_;
FieldMatcher *tmp_matcher_; FieldMatcher *tmp_matcher_;
Translate::Lookup *tmp_lookup_;
Translate::Rule *tmp_rule_;
}; };
#endif #endif

Wyświetl plik

@ -41,7 +41,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -52,7 +52,7 @@ namespace
"Current power consumption at phase 1.", "Current power consumption at phase 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF01")) .set(DifVifKey("04A9FF01"))
); );
@ -62,7 +62,7 @@ namespace
"Current power consumption at phase 2.", "Current power consumption at phase 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF02")) .set(DifVifKey("04A9FF02"))
); );
@ -72,7 +72,7 @@ namespace
"Current power consumption at phase 3.", "Current power consumption at phase 3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF03")) .set(DifVifKey("04A9FF03"))
); );
@ -92,7 +92,7 @@ namespace
"Calculated sum of power consumption of all phases.", "Calculated sum of power consumption of all phases.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)

Wyświetl plik

@ -47,7 +47,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -58,7 +58,7 @@ namespace
"Current power consumption.", "Current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -69,7 +69,7 @@ namespace
"The total energy production recorded by this meter.", "The total energy production recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)

Wyświetl plik

@ -38,7 +38,7 @@ namespace
{ {
setMfctTPLStatusBits( setMfctTPLStatusBits(
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("TPL_STS", Translate::Type::BitToString) .add(Translate::Rule("TPL_STS", Translate::MapType::BitToString)
.set(MaskBits(0xe0)) .set(MaskBits(0xe0))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x04 ,"RTC_INVALID", TestBit::Set)))); .add(Translate::Map(0x04 ,"RTC_INVALID", TestBit::Set))));
@ -54,7 +54,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -90,7 +90,7 @@ namespace
"Number of times the smoke alarm has triggered.", "Number of times the smoke alarm has triggered.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(SubUnitNr(1)) .set(SubUnitNr(1))
@ -121,7 +121,7 @@ namespace
"Time the smoke alarm has been removed.", "Time the smoke alarm has been removed.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(SubUnitNr(1)) .set(SubUnitNr(1))
@ -145,7 +145,7 @@ namespace
"Number of times the smoke alarm has been removed.", "Number of times the smoke alarm has been removed.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(SubUnitNr(1)) .set(SubUnitNr(1))
@ -169,7 +169,7 @@ namespace
"Number of times the test button has been pressed.", "Number of times the test button has been pressed.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(SubUnitNr(1)) .set(SubUnitNr(1))
@ -208,7 +208,7 @@ namespace
{ {
{ {
"DUST", "DUST",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x1f), AlwaysTrigger, MaskBits(0x1f),
"", "",
{ {
@ -228,7 +228,7 @@ namespace
{ {
{ {
"BATTERY_VOLTAGE", "BATTERY_VOLTAGE",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x0f00), AlwaysTrigger, MaskBits(0x0f00),
"", "",
{ {
@ -267,7 +267,7 @@ namespace
{ {
{ {
"OBSTACLE_DISTANCE", "OBSTACLE_DISTANCE",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x700000), AlwaysTrigger, MaskBits(0x700000),
"", "",
{ {
@ -297,7 +297,7 @@ namespace
{ {
{ {
"HEAD_STATUS", "HEAD_STATUS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff8ff0e0), AlwaysTrigger, MaskBits(0xff8ff0e0),
"OK", "OK",
{ {

Wyświetl plik

@ -45,7 +45,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffffff), AlwaysTrigger, MaskBits(0xffffffff),
"OK", "OK",
{ {
@ -69,7 +69,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -80,7 +80,7 @@ namespace
"Current power consumption.", "Current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -91,7 +91,7 @@ namespace
"Total volume of heat media.", "Total volume of heat media.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -102,7 +102,7 @@ namespace
"The total energy consumption recorded at the target date.", "The total energy consumption recorded at the target date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -114,7 +114,7 @@ namespace
"The flow temperature.", "The flow temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -125,7 +125,7 @@ namespace
"The return temperature.", "The return temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -136,7 +136,7 @@ namespace
"The external temperature.", "The external temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -147,7 +147,7 @@ namespace
"How long the meter has been collecting data.", "How long the meter has been collecting data.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OperatingTime) .set(VIFRange::OperatingTime)
@ -167,7 +167,7 @@ namespace
"Battery voltage.", "Battery voltage.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)

Wyświetl plik

@ -53,7 +53,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"OK", "OK",
{ {
@ -80,7 +80,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"", "",
{ {
@ -101,7 +101,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -112,7 +112,7 @@ namespace
"Power measured by this meter at the moment.", "Power measured by this meter at the moment.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -123,7 +123,7 @@ namespace
"The total energy backward (production) recorded by this meter.", "The total energy backward (production) recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -135,7 +135,7 @@ namespace
"The reactive total energy consumption recorded by this meter.", "The reactive total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Reactive_Energy, Quantity::Reactive_Energy,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FB8275")) .set(DifVifKey("04FB8275"))
); );
@ -145,7 +145,7 @@ namespace
"The total reactive energy backward (production) recorded by this meter.", "The total reactive energy backward (production) recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Reactive_Energy, Quantity::Reactive_Energy,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(DifVifKey("04FB82F53C")) .set(DifVifKey("04FB82F53C"))
@ -177,7 +177,7 @@ namespace
"Amperage at phase L1.", "Amperage at phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDD9FC01")) .set(DifVifKey("04FDD9FC01"))
); );
@ -187,7 +187,7 @@ namespace
"Amperage at phase L2.", "Amperage at phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDD9FC02")) .set(DifVifKey("04FDD9FC02"))
); );
@ -197,7 +197,7 @@ namespace
"Amperage at phase L3.", "Amperage at phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDD9FC03")) .set(DifVifKey("04FDD9FC03"))
); );
@ -207,7 +207,7 @@ namespace
"Voltage at phase L1.", "Voltage at phase L1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDC8FC01")) .set(DifVifKey("04FDC8FC01"))
); );
@ -217,7 +217,7 @@ namespace
"Voltage at phase L2.", "Voltage at phase L2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDC8FC02")) .set(DifVifKey("04FDC8FC02"))
); );
@ -227,7 +227,7 @@ namespace
"Voltage at phase L3.", "Voltage at phase L3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FDC8FC03")) .set(DifVifKey("04FDC8FC03"))
); );
@ -237,7 +237,7 @@ namespace
"Frequency in 0.1 Hz", "Frequency in 0.1 Hz",
DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE, DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE,
Quantity::Frequency, Quantity::Frequency,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FB2E")) .set(DifVifKey("02FB2E"))
); );

Wyświetl plik

@ -42,7 +42,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -53,7 +53,7 @@ namespace
"The target water consumption recorded at previous period.", "The target water consumption recorded at previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -45,7 +45,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -56,7 +56,7 @@ namespace
"The energy consumption recorded by this meter at the set date.", "The energy consumption recorded by this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -68,7 +68,7 @@ namespace
"The active power consumption.", "The active power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -79,7 +79,7 @@ namespace
"The flow of water.", "The flow of water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -90,7 +90,7 @@ namespace
"The maximum forward flow of water since the last set date?", "The maximum forward flow of water since the last set date?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -101,7 +101,7 @@ namespace
"The forward temperature of the water.", "The forward temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -112,7 +112,7 @@ namespace
"The return temperature of the water.", "The return temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -123,7 +123,7 @@ namespace
"The temperature difference forward-return for the water.", "The temperature difference forward-return for the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::TemperatureDifference) .set(VIFRange::TemperatureDifference)
@ -134,7 +134,7 @@ namespace
"The total amount of water that has passed through this meter.", "The total amount of water that has passed through this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -145,7 +145,7 @@ namespace
"The amount of water that had passed through this meter at the set date.", "The amount of water that had passed through this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -157,7 +157,7 @@ namespace
"The amount of water that has passed through subunit 1.", "The amount of water that has passed through subunit 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -169,7 +169,7 @@ namespace
"The amount of water that had passed through the subunit 1 at the set date.", "The amount of water that had passed through the subunit 1 at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -182,7 +182,7 @@ namespace
"The current heat cost allocation for subunit 1.", "The current heat cost allocation for subunit 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -194,7 +194,7 @@ namespace
"The heat cost allocation for subunit 1 at the target date.", "The heat cost allocation for subunit 1 at the target date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -207,7 +207,7 @@ namespace
"The current heat cost allocation for subunit 2.", "The current heat cost allocation for subunit 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -219,7 +219,7 @@ namespace
"The heat cost allocation for subunit 2 at the target date.", "The heat cost allocation for subunit 2 at the target date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)

Wyświetl plik

@ -46,7 +46,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"OK", "OK",
{ {
@ -78,7 +78,7 @@ namespace
"The water consumption at the last billing period date.", "The water consumption at the last billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -95,7 +95,7 @@ namespace
info, info,
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -53,7 +53,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -64,7 +64,7 @@ namespace
"Calculated sum of power consumption of all phases.", "Calculated sum of power consumption of all phases.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -75,7 +75,7 @@ namespace
"The total energy production recorded by this meter.", "The total energy production recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -87,7 +87,7 @@ namespace
"The total energy consumption recorded by this meter on tariff 1.", "The total energy consumption recorded by this meter on tariff 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -99,7 +99,7 @@ namespace
"The total energy consumption recorded by this meter on tariff 2.", "The total energy consumption recorded by this meter on tariff 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -111,7 +111,7 @@ namespace
"Current power consumption phase 1.", "Current power consumption phase 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF01")) .set(DifVifKey("04A9FF01"))
); );
@ -121,7 +121,7 @@ namespace
"Current power consumption phase 2.", "Current power consumption phase 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF02")) .set(DifVifKey("04A9FF02"))
); );
@ -131,7 +131,7 @@ namespace
"Current power consumption phase 3.", "Current power consumption phase 3.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04A9FF03")) .set(DifVifKey("04A9FF03"))
); );

Wyświetl plik

@ -50,7 +50,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -78,7 +78,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -98,7 +98,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -109,7 +109,7 @@ namespace
"The heat cost allocation at set date #.", "The heat cost allocation at set date #.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -121,7 +121,7 @@ namespace
"Deprecated field.", "Deprecated field.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)

Wyświetl plik

@ -42,7 +42,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -53,7 +53,7 @@ namespace
"The target water consumption recorded at previous period.", "The target water consumption recorded at previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -67,7 +67,7 @@ namespace
"The total water consumption at the most recent billing period date.", "The total water consumption at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -89,7 +89,7 @@ namespace
"The total water consumption at the second most recent billing period date.", "The total water consumption at the second most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -111,7 +111,7 @@ namespace
"Maximum water flow since date time.", "Maximum water flow since date time.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -133,7 +133,7 @@ namespace
"The total water consumption at the historic date.", "The total water consumption at the historic date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -145,7 +145,7 @@ namespace
"Reference date for history.", "Reference date for history.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -50,7 +50,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
); );
@ -69,7 +69,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(1)) .set(StorageNr(1))
@ -89,7 +89,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(1)) .set(StorageNr(1))
@ -109,7 +109,7 @@ namespace
"Heat cost allocation at the 8 billing period date.", "Heat cost allocation at the 8 billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(8)) .set(StorageNr(8))

Wyświetl plik

@ -51,7 +51,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffffff), AlwaysTrigger, MaskBits(0xffffffff),
"OK", "OK",
{ {
@ -71,7 +71,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -82,7 +82,7 @@ namespace
"The total water consumption recorded at the beginning of this month.", "The total water consumption recorded at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -104,7 +104,7 @@ namespace
"The current flow of water through the meter.", "The current flow of water through the meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -115,7 +115,7 @@ namespace
"The water temperature.", "The water temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -127,7 +127,7 @@ namespace
"The maximum water temperature.", "The maximum water temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -139,7 +139,7 @@ namespace
"The external temperature outside of the meter.", "The external temperature outside of the meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -151,7 +151,7 @@ namespace
"The maximum flow recorded during previous period.", "The maximum flow recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -163,7 +163,7 @@ namespace
"The minimum flow recorded during previous period.", "The minimum flow recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -175,7 +175,7 @@ namespace
"The maximum temperature recorded during previous period.", "The maximum temperature recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -187,7 +187,7 @@ namespace
"The minimum flow recorded during previous period.", "The minimum flow recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -199,7 +199,7 @@ namespace
"The maximum flow recorded during previous period.", "The maximum flow recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -216,7 +216,7 @@ namespace
{ {
{ {
"DRY", "DRY",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x0070), AlwaysTrigger, MaskBits(0x0070),
"", "",
{ {
@ -243,7 +243,7 @@ namespace
{ {
{ {
"REVERSED", "REVERSED",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x0380), AlwaysTrigger, MaskBits(0x0380),
"", "",
{ {
@ -270,7 +270,7 @@ namespace
{ {
{ {
"LEAKING", "LEAKING",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x1c00), AlwaysTrigger, MaskBits(0x1c00),
"", "",
{ {
@ -297,7 +297,7 @@ namespace
{ {
{ {
"BURSTING", "BURSTING",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0xe000), AlwaysTrigger, MaskBits(0xe000),
"", "",
{ {

Wyświetl plik

@ -70,7 +70,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, AlwaysTrigger,
AutoMask, AutoMask,
"OK", "OK",
@ -85,7 +85,7 @@ namespace
}, },
{ {
"ERROR_FLAGS_SINGLE_PHASE", "ERROR_FLAGS_SINGLE_PHASE",
Translate::Type::BitToString, Translate::MapType::BitToString,
TriggerBits(0x01020000), TriggerBits(0x01020000),
AutoMask, AutoMask,
"OK", "OK",
@ -99,7 +99,7 @@ namespace
}, },
{ {
"ERROR_FLAGS_THREE_PHASE", "ERROR_FLAGS_THREE_PHASE",
Translate::Type::BitToString, Translate::MapType::BitToString,
TriggerBits(0x01010000), TriggerBits(0x01010000),
AutoMask, AutoMask,
"OK", "OK",
@ -124,7 +124,7 @@ namespace
{ {
{ {
"INFO_FLAGS", "INFO_FLAGS",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, AlwaysTrigger,
AutoMask, AutoMask,
"", "",
@ -141,7 +141,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -152,7 +152,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -164,7 +164,7 @@ namespace
"Last day?", "Last day?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -176,7 +176,7 @@ namespace
"Last day energy consumption?", "Last day energy consumption?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -188,7 +188,7 @@ namespace
"Last day energy consumption for tariff?", "Last day energy consumption for tariff?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -201,7 +201,7 @@ namespace
"Device date time when telegram was sent.", "Device date time when telegram was sent.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -212,7 +212,7 @@ namespace
"Voltage for single phase meter.", "Voltage for single phase meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -224,7 +224,7 @@ namespace
"Voltage at phase L#.", "Voltage at phase L#.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -236,7 +236,7 @@ namespace
"Amperage for single phase meter.", "Amperage for single phase meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -248,7 +248,7 @@ namespace
"Amperage at phase L#.", "Amperage at phase L#.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -260,7 +260,7 @@ namespace
"Raw input to frequency.", "Raw input to frequency.",
DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE, DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE,
Quantity::Frequency, Quantity::Frequency,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FB2D")) .set(DifVifKey("02FB2D"))
); );

Wyświetl plik

@ -100,5 +100,5 @@ namespace
// Test: Wateroo gwfwater 20221031 NOKEY // Test: Wateroo gwfwater 20221031 NOKEY
// telegram=|3144E61E31102220010E8C04F47ABE0420452F2F_037410000004133E0000004413FFFFFFFF426CFFFF0F0120012F2F2F2F2F| // telegram=|3144E61E31102220010E8C04F47ABE0420452F2F_037410000004133E0000004413FFFFFFFF426CFFFF0F0120012F2F2F2F2F|
// {"actuality_duration_s": 16,"battery_y": 0,"id": "20221031","media": "bus/system component","meter": "gwfwater","name": "Wateroo","power_mode": "SAVING","status": "BATTERY_LOW POWER_LOW","target_date": "2128-03-31","target_m3": 4294967.295,"timestamp": "1111-11-11T11:11:11Z","total_m3": 0.062} // {"actuality_duration_s": 16,"battery_y": 0,"id": "20221031","media": "bus/system component","meter": "gwfwater","name": "Wateroo","power_mode": "SAVING","status": "BATTERY_LOW POWER_LOW","target_date": "2128-03-31","target_m3": -0.001,"timestamp": "1111-11-11T11:11:11Z","total_m3": 0.062}
// |Wateroo;20221031;0.062;1111-11-11 11:11.11 // |Wateroo;20221031;0.062;1111-11-11 11:11.11

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -69,7 +69,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -80,7 +80,7 @@ namespace
"The heat cost allocation at set date #.", "The heat cost allocation at set date #.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -92,7 +92,7 @@ namespace
"Deprecated field.", "Deprecated field.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)

Wyświetl plik

@ -39,7 +39,7 @@ namespace
{ {
setMfctTPLStatusBits( setMfctTPLStatusBits(
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("TPL_STS", Translate::Type::BitToString) .add(Translate::Rule("TPL_STS", Translate::MapType::BitToString)
.set(MaskBits(0xe0)) .set(MaskBits(0xe0))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x80 ,"SABOTAGE_ENCLOSURE", TestBit::Set)))); .add(Translate::Map(0x80 ,"SABOTAGE_ENCLOSURE", TestBit::Set))));
@ -55,7 +55,7 @@ namespace
"The total heating energy consumption recorded by this meter.", "The total heating energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -67,7 +67,7 @@ namespace
"The date time when the recording was made.", "The date time when the recording was made.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -78,7 +78,7 @@ namespace
"The total cooling energy consumption recorded by this meter.", "The total cooling energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -90,7 +90,7 @@ namespace
"Total heating volume of media.", "Total heating volume of media.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -102,7 +102,7 @@ namespace
"Total cooling volume of media.", "Total cooling volume of media.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -114,7 +114,7 @@ namespace
"Supply c1 volume.", "Supply c1 volume.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -126,7 +126,7 @@ namespace
"Return c2 volume.", "Return c2 volume.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -138,7 +138,7 @@ namespace
"The supply t1 pipe temperature.", "The supply t1 pipe temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -150,7 +150,7 @@ namespace
"The return t2 pipe temperature.", "The return t2 pipe temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)

Wyświetl plik

@ -45,7 +45,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)

Wyświetl plik

@ -44,7 +44,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -55,7 +55,7 @@ namespace
"Meter timestamp for measurement.", "Meter timestamp for measurement.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime), .set(VIFRange::DateTime),

Wyświetl plik

@ -57,7 +57,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -68,7 +68,7 @@ namespace
"The total water consumption recorded on tariff # by this meter.", "The total water consumption recorded on tariff # by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -80,7 +80,7 @@ namespace
"The total water consumption recorded on tariff # by this meter at billing date.", "The total water consumption recorded on tariff # by this meter at billing date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -93,7 +93,7 @@ namespace
"The current water flow.", "The current water flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow)); .set(VIFRange::VolumeFlow));
@ -103,7 +103,7 @@ namespace
"The total water consumption recorded at date.", "The total water consumption recorded at date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -115,7 +115,7 @@ namespace
"The last billing period date.", "The last billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -128,7 +128,7 @@ namespace
"The total water consumption recorded at the end of last month.", "The total water consumption recorded at the end of last month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -140,7 +140,7 @@ namespace
"The end of last month.", "The end of last month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -152,7 +152,7 @@ namespace
"Remaining battery life in years.", "Remaining battery life in years.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RemainingBattery), .set(VIFRange::RemainingBattery),

Plik diff jest za duży Load Diff

Wyświetl plik

@ -60,7 +60,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffff), AlwaysTrigger, MaskBits(0xffffff),
"OK", "OK",
{ {
@ -75,7 +75,7 @@ namespace
"The total water consumption recorded at the end of previous billing period.", "The total water consumption recorded at the end of previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -102,7 +102,7 @@ namespace
{ {
{ {
"WOOTA", "WOOTA",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffffff), AlwaysTrigger, MaskBits(0xffffffff),
"", "",
{ {
@ -122,7 +122,7 @@ namespace
{ {
{ {
"WOOTB", "WOOTB",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"", "",
{ {
@ -156,4 +156,3 @@ namespace
// telegram=|3A4497269820362300167AF60020A52F2F_04132E100000066D03260DE12B007413FEFEFEFE426C1F01047F1600060C027F9A2A0E79187103002300| // telegram=|3A4497269820362300167AF60020A52F2F_04132E100000066D03260DE12B007413FEFEFEFE426C1F01047F1600060C027F9A2A0E79187103002300|
// {"enhanced_id": "002300037118", "id": "23362098", "media": "cold water", "meter": "itron", "meter_datetime": "2023-11-01 13:38:03", "name": "ColdWaterMeter", "status": "OK", "target_date": "2000-01-31", "timestamp": "1111-11-11T11:11:11Z", "total_m3": 4.142,"unknown_a": "WOOTA_C060016","unknown_b": "WOOTB_2A9A" } // {"enhanced_id": "002300037118", "id": "23362098", "media": "cold water", "meter": "itron", "meter_datetime": "2023-11-01 13:38:03", "name": "ColdWaterMeter", "status": "OK", "target_date": "2000-01-31", "timestamp": "1111-11-11T11:11:11Z", "total_m3": 4.142,"unknown_a": "WOOTA_C060016","unknown_b": "WOOTB_2A9A" }
// |ColdWaterMeter;23362098;4.142;null;1111-11-11 11:11.11 // |ColdWaterMeter;23362098;4.142;null;1111-11-11 11:11.11

Wyświetl plik

@ -1,5 +1,5 @@
/* /*
Copyright (C) 2018-2022 Fredrik Öhrström (gpl-3.0-or-later) Copyright (C) 2018-2024 Fredrik Öhrström (gpl-3.0-or-later)
Copyright (C) 2020 Eric Bus (gpl-3.0-or-later) Copyright (C) 2020 Eric Bus (gpl-3.0-or-later)
Copyright (C) 2022 thecem (gpl-3.0-or-later) Copyright (C) 2022 thecem (gpl-3.0-or-later)
@ -74,7 +74,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffffff), AlwaysTrigger, MaskBits(0xffffffff),
"OK", "OK",
{ {
@ -120,7 +120,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -131,7 +131,7 @@ namespace
"The volume of water (3/68/Volume V1).", "The volume of water (3/68/Volume V1).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -142,7 +142,7 @@ namespace
"The actual amount of water that pass through this meter (8/74/Flow V1 actual).", "The actual amount of water that pass through this meter (8/74/Flow V1 actual).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -153,7 +153,7 @@ namespace
"The current power flowing.", "The current power flowing.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -164,7 +164,7 @@ namespace
"The maximum power supplied.", "The maximum power supplied.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -175,7 +175,7 @@ namespace
"The forward temperature of the water (6/86/t2 actual 2 decimals).", "The forward temperature of the water (6/86/t2 actual 2 decimals).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -186,7 +186,7 @@ namespace
"The return temperature of the water (7/87/t2 actual 2 decimals).", "The return temperature of the water (7/87/t2 actual 2 decimals).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -197,7 +197,7 @@ namespace
"The maximum flow of water that passed through this meter.", "The maximum flow of water that passed through this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -208,7 +208,7 @@ namespace
"The forward energy of the water (4/97/Energy E8).", "The forward energy of the water (4/97/Energy E8).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FF07")), .set(DifVifKey("04FF07")),
Unit::M3C); Unit::M3C);
@ -218,7 +218,7 @@ namespace
"The return energy of the water (5/110/Energy E9).", "The return energy of the water (5/110/Energy E9).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04FF08")), .set(DifVifKey("04FF08")),
Unit::M3C); Unit::M3C);
@ -237,7 +237,7 @@ namespace
"The energy consumption recorded by this meter at the set date (11/60/Heat energy E1/026C).", "The energy consumption recorded by this meter at the set date (11/60/Heat energy E1/026C).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -249,7 +249,7 @@ namespace
"The amount of water that had passed through this meter at the set date (13/68/Volume V1).", "The amount of water that had passed through this meter at the set date (13/68/Volume V1).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -271,7 +271,7 @@ namespace
"How long the meter has been collecting data.", "How long the meter has been collecting data.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OperatingTime) .set(VIFRange::OperatingTime)
@ -314,11 +314,11 @@ namespace
// Test: My403Cooling multical403 78780102 NOKEY // Test: My403Cooling multical403 78780102 NOKEY
// telegram=|88442D2C02017878340A8D208D529C132037FC78_040E2D0A000004FF07F8FF000004FF08401801000413C1900500844014000000008480401400000000043BED0000000259BC06025DCD07142DE7FFFFFF84100E0000000084200E0000000004FF2200000000026C9228440E5F0300004413960D0200C4401400000000C480401400000000426C8128| // telegram=|88442D2C02017878340A8D208D529C132037FC78_040E2D0A000004FF07F8FF000004FF08401801000413C1900500844014000000008480401400000000043BED0000000259BC06025DCD07142DE7FFFFFF84100E0000000084200E0000000004FF2200000000026C9228440E5F0300004413960D0200C4401400000000C480401400000000426C8128|
// {"forward_energy_m3c": 65528,"id": "78780102","max_power_kw": 429496727.1,"media": "cooling load volume at outlet","meter": "kamheat","meter_date": "2020-08-18","name": "My403Cooling","return_energy_m3c": 71744,"status": "OK","t1_temperature_c": 17.24,"t2_temperature_c": 19.97,"target_date": "2020-08-01","target_energy_kwh": 239.722222,"target_volume_m3": 134.55,"timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 723.611111,"total_volume_m3": 364.737,"volume_flow_m3h": 0.237} // {"forward_energy_m3c": 65528,"id": "78780102","max_power_kw": -2.5,"media": "cooling load volume at outlet","meter": "kamheat","meter_date": "2020-08-18","name": "My403Cooling","return_energy_m3c": 71744,"status": "OK","t1_temperature_c": 17.24,"t2_temperature_c": 19.97,"target_date": "2020-08-01","target_energy_kwh": 239.722222,"target_volume_m3": 134.55,"timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 723.611111,"total_volume_m3": 364.737,"volume_flow_m3h": 0.237}
// |My403Cooling;78780102;723.611111;364.737;OK;1111-11-11 11:11.11 // |My403Cooling;78780102;723.611111;364.737;OK;1111-11-11 11:11.11
// telegram=|5B442D2C02017878340A8D2096809C1320EF2B7934147ED7_2D0A0000FAFF000043180100CE9005000000000000000000EE000000BA06CB07E7FFFFFF00000000000000000000000092285F030000960D020000000000000000008128| // telegram=|5B442D2C02017878340A8D2096809C1320EF2B7934147ED7_2D0A0000FAFF000043180100CE9005000000000000000000EE000000BA06CB07E7FFFFFF00000000000000000000000092285F030000960D020000000000000000008128|
// {"forward_energy_m3c": 65530,"id": "78780102","max_power_kw": 429496727.1,"media": "cooling load volume at outlet","meter": "kamheat","meter_date": "2020-08-18","name": "My403Cooling","return_energy_m3c": 71747,"status": "OK","t1_temperature_c": 17.22,"t2_temperature_c": 19.95,"target_date": "2020-08-01","target_energy_kwh": 239.722222,"target_volume_m3": 134.55,"timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 723.611111,"total_volume_m3": 364.75,"volume_flow_m3h": 0.238} // {"forward_energy_m3c": 65530,"id": "78780102","max_power_kw": -2.5,"media": "cooling load volume at outlet","meter": "kamheat","meter_date": "2020-08-18","name": "My403Cooling","return_energy_m3c": 71747,"status": "OK","t1_temperature_c": 17.22,"t2_temperature_c": 19.95,"target_date": "2020-08-01","target_energy_kwh": 239.722222,"target_volume_m3": 134.55,"timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 723.611111,"total_volume_m3": 364.75,"volume_flow_m3h": 0.238}
// |My403Cooling;78780102;723.611111;364.75;OK;1111-11-11 11:11.11 // |My403Cooling;78780102;723.611111;364.75;OK;1111-11-11 11:11.11
// Test: Heato multical602 78152801 NOKEY // Test: Heato multical602 78152801 NOKEY
@ -354,3 +354,8 @@ namespace
// telegram=|68c9c96808e672323232322d2c35041900000004fB006083000004ff074006010004ff08299400000416984e010084401400000000848040140000000004225043000034221c0000000259c91f025d4f1102617a0e042e30020000142e65030000043c24050000143ce308000004ff2200000000046d2e2B0f3144fB00007d000044ff07Bdf9000044ff08308d00004416B73f0100c4401400000000c480401400000000542ed9020000543ce8090000426c013102ff1a011B0c783032858404ff16e5841e0004ff17c1d5B400a516| // telegram=|68c9c96808e672323232322d2c35041900000004fB006083000004ff074006010004ff08299400000416984e010084401400000000848040140000000004225043000034221c0000000259c91f025d4f1102617a0e042e30020000142e65030000043c24050000143ce308000004ff2200000000046d2e2B0f3144fB00007d000044ff07Bdf9000044ff08308d00004416B73f0100c4401400000000c480401400000000542ed9020000543ce8090000426c013102ff1a011B0c783032858404ff16e5841e0004ff17c1d5B400a516|
// {"fabrication_no": "84853230", "flow_return_temperature_difference_c": 37.06, "forward_energy_m3c": 67136, "id": "32323232", "max_flow_m3h": 22.75, "max_power_kw": 869, "media": "heat", "meter": "kamheat", "meter_datetime": "2024-01-15 11:46", "name": "Kamstrup_MC603_mbus", "on_time_at_error_h": 28, "on_time_h": 17232, "power_kw": 560, "return_energy_m3c": 37929, "status": "OK", "t1_temperature_c": 81.37, "t2_temperature_c": 44.31, "target_date": "2024-01-01", "target_energy_kwh": 3200000, "target_volume_m3": 81847, "timestamp": "1111-11-11T11:11:11Z", "total_energy_consumption_kwh": 3363200, "total_volume_m3": 85656, "volume_flow_m3h": 13.16} // {"fabrication_no": "84853230", "flow_return_temperature_difference_c": 37.06, "forward_energy_m3c": 67136, "id": "32323232", "max_flow_m3h": 22.75, "max_power_kw": 869, "media": "heat", "meter": "kamheat", "meter_datetime": "2024-01-15 11:46", "name": "Kamstrup_MC603_mbus", "on_time_at_error_h": 28, "on_time_h": 17232, "power_kw": 560, "return_energy_m3c": 37929, "status": "OK", "t1_temperature_c": 81.37, "t2_temperature_c": 44.31, "target_date": "2024-01-01", "target_energy_kwh": 3200000, "target_volume_m3": 81847, "timestamp": "1111-11-11T11:11:11Z", "total_energy_consumption_kwh": 3363200, "total_volume_m3": 85656, "volume_flow_m3h": 13.16}
// |Kamstrup_MC603_mbus;32323232;3363200;85656;OK;1111-11-11 11:11.11 // |Kamstrup_MC603_mbus;32323232;3363200;85656;OK;1111-11-11 11:11.11
// Test: KMHEAT kamheat 85412440 NOKEY
// telegram=|5e442d2c4024418535047ae10050252f2f04fB091300000004167500000004ff2200000000043ca301000002599c1d025dB00e844014000000008480401400000000042eB9000000026c0534426c013444fB0900000000543c000000002f2f|
// {"id": "85412440","media": "heat","meter": "kamheat","meter_date": "2024-04-05","name": "KMHEAT","power_kw": 185,"status": "OK","t1_temperature_c": 75.8,"t2_temperature_c": 37.6,"target_date": "2024-04-01","target_energy_kwh": 0,"timestamp": "1111-11-11T11:11:11Z","total_energy_consumption_kwh": 5277.777778,"total_volume_m3": 117,"volume_flow_m3h": 4.19}
// |KMHEAT;85412440;5277.777778;117;OK;1111-11-11 11:11.11

Wyświetl plik

@ -1,130 +0,0 @@
/*
Copyright (C) 2022 Fredrik Öhrström (gpl-3.0-or-later)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include"meters_common_implementation.h"
namespace
{
struct Driver : public virtual MeterCommonImplementation
{
Driver(MeterInfo &mi, DriverInfo &di);
};
static bool ok = registerDriver([](DriverInfo&di)
{
di.setName("kampress");
di.setDefaultFields("name,id,status,pressure_bar,max_pressure_bar,min_pressure_bar,timestamp");
di.setMeterType(MeterType::PressureSensor);
di.addLinkMode(LinkMode::C1);
di.addDetection(MANUFACTURER_KAM, 0x18, 0x01);
di.setConstructor([](MeterInfo& mi, DriverInfo& di){ return shared_ptr<Meter>(new Driver(mi, di)); });
});
Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
{
addStringFieldWithExtractorAndLookup(
"status",
"Status and error flags.",
DEFAULT_PRINT_PROPERTIES | INCLUDE_TPL_STATUS,
FieldMatcher::build()
.set(VIFRange::ErrorFlags),
{
{
{
"ERROR_FLAGS",
Translate::Type::BitToString,
AlwaysTrigger, MaskBits(0xffff),
"OK",
{
{ 0x01, "DROP" }, // Unexpected drop in pressure in relation to average pressure.
{ 0x02, "SURGE" }, // Unexpected increase in pressure in relation to average pressure.
{ 0x04, "HIGH" }, // Average pressure has reached configurable limit. Default 15 bar
{ 0x08, "LOW" }, // Average pressure has reached configurable limit. Default 1.5 bar
{ 0x10, "TRANSIENT" }, // Pressure changes quickly over short timeperiods. Average is fluctuating.
{ 0x20, "COMM_ERROR" } // Cannot measure properly or bad internal communication.
}
},
},
});
addNumericFieldWithExtractor(
"pressure",
"The measured pressure.",
DEFAULT_PRINT_PROPERTIES,
Quantity::Pressure,
VifScaling::Auto,
FieldMatcher::build()
.set(MeasurementType::Instantaneous)
.set(VIFRange::Pressure)
);
addNumericFieldWithExtractor(
"max_pressure",
"The maximum pressure measured during ?.",
DEFAULT_PRINT_PROPERTIES,
Quantity::Pressure,
VifScaling::Auto,
FieldMatcher::build()
.set(MeasurementType::Maximum)
.set(VIFRange::Pressure)
);
addNumericFieldWithExtractor(
"min_pressure",
"The minimum pressure measured during ?.",
DEFAULT_PRINT_PROPERTIES,
Quantity::Pressure,
VifScaling::Auto,
FieldMatcher::build()
.set(MeasurementType::Minimum)
.set(VIFRange::Pressure)
);
addNumericFieldWithExtractor(
"alfa",
"We do not know what this is.",
DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless,
VifScaling::None,
FieldMatcher::build()
.set(DifVifKey("05FF09"))
);
addNumericFieldWithExtractor(
"beta",
"We do not know what this is.",
DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless,
VifScaling::None,
FieldMatcher::build()
.set(DifVifKey("05FF0A"))
);
}
}
// Test: Pressing kampress 77000317 NOKEY
// telegram=|32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800|
// {"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001246,"beta_counter":0.000997,"timestamp":"1111-11-11T11:11:11Z"}
// |Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11
// telegram=|27442D2C1703007701188D280194E393226EC679DE735657_660067006600962B913A21B9423A0800|
// {"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001108,"beta_counter":0.000743,"timestamp":"1111-11-11T11:11:11Z"}
// |Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11
// telegram=|27442D2C1703007701188D289554F295224ED579DE73188A_650066006600E80EA43A6B97A3BA0800|
// {"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.02,"min_pressure_bar":1.01,"alfa_counter":0.001252,"beta_counter":-0.001248,"timestamp":"1111-11-11T11:11:11Z"}
// |Pressing;77000317;LOW;1.02;1.02;1.01;1111-11-11 11:11.11

Wyświetl plik

@ -44,7 +44,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DigitalInput), .set(VIFRange::DigitalInput),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INPUT_BITS", Translate::Type::IndexToString) .add(Translate::Rule("INPUT_BITS", Translate::MapType::IndexToString)
.set(MaskBits(0xffff)) .set(MaskBits(0xffff))
.add(Translate::Map(0x11 ,"CLOSED", TestBit::Set)) .add(Translate::Map(0x11 ,"CLOSED", TestBit::Set))
.add(Translate::Map(0x55 ,"OPEN", TestBit::Set)) .add(Translate::Map(0x55 ,"OPEN", TestBit::Set))
@ -58,7 +58,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ErrorFlags), .set(VIFRange::ErrorFlags),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xffff)) .set(MaskBits(0xffff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -68,7 +68,7 @@ namespace
"How many times the door/window has been opened or closed.", "How many times the door/window has been opened or closed.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -79,7 +79,7 @@ namespace
"The current number of counted pulses from counter b.", "The current number of counted pulses from counter b.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)

Wyświetl plik

@ -39,7 +39,7 @@ namespace
{ {
setMfctTPLStatusBits( setMfctTPLStatusBits(
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("TPL_STS", Translate::Type::BitToString) .add(Translate::Rule("TPL_STS", Translate::MapType::BitToString)
.set(MaskBits(0xe0)) .set(MaskBits(0xe0))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x40 ,"SABOTAGE_ENCLOSURE", TestBit::Set)))); .add(Translate::Map(0x40 ,"SABOTAGE_ENCLOSURE", TestBit::Set))));
@ -60,7 +60,7 @@ namespace
"The current number of counted pulses from counter a.", "The current number of counted pulses from counter a.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("0EFD3A")) .set(DifVifKey("0EFD3A"))
); );
@ -70,7 +70,7 @@ namespace
"The current number of counted pulses from counter b.", "The current number of counted pulses from counter b.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("8E40FD3A")) .set(DifVifKey("8E40FD3A"))
); );

Wyświetl plik

@ -40,7 +40,7 @@ namespace
{ {
setMfctTPLStatusBits( setMfctTPLStatusBits(
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("TPL_STS", Translate::Type::BitToString) .add(Translate::Rule("TPL_STS", Translate::MapType::BitToString)
.set(MaskBits(0xe0)) .set(MaskBits(0xe0))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x04 ,"LOW_BATTERY", TestBit::Set)))); .add(Translate::Map(0x04 ,"LOW_BATTERY", TestBit::Set))));
@ -56,7 +56,7 @@ namespace
"Number of total routed messages since power up", "Number of total routed messages since power up",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -67,7 +67,7 @@ namespace
"Used router slots (maximum 936)", "Used router slots (maximum 936)",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -92,7 +92,7 @@ namespace
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
.set(SubUnitNr(2)), .set(SubUnitNr(2)),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INPUT_BITS", Translate::Type::IndexToString) .add(Translate::Rule("INPUT_BITS", Translate::MapType::IndexToString)
.set(MaskBits(0x01)) .set(MaskBits(0x01))
.add(Translate::Map(0x00, "NO", TestBit::Set)) .add(Translate::Map(0x00, "NO", TestBit::Set))
.add(Translate::Map(0x01, "YES", TestBit::Set)) .add(Translate::Map(0x01, "YES", TestBit::Set))
@ -103,7 +103,7 @@ namespace
"Seconds to mode change (Listen -> Sleep or Sleep -> Listen). Maximum 32767 seconds", "Seconds to mode change (Listen -> Sleep or Sleep -> Listen). Maximum 32767 seconds",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -115,7 +115,7 @@ namespace
"Value on parameter 'Listen timer'", "Value on parameter 'Listen timer'",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -127,7 +127,7 @@ namespace
"Value on parameter 'Pause timer'", "Value on parameter 'Pause timer'",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -143,7 +143,7 @@ namespace
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
.set(StorageNr(3)), .set(StorageNr(3)),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("INPUT_BITS", Translate::Type::BitToString) .add(Translate::Rule("INPUT_BITS", Translate::MapType::BitToString)
.set(MaskBits(0xffff)) .set(MaskBits(0xffff))
.add(Translate::Map(0x01 ,"SU", TestBit::Set)) .add(Translate::Map(0x01 ,"SU", TestBit::Set))
.add(Translate::Map(0x02 ,"MO", TestBit::Set)) .add(Translate::Map(0x02 ,"MO", TestBit::Set))
@ -159,7 +159,7 @@ namespace
"Value on parameter 'Start time', shown as minusted after midnight (-1=Not used)", "Value on parameter 'Start time', shown as minusted after midnight (-1=Not used)",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -180,7 +180,7 @@ namespace
"Battery voltage.", "Battery voltage.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -69,7 +69,7 @@ namespace
"Unique asynchronous message number.", "Unique asynchronous message number.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AccessNumber) .set(VIFRange::AccessNumber)
@ -80,7 +80,7 @@ namespace
"Minutes since last manual test.", "Minutes since last manual test.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)

Wyświetl plik

@ -39,7 +39,7 @@ namespace
addOptionalLibraryFields("on_time_h"); addOptionalLibraryFields("on_time_h");
setMfctTPLStatusBits( setMfctTPLStatusBits(
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("TPL_STS", Translate::Type::BitToString) .add(Translate::Rule("TPL_STS", Translate::MapType::BitToString)
.set(MaskBits(0xe0)) .set(MaskBits(0xe0))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x40 ,"SABOTAGE_ENCLOSURE", TestBit::Set)))); .add(Translate::Map(0x40 ,"SABOTAGE_ENCLOSURE", TestBit::Set))));
@ -55,7 +55,7 @@ namespace
"The current temperature.", "The current temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -66,7 +66,7 @@ namespace
"The current humidity.", "The current humidity.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -77,7 +77,7 @@ namespace
"The average temperature over the last hour.", "The average temperature over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -89,7 +89,7 @@ namespace
"The average humidity over the last hour.", "The average humidity over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -101,7 +101,7 @@ namespace
"The average temperature over the last 24 hours.", "The average temperature over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -113,7 +113,7 @@ namespace
"The average humidity over the last 24 hours.", "The average humidity over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)

Wyświetl plik

@ -44,7 +44,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -55,7 +55,7 @@ namespace
"The water consumption at the due date.", "The water consumption at the due date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -77,7 +77,7 @@ namespace
"The water consumption at the what date?", "The water consumption at the what date?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -105,7 +105,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {

Wyświetl plik

@ -51,7 +51,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"OK", "OK",
{ {
@ -66,7 +66,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -87,7 +87,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -108,7 +108,7 @@ namespace
"Duration since last measurement.", "Duration since last measurement.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DurationSinceReadout) .set(VIFRange::DurationSinceReadout)

Wyświetl plik

@ -52,7 +52,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -66,7 +66,7 @@ namespace
"The total heat energy consumption recorded by this meter.", "The total heat energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -77,7 +77,7 @@ namespace
"The total heating media volume recorded by this meter.", "The total heating media volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -88,7 +88,7 @@ namespace
"The current heat media volume flow.", "The current heat media volume flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -99,7 +99,7 @@ namespace
"The current power consumption.", "The current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -110,7 +110,7 @@ namespace
"The difference between flow and return media temperatures.", "The difference between flow and return media temperatures.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::TemperatureDifference) .set(VIFRange::TemperatureDifference)
@ -121,7 +121,7 @@ namespace
"The most recent billing period date.", "The most recent billing period date.",
DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE, DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -134,7 +134,7 @@ namespace
"The total water consumption at the historic date.", "The total water consumption at the historic date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)

Wyświetl plik

@ -51,7 +51,7 @@ namespace
"The total water consumption recorded at the beginning of this month.", "The total water consumption recorded at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -74,7 +74,7 @@ namespace
"The total water consumption recorded at the beginning of this month.", "The total water consumption recorded at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -130,7 +130,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -212,8 +212,8 @@ namespace
// Test: Minowired minomess 57575757 NOKEY // Test: Minowired minomess 57575757 NOKEY
// telegram=|6874746808007257575757496A000712000000_0C7857575757046D2414DE280413000000000C943C000000004413FFFFFFFF426CFFFF840113FFFFFFFF82016CFFFFC40113FFFFFFFFC2016CFFFF840213FFFFFFFF82026CFFFF043B000000000422E62F000004260000000034220000000002FD1700001F5716| // telegram=|6874746808007257575757496A000712000000_0C7857575757046D2414DE280413000000000C943C000000004413FFFFFFFF426CFFFF840113FFFFFFFF82016CFFFFC40113FFFFFFFFC2016CFFFF840213FFFFFFFF82026CFFFF043B000000000422E62F000004260000000034220000000002FD1700001F5716|
// {"media":"water","meter":"minomess","name":"Minowired","id":"57575757","fabrication_no":"57575757","operating_time_h":0,"on_time_h":12262,"on_time_at_error_h":0,"meter_datetime":"2022-08-30 20:36","total_m3":0,"total_backward_m3":0,"volume_flow_m3h":0,"target_m3":4294967.295,"target_date":"2127-15-31","status":"OK","timestamp":"1111-11-11T11:11:11Z"} // {"media":"water","meter":"minomess","name":"Minowired","id":"57575757","fabrication_no":"57575757","operating_time_h":0,"on_time_h":12262,"on_time_at_error_h":0,"meter_datetime":"2022-08-30 20:36","total_m3":0,"total_backward_m3":0,"volume_flow_m3h":0,"target_m3":-0.001,"target_date":"2127-15-31","status":"OK","timestamp":"1111-11-11T11:11:11Z"}
// |Minowired;57575757;0;4294967.295;OK;1111-11-11 11:11.11 // |Minowired;57575757;0;-0.001;OK;1111-11-11 11:11.11
// Test: Zenner_cold minomess 21314151 NOKEY // Test: Zenner_cold minomess 21314151 NOKEY
// telegram=|6644496A4425155518377251413121496A0116360050052F2F_0C1355000000026CEC2182046CE1218C0413000000808D0493132C33FE00008000008000008000008000008000008000008000008000008000008000008000008000008000008002FD1700002F2F| // telegram=|6644496A4425155518377251413121496A0116360050052F2F_0C1355000000026CEC2182046CE1218C0413000000808D0493132C33FE00008000008000008000008000008000008000008000008000008000008000008000008000008000008002FD1700002F2F|

Wyświetl plik

@ -46,7 +46,7 @@ namespace
"The total water consumption recorded at the end of previous year.", "The total water consumption recorded at the end of previous year.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -58,7 +58,7 @@ namespace
"Date when previous year ended.", "Date when previous year ended.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -46,7 +46,7 @@ namespace
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FF20")), .set(DifVifKey("02FF20")),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0x000f)) .set(MaskBits(0x000f))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
.add(Translate::Map(0x01 ,"DRY", TestBit::Set)) .add(Translate::Map(0x01 ,"DRY", TestBit::Set))
@ -60,7 +60,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -71,7 +71,7 @@ namespace
"The total water consumption recorded at the beginning of this month.", "The total water consumption recorded at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -83,7 +83,7 @@ namespace
"The water temperature.", "The water temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -95,7 +95,7 @@ namespace
"The external temperature outside of the meter.", "The external temperature outside of the meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Any) .set(MeasurementType::Any)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -108,7 +108,7 @@ namespace
"The lowest external temperature outside of the meter.", "The lowest external temperature outside of the meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -119,7 +119,7 @@ namespace
"The maximum flow recorded during previous period.", "The maximum flow recorded during previous period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -136,7 +136,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0x000f), AlwaysTrigger, MaskBits(0x000f),
"", "",
{ {
@ -159,7 +159,7 @@ namespace
{ {
{ {
"DRY", "DRY",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x0070), AlwaysTrigger, MaskBits(0x0070),
"", "",
{ {
@ -186,7 +186,7 @@ namespace
{ {
{ {
"REVERSED", "REVERSED",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x0380), AlwaysTrigger, MaskBits(0x0380),
"", "",
{ {
@ -213,7 +213,7 @@ namespace
{ {
{ {
"LEAKING", "LEAKING",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0x1c00), AlwaysTrigger, MaskBits(0x1c00),
"", "",
{ {
@ -240,7 +240,7 @@ namespace
{ {
{ {
"BURSTING", "BURSTING",
Translate::Type::IndexToString, Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0xe000), AlwaysTrigger, MaskBits(0xe000),
"", "",
{ {

Wyświetl plik

@ -47,7 +47,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -62,7 +62,7 @@ namespace
"The current temperature.", "The current temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -73,7 +73,7 @@ namespace
"The current relative humidity.", "The current relative humidity.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)

Wyświetl plik

@ -47,7 +47,7 @@ namespace
"Et+ the total 3-phase active positive energy.", "Et+ the total 3-phase active positive energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -61,7 +61,7 @@ namespace
"P+ the 3-phase active positive power.", "P+ the 3-phase active positive power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -75,7 +75,7 @@ namespace
"Er+ the total 3-phase reactive positive energy.", "Er+ the total 3-phase reactive positive energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -89,7 +89,7 @@ namespace
"Q+ the 3-phase reactive positive power.", "Q+ the 3-phase reactive positive power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -103,7 +103,7 @@ namespace
"Part Et+ the total 3-phase active partial energy.", "Part Et+ the total 3-phase active partial energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -117,7 +117,7 @@ namespace
"P- the 3-phase active negative power.", "P- the 3-phase active negative power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -131,7 +131,7 @@ namespace
"Part Er+ the total 3-phase reactive partial energy.", "Part Er+ the total 3-phase reactive partial energy.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -145,7 +145,7 @@ namespace
"Q- the 3-phase reactive negative power.", "Q- the 3-phase reactive negative power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -159,7 +159,7 @@ namespace
"PF the power factor.", "PF the power factor.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless), .set(VIFRange::Dimensionless),
@ -174,7 +174,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ErrorFlags), .set(VIFRange::ErrorFlags),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0xff)) .set(MaskBits(0xff))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -186,7 +186,7 @@ namespace
"I1 Amperage for L1 phase.", "I1 Amperage for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -198,7 +198,7 @@ namespace
"I2 Amperage for L2 phase.", "I2 Amperage for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -210,7 +210,7 @@ namespace
"I3 Amperage for L3 phase.", "I3 Amperage for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -222,7 +222,7 @@ namespace
"L1-N Voltage for L1 phase.", "L1-N Voltage for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -234,7 +234,7 @@ namespace
"L2-N Voltagefor L2 phase.", "L2-N Voltagefor L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -246,7 +246,7 @@ namespace
"L3-N Voltage for L3 phase.", "L3-N Voltage for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -260,7 +260,7 @@ namespace
"P1 Power for L1 phase.", "P1 Power for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -273,7 +273,7 @@ namespace
"P2 Power for L2 phase.", "P2 Power for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -286,7 +286,7 @@ namespace
"P3 Power for L3 phase.", "P3 Power for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -299,7 +299,7 @@ namespace
"Q1 Power for L1 phase.", "Q1 Power for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -312,7 +312,7 @@ namespace
"Q2 Power for L2 phase.", "Q2 Power for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -325,7 +325,7 @@ namespace
"Q3 Power for L3 phase.", "Q3 Power for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -338,7 +338,7 @@ namespace
"PF1 the power factor for L1 phase.", "PF1 the power factor for L1 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -351,7 +351,7 @@ namespace
"PF2 the power factor for L2 phase.", "PF2 the power factor for L2 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -364,7 +364,7 @@ namespace
"PF3 the power factor for L3 phase.", "PF3 the power factor for L3 phase.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Dimensionless) .set(VIFRange::Dimensionless)
@ -377,7 +377,7 @@ namespace
"L1-L2 Voltage between phases.", "L1-L2 Voltage between phases.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -389,7 +389,7 @@ namespace
"L2-L3 Voltage between phases.", "L2-L3 Voltage between phases.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -401,7 +401,7 @@ namespace
"L3-L1 Voltage between phases.", "L3-L1 Voltage between phases.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -413,7 +413,7 @@ namespace
"I Neutral amperage.", "I Neutral amperage.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Amperage, Quantity::Amperage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Amperage) .set(VIFRange::Amperage)
@ -426,7 +426,7 @@ namespace
"Frequency in 0.1 Hz", "Frequency in 0.1 Hz",
DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE, DEFAULT_PRINT_PROPERTIES | PrintProperty::HIDE,
Quantity::Frequency, Quantity::Frequency,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("05FF5A")) .set(DifVifKey("05FF5A"))
); );

Wyświetl plik

@ -64,7 +64,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -75,7 +75,7 @@ namespace
"The total energy backward (production) recorded by this meter.", "The total energy backward (production) recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -87,7 +87,7 @@ namespace
"The current power consumption.", "The current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -98,7 +98,7 @@ namespace
"The current power production.", "The current power production.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
"The current temperature.", "The current temperature.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -59,7 +59,7 @@ namespace
"The average temperature over the last hour.", "The average temperature over the last hour.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -71,7 +71,7 @@ namespace
"The average temperature over the last 24 hours.", "The average temperature over the last 24 hours.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -83,7 +83,7 @@ namespace
"The current relative humidity.", "The current relative humidity.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -94,7 +94,7 @@ namespace
"The average relative humidity over the last hour.", "The average relative humidity over the last hour.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -106,7 +106,7 @@ namespace
"The average relative humidity over the last 24 hours.", "The average relative humidity over the last 24 hours.",
PrintProperty::REQUIRED, PrintProperty::REQUIRED,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -59,7 +59,7 @@ namespace
"The total amount of water that has passed through this meter.", "The total amount of water that has passed through this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -70,7 +70,7 @@ namespace
"The active power consumption.", "The active power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -81,7 +81,7 @@ namespace
"The flow of water.", "The flow of water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -92,7 +92,7 @@ namespace
"The forward temperature of the water.", "The forward temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -103,7 +103,7 @@ namespace
"The return temperature of the water.", "The return temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -124,7 +124,7 @@ namespace
"The energy consumption recorded by this meter at the set date.", "The energy consumption recorded by this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -136,7 +136,7 @@ namespace
"The amount of water that had passed through this meter at the set date.", "The amount of water that had passed through this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -148,7 +148,7 @@ namespace
"The maximum forward temperature of the water.", "The maximum forward temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -160,7 +160,7 @@ namespace
"The maximum return temperature of the water.", "The maximum return temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -172,7 +172,7 @@ namespace
"The maximum forward flow of water through this meter.", "The maximum forward flow of water through this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)

Wyświetl plik

@ -59,7 +59,7 @@ namespace
"The total water consumption at the end of the previous billing period.", "The total water consumption at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -71,7 +71,7 @@ namespace
"The total media volume flowing forward at the end of previous billing period.", "The total media volume flowing forward at the end of previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -84,7 +84,7 @@ namespace
"The total media volume flowing backward at the end of the previous billing period.", "The total media volume flowing backward at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -97,7 +97,7 @@ namespace
"Percentage of battery remaining.", "Percentage of battery remaining.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("01FD74")), .set(DifVifKey("01FD74")),
Unit::PERCENTAGE Unit::PERCENTAGE
@ -118,5 +118,5 @@ namespace
// Test: M q400 05829163 NOKEY // Test: M q400 05829163 NOKEY
// telegram=|544409076391820510077ABF100000046D2A0DC62C0420E80F430104130000000004933B0000000004933C00000000023B00000259F0D8446D0000C12C44130000000044933B0000000044933C0000000001FD7461| // telegram=|544409076391820510077ABF100000046D2A0DC62C0420E80F430104130000000004933B0000000004933C00000000023B00000259F0D8446D0000C12C44130000000044933B0000000044933C0000000001FD7461|
// {"backward_at_set_date_m3": 0,"battery_pct": 97,"consumption_at_set_date_m3": 0,"flow_temperature_c": 555.36,"forward_at_set_date_m3": 0,"id": "05829163","media": "water","meter": "q400","meter_datetime": "2022-12-06 13:42","name": "M","on_time_h": 5881.166667,"set_datetime": "2022-12-01 00:00","status": "TEMPORARY_ERROR","timestamp": "1111-11-11T11:11:11Z","total_backward_m3": 0,"total_forward_m3": 0,"total_m3": 0,"volume_flow_m3h": 0} // {"backward_at_set_date_m3": 0,"battery_pct": 97,"consumption_at_set_date_m3": 0,"flow_temperature_c": -100,"forward_at_set_date_m3": 0,"id": "05829163","media": "water","meter": "q400","meter_datetime": "2022-12-06 13:42","name": "M","on_time_h": 5881.166667,"set_datetime": "2022-12-01 00:00","status": "TEMPORARY_ERROR","timestamp": "1111-11-11T11:11:11Z","total_backward_m3": 0,"total_forward_m3": 0,"total_m3": 0,"volume_flow_m3h": 0}
// |M;05829163;0;1111-11-11 11:11.11 // |M;05829163;0;1111-11-11 11:11.11

Wyświetl plik

@ -59,7 +59,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"OK", "OK",
{ {
@ -74,7 +74,7 @@ namespace
"The current heat cost allocation.", "The current heat cost allocation.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -95,7 +95,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -117,7 +117,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -139,7 +139,7 @@ namespace
"Heat cost allocation at the 8 billing period date.", "Heat cost allocation at the 8 billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -161,7 +161,7 @@ namespace
"Heat cost allocation at the 17 billing period date.", "Heat cost allocation at the 17 billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -200,7 +200,7 @@ namespace
"Forward media temperature.", "Forward media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)

Wyświetl plik

@ -54,7 +54,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -85,7 +85,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -106,7 +106,7 @@ namespace
"The total energy consumption recorded at the last day of the previous month.", "The total energy consumption recorded at the last day of the previous month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(17)) .set(StorageNr(17))
@ -128,7 +128,7 @@ namespace
"The total energy consumption recorded at the last day of the previous year.", "The total energy consumption recorded at the last day of the previous year.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(StorageNr(1)) .set(StorageNr(1))

Wyświetl plik

@ -63,7 +63,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -89,7 +89,7 @@ namespace
"The total energy consumption recorded at key (billing) date", "The total energy consumption recorded at key (billing) date",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -121,7 +121,7 @@ namespace
info, info,
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -136,7 +136,7 @@ namespace
"The time between the measurement and the sending of this telegram.", "The time between the measurement and the sending of this telegram.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ActualityDuration) .set(VIFRange::ActualityDuration)
@ -147,7 +147,7 @@ namespace
"How long the meter has been in an error state and unable to measure values, while powered up.", "How long the meter has been in an error state and unable to measure values, while powered up.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::AtError) .set(MeasurementType::AtError)
.set(VIFRange::OnTime) .set(VIFRange::OnTime)

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -73,7 +73,7 @@ namespace
"Number of times the smoke alarm has triggered.", "Number of times the smoke alarm has triggered.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Unsigned,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("81037C034C4123")) .set(DifVifKey("81037C034C4123"))
); );
@ -102,7 +102,7 @@ namespace
"Number of times the test button has been pressed.", "Number of times the test button has been pressed.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("81027C03495523")) .set(DifVifKey("81027C03495523"))
); );
@ -112,7 +112,7 @@ namespace
"Transmission counter?", "Transmission counter?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None, DifSignedness::Unsigned,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AccessNumber) .set(VIFRange::AccessNumber)
@ -132,7 +132,7 @@ namespace
"What does this mean?", "What does this mean?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("02FDAC7E")) .set(DifVifKey("02FDAC7E"))
); );

Wyświetl plik

@ -53,7 +53,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffffff), AlwaysTrigger, MaskBits(0xffffffff),
"OK", "OK",
{ {
@ -69,7 +69,7 @@ namespace
"The total heating energy consumption recorded by this meter.", "The total heating energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -81,7 +81,7 @@ namespace
"The total cooling energy consumption recorded by this meter.", "The total cooling energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -93,7 +93,7 @@ namespace
"The current power consumption.", "The current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -114,7 +114,7 @@ namespace
"The heating energy consumption recorded at the end of the previous billing period.", "The heating energy consumption recorded at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -127,7 +127,7 @@ namespace
"The cooling energy consumption recorded at the end of the previous billing period.", "The cooling energy consumption recorded at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)

Wyświetl plik

@ -65,7 +65,7 @@ namespace
"The water consumption at the due date.", "The water consumption at the due date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -77,7 +77,7 @@ namespace
"The due date for billing date.", "The due date for billing date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -90,7 +90,7 @@ namespace
"The water consumption at the 17 due date.", "The water consumption at the 17 due date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -102,7 +102,7 @@ namespace
"The due date for billing date.", "The due date for billing date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -115,7 +115,7 @@ namespace
"Media volume flow when duration exceeds lower last.", "Media volume flow when duration exceeds lower last.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -127,7 +127,7 @@ namespace
"The date the error occurred at. If no error, reads 2127-15-31 (FFFF).", "The date the error occurred at. If no error, reads 2127-15-31 (FFFF).",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::AtError) .set(MeasurementType::AtError)
.set(VIFRange::Date), .set(VIFRange::Date),

Wyświetl plik

@ -47,7 +47,7 @@ namespace
"The current temperature.", "The current temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -58,7 +58,7 @@ namespace
"The average temperature over the last hour.", "The average temperature over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -70,7 +70,7 @@ namespace
"The average temperature over the last 24 hours.", "The average temperature over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -82,7 +82,7 @@ namespace
"The maximum temperature over the last hour.", "The maximum temperature over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -93,7 +93,7 @@ namespace
"The maximum temperature over the last 24 hours.", "The maximum temperature over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -105,7 +105,7 @@ namespace
"The minimum temperature over the last hour.", "The minimum temperature over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -116,7 +116,7 @@ namespace
"The minimum temperature over the last 24 hours.", "The minimum temperature over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -128,7 +128,7 @@ namespace
"The current relative humidity.", "The current relative humidity.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -139,7 +139,7 @@ namespace
"The average relative humidity over the last hour.", "The average relative humidity over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -151,7 +151,7 @@ namespace
"The average relative humidity over the last 24 hours.", "The average relative humidity over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -163,7 +163,7 @@ namespace
"The maximum relative humidity over the last hour.", "The maximum relative humidity over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -174,7 +174,7 @@ namespace
"The maximum relative humidity over the last 24 hours.", "The maximum relative humidity over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -186,7 +186,7 @@ namespace
"The minimum relative humidity over the last hour.", "The minimum relative humidity over the last hour.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -197,7 +197,7 @@ namespace
"The minimum relative humidity over the last 24 hours.", "The minimum relative humidity over the last 24 hours.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::RelativeHumidity, Quantity::RelativeHumidity,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Minimum) .set(MeasurementType::Minimum)
.set(VIFRange::RelativeHumidity) .set(VIFRange::RelativeHumidity)
@ -209,7 +209,7 @@ namespace
"The meters date time.", "The meters date time.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)

Wyświetl plik

@ -43,7 +43,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -51,7 +51,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -62,7 +62,7 @@ namespace
"The active power consumption.", "The active power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -73,7 +73,7 @@ namespace
"The maximum power consumption over ?period?.", "The maximum power consumption over ?period?.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -84,7 +84,7 @@ namespace
"The flow of water.", "The flow of water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -95,7 +95,7 @@ namespace
"The maximum forward flow of water over a ?period?.", "The maximum forward flow of water over a ?period?.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -106,7 +106,7 @@ namespace
"The forward temperature of the water.", "The forward temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -117,7 +117,7 @@ namespace
"The return temperature of the water.", "The return temperature of the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -128,7 +128,7 @@ namespace
"The temperature difference forward-return for the water.", "The temperature difference forward-return for the water.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::TemperatureDifference) .set(VIFRange::TemperatureDifference)
@ -139,7 +139,7 @@ namespace
"The total amount of water that has passed through this meter.", "The total amount of water that has passed through this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -155,7 +155,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"OK", "OK",
{ {
@ -188,7 +188,7 @@ namespace
"The energy consumption at the last billing period date.", "The energy consumption at the last billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -205,7 +205,7 @@ namespace
info, info,
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -220,8 +220,14 @@ namespace
// {"media":"heat","meter":"sensostar","name":"Heat","id":"20480057","meter_timestamp":"2022-04-28 13:44","total_kwh":0,"power_kw":0,"power_max_kw":0,"flow_water_m3h":0,"flow_water_max_m3h":0,"forward_c":20,"return_c":21,"difference_c":-0.38,"total_water_m3":0,"current_status":"ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR","reporting_date":"2000-00-00","energy_consumption_at_reporting_date_kwh":0,"consumption_1_months_ago_kwh":0,"timestamp":"1111-11-11T11:11:11Z"} // {"media":"heat","meter":"sensostar","name":"Heat","id":"20480057","meter_timestamp":"2022-04-28 13:44","total_kwh":0,"power_kw":0,"power_max_kw":0,"flow_water_m3h":0,"flow_water_max_m3h":0,"forward_c":20,"return_c":21,"difference_c":-0.38,"total_water_m3":0,"current_status":"ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR","reporting_date":"2000-00-00","energy_consumption_at_reporting_date_kwh":0,"consumption_1_months_ago_kwh":0,"timestamp":"1111-11-11T11:11:11Z"}
// |Heat;20480057;0;0;ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR;2000-00-00;0;1111-11-11 11:11.11 // |Heat;20480057;0;0;ERROR_FLOW_MEASUREMENT_SYSTEM_ERROR;2000-00-00;0;1111-11-11 11:11.11
// Test: WMZ sensostar 02752560 NOKEY //Test: WMZ sensostar 02752560 NOKEY
// Comment: from "Sensostar U" //Comment: from "Sensostar U"
//telegram=a444c5146025750200047ac20000202f2f046d2e26c62a040643160000041310f0050001fd1700426cbf2c4406570e00008401061f160000840206f6150000840306f5150000840406f3150000840506ea150000840606bf1500008407065214000084080692120000840906c5100000840a06570e0000840b06ca0b0000840c06da090000840d06ca080000840e06c8080000840f06c608000003fd0c05010002fd0b2111 //telegram=a444c5146025750200047ac20000202f2f046d2e26c62a040643160000041310f0050001fd1700426cbf2c4406570e00008401061f160000840206f6150000840306f5150000840406f3150000840506ea150000840606bf1500008407065214000084080692120000840906c5100000840a06570e0000840b06ca0b0000840c06da090000840d06ca080000840e06c8080000840f06c608000003fd0c05010002fd0b2111
//{"media":"heat","meter":"sensostar","name":"WMZ","id":"02752560","meter_timestamp":"2022-10-06 06:46","total_kwh":5699,"total_water_m3":389.136,"current_status":"OK","reporting_date":"2021-12-31","energy_consumption_at_reporting_date_kwh":3671,"consumption_1_months_ago_kwh":5663,"consumption_2_months_ago_kwh":5622,"consumption_3_months_ago_kwh":5621,"consumption_4_months_ago_kwh":5619,"consumption_5_months_ago_kwh":5610,"consumption_6_months_ago_kwh":5567,"consumption_7_months_ago_kwh":5202,"consumption_8_months_ago_kwh":4754,"consumption_9_months_ago_kwh":4293,"consumption_10_months_ago_kwh":3671,"consumption_11_months_ago_kwh":3018,"consumption_12_months_ago_kwh":2522,"consumption_13_months_ago_kwh":2250,"consumption_14_months_ago_kwh":2248,"consumption_15_months_ago_kwh":2246,"timestamp":"1111-11-11 11:11.11"} //{"media":"heat","meter":"sensostar","name":"WMZ","id":"02752560","meter_timestamp":"2022-10-06 06:46","total_kwh":5699,"total_water_m3":389.136,"current_status":"OK","reporting_date":"2021-12-31","energy_consumption_at_reporting_date_kwh":3671,"consumption_1_months_ago_kwh":5663,"consumption_2_months_ago_kwh":5622,"consumption_3_months_ago_kwh":5621,"consumption_4_months_ago_kwh":5619,"consumption_5_months_ago_kwh":5610,"consumption_6_months_ago_kwh":5567,"consumption_7_months_ago_kwh":5202,"consumption_8_months_ago_kwh":4754,"consumption_9_months_ago_kwh":4293,"consumption_10_months_ago_kwh":3671,"consumption_11_months_ago_kwh":3018,"consumption_12_months_ago_kwh":2522,"consumption_13_months_ago_kwh":2250,"consumption_14_months_ago_kwh":2248,"consumption_15_months_ago_kwh":2246,"timestamp":"1111-11-11 11:11.11"}
//WMZ;02752560;5699;389.136000;OK;1111-11-11 11:11.11 //WMZ;02752560;5699;389.136000;OK;1111-11-11 11:11.11
// Test: ABC sensostar 21750444 NOKEY
// Comment: Test negative flow values
// telegram=4944C5144404752100047AC1000020_2F2F046D142D073404068847000001FD170004138E8A4000043BF7FFFFFF042B00000000025B3E00025F360002612F0303FD0C05010002FD0B2011
// {"current_status": "OK","difference_c": 8.15,"flow_water_m3h": -0.009,"forward_c": 62,"id": "21750444","media": "heat","meter": "sensostar","meter_timestamp": "2024-04-07 13:20","name": "ABC","power_kw": 0,"return_c": 54,"timestamp": "1111-11-11T11:11:11Z","total_kwh": 18312,"total_water_m3": 4229.774}
// |ABC;21750444;18312;4229.774;OK;null;null;1111-11-11 11:11.11

Wyświetl plik

@ -51,7 +51,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ErrorFlags), .set(VIFRange::ErrorFlags),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0x0000)) .set(MaskBits(0x0000))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));
@ -61,7 +61,7 @@ namespace
"The total heat energy consumption recorded by this meter.", "The total heat energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -72,7 +72,7 @@ namespace
"The total heat energy consumption recorded by this meter on tariff 1.", "The total heat energy consumption recorded by this meter on tariff 1.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -84,7 +84,7 @@ namespace
"The total heating media volume recorded by this meter.", "The total heating media volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -95,7 +95,7 @@ namespace
"The total heating media volume recorded by this meter on tariff 2.", "The total heating media volume recorded by this meter on tariff 2.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -107,7 +107,7 @@ namespace
"The current heat media volume flow.", "The current heat media volume flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -118,7 +118,7 @@ namespace
"The current power consumption.", "The current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -129,7 +129,7 @@ namespace
"The current forward heat media temperature.", "The current forward heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -140,7 +140,7 @@ namespace
"The current return heat media temperature.", "The current return heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -151,7 +151,7 @@ namespace
"The current return heat media temperature.", "The current return heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::TemperatureDifference) .set(VIFRange::TemperatureDifference)
@ -162,7 +162,7 @@ namespace
"The total heat energy consumption recorded by this meter at the end of the previous billing period.", "The total heat energy consumption recorded by this meter at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -174,7 +174,7 @@ namespace
"The total heating media volume recorded by this meter at the end of the previous billing period.", "The total heating media volume recorded by this meter at the end of the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -186,7 +186,7 @@ namespace
"The last billing period end date.", "The last billing period end date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -59,7 +59,7 @@ namespace
"The total cooling energy consumption recorded by this meter.", "The total cooling energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -71,7 +71,7 @@ namespace
"The total volume recorded by this meter.", "The total volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyVolumeVIF) .set(VIFRange::AnyVolumeVIF)
@ -82,7 +82,7 @@ namespace
"The total cooling volume recorded by this meter.", "The total cooling volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyVolumeVIF) .set(VIFRange::AnyVolumeVIF)
@ -94,7 +94,7 @@ namespace
"The current flow.", "The current flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -105,7 +105,7 @@ namespace
"The power.", "The power.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyPowerVIF) .set(VIFRange::AnyPowerVIF)
@ -116,7 +116,7 @@ namespace
"The flow temperature.", "The flow temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -127,7 +127,7 @@ namespace
"The return temperature.", "The return temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -138,7 +138,7 @@ namespace
"How long the meter has been collecting data.", "How long the meter has been collecting data.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OperatingTime) .set(VIFRange::OperatingTime)
@ -149,7 +149,7 @@ namespace
"How long the meter has been in an error state and not collected data.", "How long the meter has been in an error state and not collected data.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OperatingTime) .set(VIFRange::OperatingTime)
@ -161,7 +161,7 @@ namespace
"The total energy consumption recorded by this meter at the set date.", "The total energy consumption recorded by this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -173,7 +173,7 @@ namespace
"The total cooling energy consumption recorded by this meter at the set date.", "The total cooling energy consumption recorded by this meter at the set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -186,7 +186,7 @@ namespace
"The last billing set date.", "The last billing set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -43,7 +43,7 @@ namespace
"The current heat cost allocation for this meter.", "The current heat cost allocation for this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -64,7 +64,7 @@ namespace
"Heat cost allocation at the most recent billing period date.", "Heat cost allocation at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -76,7 +76,7 @@ namespace
"The current temperature of the heating element.", "The current temperature of the heating element.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -87,7 +87,7 @@ namespace
"The current room temperature.", "The current room temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -98,7 +98,7 @@ namespace
"The maximum temperature so far during this billing period.", "The maximum temperature so far during this billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -110,7 +110,7 @@ namespace
"The maximum temperature during the previous billing period.", "The maximum temperature during the previous billing period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Maximum) .set(MeasurementType::Maximum)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ErrorFlags), .set(VIFRange::ErrorFlags),
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ERROR_FLAGS", Translate::Type::BitToString) .add(Translate::Rule("ERROR_FLAGS", Translate::MapType::BitToString)
.set(MaskBits(0x000f)) .set(MaskBits(0x000f))
.set(DefaultMessage("OK")) .set(DefaultMessage("OK"))
)); ));

Wyświetl plik

@ -67,7 +67,7 @@ namespace
"Current water temperature recorded by this meter.", "Current water temperature recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature)); .set(VIFRange::FlowTemperature));
@ -77,7 +77,7 @@ namespace
"The current water flow.", "The current water flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow)); .set(VIFRange::VolumeFlow));
@ -87,7 +87,7 @@ namespace
"Volume up to end of last year-period.", "Volume up to end of last year-period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -99,7 +99,7 @@ namespace
"Reverse volume in this year-period (?)", "Reverse volume in this year-period (?)",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -123,7 +123,7 @@ namespace
"Volume up to end of last month-period.", "Volume up to end of last month-period.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -145,7 +145,7 @@ namespace
"Remaining battery life in years.", "Remaining battery life in years.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::RemainingBattery), .set(VIFRange::RemainingBattery),

Wyświetl plik

@ -42,7 +42,7 @@ namespace
"The total heat energy consumption recorded by this meter.", "The total heat energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -53,7 +53,7 @@ namespace
"The total heating media volume recorded by this meter.", "The total heating media volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -64,7 +64,7 @@ namespace
"The current power consumption.", "The current power consumption.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Power, Quantity::Power,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::PowerW) .set(VIFRange::PowerW)
@ -75,7 +75,7 @@ namespace
"The current heat media volume flow.", "The current heat media volume flow.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::AutoSigned, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -86,7 +86,7 @@ namespace
"The current forward heat media temperature.", "The current forward heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -97,7 +97,7 @@ namespace
"The current return heat media temperature.", "The current return heat media temperature.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -114,7 +114,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {

Wyświetl plik

@ -40,7 +40,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -51,7 +51,7 @@ namespace
"The total water consumption recorded at the beginning of this month.", "The total water consumption recorded at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -68,7 +68,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffffff), AlwaysTrigger, MaskBits(0xffffff),
"OK", "OK",
{ {
@ -92,7 +92,7 @@ namespace
"The total backward water volume recorded by this meter.", "The total backward water volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(DifVifKey("04933C")) .set(DifVifKey("04933C"))
); );

Wyświetl plik

@ -49,7 +49,7 @@ namespace
{ {
{ {
"STATUS_FLAGS", "STATUS_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -68,7 +68,7 @@ namespace
{ {
{ {
"OTHER_FLAGS", "OTHER_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xff), AlwaysTrigger, MaskBits(0xff),
"", "",
{ {
@ -92,7 +92,7 @@ namespace
"The total gas consumption recorded by this meter.", "The total gas consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -114,7 +114,7 @@ namespace
"The total gas consumption recorded by this meter at the beginning of this month.", "The total gas consumption recorded by this meter at the beginning of this month.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -44,7 +44,7 @@ namespace
"Total energy consumption at the end of the year", "Total energy consumption at the end of the year",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -56,7 +56,7 @@ namespace
"Date when previous year ended.", "Date when previous year ended.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -42,7 +42,7 @@ namespace
"The total energy consumption recorded by this meter.", "The total energy consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -53,7 +53,7 @@ namespace
"The total energy consumption recorded when?", "The total energy consumption recorded when?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -65,7 +65,7 @@ namespace
"The last billing old date?", "The last billing old date?",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -77,7 +77,7 @@ namespace
"The total energy consumption recorded by this meter at the due date.", "The total energy consumption recorded by this meter at the due date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Energy, Quantity::Energy,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyEnergyVIF) .set(VIFRange::AnyEnergyVIF)
@ -89,7 +89,7 @@ namespace
"The last billing set date.", "The last billing set date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)

Wyświetl plik

@ -52,7 +52,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -75,7 +75,7 @@ namespace
"Device date time.", "Device date time.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::DateTime) .set(VIFRange::DateTime)
@ -86,7 +86,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -97,7 +97,7 @@ namespace
"The total backward water volume recorded by this meter.", "The total backward water volume recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AnyVolumeVIF) .set(VIFRange::AnyVolumeVIF)
@ -114,7 +114,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -155,7 +155,7 @@ namespace
"The battery voltage.", "The battery voltage.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Voltage, Quantity::Voltage,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Voltage) .set(VIFRange::Voltage)
@ -166,7 +166,7 @@ namespace
"The most recent billing period date.", "The most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -179,7 +179,7 @@ namespace
"The total water consumption at the most recent billing period date.", "The total water consumption at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -191,7 +191,7 @@ namespace
"The total water consumption at the historic date.", "The total water consumption at the historic date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -48,7 +48,7 @@ namespace
{ {
{ {
"ERROR_FLAGS", "ERROR_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, MaskBits(0xffff), AlwaysTrigger, MaskBits(0xffff),
"OK", "OK",
{ {
@ -62,7 +62,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -43,7 +43,7 @@ namespace
"The total water consumption recorded by this meter.", "The total water consumption recorded by this meter.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -54,7 +54,7 @@ namespace
"The most recent billing period date.", "The most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -67,7 +67,7 @@ namespace
"The total water consumption at the most recent billing period date.", "The total water consumption at the most recent billing period date.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto, DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)

Wyświetl plik

@ -1,5 +1,5 @@
/* /*
Copyright (C) 2018-2022 Fredrik Öhrström (gpl-3.0-or-later) Copyright (C) 2018-2024 Fredrik Öhrström (gpl-3.0-or-later)
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -135,7 +135,8 @@ bool isInsideVIFRange(Vif vif, VIFRange vif_range)
return return
isInsideVIFRange(vif, VIFRange::EnergyWh) || isInsideVIFRange(vif, VIFRange::EnergyWh) ||
isInsideVIFRange(vif, VIFRange::EnergyMJ) || isInsideVIFRange(vif, VIFRange::EnergyMJ) ||
isInsideVIFRange(vif, VIFRange::EnergyMWh); isInsideVIFRange(vif, VIFRange::EnergyMWh) ||
isInsideVIFRange(vif, VIFRange::EnergyGJ);
} }
if (vif_range == VIFRange::AnyPowerVIF) if (vif_range == VIFRange::AnyPowerVIF)
{ {
@ -762,7 +763,7 @@ bool extractDVdouble(map<string,pair<int,DVEntry>> *dv_entries,
int *offset, int *offset,
double *value, double *value,
bool auto_scale, bool auto_scale,
bool assume_signed) bool force_unsigned)
{ {
if ((*dv_entries).count(key) == 0) { if ((*dv_entries).count(key) == 0) {
verbose("(dvparser) warning: cannot extract double from non-existant key \"%s\"\n", key.c_str()); verbose("(dvparser) warning: cannot extract double from non-existant key \"%s\"\n", key.c_str());
@ -780,7 +781,7 @@ bool extractDVdouble(map<string,pair<int,DVEntry>> *dv_entries,
return false; return false;
} }
return p.second.extractDouble(value, auto_scale, assume_signed); return p.second.extractDouble(value, auto_scale, force_unsigned);
} }
bool checkSizeHex(size_t expected_len, DifVifKey &dvk, string &v) bool checkSizeHex(size_t expected_len, DifVifKey &dvk, string &v)
@ -801,7 +802,7 @@ bool is_all_F(string &v)
return true; return true;
} }
bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed) bool DVEntry::extractDouble(double *out, bool auto_scale, bool force_unsigned)
{ {
int t = dif_vif_key.dif() & 0xf; int t = dif_vif_key.dif() & 0xf;
if (t == 0x0 || if (t == 0x0 ||
@ -830,17 +831,17 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
if (!checkSizeHex(2, dif_vif_key, value)) return false; if (!checkSizeHex(2, dif_vif_key, value)) return false;
assert(v.size() == 1); assert(v.size() == 1);
raw = v[0]; raw = v[0];
if (assume_signed && (raw & (uint64_t)0x80UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<8; } if (!force_unsigned && (raw & (uint64_t)0x80UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<8; }
} else if (t == 0x2) { } else if (t == 0x2) {
if (!checkSizeHex(4, dif_vif_key, value)) return false; if (!checkSizeHex(4, dif_vif_key, value)) return false;
assert(v.size() == 2); assert(v.size() == 2);
raw = v[1]*256 + v[0]; raw = v[1]*256 + v[0];
if (assume_signed && (raw & (uint64_t)0x8000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<16; } if (!force_unsigned && (raw & (uint64_t)0x8000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<16; }
} else if (t == 0x3) { } else if (t == 0x3) {
if (!checkSizeHex(6, dif_vif_key, value)) return false; if (!checkSizeHex(6, dif_vif_key, value)) return false;
assert(v.size() == 3); assert(v.size() == 3);
raw = v[2]*256*256 + v[1]*256 + v[0]; raw = v[2]*256*256 + v[1]*256 + v[0];
if (assume_signed && (raw & (uint64_t)0x800000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<24; } if (!force_unsigned && (raw & (uint64_t)0x800000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<24; }
} else if (t == 0x4) { } else if (t == 0x4) {
if (!checkSizeHex(8, dif_vif_key, value)) return false; if (!checkSizeHex(8, dif_vif_key, value)) return false;
assert(v.size() == 4); assert(v.size() == 4);
@ -848,7 +849,7 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
+ ((unsigned int)v[2])*256*256 + ((unsigned int)v[2])*256*256
+ ((unsigned int)v[1])*256 + ((unsigned int)v[1])*256
+ ((unsigned int)v[0]); + ((unsigned int)v[0]);
if (assume_signed && (raw & (uint64_t)0x80000000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<32; } if (!force_unsigned && (raw & (uint64_t)0x80000000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<32; }
} else if (t == 0x6) { } else if (t == 0x6) {
if (!checkSizeHex(12, dif_vif_key, value)) return false; if (!checkSizeHex(12, dif_vif_key, value)) return false;
assert(v.size() == 6); assert(v.size() == 6);
@ -858,7 +859,7 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
+ ((uint64_t)v[2])*256*256 + ((uint64_t)v[2])*256*256
+ ((uint64_t)v[1])*256 + ((uint64_t)v[1])*256
+ ((uint64_t)v[0]); + ((uint64_t)v[0]);
if (assume_signed && (raw & (uint64_t)0x800000000000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<48; } if (!force_unsigned && (raw & (uint64_t)0x800000000000UL) != 0) { negate = true; negate_mask = ~((uint64_t)0)<<48; }
} else if (t == 0x7) { } else if (t == 0x7) {
if (!checkSizeHex(16, dif_vif_key, value)) return false; if (!checkSizeHex(16, dif_vif_key, value)) return false;
assert(v.size() == 8); assert(v.size() == 8);
@ -870,7 +871,7 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
+ ((uint64_t)v[2])*256*256 + ((uint64_t)v[2])*256*256
+ ((uint64_t)v[1])*256 + ((uint64_t)v[1])*256
+ ((uint64_t)v[0]); + ((uint64_t)v[0]);
if (assume_signed && (raw & (uint64_t)0x8000000000000000UL) != 0) { negate = true; negate_mask = 0; } if (!force_unsigned && (raw & (uint64_t)0x8000000000000000UL) != 0) { negate = true; negate_mask = 0; }
} }
double scale = 1.0; double scale = 1.0;
double draw = (double)raw; double draw = (double)raw;
@ -888,8 +889,8 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
t == 0xC || // 8 digit BCD t == 0xC || // 8 digit BCD
t == 0xE) // 12 digit BCD t == 0xE) // 12 digit BCD
{ {
// Signed BCD values are always visible in bcd! Top nybble is f. We can force assume_signed to true. // Negative BCD values are always visible in bcd. I.e. they are always signed.
assume_signed = true; // Ignore assumption on signedness.
// 74140000 -> 00001474 // 74140000 -> 00001474
string& v = value; string& v = value;
uint64_t raw = 0; uint64_t raw = 0;
@ -902,29 +903,29 @@ bool DVEntry::extractDouble(double *out, bool auto_scale, bool assume_signed)
} }
if (t == 0x9) { if (t == 0x9) {
if (!checkSizeHex(2, dif_vif_key, v)) return false; if (!checkSizeHex(2, dif_vif_key, v)) return false;
if (assume_signed && v[0] == 'F') { negate = true; v[0] = '0'; } if (v[0] == 'F') { negate = true; v[0] = '0'; }
raw = (v[0]-'0')*10 + (v[1]-'0'); raw = (v[0]-'0')*10 + (v[1]-'0');
} else if (t == 0xA) { } else if (t == 0xA) {
if (!checkSizeHex(4, dif_vif_key, v)) return false; if (!checkSizeHex(4, dif_vif_key, v)) return false;
if (assume_signed && v[2] == 'F') { negate = true; v[2] = '0'; } if (v[2] == 'F') { negate = true; v[2] = '0'; }
raw = (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10 raw = (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10
+ (v[0]-'0')*10 + (v[1]-'0'); + (v[0]-'0')*10 + (v[1]-'0');
} else if (t == 0xB) { } else if (t == 0xB) {
if (!checkSizeHex(6, dif_vif_key, v)) return false; if (!checkSizeHex(6, dif_vif_key, v)) return false;
if (assume_signed && v[4] == 'F') { negate = true; v[4] = '0'; } if (v[4] == 'F') { negate = true; v[4] = '0'; }
raw = (v[4]-'0')*10*10*10*10*10 + (v[5]-'0')*10*10*10*10 raw = (v[4]-'0')*10*10*10*10*10 + (v[5]-'0')*10*10*10*10
+ (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10 + (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10
+ (v[0]-'0')*10 + (v[1]-'0'); + (v[0]-'0')*10 + (v[1]-'0');
} else if (t == 0xC) { } else if (t == 0xC) {
if (!checkSizeHex(8, dif_vif_key, v)) return false; if (!checkSizeHex(8, dif_vif_key, v)) return false;
if (assume_signed && v[6] == 'F') { negate = true; v[6] = '0'; } if (v[6] == 'F') { negate = true; v[6] = '0'; }
raw = (v[6]-'0')*10*10*10*10*10*10*10 + (v[7]-'0')*10*10*10*10*10*10 raw = (v[6]-'0')*10*10*10*10*10*10*10 + (v[7]-'0')*10*10*10*10*10*10
+ (v[4]-'0')*10*10*10*10*10 + (v[5]-'0')*10*10*10*10 + (v[4]-'0')*10*10*10*10*10 + (v[5]-'0')*10*10*10*10
+ (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10 + (v[2]-'0')*10*10*10 + (v[3]-'0')*10*10
+ (v[0]-'0')*10 + (v[1]-'0'); + (v[0]-'0')*10 + (v[1]-'0');
} else if (t == 0xE) { } else if (t == 0xE) {
if (!checkSizeHex(12, dif_vif_key, v)) return false; if (!checkSizeHex(12, dif_vif_key, v)) return false;
if (assume_signed && v[10] == 'F') { negate = true; v[10] = '0'; } if (v[10] == 'F') { negate = true; v[10] = '0'; }
raw =(v[10]-'0')*10*10*10*10*10*10*10*10*10*10*10 + (v[11]-'0')*10*10*10*10*10*10*10*10*10*10 raw =(v[10]-'0')*10*10*10*10*10*10*10*10*10*10*10 + (v[11]-'0')*10*10*10*10*10*10*10*10*10*10
+ (v[8]-'0')*10*10*10*10*10*10*10*10*10 + (v[9]-'0')*10*10*10*10*10*10*10*10 + (v[8]-'0')*10*10*10*10*10*10*10*10*10 + (v[9]-'0')*10*10*10*10*10*10*10*10
+ (v[6]-'0')*10*10*10*10*10*10*10 + (v[7]-'0')*10*10*10*10*10*10 + (v[6]-'0')*10*10*10*10*10*10*10 + (v[7]-'0')*10*10*10*10*10*10

Wyświetl plik

@ -1,5 +1,5 @@
/* /*
Copyright (C) 2018-2022 Fredrik Öhrström (gpl-3.0-or-later) Copyright (C) 2018-2024 Fredrik Öhrström (gpl-3.0-or-later)
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -48,6 +48,7 @@
X(FabricationNo,0x78,0x78, Quantity::Text, Unit::TXT) \ X(FabricationNo,0x78,0x78, Quantity::Text, Unit::TXT) \
X(EnhancedIdentification,0x79,0x79, Quantity::Text, Unit::TXT) \ X(EnhancedIdentification,0x79,0x79, Quantity::Text, Unit::TXT) \
X(EnergyMWh,0x7B00,0x7B01, Quantity::Energy, Unit::KWH) \ X(EnergyMWh,0x7B00,0x7B01, Quantity::Energy, Unit::KWH) \
X(EnergyGJ,0x7B09,0x7B0A, Quantity::Energy, Unit::MJ) \
X(RelativeHumidity,0x7B1A,0x7B1B, Quantity::RH, Unit::RH) \ X(RelativeHumidity,0x7B1A,0x7B1B, Quantity::RH, Unit::RH) \
X(AccessNumber,0x7D08,0x7D08, Quantity::Counter, Unit::COUNTER) \ X(AccessNumber,0x7D08,0x7D08, Quantity::Counter, Unit::COUNTER) \
X(Medium,0x7D09,0x7D09, Quantity::Text, Unit::TXT) \ X(Medium,0x7D09,0x7D09, Quantity::Text, Unit::TXT) \
@ -381,7 +382,7 @@ struct DVEntry
{ {
} }
bool extractDouble(double *out, bool auto_scale, bool assume_signed); bool extractDouble(double *out, bool auto_scale, bool force_unsigned);
bool extractLong(uint64_t *out); bool extractLong(uint64_t *out);
bool extractDate(struct tm *out); bool extractDate(struct tm *out);
bool extractReadableString(std::string *out); bool extractReadableString(std::string *out);
@ -561,7 +562,7 @@ bool extractDVdouble(std::map<std::string,std::pair<int,DVEntry>> *values,
int *offset, int *offset,
double *value, double *value,
bool auto_scale = true, bool auto_scale = true,
bool assume_signed = false); bool force_unsigned = false);
// Extract a value without scaling. Works for 8bits to 64 bits, binary and bcd. // Extract a value without scaling. Works for 8bits to 64 bits, binary and bcd.
bool extractDVlong(std::map<std::string,std::pair<int,DVEntry>> *values, bool extractDVlong(std::map<std::string,std::pair<int,DVEntry>> *values,

Wyświetl plik

@ -15,12 +15,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
// Generated 2024-02-12_01:46 // Generated 2024-04-04_20:51
BuiltinDriver builtins_[] = BuiltinDriver builtins_[] =
{ {
{ "elster", "driver{name=elster meter_type=GasMeter default_fields=name,id,total_m3,timestamp detect{mvt=ELS,81,03}use=actuality_duration_s field{name=total quantity=Volume match{measurement_type=Instantaneous vif_range=Volume}about{de='Der Gesamtwasserverbrauch.'en='The total water consumption.'fr='''La consommation totale d'eau.'''sv='Den totala vattenförbrukningen.'}}}", false }, { "elster", "driver{name=elster meter_type=GasMeter default_fields=name,id,total_m3,timestamp detect{mvt=ELS,81,03}use=actuality_duration_s field{name=total quantity=Volume match{measurement_type=Instantaneous vif_range=Volume}about{de='Der Gesamtwasserverbrauch.'en='The total water consumption.'fr='''La consommation totale d'eau.'''sv='Den totala vattenförbrukningen.'}}}", false },
{ "iperl", "driver{name=iperl meter_type=WaterMeter default_fields=name,id,total_m3,max_flow_m3h,timestamp detect{mvt=SEN,68,06 mvt=SEN,68,07 mvt=SEN,7c,07}field{name=total quantity=Volume match{measurement_type=Instantaneous vif_range=Volume}about{de='Der Gesamtwasserverbrauch.'en='The total water consumption.'fr='''La consommation totale d'eau.'''sv='Den totala vattenförbrukningen.'}}field{name=max_flow quantity=Flow match{measurement_type=Instantaneous vif_range=VolumeFlow}about{en='The maximum flow recorded during previous period.'}}}", false }, { "iperl", "driver{name=iperl meter_type=WaterMeter default_fields=name,id,total_m3,max_flow_m3h,timestamp detect{mvt=SEN,68,06 mvt=SEN,68,07 mvt=SEN,7c,07}field{name=total quantity=Volume match{measurement_type=Instantaneous vif_range=Volume}about{de='Der Gesamtwasserverbrauch.'en='The total water consumption.'fr='''La consommation totale d'eau.'''sv='Den totala vattenförbrukningen.'}}field{name=max_flow quantity=Flow match{measurement_type=Instantaneous vif_range=VolumeFlow}about{en='The maximum flow recorded during previous period.'}}}", false },
{ "kampress", "driver{name=kampress default_fields=name,id,status,pressure_bar,max_pressure_bar,min_pressure_bar,timestamp meter_type=PressureSensor detect{mvt=KAM,01,18}field{name=status quantity=Text info=status_and_error_flags match{measurement_type=Instantaneous vif_range=ErrorFlags}lookup{name=ERROR_FLAGS map_type=BitToString mask_bits=0xffff default_message=OK map{name=DROP info='Unexpected drop in pressure in relation to average pressure.'value=0x01 test=Set}map{name=SURGE info='Unexpected increase in pressure in relation to average pressure.'value=0x02 test=Set}map{name=HIGH info='Average pressure has reached configurable limit. Default 15 bar.'value=0x04 test=Set}map{name=LOW info='Average pressure has reached configurable limit. Default 1.5 bar.'value=0x08 test=Set}map{name=TRANSIENT info='Pressure changes quickly over short timeperiods. Average is fluctuating.'value=0x10 test=Set}map{name=COMM_ERROR info='Cannot measure properly or bad internal communication.'value=0x20 test=Set}}}field{name=pressure quantity=Pressure info='The measured pressure.'match{measurement_type=Instantaneous vif_range=Pressure}}field{name=max_pressure quantity=Pressure info='The maximum pressure measured during ?'match{measurement_type=Maximum vif_range=Pressure}}field{name=min_pressure quantity=Pressure info='The minimum pressure measured during ?'match{measurement_type=Minimum vif_range=Pressure}}field{name=alfa info='We do not know what this is.'quantity=Dimensionless vif_scaling=None match{difvifkey=05FF09}}field{name=beta info='We do not know what this is.'quantity=Dimensionless vif_scaling=None match{difvifkey=05FF0A}}}", false },
{ "werhlemodwm", "driver{name=werhlemodwm meter_type=WaterMeter default_fields=name,id,total_m3,timestamp detect{mvt=WZG,03,16}use=meter_datetime use=target_date use=target_m3 use=total_m3 use=fabrication_no field{name=next_target quantity=PointInTime display_unit=date match{measurement_type=Instantaneous vif_range=Date add_combinable=FutureValue storage_nr=1}}}", false },
}; };
MapToDriver builtins_mvts_[] = MapToDriver builtins_mvts_[] =
@ -29,4 +31,6 @@ MapToDriver builtins_mvts_[] =
{ { MANUFACTURER_SEN,0x68,0x06 }, "iperl" }, { { MANUFACTURER_SEN,0x68,0x06 }, "iperl" },
{ { MANUFACTURER_SEN,0x68,0x07 }, "iperl" }, { { MANUFACTURER_SEN,0x68,0x07 }, "iperl" },
{ { MANUFACTURER_SEN,0x7c,0x07 }, "iperl" }, { { MANUFACTURER_SEN,0x7c,0x07 }, "iperl" },
{ { MANUFACTURER_KAM,0x01,0x18 }, "kampress" },
{ { MANUFACTURER_WZG,0x03,0x16 }, "werhlemodwm" },
}; };

Wyświetl plik

@ -207,6 +207,7 @@ string loadDriver(const string &file, const char *content)
{ {
DriverInfo di; DriverInfo di;
debug("(meter) loading %s\n", file.c_str());
bool ok = DriverDynamic::load(&di, file, content); bool ok = DriverDynamic::load(&di, file, content);
if (!ok) if (!ok)
{ {
@ -217,8 +218,15 @@ string loadDriver(const string &file, const char *content)
DriverInfo *old = lookupDriver(di.name().str()); DriverInfo *old = lookupDriver(di.name().str());
if (old != NULL) if (old != NULL)
{ {
debug("(meter) overriding %s\n", di.name().str().c_str());
if (old->getDynamicFileName() != "") if (old->getDynamicFileName() != "")
{ {
if (di.getDynamicFileName() == old->getDynamicFileName())
{
// Loading same file again, happens when using analyze. This is fine.
return di.name().str();
}
// New file source registering the same driver name, nono.
error("Newly loaded driver file %s tries to register the same name %s as driver file %s has already taken!\n", error("Newly loaded driver file %s tries to register the same name %s as driver file %s has already taken!\n",
file.c_str(), di.name().str().c_str(), old->getDynamicFileName().c_str()); file.c_str(), di.name().str().c_str(), old->getDynamicFileName().c_str());
} }
@ -453,6 +461,7 @@ void MeterCommonImplementation::addNumericFieldWithExtractor(string vname,
PrintProperties print_properties, PrintProperties print_properties,
Quantity vquantity, Quantity vquantity,
VifScaling vif_scaling, VifScaling vif_scaling,
DifSignedness dif_signedness,
FieldMatcher matcher, FieldMatcher matcher,
Unit display_unit, Unit display_unit,
double scale) double scale)
@ -463,6 +472,7 @@ void MeterCommonImplementation::addNumericFieldWithExtractor(string vname,
vquantity, vquantity,
display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit, display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit,
vif_scaling, vif_scaling,
dif_signedness,
scale, scale,
matcher, matcher,
help, help,
@ -502,6 +512,7 @@ void MeterCommonImplementation::addNumericFieldWithCalculator(string vname,
vquantity, vquantity,
display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit, display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
1.0, 1.0,
FieldMatcher::noMatcher(), FieldMatcher::noMatcher(),
help, help,
@ -542,6 +553,7 @@ void MeterCommonImplementation::addNumericFieldWithCalculatorAndMatcher(string v
vquantity, vquantity,
display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit, display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
1.0, 1.0,
matcher, matcher,
help, help,
@ -569,6 +581,7 @@ void MeterCommonImplementation::addNumericField(
vquantity, vquantity,
display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit, display_unit == Unit::Unknown ? defaultUnitForQuantity(vquantity) : display_unit,
VifScaling::None, VifScaling::None,
DifSignedness::Signed,
1.0, 1.0,
FieldMatcher::noMatcher(), FieldMatcher::noMatcher(),
help, help,
@ -593,6 +606,7 @@ void MeterCommonImplementation::addStringFieldWithExtractor(string vname,
Quantity::Text, Quantity::Text,
defaultUnitForQuantity(Quantity::Text), defaultUnitForQuantity(Quantity::Text),
VifScaling::None, VifScaling::None,
DifSignedness::Signed,
1.0, 1.0,
matcher, matcher,
help, help,
@ -618,6 +632,7 @@ void MeterCommonImplementation::addStringFieldWithExtractorAndLookup(string vnam
Quantity::Text, Quantity::Text,
defaultUnitForQuantity(Quantity::Text), defaultUnitForQuantity(Quantity::Text),
VifScaling::None, VifScaling::None,
DifSignedness::Signed,
1.0, 1.0,
matcher, matcher,
help, help,
@ -641,6 +656,7 @@ void MeterCommonImplementation::addStringField(string vname,
Quantity::Text, Quantity::Text,
defaultUnitForQuantity(Quantity::Text), defaultUnitForQuantity(Quantity::Text),
VifScaling::None, VifScaling::None,
DifSignedness::Signed,
1.0, 1.0,
FieldMatcher(), FieldMatcher(),
help, help,
@ -1662,6 +1678,7 @@ FieldInfo::FieldInfo(int index,
Quantity xuantity, Quantity xuantity,
Unit display_unit, Unit display_unit,
VifScaling vif_scaling, VifScaling vif_scaling,
DifSignedness dif_signedness,
double scale, double scale,
FieldMatcher matcher, FieldMatcher matcher,
string help, string help,
@ -1678,6 +1695,7 @@ FieldInfo::FieldInfo(int index,
xuantity_(xuantity), xuantity_(xuantity),
display_unit_(display_unit), display_unit_(display_unit),
vif_scaling_(vif_scaling), vif_scaling_(vif_scaling),
dif_signedness_(dif_signedness),
scale_(scale), scale_(scale),
matcher_(matcher), matcher_(matcher),
help_(help), help_(help),
@ -2328,11 +2346,11 @@ bool FieldInfo::extractNumeric(Meter *m, Telegram *t, DVEntry *dve)
} }
double extracted_double_value = NAN; double extracted_double_value = NAN;
if (dve->extractDouble(&extracted_double_value,
vifScaling() == VifScaling::Auto || bool auto_vif_scaling = vifScaling() == VifScaling::Auto;
vifScaling() == VifScaling::AutoSigned, bool force_unsigned = difSignedness() == DifSignedness::Unsigned;
vifScaling() == VifScaling::NoneSigned ||
vifScaling() == VifScaling::AutoSigned)) if (dve->extractDouble(&extracted_double_value, auto_vif_scaling, force_unsigned))
{ {
Unit decoded_unit = displayUnit(); Unit decoded_unit = displayUnit();
if (matcher_.vif_range == VIFRange::DateTime) if (matcher_.vif_range == VIFRange::DateTime)
@ -2599,6 +2617,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ActualityDuration), .set(VIFRange::ActualityDuration),
@ -2614,6 +2633,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ActualityDuration) .set(VIFRange::ActualityDuration)
@ -2736,6 +2756,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OperatingTime) .set(VIFRange::OperatingTime)
@ -2750,6 +2771,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::OnTime) .set(VIFRange::OnTime)
@ -2764,6 +2786,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Time, Quantity::Time,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::AtError) .set(MeasurementType::AtError)
.set(VIFRange::OnTime) .set(VIFRange::OnTime)
@ -2826,6 +2849,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -2840,6 +2864,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -2855,6 +2880,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::PointInTime, Quantity::PointInTime,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Date) .set(VIFRange::Date)
@ -2871,6 +2897,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -2886,6 +2913,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Volume, Quantity::Volume,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::Volume) .set(VIFRange::Volume)
@ -2901,6 +2929,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::FlowTemperature) .set(VIFRange::FlowTemperature)
@ -2915,6 +2944,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ExternalTemperature) .set(VIFRange::ExternalTemperature)
@ -2929,6 +2959,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::ReturnTemperature) .set(VIFRange::ReturnTemperature)
@ -2942,7 +2973,8 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
"The difference between flow and return media temperatures.", "The difference between flow and return media temperatures.",
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Temperature, Quantity::Temperature,
VifScaling::AutoSigned, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::TemperatureDifference) .set(VIFRange::TemperatureDifference)
@ -2957,6 +2989,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Flow, Quantity::Flow,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::VolumeFlow) .set(VIFRange::VolumeFlow)
@ -2971,6 +3004,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::Dimensionless, Quantity::Dimensionless,
VifScaling::None, VifScaling::None,
DifSignedness::Unsigned,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::AccessNumber) .set(VIFRange::AccessNumber)
@ -2985,6 +3019,7 @@ bool MeterCommonImplementation::addOptionalLibraryFields(string field_names)
DEFAULT_PRINT_PROPERTIES, DEFAULT_PRINT_PROPERTIES,
Quantity::HCA, Quantity::HCA,
VifScaling::Auto, VifScaling::Auto,
DifSignedness::Signed,
FieldMatcher::build() FieldMatcher::build()
.set(MeasurementType::Instantaneous) .set(MeasurementType::Instantaneous)
.set(VIFRange::HeatCostAllocation) .set(VIFRange::HeatCostAllocation)
@ -3002,10 +3037,8 @@ const char *toString(VifScaling s)
{ {
switch (s) switch (s)
{ {
case VifScaling::None: return "None";
case VifScaling::Auto: return "Auto"; case VifScaling::Auto: return "Auto";
case VifScaling::NoneSigned: return "NoneSigned"; case VifScaling::None: return "None";
case VifScaling::AutoSigned: return "AutoSigned";
case VifScaling::Unknown: return "Unknown"; case VifScaling::Unknown: return "Unknown";
} }
return "?"; return "?";
@ -3014,14 +3047,32 @@ const char *toString(VifScaling s)
VifScaling toVifScaling(const char *s) VifScaling toVifScaling(const char *s)
{ {
if (!s) return VifScaling::Unknown; if (!s) return VifScaling::Unknown;
if (!strcmp(s, "None")) return VifScaling::None;
if (!strcmp(s, "Auto")) return VifScaling::Auto; if (!strcmp(s, "Auto")) return VifScaling::Auto;
if (!strcmp(s, "NoneSigned")) return VifScaling::NoneSigned; if (!strcmp(s, "None")) return VifScaling::None;
if (!strcmp(s, "AutoSigned")) return VifScaling::AutoSigned;
if (!strcmp(s, "Unknown")) return VifScaling::Unknown; if (!strcmp(s, "Unknown")) return VifScaling::Unknown;
return VifScaling::Unknown; return VifScaling::Unknown;
} }
const char *toString(DifSignedness s)
{
switch (s)
{
case DifSignedness::Signed: return "Signed";
case DifSignedness::Unsigned: return "Unsigned";
case DifSignedness::Unknown: return "Unknown";
}
return "?";
}
DifSignedness toDifSignedness(const char *s)
{
if (!s) return DifSignedness::Unknown;
if (!strcmp(s, "Signed")) return DifSignedness::Signed;
if (!strcmp(s, "Unsigned")) return DifSignedness::Unsigned;
if (!strcmp(s, "Unknown")) return DifSignedness::Unknown;
return DifSignedness::Unknown;
}
const char* toString(PrintProperty p) const char* toString(PrintProperty p)
{ {
switch(p) switch(p)

Wyświetl plik

@ -229,16 +229,24 @@ vector<DriverInfo*>& allDrivers();
enum class VifScaling enum class VifScaling
{ {
None, // No auto scaling.
Auto, // Scale to normalized VIF unit (ie kwh, m3, m3h etc) Auto, // Scale to normalized VIF unit (ie kwh, m3, m3h etc)
NoneSigned, // No auto scaling however assume the value is signed. None, // No auto scaling.
AutoSigned, // Scale and assume the value is signed.
Unknown Unknown
}; };
const char* toString(VifScaling s); const char* toString(VifScaling s);
VifScaling toVifScaling(const char *s); VifScaling toVifScaling(const char *s);
enum class DifSignedness
{
Signed, // By default the binary values are interpreted as signed.
Unsigned, // We can override for non-compliant meters.
Unknown
};
const char* toString(DifSignedness s);
DifSignedness toDifSignedness(const char *s);
enum PrintProperty enum PrintProperty
{ {
REQUIRED = 1, // If no data has arrived, then print this field anyway with NaN or null. REQUIRED = 1, // If no data has arrived, then print this field anyway with NaN or null.
@ -283,6 +291,7 @@ struct FieldInfo
Quantity quantity, Quantity quantity,
Unit display_unit, Unit display_unit,
VifScaling vif_scaling, VifScaling vif_scaling,
DifSignedness dif_signedness,
double scale, double scale,
FieldMatcher matcher, FieldMatcher matcher,
string help, string help,
@ -300,6 +309,7 @@ struct FieldInfo
Quantity xuantity() { return xuantity_; } Quantity xuantity() { return xuantity_; }
Unit displayUnit() { return display_unit_; } Unit displayUnit() { return display_unit_; }
VifScaling vifScaling() { return vif_scaling_; } VifScaling vifScaling() { return vif_scaling_; }
DifSignedness difSignedness() { return dif_signedness_; }
double scale() { return scale_; } double scale() { return scale_; }
FieldMatcher& matcher() { return matcher_; } FieldMatcher& matcher() { return matcher_; }
string help() { return help_; } string help() { return help_; }
@ -337,6 +347,7 @@ private:
Quantity xuantity_; // Quantity: Energy, Volume Quantity xuantity_; // Quantity: Energy, Volume
Unit display_unit_; // Selected display unit for above quantity: KWH, M3 Unit display_unit_; // Selected display unit for above quantity: KWH, M3
VifScaling vif_scaling_; VifScaling vif_scaling_;
DifSignedness dif_signedness_;
double scale_; // A hardcoded scale factor. Used only for manufacturer specific values with unknown units for the vifs. double scale_; // A hardcoded scale factor. Used only for manufacturer specific values with unknown units for the vifs.
FieldMatcher matcher_; FieldMatcher matcher_;
string help_; // Helpful information on this meters use of this value. string help_; // Helpful information on this meters use of this value.

Wyświetl plik

@ -111,6 +111,7 @@ protected:
PrintProperties print_properties, // Should this be printed by default in fields,json and hr. PrintProperties print_properties, // Should this be printed by default in fields,json and hr.
Quantity vquantity, // Value belongs to this quantity, this quantity determines the default unit. Quantity vquantity, // Value belongs to this quantity, this quantity determines the default unit.
VifScaling vif_scaling, // How should any Vif value be scaled. VifScaling vif_scaling, // How should any Vif value be scaled.
DifSignedness dif_signedness, // Should we override the default signed assumption for binary values?
FieldMatcher matcher, FieldMatcher matcher,
Unit display_unit = Unit::Unknown, // If specified use this unit for the json field instead instead of the default unit. Unit display_unit = Unit::Unknown, // If specified use this unit for the json field instead instead of the default unit.
double scale = 1.0); // A hard coded extra scale factor. Useful for manufacturer specific values. double scale = 1.0); // A hard coded extra scale factor. Useful for manufacturer specific values.

Wyświetl plik

@ -1383,13 +1383,13 @@ void test_translate()
{ {
Translate::Lookup lookup1 = Translate::Lookup lookup1 =
Translate::Lookup() Translate::Lookup()
.add(Translate::Rule("ACCESS_BITS", Translate::Type::BitToString) .add(Translate::Rule("ACCESS_BITS", Translate::MapType::BitToString)
.set(MaskBits(0xf0)) .set(MaskBits(0xf0))
.add(Translate::Map(0x10, "NO_ACCESS", TestBit::Set)) .add(Translate::Map(0x10, "NO_ACCESS", TestBit::Set))
.add(Translate::Map(0x20, "ALL_ACCESS", TestBit::Set)) .add(Translate::Map(0x20, "ALL_ACCESS", TestBit::Set))
.add(Translate::Map(0x40, "TEMP_ACCESS", TestBit::Set)) .add(Translate::Map(0x40, "TEMP_ACCESS", TestBit::Set))
) )
.add(Translate::Rule("ACCESSOR_TYPE", Translate::Type::IndexToString) .add(Translate::Rule("ACCESSOR_TYPE", Translate::MapType::IndexToString)
.set(MaskBits(0x0f)) .set(MaskBits(0x0f))
.add(Translate::Map(0x00, "ACCESSOR_RED", TestBit::Set)) .add(Translate::Map(0x00, "ACCESSOR_RED", TestBit::Set))
.add(Translate::Map(0x07, "ACCESSOR_GREEN", TestBit::Set)) .add(Translate::Map(0x07, "ACCESSOR_GREEN", TestBit::Set))
@ -1401,7 +1401,7 @@ void test_translate()
{ {
{ {
"FLOW_FLAGS", "FLOW_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, AlwaysTrigger,
MaskBits(0x3f), MaskBits(0x3f),
"OOOK", "OOOK",
@ -1420,7 +1420,7 @@ void test_translate()
{ {
{ {
"NO_FLAGS", "NO_FLAGS",
Translate::Type::BitToString, Translate::MapType::BitToString,
AlwaysTrigger, AlwaysTrigger,
MaskBits(0x03), MaskBits(0x03),
"OK", "OK",

Wyświetl plik

@ -19,6 +19,7 @@
#include"util.h" #include"util.h"
#include<assert.h> #include<assert.h>
#include<string.h>
using namespace Translate; using namespace Translate;
using namespace std; using namespace std;
@ -210,15 +211,15 @@ void handleRule(Rule& rule, string &s, uint64_t bits)
{ {
switch (rule.type) switch (rule.type)
{ {
case Type::BitToString: case MapType::BitToString:
handleBitToString(rule, s, bits); handleBitToString(rule, s, bits);
break; break;
case Type::IndexToString: case MapType::IndexToString:
handleIndexToString(rule, s, bits); handleIndexToString(rule, s, bits);
break; break;
case Type::DecimalsToString: case MapType::DecimalsToString:
handleDecimalsToString(rule, s, bits); handleDecimalsToString(rule, s, bits);
break; break;
@ -259,11 +260,19 @@ string Lookup::str()
return x; return x;
} }
Translate::MapType toMapType(const char *s)
{
if (!strcmp(s, "BitToString")) return Translate::MapType::BitToString;
if (!strcmp(s, "IndexToString")) return Translate::MapType::IndexToString;
if (!strcmp(s, "DecimalsToString")) return Translate::MapType::DecimalsToString;
return Translate::MapType::Unknown;
}
Lookup NoLookup = {}; Lookup NoLookup = {};
Map m = { 123, "howdy" }; Map m = { 123, "howdy" };
vector<Map> vm = { { 123, "howdy" } }; vector<Map> vm = { { 123, "howdy" } };
Rule r = { "name", Translate::Type::IndexToString, Rule r = { "name", Translate::MapType::IndexToString,
AlwaysTrigger, MaskBits(0xe000), "", { } }; AlwaysTrigger, MaskBits(0xe000), "", { } };

Wyświetl plik

@ -66,8 +66,9 @@ private:
namespace Translate namespace Translate
{ {
enum class Type enum class MapType
{ {
Unknown,
BitToString, // A bit translates to a text string. BitToString, // A bit translates to a text string.
IndexToString, // A masked set of bits (a number) translates to a lookup index with text strings. IndexToString, // A masked set of bits (a number) translates to a lookup index with text strings.
DecimalsToString // Numbers are successively subtracted from input, each successfull subtraction translate into a text string. DecimalsToString // Numbers are successively subtracted from input, each successfull subtraction translate into a text string.
@ -86,16 +87,16 @@ namespace Translate
struct Rule struct Rule
{ {
std::string name; std::string name;
Type type; MapType type;
TriggerBits trigger; // Bits that must be set. TriggerBits trigger; // Bits that must be set.
MaskBits mask; // Bits to be used are set as 1. MaskBits mask; // Bits to be used are set as 1.
DefaultMessage default_message; // If no bits are set print this, typically "OK" or "". DefaultMessage default_message; // If no bits are set print this, typically "OK" or "".
std::vector<Map> map; std::vector<Map> map;
Rule() {}; Rule() {};
Rule(std::string n, Type t, TriggerBits tr, MaskBits mb, std::string dm, std::vector<Map> m) Rule(std::string n, MapType t, TriggerBits tr, MaskBits mb, std::string dm, std::vector<Map> m)
: name(n), type(t), trigger(tr), mask(mb), default_message(dm), map(m) {} : name(n), type(t), trigger(tr), mask(mb), default_message(dm), map(m) {}
Rule(std::string n, Type t) : Rule(std::string n, MapType t) :
name(n), type(t), trigger(AlwaysTrigger), mask(AutoMask), default_message(DefaultMessage("")) {} name(n), type(t), trigger(AlwaysTrigger), mask(AutoMask), default_message(DefaultMessage("")) {}
Rule &set(TriggerBits t) { trigger = t; return *this; } Rule &set(TriggerBits t) { trigger = t; return *this; }
Rule &set(MaskBits m) { mask = m; return *this; } Rule &set(MaskBits m) { mask = m; return *this; }
@ -116,6 +117,8 @@ namespace Translate
}; };
}; };
Translate::MapType toMapType(const char *s);
extern Translate::Lookup NoLookup; extern Translate::Lookup NoLookup;
#endif #endif

Wyświetl plik

@ -2227,3 +2227,10 @@ const std::string &language()
return lang_; return lang_;
} }
TestBit toTestBit(const char *s)
{
if (!strcmp(s, "Set")) return TestBit::Set;
if (!strcmp(s, "NotSet")) return TestBit::NotSet;
return TestBit::Unknown;
}

Wyświetl plik

@ -42,6 +42,7 @@ typedef unsigned char uchar;
enum class TestBit enum class TestBit
{ {
Unknown,
Set, Set,
NotSet NotSet
}; };
@ -305,6 +306,8 @@ bool is_lowercase_alnum_text(const char *text);
// The language that the user expects driver and other messages in. // The language that the user expects driver and other messages in.
const std::string &language(); const std::string &language();
TestBit toTestBit(const char *s);
#ifndef FUZZING #ifndef FUZZING
#define FUZZING false #define FUZZING false
#endif #endif

Wyświetl plik

@ -2818,6 +2818,12 @@ double vifScale(int vif)
case 0x7b00: case 0x7b00:
case 0x7b01: { double exp = (vif & 0x1)+2; return pow(10.0, -exp); } case 0x7b01: { double exp = (vif & 0x1)+2; return pow(10.0, -exp); }
// Active energy 0.1 or 1 GJ normalize to 100 MJ or 1000 MJ
// 7b09 19 -> 1.9 G -> 1 900 KWh
// 7b0A 19 -> 19 GJ -> 19 000 MJ
case 0x7b09:
case 0x7b0A: { double exp = (vif & 0x1)+2; return pow(10.0, -exp); }
// relative humidity is a dimensionless value. // relative humidity is a dimensionless value.
case 0x7b1a: return 10.0; // Relative humidity 0.1 % case 0x7b1a: return 10.0; // Relative humidity 0.1 %
case 0x7b1b: return 1.0; // Relative humidity 1 % case 0x7b1b: return 1.0; // Relative humidity 1 %

603
src/xmq.c

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,4 +1,4 @@
/* libxmq - Copyright (C) 2023 Fredrik Öhrström (spdx: MIT) /* libxmq - Copyright (C) 2023-2024 Fredrik Öhrström (spdx: MIT)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
@ -124,25 +124,34 @@ typedef enum
} XMQRenderFormat; } XMQRenderFormat;
/** /**
XMQTrimType: XMQFlagBits:
@XMQ_TRIM_DEFAULT: Use the default, ie no-trim for xmq/json, normal-trim for xml/html. @XMQ_FLAG_TRIM_NONE: Do not trim any whitespace.
@XMQ_TRIM_NONE: Do not trim at all. Keep unnecessary xml/html indentation and newlines. @XMQ_FLAG_TRIM_HEURISTIC: Remove leading/ending whitespace, but try to keep significant, remove incidental indentation.
@XMQ_TRIM_HEURISTIC: Normal trim heuristic. Remove leading/ending whitespace, remove incidental indentation. @XMQ_FLAG_TRIM_EXACT: Trim exactly according to XML rules. Depends on your XSD,space:preserve and more and is COMPLICATED!
@XMQ_TRIM_EXTRA: Like normal but remove all indentation (not just incidental) and collapse whitespace. @XMQ_FLAG_NOMERGE: Do not merge text and character entities.
@XMQ_TRIM_RESHUFFLE: Like extra but also reflow all content at word boundaries to limit line lengths.
If a 0 is provided as the flags to the parse functions, then it will parse using the these default settings:
When loading xml/html:
trim the whitespace from the input to generate the most likely desired xmq output.
merge character entities
When loading xmq/htmq:
no trimming but
merge character entities such as &#10; and consecutive text quotes
When loading xml/html trim the whitespace from the input to generate the most likely desired xmq output.
When loading xmq/htmq, the whitespace is never trimmed since xmq explicitly encodes all important whitespace.
If you load xml with XMQ_TRIM_NONE (--trim=none) there will be a lot of unnecessary whitespace stored in If you load xml with XMQ_TRIM_NONE (--trim=none) there will be a lot of unnecessary whitespace stored in
the xmq, like &#32;&#9;&#10; etc. the xmq, like &#32;&#9;&#10; etc.
You can then view the xmq with XMQ_TRIM_HEURISTIC (--trim=heuristic) to drop the whitespace. You can then view the xmq with XMQ_TRIM_HEURISTIC (--trim=heuristic) to drop the whitespace.
If you load xmq with --nomerge then character entities and separate text blocks will be kept as is.
The --nomerge currently does not work for XML/HTML since libxml2 does not have a setting for merge.
*/ */
typedef enum typedef enum
{ {
XMQ_TRIM_DEFAULT = 0, XMQ_FLAG_TRIM_NONE = 1,
XMQ_TRIM_NONE = 1, XMQ_FLAG_TRIM_HEURISTIC = 2,
XMQ_TRIM_HEURISTIC = 2, XMQ_FLAG_TRIM_EXACT = 4,
} XMQTrimType; XMQ_FLAG_NOMERGE = 8,
} XMQFlagBits;
/** /**
XMQSyntax: XMQSyntax:
@ -351,7 +360,7 @@ void xmqFreeParseCallbacks(XMQParseCallbacks *cb);
Used to colorize xmq input, without building a parse tree. Used to colorize xmq input, without building a parse tree.
*/ */
void xmqSetupParseCallbacksColorizeTokens(XMQParseCallbacks *state, XMQRenderFormat render_format, bool dark_mode); void xmqSetupParseCallbacksColorizeTokens(XMQParseCallbacks *state, XMQRenderFormat render_format);
/** /**
xmqSetupParseCallbacksDebugTokens: xmqSetupParseCallbacksDebugTokens:
@ -486,7 +495,7 @@ void xmqFreeDoc(XMQDoc *doc);
Parse a file, or if file is NULL, read from stdin. Parse a file, or if file is NULL, read from stdin.
*/ */
bool xmqParseFile(XMQDoc *doc, const char *file, const char *implicit_root); bool xmqParseFile(XMQDoc *doc, const char *file, const char *implicit_root, int flags);
/** /**
xmqParseBuffer: xmqParseBuffer:
@ -498,7 +507,7 @@ bool xmqParseFile(XMQDoc *doc, const char *file, const char *implicit_root);
Parse a buffer or a file and create a document. Parse a buffer or a file and create a document.
The xmq format permits multiple root nodes if an implicit root is supplied. The xmq format permits multiple root nodes if an implicit root is supplied.
*/ */
bool xmqParseBuffer(XMQDoc *doc, const char *start, const char *stop, const char *implicit_root); bool xmqParseBuffer(XMQDoc *doc, const char *start, const char *stop, const char *implicit_root, int flags);
/** /**
xmqParseReader: xmqParseReader:
@ -509,7 +518,7 @@ bool xmqParseBuffer(XMQDoc *doc, const char *start, const char *stop, const char
Parse data fetched with a reader and create a document. Parse data fetched with a reader and create a document.
The xmq format permits multiple root nodes if an implicit root is supplied. The xmq format permits multiple root nodes if an implicit root is supplied.
*/ */
bool xmqParseReader(XMQDoc *doc, XMQReader *reader, const char *implicit_root); bool xmqParseReader(XMQDoc *doc, XMQReader *reader, const char *implicit_root, int flags);
/** Allocate the print settings structure and zero it. */ /** Allocate the print settings structure and zero it. */
XMQOutputSettings *xmqNewOutputSettings(); XMQOutputSettings *xmqNewOutputSettings();
@ -520,13 +529,14 @@ void xmqFreeOutputSettings(XMQOutputSettings *os);
void xmqSetAddIndent(XMQOutputSettings *os, int add_indent); void xmqSetAddIndent(XMQOutputSettings *os, int add_indent);
void xmqSetCompact(XMQOutputSettings *os, bool compact); void xmqSetCompact(XMQOutputSettings *os, bool compact);
void xmqSetUseColor(XMQOutputSettings *os, bool use_color); void xmqSetUseColor(XMQOutputSettings *os, bool use_color);
void xmqSetBackgroundMode(XMQOutputSettings *os, bool bg_dark_mode);
void xmqSetEscapeNewlines(XMQOutputSettings *os, bool escape_newlines); void xmqSetEscapeNewlines(XMQOutputSettings *os, bool escape_newlines);
void xmqSetEscapeNon7bit(XMQOutputSettings *os, bool escape_non_7bit); void xmqSetEscapeNon7bit(XMQOutputSettings *os, bool escape_non_7bit);
void xmqSetOutputFormat(XMQOutputSettings *os, XMQContentType output_format); void xmqSetOutputFormat(XMQOutputSettings *os, XMQContentType output_format);
void xmqSetRenderFormat(XMQOutputSettings *os, XMQRenderFormat render_to); void xmqSetRenderFormat(XMQOutputSettings *os, XMQRenderFormat render_to);
void xmqSetRenderTheme(XMQOutputSettings *os, const char *theme_name);
void xmqSetRenderRaw(XMQOutputSettings *os, bool render_raw); void xmqSetRenderRaw(XMQOutputSettings *os, bool render_raw);
void xmqSetRenderOnlyStyle(XMQOutputSettings *os, bool only_style); void xmqSetRenderOnlyStyle(XMQOutputSettings *os, bool only_style);
void xmqSetRenderStyle(XMQOutputSettings *os, const char *render_style);
void xmqSetWriterContent(XMQOutputSettings *os, XMQWriter content); void xmqSetWriterContent(XMQOutputSettings *os, XMQWriter content);
void xmqSetWriterError(XMQOutputSettings *os, XMQWriter error); void xmqSetWriterError(XMQOutputSettings *os, XMQWriter error);
@ -546,7 +556,7 @@ void xmqSetupPrintMemory(XMQOutputSettings *ps, char **start, char **stop);
void xmqPrint(XMQDoc *doc, XMQOutputSettings *settings); void xmqPrint(XMQDoc *doc, XMQOutputSettings *settings);
/** Trim xml whitespace. */ /** Trim xml whitespace. */
void xmqTrimWhitespace(XMQDoc *doc, XMQTrimType tt); void xmqTrimWhitespace(XMQDoc *doc, int flags);
/** A parsing error will be described here! */ /** A parsing error will be described here! */
const char *xmqDocError(XMQDoc *doc); const char *xmqDocError(XMQDoc *doc);
@ -661,7 +671,7 @@ bool xmqParseBufferWithType(XMQDoc *doc,
const char *stop, const char *stop,
const char *implicit_root, const char *implicit_root,
XMQContentType ct, XMQContentType ct,
XMQTrimType tt); int flags);
/** /**
xmqParseFileWithType: xmqParseFileWithType:
@ -672,14 +682,14 @@ bool xmqParseFileWithType(XMQDoc *doc,
const char *file, const char *file,
const char *implicit_root, const char *implicit_root,
XMQContentType ct, XMQContentType ct,
XMQTrimType tt); int flags);
/** /**
xmqSetupDefaultColors: xmqSetupDefaultColors:
Set the default colors for settings based on the background color. Set the default colors for settings based on the theme and background color.
*/ */
void xmqSetupDefaultColors(XMQOutputSettings *settings, bool dark_mode); void xmqSetupDefaultColors(XMQOutputSettings *settings);
/** /**
xmqOverrideSetting: Change the default strings for spaces etc. xmqOverrideSetting: Change the default strings for spaces etc.

Wyświetl plik

@ -11,7 +11,7 @@ fi
if ! command -v jq > /dev/null if ! command -v jq > /dev/null
then then
echo "You have to install jq !" echo "You have to install jq! Try: sudo apt install jq"
exit 1 exit 1
fi fi

Wyświetl plik

@ -1,4 +1,4 @@
// Generated 2024-02-12_08:58 // Generated 2024-04-04_20:51
test { test {
args = 'Gas elster 05105025 NOKEY' args = 'Gas elster 05105025 NOKEY'
telegram = 3644A511640010253837722550100593158103E70020052F2F_0374E602000C137034220302FD74EE0F2F2F2F2F2F2F2F2F2F2F2F2F2F2F telegram = 3644A511640010253837722550100593158103E70020052F2F_0374E602000C137034220302FD74EE0F2F2F2F2F2F2F2F2F2F2F2F2F2F2F
@ -19,3 +19,23 @@ test {
json = '{"media":"water","meter":"iperl","name":"MoreWater","id":"12345699","total_m3":7.704,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}' json = '{"media":"water","meter":"iperl","name":"MoreWater","id":"12345699","total_m3":7.704,"max_flow_m3h":0,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'MoreWater;12345699;7.704;0;1111-11-11 11:11.11' fields = 'MoreWater;12345699;7.704;0;1111-11-11 11:11.11'
} }
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D289554F295224ED579DE73188A_650066006600E80EA43A6B97A3BA0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.02,"min_pressure_bar":1.01,"alfa_counter":0.001252,"beta_counter":-0.001248,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.02;1.01;1111-11-11 11:11.11'
}
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = '32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
27442D2C1703007701188D280194E393226EC679DE735657_660067006600962B913A21B9423A0800'
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001108,"beta_counter":0.000743,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}
test {
args = 'Pressing kampress 77000317 NOKEY'
telegram = 32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800
json = '{"media":"pressure","meter":"kampress","name":"Pressing","id":"77000317","status":"LOW","pressure_bar":1.02,"max_pressure_bar":1.03,"min_pressure_bar":1.02,"alfa_counter":0.001246,"beta_counter":0.000997,"timestamp":"1111-11-11T11:11:11Z"}'
fields = 'Pressing;77000317;LOW;1.02;1.03;1.02;1111-11-11 11:11.11'
}

Wyświetl plik

@ -497,3 +497,22 @@ EOF
$PROG --format=hr --selectfields=name,total_m3 1844AE4C4455223399077A55000000_041389E20100023B0000 Hej $TEST/driver.xmq 33225544 NOKEY > $TEST/test_output.txt 2>&1 || true $PROG --format=hr --selectfields=name,total_m3 1844AE4C4455223399077A55000000_041389E20100023B0000 Hej $TEST/driver.xmq 33225544 NOKEY > $TEST/test_output.txt 2>&1 || true
performCheck performCheck
TESTNAME="Test lookup of bits"
TESTRESULT="ERROR"
cat > $TEST/driver.xmq <<EOF
driver{name=kampress meter_type=PressureSensor detect{mvt=KAM,01,18} default_fields=name,pressure,status
field{name=status quantity=Text match{measurement_type=Instantaneous vif_range=ErrorFlags}
lookup{name=ERROR_FLAGS map_type=BitToString mask_bits=0xffff default_message=OK
map{name=DROP value=0x01 test=Set}map{name=LOW value=0x08 test=Set}}}
field{name=pressure quantity=Pressure match{measurement_type=Instantaneous vif_range=Pressure}}
}
EOF
cat > $TEST/test_expected.txt <<EOF
Hej 1.02 bar LOW
EOF
$PROG --format=hr --selectfields=name,pressure_bar,status 32442D2C1703007701188D280080E39322DB8F78_22696600126967000269660005FF091954A33A05FF0A99BD823A02FD170800 Hej $TEST/driver.xmq 77000317 NOKEY > $TEST/test_output.txt 2>&1 || true
performCheck

Wyświetl plik

@ -11,9 +11,12 @@ FIELDS="$5"
OK=true OK=true
rm -f $TEST/test_output.txt $TEST/test_expected.txt rm -f $TEST/test_output.txt $TEST/test_expected.txt $TEST/simulation_tmp.txt
$PROG --format=json $HEX $ARGS \ echo "$HEX" | sed 's/^/telegram=/g' > $TEST/simulation_tmp.txt
$PROG --format=json $TEST/simulation_tmp.txt $ARGS \
| tail -n 1 \
| jq . --sort-keys \ | jq . --sort-keys \
| sed 's/"timestamp": "....-..-..T..:..:..Z"/"timestamp": "1111-11-11T11:11:11Z"/' \ | sed 's/"timestamp": "....-..-..T..:..:..Z"/"timestamp": "1111-11-11T11:11:11Z"/' \
> $TEST/test_output.txt > $TEST/test_output.txt
@ -31,7 +34,8 @@ fi
rm -f $TEST/test_output.txt $TEST/test_expected.txt rm -f $TEST/test_output.txt $TEST/test_expected.txt
$PROG --format=fields $HEX $ARGS \ $PROG --format=fields $TEST/simulation_tmp.txt $ARGS \
| tail -n 1 \
| sed 's/....-..-.. ..:..:../1111-11-11 11:11.11/' \ | sed 's/....-..-.. ..:..:../1111-11-11 11:11.11/' \
> $TEST/test_output.txt > $TEST/test_output.txt