diff --git a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs index e86a652c..c9206330 100644 --- a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs +++ b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014.cs @@ -199,6 +199,11 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core #endregion ---------------------------------------- events ---------------------------------------------------- #region ------------------------------------------- static properties ----------------------------------------- + /// + /// Force to decode the entire status even if it is not important for this measurement sequence. + /// + public static Boolean DecodeEntireStatus { get; set; } = false; + /// /// Reminder of actual ongoing measurement information /// @@ -1000,9 +1005,6 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core if (firstActiveFm2014 == null) return false; - // Setup status mask to ignore unimportant settings and feedbacks for the time and regulation measurement - StatusDecodingMask = GetBitMask(CyclicMeasSequ.PulseCounterMeasurement); - // Publish setting to all connected and logged in FM2014s as those will be delivered // for all via broadcast foreach (var fm2014 in RegisteredFm2014s.Where(fm2014 => fm2014.IsLoggedOn)) @@ -1065,6 +1067,10 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core do { + // Setup status mask to ignore unimportant settings and feedbacks for the time and regulation measurement + StatusDecodingMask = GetBitMaskForSequence(DecodeEntireStatus ? CyclicMeasSequ.Idle : + CyclicMeasSequ.PulseCounterMeasurement); + CmdName cmdNameRef; CmdName cmdNameDut; Boolean syncPulseCtr; @@ -1192,9 +1198,6 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core if (firstActiveFm2014 == null) return false; - // Setup status mask to ignore unimportant settings and feedbacks for the time measurement - StatusDecodingMask = GetBitMask(CyclicMeasSequ.RegulationMeasurement); - // Publish setting to all connected and logged in FM2014s as those will be delivered // for all via broadcast foreach (var fm2014 in RegisteredFm2014s.Where(fm2014 => fm2014.IsLoggedOn)) @@ -1255,6 +1258,10 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core do { + // Setup status mask to ignore unimportant settings and feedbacks for the time measurement + StatusDecodingMask = GetBitMaskForSequence(DecodeEntireStatus ? CyclicMeasSequ.Idle : + CyclicMeasSequ.RegulationMeasurement); + foreach (var fm2014 in RegisteredFm2014s.Where(fm2014 => fm2014.IsLoggedOn)) { try @@ -1460,9 +1467,6 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core return false; } - // Setup status mask to ignore unimportant settings for this measurement 'T' and 'K' - StatusDecodingMask = GetBitMask(CyclicMeasSequ.TimeMeasurement); - // Publish setting to all connected and logged in FM2014s as those will be delivered // for all via broadcast foreach (var fm2014 in RegisteredFm2014s.Where(fm2014 => fm2014.IsLoggedOn)) @@ -1534,6 +1538,10 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core do { + // Setup status mask to ignore unimportant settings for this measurement 'T' and 'K' + StatusDecodingMask = GetBitMaskForSequence(DecodeEntireStatus ? CyclicMeasSequ.Idle : + CyclicMeasSequ.TimeMeasurement); + foreach (var fm2014 in RegisteredFm2014s.Where(fm2014 => fm2014.IsLoggedOn && !fm2014.MeasurementIsReady)) { try diff --git a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014CmdDef.cs b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014CmdDef.cs index 45211623..ca55ca55 100644 --- a/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014CmdDef.cs +++ b/Common/Hardware/WaterMeter/MechanicalMeter/FM2014/FM2014Core/FM2014CmdDef.cs @@ -695,7 +695,7 @@ namespace Sensus.Common.Hardware.WaterMeter.MechanicalMeter.FM2014.FM2014Core /// /// /// - public static UInt32 GetBitMask(CyclicMeasSequ sequence) + public static UInt32 GetBitMaskForSequence(CyclicMeasSequ sequence) { if (sequence == CyclicMeasSequ.TimeMeasurement) return 0xF8074D10; diff --git a/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml b/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml index 39d705df..8e01e08d 100644 --- a/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml +++ b/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml @@ -193,20 +193,21 @@ -