From 30f3f6137693bd8453636ce6b7787d2dd0f9379d Mon Sep 17 00:00:00 2001 From: Thomas Wiedebusch Date: Tue, 9 Dec 2025 12:45:35 +0100 Subject: [PATCH] GenesisMeter: - Excluded register versions explicit specified in the 'configuration.json' as version.exclude list --- Common/.shared/SharedAssemblyInfo.cs | 2 +- Common/Common.sln.DotSettings | 11 ++++++++++ .../Genesis/GenesisCore/GenesisMeter.cs | 8 +++++++- .../Genesis/GenesisCore/RegisterRestorer.cs | 20 ++++++++----------- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Common/.shared/SharedAssemblyInfo.cs b/Common/.shared/SharedAssemblyInfo.cs index bd28db6d..38ebda7a 100644 --- a/Common/.shared/SharedAssemblyInfo.cs +++ b/Common/.shared/SharedAssemblyInfo.cs @@ -13,4 +13,4 @@ using System.Reflection; // //[assembly: AssemblyVersion("1.2.*.0")] -[assembly: AssemblyVersion("2.8.13.*")] +[assembly: AssemblyVersion("2.8.14.*")] diff --git a/Common/Common.sln.DotSettings b/Common/Common.sln.DotSettings index 8861e626..f85013f2 100644 --- a/Common/Common.sln.DotSettings +++ b/Common/Common.sln.DotSettings @@ -1,6 +1,17 @@  True + True + True + True + True + False + True + True + True + Enabled + True Left + True True HINT diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs b/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs index 1f752a72..0abf6b55 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs +++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/GenesisMeter.cs @@ -1645,6 +1645,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore /// /// - Initial, extracted from /// + /// + /// - Excluded register versions explicit specified in the 'configuration.json' as version.exclude list. + /// public void BuildValidMeterRegisters(List> tempConfigRegisters) { if (tempConfigRegisters == null || tempConfigRegisters.Count == 0) @@ -1677,7 +1680,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore (registerToCheck.Key.RegisterDetail.Version.Last != null && registerToCheck.Key.RegisterDetail.Version.First != null && registerToCheck.Key.RegisterDetail.Version.First.Value <= currentGroup.Version && - registerToCheck.Key.RegisterDetail.Version.Last.Value >= currentGroup.Version)) + registerToCheck.Key.RegisterDetail.Version.Last.Value >= currentGroup.Version && + ( registerToCheck.Key.RegisterDetail.Version.Exclude == null || + // Exclude named versions + registerToCheck.Key.RegisterDetail.Version.Exclude.All(exVer => exVer != currentGroup.Version)))) { configRegisterListForDebug.Add(registerToCheck.Key.GetIdent()); // Avoid multiple assignment of identical register in dictionary if one has passed the test diff --git a/Common/Hardware/WaterMeter/Genesis/GenesisCore/RegisterRestorer.cs b/Common/Hardware/WaterMeter/Genesis/GenesisCore/RegisterRestorer.cs index 7f51db74..976b4c84 100644 --- a/Common/Hardware/WaterMeter/Genesis/GenesisCore/RegisterRestorer.cs +++ b/Common/Hardware/WaterMeter/Genesis/GenesisCore/RegisterRestorer.cs @@ -121,14 +121,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore /// /// Registers manually explicit excluded for in-field updatable parameters for the CUST to prevent inadvertent /// modifications resulting in potential MID violations. - /// - /// Defined by M.C., J.L. and A.F. with the file: 'FwUpdateController.cs-GetRecoveryFile()-2507160616.xlsx'. - /// - /// All commands defined here will not be accepted from 'external' to adjust. Program internally, those - /// commands are potentially allowed if those do not change any MID dependent 'values'. /// - /// - /// - SENSUSRADIO_WakeupInterval added to keep radio active after field update if it was active before. + /// + /// Defined by M.C., J.L. and A.F. with the file: 'FwUpdateController.cs-GetRecoveryFile()-2507160616.xlsx'. + /// + /// + /// CUST 2.8.13: + /// - Added:’SENSUSRADIO_WakeupInterval’ /// private static readonly List _fieldUpdateBlacklist = new List { @@ -253,7 +252,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore "SENSUSRADIO_Tfx_Structure", //21 "SENSUSRADIO_UpgFWVersion", //22 "SENSUSRADIO_UtcTimeOffset", //23 - "SENSUSRADIO_WakeupInterval", //24 - CUST_2.8.13 + "SENSUSRADIO_WakeupInterval", //24 - 2025-Dec-08 - CUST_2.8.13 "SYSTEM_CalendarSeconds", // 1 "SYSTEM_CheckPresence", // 2 @@ -1210,15 +1209,13 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore /// /// - Leave the initial 'FailedComparisonRegisters' intact. /// - public Boolean RestoreAndCompareRegistersAfterReboot(CancellationToken cancellationToken) + public Boolean RestoreAndCompareRegistersAfterReboot(CancellationToken cancellationToken) { if (!HasRestoreRegistersAfterRebootIfCompareFailed) return false; HasRestoreRegistersAfterRebootIfCompareFailed = false; - //FailedComparisonRegisters.Clear(); - // get the pre-defined dictionary var meterRegisters = _currentGenesis.GetConfigRegistersDefinitions(); @@ -1320,7 +1317,6 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore var retVal = true; // build a string list of the registers being able to sort those - //var registerNames = RecoveryRegisters.Select(register => register.RegisterIdent).ToList(); var registerNames = recoveryRegisters.Select(register => register.RegisterIdent).ToList(); // Remove all excluded registers