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 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml.cs b/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml.cs
index 803e8104..00618939 100644
--- a/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml.cs
+++ b/FM2014TestApp/Ui/Fm2014sTest/FM2014TestBenchWindow.xaml.cs
@@ -584,6 +584,7 @@ namespace Sensus.Ui.FM2014TestBench
// Dispatch multilingual denotation to GUI elements
btnFM2014Connect.Content = StrBtnConnect;
+ chkDecodeEntireStatus.Content = StrChkDecodeEntireStatus;
// Measurement selection tab setup
tabDutToRefRegulation.Header = StrGbxDutToRefRegulation;
@@ -1735,6 +1736,24 @@ namespace Sensus.Ui.FM2014TestBench
}));
}
+ ///
+ /// Enable/Disable input
+ ///
+ ///
+ ///
+ private void chkDecodeEntireStatus_CheckChanged(Object sender, EventArgs e)
+ {
+ Dispatcher.Invoke(DispatcherPriority.Normal,
+ new Action(() =>
+ {
+ if (FM2014.RegisteredFm2014s == null || FM2014.RegisteredFm2014s.Count <= 0)
+ return;
+
+ if (chkDecodeEntireStatus.IsChecked != null)
+ FM2014.DecodeEntireStatus = (Boolean)chkDecodeEntireStatus.IsChecked;
+ }));
+ }
+
///
/// Enable/Disable input
///
@@ -2497,7 +2516,7 @@ namespace Sensus.Ui.FM2014TestBench
{
// Calculate the new pulse ratio based on the manual calibration
var pulses_per_cm = FM2014.CalculatePulsesPerCm(pulses, liters);
-
+
// Try to set the new calculated REF pulses limited by the property setter
_fm2014Common.RefPulses_per_cm = pulses_per_cm;
diff --git a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.Designer.cs b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.Designer.cs
index db765b2b..65b33b7e 100644
--- a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.Designer.cs
+++ b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.Designer.cs
@@ -123,6 +123,15 @@ namespace Sensus.Ui.Fm2014TestBench.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Decode Entire Status.
+ ///
+ internal static string StrChkDecodeEntireStatus {
+ get {
+ return ResourceManager.GetString("StrChkDecodeEntireStatus", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Damped Tolerance On.
///
diff --git a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.de.resx b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.de.resx
index 5ac1a179..d698f82a 100644
--- a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.de.resx
+++ b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.de.resx
@@ -294,4 +294,7 @@
DUT Impulszeitmessung
+
+ Alle Statusbits Decodieren
+
\ No newline at end of file
diff --git a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.resx b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.resx
index 4294d76e..6c43bb2e 100644
--- a/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.resx
+++ b/FM2014TestApp/Ui/Fm2014sTest/Properties/Resources.resx
@@ -294,4 +294,7 @@
DUT Pulse Time Measurement
+
+ Decode Entire Status
+
\ No newline at end of file