ProductionUiCordonel: - check production status
This commit is contained in:
+5
-1
@@ -525,7 +525,11 @@ OUTPUT: "StatusReturn" with results "Okay" or "Failed",
|
||||
| Meter Calib Fact 1 | Meter Calib Fact 2 | Meter Calib Fact 3 | DB Calib Fact 1 | DB Calib Fact 2 | DB Calib Fact 3 | Comment |
|
||||
| 10000 | 20000 | 30000 | 10000 | 20000 | 30000 | Valid calib factors |
|
||||
|
||||
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
|
||||
# Name one production process to be checked in advance to the real test. This can be done more than once to fill a list with
|
||||
# all required preceding production processes to check an entire sequence of processes.
|
||||
And Define production process for sequencing before test 'ExecFinalParametrization'
|
||||
|
||||
#--------------------------------- Define Test-Cases -------------------------------------------------------------------------
|
||||
And Input matrix defining the test cases and results
|
||||
# "Kill x" forces the test to fail to check if all tests are executed. REMIND: Set only ONE to "X" and leave all others as "-"! Otherwise the test will FAIL!
|
||||
| TestNo | Kill EOL | Kill Requ | Kill Order | Kill PcbId | Kill Region | Kill LUT | Kill Size | Kill FW | Kill Load | Kill LifeTime | Kill StoreTime | Kill PreAdj | Kill FlowTest | Kill Calib | StatusReturn | Comment |
|
||||
|
||||
+6
-3
@@ -2069,6 +2069,9 @@ this.ScenarioInitialize(scenarioInfo);
|
||||
#line 524
|
||||
testRunner.And("Input initializations for the test matrix and presets to pass the preceding tests" +
|
||||
"", ((string)(null)), table29, "And ");
|
||||
#line hidden
|
||||
#line 530
|
||||
testRunner.And("Define production process for sequencing before test \'ExecFinalParametrization\'", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table30 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"TestNo",
|
||||
@@ -2358,13 +2361,13 @@ this.ScenarioInitialize(scenarioInfo);
|
||||
"X",
|
||||
"Failed",
|
||||
"Detected kill calibrations check"});
|
||||
#line 529
|
||||
#line 533
|
||||
testRunner.And("Input matrix defining the test cases and results", ((string)(null)), table30, "And ");
|
||||
#line hidden
|
||||
#line 547
|
||||
#line 551
|
||||
testRunner.When("Execute the generic tests", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
#line 548
|
||||
#line 552
|
||||
testRunner.Then("Check the generic test results", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
}
|
||||
|
||||
+71
-36
@@ -139,7 +139,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
|
||||
ActualProcessProgress++;
|
||||
|
||||
// Get the real content of the FW package including all binaries of each app and the application description file
|
||||
// Get the real content of the FW package including all binaries of each app and the application
|
||||
// description file
|
||||
FwUpdatePackage = new List<FilePart>();
|
||||
if (!MeterFwUpdate.GetFwPackageFromDb((Int32)parentFileId, FwUpdatePackage, out error) ||
|
||||
FwUpdatePackage == null)
|
||||
@@ -283,7 +284,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
/// - Region,
|
||||
/// - FW,
|
||||
/// - LUT CRC,
|
||||
/// - Meter size
|
||||
/// - Meter size,
|
||||
/// - Kitron radio parameter,
|
||||
/// - Drained battery load versus required remaining battery load in percent,
|
||||
/// - Remaining run time in years,
|
||||
/// - Preadjustment is completed including correct values in registers,
|
||||
@@ -297,12 +299,13 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
/// - Adapted to new production process.
|
||||
/// </remarks>
|
||||
/// <remarks date="2023-Jul-07" author="Thomas Wiedebusch">
|
||||
/// - Removed signals for <see cref="SingleProcessState.Error"/> and <see cref="SingleProcessState.Succeeded"/> as
|
||||
/// these will be automatically set based on return value in
|
||||
/// - Removed signals for <see cref="SingleProcessState.Error"/> and <see cref="SingleProcessState.Succeeded"/>
|
||||
/// as these will be automatically set based on return value in
|
||||
/// <see cref="BaseProductionProcess.FinalizeProcess"/>.
|
||||
/// </remarks>
|
||||
/// <remarks date="2024-Jul-20" author="Thomas Wiedebusch">
|
||||
/// - Take cordonel requirements from DB as base for checks of drained battery load and eventually special requirements.
|
||||
/// - Take cordonel requirements from DB as base for checks of drained battery load and eventually special
|
||||
/// requirements.
|
||||
/// </remarks>
|
||||
/// <remarks date="2024-Sep-03" author="Thomas Wiedebusch">
|
||||
/// - Get EOL progress model from DB,
|
||||
@@ -325,8 +328,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
/// - Changed <see cref="CheckStorageMonths"/> from "StatusReturn" to "EOLStatus".
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Apr-09" author="Thomas Wiedebusch">
|
||||
/// - Collect all requirement statuses before signalizing failed to summarize results starting with battery
|
||||
/// load.
|
||||
/// - Collect all requirement statuses before signalizing failed to summarize results starting with
|
||||
/// battery load.
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Mai-28" author="Thomas Wiedebusch">
|
||||
/// - Check radio signal levels in parameter list.
|
||||
@@ -420,22 +423,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Kitron Radio Signal Levels ------------------------------
|
||||
|
||||
var statusReturn = CheckKitronRadioSignalLevels(out feedbackMsg);
|
||||
if (StatusReturn.Failed == statusReturn)
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
if (StatusReturn.Okay == statusReturn)
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Firmware and Apps ---------------------------------------
|
||||
|
||||
if (string.IsNullOrEmpty(CheckFwAndApps(out feedbackMsg)))
|
||||
@@ -448,9 +435,34 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Remaining Battery Load ----------------------------------
|
||||
#region ----------------------------------- Check Kitron Radio Signal Levels ------------------------------
|
||||
|
||||
var erroneousSequenceStep = false;
|
||||
var warningSequenceStep = false;
|
||||
var statusReturn = CheckKitronRadioSignalLevels(out feedbackMsg);
|
||||
|
||||
if (StatusReturn.Failed == statusReturn)
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
//return StatusReturn.Failed;
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
if (StatusReturn.Skipped == statusReturn)
|
||||
{
|
||||
WarningMsgDispatcher(feedbackMsg);
|
||||
warningSequenceStep = true;
|
||||
}
|
||||
if (StatusReturn.Okay == statusReturn)
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Remaining Battery Load ----------------------------------
|
||||
|
||||
if (EOLStatus.FAIL == CheckRemainingBatteryLoad(out feedbackMsg))
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
@@ -458,7 +470,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -472,7 +487,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -486,14 +504,16 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Preadjusment --------------------------------------------
|
||||
|
||||
var warningSequenceStep = false;
|
||||
eolStatus = CheckPreadjustment(out feedbackMsg);
|
||||
if (EOLStatus.FAIL == eolStatus)
|
||||
{
|
||||
@@ -502,12 +522,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
if (EOLStatus.NA == eolStatus)
|
||||
else if (EOLStatus.NA == eolStatus)
|
||||
{
|
||||
WarningMsgDispatcher(feedbackMsg);
|
||||
warningSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -522,12 +545,15 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
if (EOLStatus.NA == eolStatus)
|
||||
else if (EOLStatus.NA == eolStatus)
|
||||
{
|
||||
WarningMsgDispatcher(feedbackMsg);
|
||||
warningSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -545,20 +571,24 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
warningSequenceStep = true;
|
||||
//return StatusReturn.Skipped;
|
||||
}
|
||||
if (StatusReturn.Failed == statusReturn)
|
||||
else if (StatusReturn.Failed == statusReturn)
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
//return StatusReturn.Failed;
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
if (StatusReturn.Warning == statusReturn)
|
||||
else if (StatusReturn.Warning == statusReturn)
|
||||
{
|
||||
WarningMsgDispatcher(feedbackMsg);
|
||||
//return StatusReturn.Failed;//TODO THW return warning?
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
#endregion -------------------------------- Check Calibration Values --------------------------------------
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Summarize Check Results ---------------------------------------
|
||||
|
||||
@@ -1006,7 +1036,7 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
/// <remarks date="2025-Jan-16" author="Thomas Wiedebusch">
|
||||
/// - Changed from "StatusReturn" to "EOLStatus".
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Jun-18" author="Thomas Wiedebusch">
|
||||
/// <remarks date="2025-Jun-19" author="Thomas Wiedebusch">
|
||||
/// - Modified for generic checks.
|
||||
/// </remarks>
|
||||
private EOLStatus CheckStorageMonths(out String feedbackMsg)
|
||||
@@ -1017,11 +1047,16 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.EolPr
|
||||
ProductionStatus, out feedbackMsg))
|
||||
{
|
||||
if (EolProgress != null)
|
||||
{
|
||||
EolProgress.MaxStorageMonthsChecked = EOLStatus.FAIL;
|
||||
EolProgress.MaxStorageMonths = ProductionRequirements.MaxStorageMonths;
|
||||
}
|
||||
|
||||
return EOLStatus.FAIL;
|
||||
}
|
||||
|
||||
EolProgress.MaxStorageMonthsChecked = EOLStatus.OK;
|
||||
EolProgress.MaxStorageMonths = ProductionRequirements.MaxStorageMonths;
|
||||
return EOLStatus.OK;
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -472,6 +472,9 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
||||
/// <remarks date="2025-Mai-28" author="Thomas Wiedebusch">
|
||||
/// - Import from CheckProductionState for common use.
|
||||
/// </remarks>
|
||||
/// <remarks date="2025-Jun-19" author="Thomas Wiedebusch">
|
||||
/// - Extended radio parameter.
|
||||
/// </remarks>
|
||||
public static StatusReturn CheckKitronRadioSignalLevels(IGenesisMeter meter, RegisterRestorer registerRestorer,
|
||||
Boolean skipRadioCheck, out String feedbackMsg)
|
||||
{
|
||||
@@ -495,8 +498,11 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Gener
|
||||
$"{Resources.StrLblMeterLengthTxt}: {meter.MeterLength} mm" +
|
||||
$"{pressureSensorAssembled}";
|
||||
// On unknown radio signal level parameters from Kitron those are not in the list of the programming parameters
|
||||
if (!registerRestorer.RecoveryRegisters.Any(x => x.RegisterIdent.Equals("SENSUSRADIO_PowerLevel")))
|
||||
{
|
||||
if (!registerRestorer.RecoveryRegisters.Any(x => x.RegisterIdent.Equals("SENSUSRADIO_PowerLevel")) ||
|
||||
!registerRestorer.RecoveryRegisters.Any(x => x.RegisterIdent.Equals("SENSUSRADIO_PowerLevelOption")) ||
|
||||
!registerRestorer.RecoveryRegisters.Any(x => x.RegisterIdent.Equals("SENSUSRADIO_ImpedanceCodeNew")) ||
|
||||
!registerRestorer.RecoveryRegisters.Any(x => x.RegisterIdent.Equals("SENSUSRADIO_ImpedanceCodeOption")) )
|
||||
{
|
||||
feedbackMsg = Resources.StrErrorMsgRadioSignalLevels + " " + meterInfo;
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
|
||||
+45
-22
@@ -148,7 +148,8 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
/// - Region,
|
||||
/// - FW,
|
||||
/// - LUT CRC,
|
||||
/// - Meter size
|
||||
/// - Meter size,
|
||||
/// - Kitron radio parameter,
|
||||
/// - Drained battery load versus required remaining battery load in percent,
|
||||
/// - Remaining run time in years,
|
||||
/// </summary>
|
||||
@@ -236,23 +237,6 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Kitron Radio Signal Levels ------------------------------
|
||||
|
||||
statusReturn = GenericChecks.CheckKitronRadioSignalLevels(Meter, RegisterRestorer,
|
||||
ProductionRequirements.SkipRadioCheck,out feedbackMsg);
|
||||
if (StatusReturn.Failed == statusReturn)
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
return StatusReturn.Failed;
|
||||
}
|
||||
if (StatusReturn.Okay == statusReturn)
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Firmware and Apps ---------------------------------------
|
||||
|
||||
if (string.IsNullOrEmpty(GenericChecks.CheckFwAndApps(Meter, ProductionRequirements, FwUpdatePackage,
|
||||
@@ -266,9 +250,35 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Remaining Battery Load ----------------------------------
|
||||
#region ----------------------------------- Check Kitron Radio Signal Levels ------------------------------
|
||||
|
||||
var erroneousSequenceStep = false;
|
||||
var warningSequenceStep = false;
|
||||
statusReturn = GenericChecks.CheckKitronRadioSignalLevels(Meter, RegisterRestorer, ProductionRequirements.SkipRadioCheck,
|
||||
out feedbackMsg);
|
||||
|
||||
if (StatusReturn.Failed == statusReturn)
|
||||
{
|
||||
ErrorMsgDispatcher(feedbackMsg);
|
||||
//return StatusReturn.Failed;
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
else if (StatusReturn.Skipped == statusReturn)
|
||||
{
|
||||
WarningMsgDispatcher(feedbackMsg);
|
||||
warningSequenceStep = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
|
||||
#region ----------------------------------- Check Remaining Battery Load ----------------------------------
|
||||
|
||||
if (StatusReturn.Failed == GenericChecks.CheckRemainingBatteryLoad(Meter, ProductionRequirements,
|
||||
ProductionStatus, out feedbackMsg, true))
|
||||
{
|
||||
@@ -277,7 +287,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -292,7 +305,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -307,7 +323,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
// Do not return immediately to avoid multiple special-requirements on multiple errors
|
||||
erroneousSequenceStep = true;
|
||||
}
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
else
|
||||
{
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
}
|
||||
|
||||
ActualProcessProgress++;
|
||||
#endregion
|
||||
@@ -318,6 +337,10 @@ namespace Xylem.Common.Production.ProductionUiCordonel.ProductionProcesses.Picki
|
||||
if (erroneousSequenceStep)
|
||||
return StatusReturn.Failed;
|
||||
|
||||
// One or more checks generated a warning
|
||||
if (warningSequenceStep)
|
||||
return StatusReturn.Skipped;
|
||||
|
||||
// Here everything went fine
|
||||
SuccessMsgDispatcher(feedbackMsg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user