This commit is contained in:
Roland Drabesch
2025-10-01 12:47:24 +02:00
47 changed files with 1945 additions and 1406 deletions
@@ -31,16 +31,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Applications
/// </summary>
public Int32? AppVersion;
/// <summary>
/// Max supported version of configuration.json for region EMEA.
/// </summary>
public String InterfaceMaxEmeaVersion;
/// <summary>
/// Max supported version of configuration.json for region NA.
/// </summary>
public String InterfaceMaxNaVersion;
/// <summary>
/// Get application name
/// </summary>
@@ -31,6 +31,12 @@
public List<ApplicationDefinition> ConfigApplicationDefinitions { get; }
= new List<ApplicationDefinition>();
/// <summary>
/// Information collected during 'configuration.json' read
/// </summary>
public readonly InterfaceInfo InterfaceInfo = new InterfaceInfo();
/// <summary>
/// Ctor
/// </summary>
@@ -69,6 +75,9 @@
/// <remarks date="2025-Aug-07" author="Thomas Wiedebusch">
/// - Extract the max supported versions for EMEA and NA to check the supported FW.
/// </remarks>
/// <remarks date="2025-Sep-30" author="Thomas Wiedebusch">
/// - Supported application list introduced.
/// </remarks>
public void BuildRegisterList(String configurationJson)
{
IDictionary<String, AppSection> sections;
@@ -94,20 +103,16 @@
var builds = sectionKVP.Value.Builds;
var emeaBuilds = builds["emea"];
var naBuilds = builds["na"];
String maxSupportedEmeaVersion = "";
String maxSupportedNaVersion = "";
if (emeaBuilds.Count > 0)
maxSupportedEmeaVersion = emeaBuilds[emeaBuilds.Count - 1].FW;
if (naBuilds.Count > 0)
maxSupportedNaVersion = naBuilds[naBuilds.Count - 1].FW;
ConfigApplicationDefinitions.Add(new ApplicationDefinition
InterfaceInfo.SupportedFwVersions = new List<String>();
foreach (var build in emeaBuilds)
{
AppId = appId,
AppName = appName,
AppVersion = appVersion,
InterfaceMaxEmeaVersion = maxSupportedEmeaVersion,
InterfaceMaxNaVersion = maxSupportedNaVersion
});
InterfaceInfo.SupportedFwVersions.Add(build.FW);
}
foreach (var build in naBuilds)
{
InterfaceInfo.SupportedFwVersions.Add(build.FW);
}
InterfaceInfo.InterfaceVersion = GenesisMeter.BuildFwVersionStringFromDec(appVersion);
continue;
}
@@ -267,6 +267,7 @@
<Compile Include="Consts\PowCorrConst.cs" />
<Compile Include="Consts\MetrologyDefinition.cs" />
<Compile Include="IGenesisMeter.cs" />
<Compile Include="InterfaceInfo.cs" />
<Compile Include="PowerCorrectionCalc.cs" />
<Compile Include="PowerCorrection.cs" />
<Compile Include="Consts\ErrorState.cs" />
@@ -1,5 +1,6 @@
using Logic.ProductionToProductMapper.Cordonel;
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -14,7 +15,6 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Timers;
using NLog;
using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.CommonCore.ThreadWatcher;
@@ -49,6 +49,7 @@ using Xylem.Common.Metrology.Measurements;
using Xylem.Common.Metrology.Measurements.Consts;
using Xylem.Common.Utils.Logging;
using Access = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Access;
using Register = Xylem.Common.Hardware.WaterMeter.Genesis.Registers.Register;
using Timer = System.Timers.Timer;
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
@@ -190,7 +191,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
/// <inheritdoc />
public List<MeterApplications> MeterAppListVersion { protected set; get; } = new List<MeterApplications>();
public List<MeterApplications> MeterAppListVersion
{
protected set; get;
} = new List<MeterApplications>();
/// <inheritdoc />
public Int32? CoreRevision
@@ -198,6 +203,12 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
protected set; get;
}
/// <inheritdoc />
public InterfaceInfo InterfaceInfo
{
get; internal set;
}
/// <inheritdoc />
public String StrCoreRevision
{
@@ -228,20 +239,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
protected set; get;
}
/// <inheritdoc />
public String InterfaceVersion
{
protected set;
get;
} = "?";
/// <inheritdoc />
public String InterfaceMaxFwVersion
{
protected set;
get;
}
/// <inheritdoc />
public Boolean InterfaceSupportsFwVersion
{
@@ -492,6 +489,15 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
}
/// <summary>
/// Unlocked the property change ability for special sequences.
/// </summary>
public Boolean UnlockEssentialProperties
{
get;
protected set;
}
#endregion
#region Setup
@@ -522,6 +528,61 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
}
/// <summary>
/// Unlocked the property change ability for special sequences.
/// </summary>
/// <param name="unlockPropertyChange">true if unlock required</param>
/// <returns>true if possible</returns>
public Boolean EnablePropertyChangeAbility(Boolean unlockPropertyChange)
{
UnlockEssentialProperties = unlockPropertyChange;
return true;
}
/// <summary>
/// Set the meter size if previously unlocked
/// </summary>
/// <param name="meterSize">true if setting is allowed</param>
/// <returns>true if possible</returns>
public virtual Boolean SetMeterSize<T>(T meterSize)
{
if (!UnlockEssentialProperties)
return false;
if (meterSize is String)
{
var ms = meterSize.ToString();
if (Logic.ProductionOrderCore.OrderData.MeterSize.NA == MeterSizeConverter.ConvertMeterSizeNameToEnum(ms))
return false;
MeterSize = ms;
}
else if (meterSize.GetType() == typeof(MeterSize))
{
var ms = Convert.ToInt32(meterSize);
MeterSize = MeterSizeConverter.ConvertMeterSizeEnumToSizeName((MeterSize)ms);
}
else // Type is unknown
{
return false;
}
return true;
}
/// <summary>
/// Set the pressure sensor if previously unlocked
/// </summary>
/// <param name="pressureSensorAssembled">true if setting is allow</param>
/// <returns>true if possible</returns>
public Boolean SetPressureSensorAssembled(Boolean pressureSensorAssembled)
{
if (!UnlockEssentialProperties)
return false;
PressureSensorAssembled = pressureSensorAssembled;
return true;
}
/// <summary>
/// Returns meter registers
/// </summary>
@@ -532,7 +593,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
/// <inheritdoc />
//void IWaterMeterWithRegisters.LoadConfiguration(String location)
public void LoadConfiguration(String location)
{
var configFile = ProgramConfig.RegisterDefinitionFileName;
@@ -598,6 +658,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
//and application definitions
var registerReader = new GenesisConfigurationReader(configFilePath);
InterfaceInfo = new InterfaceInfo
{
SupportedFwVersions = new List<String>()
};
InterfaceInfo.SupportedFwVersions.AddRange(registerReader.InterfaceInfo.SupportedFwVersions);
InterfaceInfo.InterfaceVersion = registerReader.InterfaceInfo.InterfaceVersion;
SetConfigRegisterDefinitions(registerReader.ConfigRegistersDefinitions);
SetConfigApplicationDefinitions(registerReader.ConfigApplicationDefinitions);
}
@@ -1303,8 +1370,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
/// <summary>
/// Building the FW Version string and the hexadecimal version out of 2 bytes of data or from an
/// input string like "1107", "11.07", "R1.1.07", "B1.1.07", "1.3.0B" or "9.0.2D".
/// Building the FW Version:
/// - string like "R1.1.07" or "B1.1.07" or optional reduced form for configuration capability check "1107",
/// - hexadecimal version like 0x1107 or 0x9107 for the 'B' version.
///
/// Input:
/// - optional string like "1107", "11.07", "R1.1.07", "B1.1.07", "1.3.0B" or "9.0.2D".
/// - optional 2 bytes representing the msb and lsb like 0x11 and 0x07.
///
/// REASON: FLEXNETVERSION is one application which does not follow the same rule of decimal numbers.
/// Instead, it uses hexadecimal digits.
@@ -1313,6 +1385,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <param name="strVersion">any string to evaluate like "11.07" or "R1.1.07" or "1.3.0B"</param>
/// <param name="msb">most significant byte representing the major and minor version</param>
/// <param name="lsb">last significant byte representing the built version</param>
/// <param name="buildShortVersion">will force to reduce the string output of FW version to e.g. "1107"</param>
/// <returns>FLEXNET version string e.g. "R1.2.47" or "B1.2.0C" </returns>
/// <remarks date="2023-Mar-02" author="Thomas Wiedebusch">
/// - Initial.
@@ -1320,8 +1393,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <remarks date="2023-Mar-08" author="Thomas Wiedebusch">
/// - Removed the optional leading "B" or "R" on strVersion input to create the fwVersion.
/// </remarks>
/// <remarks date="2025-Sep-30" author="Thomas Wiedebusch">
/// - .
/// </remarks>
public static String BuildFlexnetFwVersion(out UInt32 fwVersion, String strVersion, Byte? msb = null,
Byte? lsb = null)
Byte? lsb = null, Boolean buildShortVersion = false)
{
var major = 0;
var minor = 0;
@@ -1339,7 +1415,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
minor = (Int32)(msb & 0x0F);
builtMajor = (Int32)((lsb & 0xF0) >> 4);
builtMinor = (Int32)(lsb & 0x0F);
fwVersion = (UInt32)((msb << 8) + lsb);
fwVersion = (UInt32)(((msb & 0xFF) << 8) + lsb);
}
else if (!string.IsNullOrEmpty(strVersion))
{
@@ -1382,13 +1458,18 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
major += majorAdd;
}
// release version marked with "R"
if (major < majorIndicatorForB)
return $"R{major:X0}.{minor:X0}.{builtMajor:X0}{builtMinor:X0}";
// Build the release type id: 'R' for released version or 'B' for test version
var releaseTypeId = "R";
if (major >= majorIndicatorForB)
{
releaseTypeId = "B";
// Debug version marked with 'B'
major -= majorIndicatorForB;
}
// debug version marked with "B"
major -= majorIndicatorForB;
return $"B{major:X0}.{minor:X0}.{builtMajor:X0}{builtMinor:X0}";
return buildShortVersion ?
$"{major:X0}{minor:X0}{builtMajor:X0}{builtMinor:X0}" :
$"{releaseTypeId}{major:X0}.{minor:X0}.{builtMajor:X0}{builtMinor:X0}";
}
/// <summary>
@@ -1652,6 +1733,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// AppId 256, which exceeds the byte range as this isn't a real application, but will be used to identify
/// the interface (configuration.json) version.
/// </remarks>
/// <remarks date="2025-Sep-30" author="Thomas Wiedebusch">
/// - Handle the interface compatibility FW version with short string like "1421" and discrete FW versions.
/// </remarks>
protected virtual void ReadMeterFirmwareAndAssignRegisters()
{
// Avoid overwriting of list if this already exits
@@ -1668,29 +1752,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
CheckRegionSizeLutCrc();
UInt32 interfaceMaxEmeaVersion = 0;
UInt32 interfaceMaxNaVersion = 0;
var strShortFwVersion = "";
// Get all existing applications from meter register dictionary
foreach (var meterApp in ConfigApplications.OrderBy(o => o.AppId))
{
// The "OPTICALINTERFACE" isn't a real application as it identifies exclusively the configuration.json
if (meterApp.AppName.Equals("OPTICALINTERFACE"))
{
// Build the interface id for information of compatibility from FW to configuration.json
InterfaceVersion = BuildFwVersionStringFromDec(meterApp.AppVersion);
// Build the max supported versions for EMEA and NA to check the supported FW
if (Region.Equals("EMEA"))
InterfaceMaxFwVersion = BuildFlexnetFwVersion(out interfaceMaxEmeaVersion,
meterApp.InterfaceMaxEmeaVersion);
if (Region.Equals("NA"))
InterfaceMaxFwVersion = BuildFlexnetFwVersion(out interfaceMaxNaVersion,
meterApp.InterfaceMaxNaVersion);
continue;
}
UInt32 readFwVersion = 0;
UInt16 readFwCrc = 0;
var isInstalled = false;
var installationStatus = MeterAppState.MeterAppNotInstalled;
var versionString = "";
@@ -1711,6 +1779,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
readFwVersionBytes[0]);
versionString = FwVersion;
InstalledFwVersion = readFwVersion;
// create a short FW version info being able to compare the interface compatibility
strShortFwVersion = BuildFlexnetFwVersion(out _, FwVersion, buildShortVersion: true);
}
else
{
@@ -1816,20 +1886,17 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
Logger.Info($"Slot:{Slot} - Meter size: {MeterSize}");
Logger.Info($"Slot:{Slot} - Upgrade permission: {MetrologyUpgradePermission:X2}");
Logger.Info($"Slot:{Slot} - Interface (configuration.json) version: {InterfaceVersion}");
Logger.Info($"Slot:{Slot} - Interface (configuration.json) version: {InterfaceInfo.InterfaceVersion}");
if (InstalledFwVersion != null &&
((Region.Equals("EMEA") && interfaceMaxEmeaVersion >= InstalledFwVersion) ||
(Region.Equals("NA") && interfaceMaxNaVersion >= InstalledFwVersion)))
if (InterfaceInfo.SupportedFwVersions.Any( strFwVersion => strFwVersion.Contains(strShortFwVersion)))
{
InterfaceSupportsFwVersion = true;
Logger.Info($"Slot:{Slot} - Interface supports FW version: {FwVersion}");
Logger.Info($"Slot:{Slot} - Interface supports this FW version: {FwVersion}");
}
else
{
InterfaceSupportsFwVersion = false;
Logger.Warn($"Slot:{Slot} - Interface does not support FW version! Installed FW version: {FwVersion}, " +
$"Interface supports max FW version: {InterfaceMaxFwVersion}");
Logger.Warn($"Slot:{Slot} - Interface does not support this FW version: {FwVersion}");
}
// initial list of ALL registers defined in configuration.json
@@ -15,9 +15,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// </summary>
public interface IGenesisMeter : IMeter
{
#region properties
/// <summary>
/// Represent <see cref="Register.Configexchange.PcbSerialNumber" />
@@ -27,19 +24,11 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
{
get;
}
/// <summary>
/// This is the version of the interface "configuration.json".
/// </summary>
String InterfaceVersion
{
get;
}
/// <summary>
/// This is the max supported firmware version of the interface "configuration.json".
/// It is the max version for a specific region.
/// Interface information
/// </summary>
String InterfaceMaxFwVersion
InterfaceInfo InterfaceInfo
{
get;
}
@@ -55,7 +44,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <summary>
/// Transmit protocol access for underlie objects to change response timeout
/// </summary>
ITransmitProtocol TransmitProtocol{ get; }
ITransmitProtocol TransmitProtocol { get; }
/// <summary>
/// List of all present meter applications installed in meter
@@ -116,10 +105,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <summary>
/// This is the meter size.
/// </summary>
String MeterSize
{
get;
}
String MeterSize { get; }
/// <summary>
/// Length of the meter.
@@ -129,10 +115,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <summary>
/// Pressure sensor assembled to meter.
/// </summary>
Boolean PressureSensorAssembled
{
get;
}
Boolean PressureSensorAssembled { get; }
/// <summary>
/// Region (EMEA, NA or China).
@@ -190,6 +173,14 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
get; set;
}
/// <summary>
/// Unlocked the property change ability for special sequences.
/// </summary>
Boolean UnlockEssentialProperties
{
get;
}
#endregion
#region methods
@@ -200,6 +191,22 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// </summary>
void CheckRegionSizeLutCrc();
/// <summary>
/// Unlocked the property change ability for special sequences.
/// </summary>
Boolean EnablePropertyChangeAbility(Boolean unlockPropertyChange);
/// <summary>
/// Set the meter size if previously unlocked.
/// The data types are: - String like "DN50" or
/// </summary>
Boolean SetMeterSize<T>(T meterSize);
/// <summary>
/// Set the pressure sensor if previously unlocked
/// </summary>
Boolean SetPressureSensorAssembled(Boolean pressureSensorAssembled);
/// <summary>
/// Reset the empty pipe alarm
/// </summary>
@@ -234,7 +241,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// </summary>
/// <returns></returns>
MeterRegisters GetConfigRegistersDefinitions();
/// <summary>
/// Common routine for reboot being able to override this routine which will be called in
/// MeteResetPsu to simulate a reboot.
@@ -265,7 +272,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
/// <returns>value as byte array in raw format or null</returns>
Byte[] ReadRegister(String regName, Int32? expectedLength = null,
UInt16 skipRetryErrorCode = CommunicationConfig.SkipRetryErrorCode);
/// <summary>
/// Clear all pending alarms.
/// </summary>
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
{
/// <summary>
/// Collection of interface information
/// </summary>
public class InterfaceInfo
{
/// <summary>
/// The interface version
/// </summary>
public String InterfaceVersion { get; set; }
/// <summary>
/// List of supported FW versions by this interface
/// </summary>
public List<String> SupportedFwVersions { get; set; }
}
}
@@ -1116,7 +1116,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "Bitmask�of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"remarks": "Bitmask of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"region": {
"emea": {
"values": {
@@ -1164,7 +1164,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "Bitmask�of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"remarks": "Bitmask of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"region": {
"emea": {
"values": {
@@ -1212,7 +1212,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "Bitmask�of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"remarks": "Bitmask of the alarms that we are interested in. I can imagine some customers may have different requirements to others. The radio does change this.",
"region": {
"emea": {
"values": {
@@ -1292,7 +1292,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "This updates the same value as�AlarmEnableMask, best to avoid changing it.",
"remarks": "This updates the same value as AlarmEnableMask, best to avoid changing it.",
"region": {
"emea": {
"values": {
@@ -2371,7 +2371,7 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "High temperature alarm threshold in 0.1�C",
"description": "High temperature alarm threshold in 0.1°C",
"version": {
"first": 88,
"last": 100
@@ -2395,7 +2395,7 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "High temperature alarm threshold in 0.1�C",
"description": "High temperature alarm threshold in 0.1°C",
"version": {
"first": 101,
"last": 110
@@ -2419,14 +2419,14 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "High temperature alarm threshold in 0.1�C",
"description": "High temperature alarm threshold in 0.1°C",
"version": {
"first": 111,
"last": 164
},
"si_transform": {
"remarks": "Degrees Celsius: temperature in 0.1 degrees C ...",
"units": "�C",
"units": "°C",
"scale_float_mult": 1.0,
"scale_power_2": 0,
"scale_power_10": -1,
@@ -2573,7 +2573,7 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "Low temperature alarm threshold in 0.1�C",
"description": "Low temperature alarm threshold in 0.1°C",
"version": {
"first": 88,
"last": 100
@@ -2597,7 +2597,7 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "Low temperature alarm threshold in 0.1�C",
"description": "Low temperature alarm threshold in 0.1°C",
"version": {
"first": 101,
"last": 110
@@ -2621,7 +2621,7 @@
"lvl7": "RW",
"lvl8": "RW"
},
"description": "Low temperature alarm threshold in 0.1�C",
"description": "Low temperature alarm threshold in 0.1°C",
"version": {
"first": 111,
"last": 164
@@ -5845,7 +5845,7 @@
"jens.schulz@xylem.com",
"roland.drabesch@xylem.com"
],
"remarks": "(<=125 = 3n ) 150=> 2n in m� -> what about other Units. See Display Unit Customer Specification.",
"remarks": "(<=125 = 3n ) 150=> 2n in m³ -> what about other Units. See Display Unit Customer Specification.",
"region": {
"emea": null,
"na": null
@@ -13139,18 +13139,18 @@
"responsible": [
"mark.clemens@xylem.com"
],
"remarks": "Will change with different releases - should be tracked elsewhere. meter_lut_202406170836_v0.17_crc_list.",
"remarks": "Will change with different releases - should be tracked elsewhere. meter_lut_202506270844_v0.19_crc_list.",
"region": {
"emea": {
"values": {
"DN40": 16549,
"DN50": 51664,
"DN50": 46338,
"DN65": 52673,
"DN80": 18061,
"DN100": 48372,
"DN125": 8134,
"DN150": 1637,
"DN200": 60969,
"DN200": 26376,
"DN250": 45341,
"DN300": 49157
}
@@ -13162,7 +13162,7 @@
"US3": 52036,
"US4": 50586,
"US6": 8010,
"US8": 17423,
"US8": 52526,
"US10": 24406,
"US12": 11854
}
@@ -13209,7 +13209,7 @@
"operation_calibration": false,
"runtime_ignore": false,
"responsible": [],
"remarks": "This controls the temperature, pressure, flow rate readings on the smaller second row of digits. Previous code would display 012.3 C whereas with DisplayLeadingZeros set to 0 you�ll get _12.3 C (where the _ is actually just an empty space).",
"remarks": "This controls the temperature, pressure, flow rate readings on the smaller second row of digits. Previous code would display 012.3 C whereas with DisplayLeadingZeros set to 0 you’ll get _12.3 C (where the _ is actually just an empty space).",
"region": {
"emea": {
"values": {
@@ -13243,7 +13243,11 @@
"version": {
"first": 310,
"last": 318,
"exclude": [315, 316, 317]
"exclude": [
315,
316,
317
]
},
"values": {
"default": 1,
@@ -13301,7 +13305,11 @@
"version": {
"first": 310,
"last": 318,
"exclude": [315, 316, 317]
"exclude": [
315,
316,
317
]
},
"values": {
"default": 500,
@@ -13359,7 +13367,11 @@
"version": {
"first": 310,
"last": 318,
"exclude": [315, 316, 317]
"exclude": [
315,
316,
317
]
},
"values": {
"minimum": 0,
@@ -13416,7 +13428,11 @@
"version": {
"first": 310,
"last": 318,
"exclude": [315, 316, 317]
"exclude": [
315,
316,
317
]
},
"values": {
"minimum": 0,
@@ -13473,7 +13489,13 @@
"version": {
"first": 311,
"last": 321,
"exclude": [315, 316, 317, 319, 320]
"exclude": [
315,
316,
317,
319,
320
]
},
"values": {
"default": 0,
@@ -15432,7 +15454,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "G02 Pulse type (Netted Imp./Tamp. (-), �). Customer specific.",
"remarks": "G02 Pulse type (Netted Imp./Tamp. (-), …). Customer specific.",
"region": {
"emea": null,
"na": null
@@ -15528,7 +15550,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "G03 Pulse length (500ms, �). Customer specific.",
"remarks": "G03 Pulse length (500ms, …). Customer specific.",
"region": {
"emea": null,
"na": null
@@ -15600,7 +15622,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "C05 unit (m�, kl, US-Gall./Imp.-Gall, Barrel, ...)",
"remarks": "C05 unit (m³, kl, US-Gall./Imp.-Gall, Barrel, ...)",
"region": {
"emea": null,
"na": null
@@ -15804,7 +15826,7 @@
"responsible": [
"jens.schulz@xylem.com"
],
"remarks": "�C - EMEA/China / �F - USA.",
"remarks": "°C - EMEA/China / °F - USA.",
"region": {
"emea": {
"values": {
@@ -17203,27 +17225,84 @@
"id": 256,
"version": {
"first": 1,
"last": 357
"last": 360
},
"builds": {
"emea": [
{"id": 230, "fw": "106E"},
{"id": 230, "fw": "106F"},
{"id": 257, "fw": "1107"},
{"id": 257, "fw": "1108"},
{"id": 278, "fw": "1247"},
{"id": 318, "fw": "130A"},
{"id": 330, "fw": "130B"},
{"id": 346, "fw": "1310"},
{"id": 331, "fw": "13F3"},
{"id": 350, "fw": "1416"},
{"id": 351, "fw": "14E0"}
{
"id": 230,
"fw": "106E"
},
{
"id": 230,
"fw": "106F"
},
{
"id": 257,
"fw": "1107"
},
{
"id": 257,
"fw": "1108"
},
{
"id": 278,
"fw": "1247"
},
{
"id": 318,
"fw": "130A"
},
{
"id": 330,
"fw": "130B"
},
{
"id": 331,
"fw": "13F3"
},
{
"id": 346,
"fw": "1310"
},
{
"id": 350,
"fw": "1416"
},
{
"id": 351,
"fw": "14E0"
},
{
"id": 358,
"fw": "14E1"
},
{
"id": 359,
"fw": "14E2"
},
{
"id": 360,
"fw": "14E3"
}
],
"na": [
{"id": 278, "fw": "1228"},
{"id": 310, "fw": "2002"},
{"id": 324, "fw": "2006"},
{"id": 352, "fw": "2013"}
{
"id": 278,
"fw": "1228"
},
{
"id": 310,
"fw": "2002"
},
{
"id": 324,
"fw": "2006"
},
{
"id": 352,
"fw": "2013"
}
]
}
},
@@ -18477,7 +18556,9 @@
"version": {
"first": 69,
"last": 72,
"exclude": [70]
"exclude": [
70
]
},
"statictype": "dynamic",
"production": {
@@ -18537,7 +18618,7 @@
"id": 16,
"version": {
"first": 100,
"last": 546
"last": 549
},
"registers": {
"TxInterval": {
@@ -18558,7 +18639,7 @@
"description": "The SensusRF transmission interval in seconds for the BUPs",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 15,
@@ -18609,7 +18690,7 @@
"description": "The Open Metering transmission interval in seconds",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 3600,
@@ -18660,7 +18741,7 @@
"description": "The Listen After Talk interval as number 'n'. After every 'n' BUPs follows a BUP-LAT",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 3,
@@ -18711,7 +18792,7 @@
"description": "The Wake Up interval in seconds 's'. Every 's' seconds will the meter sniff for a WakeUp tone. 's' == 0 means active sending and no sniffing",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 3,
@@ -18762,7 +18843,7 @@
"description": "The internal MBus state (Open Metering). A bit oriented value. Do not write if you do not know details",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 7,
@@ -18813,7 +18894,7 @@
"description": "A number that shows the radio frequency used. Normally 433 or 868",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 433,
@@ -18860,7 +18941,7 @@
"description": "A radio frequency calibration parameter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -18907,7 +18988,7 @@
"description": "A parameter for controling the radio power",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -18993,7 +19074,7 @@
"description": "The internal System State of the Radio",
"version": {
"first": 545,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -19040,7 +19121,7 @@
"description": "The radio address used by the meter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19087,7 +19168,7 @@
"description": "The offset the between meter time and UTC for time correction",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19134,7 +19215,7 @@
"description": "The number of bytes sent during meter lifetime",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19181,7 +19262,7 @@
"description": "The number of bytes received during meter lifetime",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19228,7 +19309,7 @@
"description": "The number of resets the application SensusRfRadio has performed over lifetime",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19275,7 +19356,7 @@
"description": "An internal temporary state (enum) regarding the firmwware update",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19322,7 +19403,7 @@
"description": "The flow value of the leakage (low flow) detection",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 25,
@@ -19369,7 +19450,7 @@
"description": "The time in minutes of the leakage (low flow) detection threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 360,
@@ -19416,7 +19497,7 @@
"description": "The flow value of the broken pipe (high flow) detection",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 2500,
@@ -19463,7 +19544,7 @@
"description": "The time in Minutes of the broken pipe (high flow) detection threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 180,
@@ -19510,7 +19591,7 @@
"description": "The pressure value of the maximum (high) pressure alarm",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 160,
@@ -19557,7 +19638,7 @@
"description": "The pressure value of the minimum (low) pressure alarm",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 3,
@@ -19604,7 +19685,7 @@
"description": "The time in seconds of the maximum (high) pressure alarm threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 600,
@@ -19651,7 +19732,7 @@
"description": "The time in seconds of the minimum (low) pressure alarm threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 600,
@@ -19698,7 +19779,7 @@
"description": "The period in seconds with which the pressure is measured (fix 60 sec)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 60,
@@ -19745,7 +19826,7 @@
"description": "An enum respresenting the unit of pressure (0= no pressure sensor, 1= MPas, 2= PSI, 3= Bar)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19792,7 +19873,7 @@
"description": "The gauge offset of the pressure sensor value in mBar",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -19839,7 +19920,7 @@
"description": "The temperature value of the maximum (high) temperature alarm",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 50,
@@ -19886,7 +19967,7 @@
"description": "The temperature value of the minimum (low) temperature alarm",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 2,
@@ -19933,7 +20014,7 @@
"description": "The time in Minutes of the maximum (high) temperature alarm threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 600,
@@ -19980,7 +20061,7 @@
"description": "The time in Minutes of the minimum (low) temperature alarm threshold",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 600,
@@ -20027,7 +20108,7 @@
"description": "The period in seconds with which the temperature is measured (only 60 is valid)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 60,
@@ -20074,7 +20155,7 @@
"description": "An enum respresenting the unit of temperature (1= Celsius, 2= Fahrenheit)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -20121,7 +20202,7 @@
"description": "An enumerator defining the currently active PulseWidth (0 ... 8 for non testmode values and 9 ... 15 for testmode)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 4,
@@ -20168,7 +20249,7 @@
"description": "A number representing the pulse weight multiplicator 1, 10, 100 or 1000",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -20215,7 +20296,7 @@
"description": "An enum (0 to 3) representing the pulse output mode (0= deactivated, ...)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -20262,7 +20343,7 @@
"description": "A parameter regarding the non existing current loop output",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "infrequentlyupdated",
"production": {
@@ -20304,7 +20385,7 @@
"description": "A parameter regarding the non existing current loop output",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "infrequentlyupdated",
"production": {
@@ -20385,7 +20466,7 @@
"description": "A byte value representing a mask of currently active (1) main alarms. These are the flow and genreral alarms",
"version": {
"first": 545,
"last": 546
"last": 549
},
"values": {
"default": 207,
@@ -20432,7 +20513,7 @@
"description": "A byte value representing a mask of currently active (1) extended alarms. These are the temperature and pressure related alarms",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 60,
@@ -20479,7 +20560,7 @@
"description": "A number of days (0 = off) after which alarms are cleared from the alarm byte values when they are no longer active",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 29,
@@ -20530,7 +20611,7 @@
"description": "A value in minutes that defines the time the meter will stay in testmode after that mode was started",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20577,7 +20658,7 @@
"description": "The SensusRF encryption key (16 bytes) of the meter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "static",
"production": {
@@ -20590,7 +20671,7 @@
"responsible": [
"joerg.lachenmayer@xylem.com"
],
"remarks": "D05 radio key (Sensus (standard), �)",
"remarks": "D05 radio key (Sensus (standard), …)",
"region": {
"emea": null
}
@@ -20619,7 +20700,7 @@
"description": "The SensusRF Authentification PINs (3 PINs of 4 byte each) of the meter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "static",
"production": {
@@ -20661,7 +20742,7 @@
"description": "The version of the complete Meter firmware package as represented by application FlexNetVersion",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20708,7 +20789,7 @@
"description": "An array of 9 bytes of freely programmable SensusRF customer Text",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "infrequentlyupdated",
"production": {
@@ -20750,7 +20831,7 @@
"description": "An uint32_t value representing the meter's system DateTime when the radio had last time sent a telegram",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20797,7 +20878,7 @@
"description": "An uint32_t value representing the meter's system DateTime when the radio had detected first the low-battery status",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20844,7 +20925,7 @@
"description": "A copy of the LowBatDateTime time stamp",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20891,7 +20972,7 @@
"description": "A byte value representing the currently active volume unit used by radio",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 19,
@@ -20938,7 +21019,7 @@
"description": "A byte value representing additional information regarding the unit derived from the volume unit when used for flow or alternate volume, 0x1x= liter per sec, 0xx1= kiloLiter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -20985,7 +21066,7 @@
"description": "A byte value normaly never changed regarding general behavior of the firmware related to Over The Air updates",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -21036,7 +21117,7 @@
"description": "A complex structure of 84 bytes related to the Tfx mode of the meter respectively the volume channel",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "dynamic",
"production": {
@@ -21078,7 +21159,7 @@
"description": "A structure of 4 uint16_t values used for the customer DEWA",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "dynamic",
"production": {
@@ -21120,7 +21201,7 @@
"description": "A 4 byte bit mask representing whether the individual data items are logged in the periodic logging (1) or not (0)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 201335811,
@@ -21167,7 +21248,7 @@
"description": "A number in seconds representing the time period for storing data records into the periodic logging file (memory)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 60,
@@ -21214,7 +21295,7 @@
"description": "A number derived automatically from the DataLogPeriod that determines averaging periods in mimutes for min and max calculations",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 5,
@@ -21261,7 +21342,7 @@
"description": "A 4 byte bit mask representing whether the individual data items are logged in the fixed date logging (1) or not (0)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 201335811,
@@ -21308,7 +21389,7 @@
"description": "The day of the month (0 = every day) on which at 00:00 the fixed date logging takes place",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 1,
@@ -21355,7 +21436,7 @@
"description": "An uint32_t counter used originally for debugging during development. Meanwhile out of use",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -21406,7 +21487,7 @@
"description": "An uint8_t value related to the power level used by the radio when an Irda module is present",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -21453,7 +21534,7 @@
"description": "An uint16_t value used for adjusting the antenna impedance",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 4,
@@ -21500,7 +21581,7 @@
"description": "An uint16_t value used for adjusting the antenna impedance if an Irda module is present",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 4,
@@ -21547,7 +21628,7 @@
"description": "A parameter of type bool that signals the presence of an Irda module. The value is controlled by the meter",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -21594,7 +21675,7 @@
"description": "Write 1 to store configuration values to non-volatile storage. Read back for status",
"version": {
"first": 100,
"last": 546
"last": 549
},
"statictype": "dynamic",
"production": {
@@ -21636,7 +21717,7 @@
"description": "The number of seconds since the radio left the production (Set to 0 at the end of the production proccess)",
"version": {
"first": 100,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -21683,7 +21764,7 @@
"description": "A value (counter) used only during development for release testing",
"version": {
"first": 412,
"last": 546
"last": 549
},
"values": {
"default": 4320000,
@@ -21730,7 +21811,7 @@
"description": "A counter used to control the radio activity which must not exceed certain regulatory limits",
"version": {
"first": 412,
"last": 546
"last": 549
},
"values": {
"default": 1000,
@@ -21777,7 +21858,7 @@
"description": "Storage item for HistoricalErrorLimitCounters Reverse(1, hi) and Leak(0, lo)",
"version": {
"first": 437,
"last": 546
"last": 549
},
"values": {
"default": 16711935,
@@ -21824,7 +21905,7 @@
"description": "Storage item for HistoricalErrorLimitCounters Magnet(3, hi) and Air(2, lo)",
"version": {
"first": 437,
"last": 546
"last": 549
},
"values": {
"default": 16711935,
@@ -21871,7 +21952,7 @@
"description": "Storage item for HistoricalErrorLimitCounters PressureMin(5, hi) and PressureMax(4, lo)",
"version": {
"first": 437,
"last": 546
"last": 549
},
"values": {
"default": 16711935,
@@ -21918,7 +21999,7 @@
"description": "Storage item for HistoricalErrorLimitCounters TempMin(7, hi) and TempMax(6, lo)",
"version": {
"first": 437,
"last": 546
"last": 549
},
"values": {
"default": 16711935,
@@ -21965,7 +22046,7 @@
"description": "int8_t value to add an offset to the measured pressure in 10mBar resolution (for value from -1270 to +1270 mBar for field calibration purposes). -128 is an invalid value",
"version": {
"first": 483,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -22012,7 +22093,7 @@
"description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 1 (temperature)",
"version": {
"first": 494,
"last": 546
"last": 549
},
"statictype": "infrequentlyupdated",
"production": {
@@ -22054,7 +22135,7 @@
"description": "a 6 bytes big complex structure for the Tfx settings of the secondary channel 2 (pressure)",
"version": {
"first": 494,
"last": 546
"last": 549
},
"statictype": "infrequentlyupdated",
"production": {
@@ -22096,7 +22177,7 @@
"description": "An unit32_t value used to support/control the MB_MODE3_OMSv4B transmission uinque MCR",
"version": {
"first": 499,
"last": 546
"last": 549
},
"values": {
"default": 0,
@@ -22143,7 +22224,7 @@
"description": "Storage item for HistoricalErrorLimitCounters NoFlowAlarm(7, hi) and Metrology Failure(6, lo)",
"version": {
"first": 536,
"last": 546
"last": 549
},
"values": {
"default": 16711935,
@@ -22190,7 +22271,7 @@
"description": "Storage item for HistoricalErrorLimitCounters Reboot Alarm(7, hi) and reserved(6, lo)",
"version": {
"first": 536,
"last": 546
"last": 549
},
"values": {
"default": 16711680,
@@ -12,6 +12,7 @@ using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers.DataTypes;
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
using Xylem.Common.Logic.ProductionOrderCore.TestResults;
namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
@@ -107,7 +108,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
base.PcbId = value;
ClearPassword();
}
get => base.PcbId;
}
/// <summary>
@@ -116,7 +116,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
public new String LutCrc
{
set => base.LutCrc = value;
get => base.LutCrc;
}
/// <summary>
@@ -125,7 +124,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
public new String StrCoreRevision
{
set => base.StrCoreRevision = value;
get => base.StrCoreRevision;
}
/// <summary>
@@ -143,7 +141,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
public new Int32? RadioFrequencyMhz
{
set => base.RadioFrequencyMhz = value;
get => base.RadioFrequencyMhz;
}
/// <summary>
@@ -152,7 +149,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
public new UInt32? InstalledFwVersion
{
set => base.InstalledFwVersion = value;
get => base.InstalledFwVersion;
}
/// <summary>
@@ -169,7 +165,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
/// </summary>
public new String MeterSize
{
set => base.MeterSize = value;
private set => base.MeterSize = value;
get => base.MeterSize;
}
@@ -187,7 +183,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
/// </summary>
public new Boolean PressureSensorAssembled
{
set => base.PressureSensorAssembled = value;
private set => base.PressureSensorAssembled = value;
get => base.PressureSensorAssembled;
}
@@ -202,7 +198,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
/// <summary>
/// Mock object can overwrite login status for test purposes
/// </summary>
public new Boolean IsLoggedOn
private new Boolean IsLoggedOn
{
set => base.IsLoggedOn = value;
get => base.IsLoggedOn;
@@ -450,6 +446,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
/// <remarks date="2025-Aug-07" author="Thomas Wiedebusch">
/// - Check interface compatibility.
/// </remarks>
/// <remarks date="2025-Sep-30" author="Thomas Wiedebusch">
/// - Handle the interface compatibility FW version with short string like "1421" and discrete FW versions.
/// </remarks>
protected override void ReadMeterFirmwareAndAssignRegisters()
{
// Avoid overwriting of list if this already exits
@@ -473,26 +472,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
return;
}
UInt32 interfaceMaxEmeaVersion = 0;
UInt32 interfaceMaxNaVersion = 0;
var strInterfaceMaxEmeaVersion = "";
var strInterfaceMaxNaVersion = "";
var strShortFwVersion = "";
//Get all existing applications from meter register dictionary
foreach (var meterApp in ConfigApplications.OrderBy(o => o.AppId))
{
if (meterApp.AppName.Equals("OPTICALINTERFACE"))
{
// Build the interface id for information of compatibility from FW to configuration.json
InterfaceVersion = BuildFwVersionStringFromDec(meterApp.AppVersion);
// Build the max supported versions for EMEA and NA to check the supported FW
strInterfaceMaxEmeaVersion = BuildFlexnetFwVersion(out interfaceMaxEmeaVersion,
meterApp.InterfaceMaxEmeaVersion);
strInterfaceMaxNaVersion = BuildFlexnetFwVersion(out interfaceMaxNaVersion,
meterApp.InterfaceMaxNaVersion);
continue;
}
// Take all listed config apps even if not installed
var app = new MeterApplications
{
@@ -521,6 +504,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
{
InstalledFwVersion = fileApp.Version;
FwVersion = fileApp.StrVersion;
// create a short FW version info being able to compare the interface compatibility
strShortFwVersion = BuildFlexnetFwVersion(out _, FwVersion, buildShortVersion: true);
}
}
@@ -550,28 +535,17 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
Region = "EMEA";
}
}
// Assign the max supported FW version of the interface depending on the region
if (Region.Equals("EMEA"))
InterfaceMaxFwVersion = strInterfaceMaxEmeaVersion;
if (Region.Equals("NA"))
InterfaceMaxFwVersion = strInterfaceMaxNaVersion;
// Check if the interface supports the FW
if (InstalledFwVersion != null &&
((Region.Equals("EMEA") && interfaceMaxEmeaVersion >= InstalledFwVersion) ||
(Region.Equals("NA") && interfaceMaxNaVersion >= InstalledFwVersion)))
if (InterfaceInfo.SupportedFwVersions.Any( strFwVersion => strFwVersion.Contains(strShortFwVersion)))
{
InterfaceSupportsFwVersion = true;
Logger.Info($"Slot:{Slot} - Interface supports FW version: {FwVersion}");
Logger.Info($"Slot:{Slot} - Interface supports this FW version: {FwVersion}");
}
else
{
InterfaceSupportsFwVersion = false;
Logger.Warn($"Slot:{Slot} - Interface does not support FW version! Installed FW version: {FwVersion}, " +
$"Interface supports max FW version: {InterfaceMaxFwVersion}");
Logger.Warn($"Slot:{Slot} - Interface does not support this FW version: {FwVersion}");
}
}
catch (Exception ex)
{
@@ -759,6 +733,45 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.MockGenesis
return IsLoggedOn;
}
/// <inheritdoc />
/// <summary>
/// Set the meter size if previously unlocked.
/// - MockGenesis allows additional empty string or question mark string!
/// </summary>
/// <param name="meterSize">true if setting is allowed</param>
/// <returns>true if possible</returns>
public override Boolean SetMeterSize<T>(T meterSize)
{
if (!UnlockEssentialProperties)
return false;
if (meterSize is String)
{
var ms = meterSize.ToString();
// MockGenesis allows 'killing' of MeterSize
if (Equals(meterSize,"") || Equals(meterSize,"?"))
{
}
else if (Logic.ProductionOrderCore.OrderData.MeterSize.NA == MeterSizeConverter.ConvertMeterSizeNameToEnum(ms))
{
return false;
}
MeterSize = ms;
}
else if (meterSize.GetType() == typeof(MeterSize))
{
var ms = Convert.ToInt32(meterSize);
MeterSize = MeterSizeConverter.ConvertMeterSizeEnumToSizeName((MeterSize)ms);
}
else // Type is unknown
{
return false;
}
return true;
}
/// <inheritdoc />
/// <summary>
/// Simulate login with password to mock Genesis for test purposes
@@ -1 +0,0 @@
89102b0142e574de38a9f47d370f3334e5e6c268