diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs index 81dec7e6a..b92bd064e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/AdjustmentSeq.cs @@ -53,7 +53,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Test test, int repetitionNr, DebugMode mode) + public IList Execute(Test test, int repetitionNr, bool isLastRepetition, DebugMode mode) { float simulatedError = 4.5f; /// % @@ -442,12 +442,12 @@ namespace TBF.BenchControl.TestMethods.Adjustment stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create("Adjustment : Stopping diverter, gate, etc.") .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs index bc50749de..831571ec1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs @@ -29,7 +29,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new AdjustmentSeq()).Execute(test, repetNr, DebugLevel); + return (new AdjustmentSeq()).Execute(test, repetNr, isLastRepetition, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs index a9a5b9e5a..ad5bd3a5a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/CombinedWithDetectionSeq.cs @@ -41,7 +41,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection /// /// Test method simulation /// - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); if (test.Name.ToLower().Contains("rise") || test.Name.ToLower().Contains("steig")) { @@ -52,7 +52,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.9f); } - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0))); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/Component.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/Component.cs index b93be3bf4..44df74270 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/Component.cs @@ -34,7 +34,7 @@ namespace TBF.BenchControl.TestMethods.Endurance public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new EnduranceSeq()).Execute(test, repetNr, testMethodCfg.Cycle, DebugLevel); + return (new EnduranceSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.Cycle, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs index 457ffb9dc..a6b1cb24e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Endurance/EnduranceSeq.cs @@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.Endurance /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, string enduranceCycleStr, Config.Entities.DebugMode debugLevel) { @@ -620,12 +620,12 @@ namespace TBF.BenchControl.TestMethods.Endurance stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs index e16e3e6c0..1254ebb18 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/FixedStartAdvancedSeq.cs @@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr) + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -587,12 +587,12 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create("FixedStartAdvanced : Stopping diverter, gate, etc.") .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/Single/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/Single/Component.cs index d325880ae..ca908d37a 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/Single/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/Single/Component.cs @@ -29,7 +29,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced.Single public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartAdvancedSeq()).Execute(test, repetNr); + return (new FixedStartAdvancedSeq()).Execute(test, repetNr, isLastRepetition); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Compound/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Compound/Component.cs index 95e2c33d5..6f59ee669 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Compound/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Compound/Component.cs @@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation.Compound public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, true, null, DebugLevel, out intermediateData); + return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, isLastRepetition, true, null, DebugLevel, out intermediateData); } public IList Execute2ndPass(Test test, int repetNr, object data) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs index 5a2e0b8bb..a5eb649bb 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/FixedStartDeferredEvaluationSeq.cs @@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, bool compound, HeatMeters.TestParams heatMetersTestParams, Config.Entities.DebugMode debugLevel, @@ -489,7 +489,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation { e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); if (e.Contains(Event.Error)) { retVal = Event.Error; break; } if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } @@ -835,7 +835,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation { e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); if (e.Contains(Event.Error)) { retVal = Event.Error; break; } if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } @@ -944,12 +944,12 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/HeatMeters/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/HeatMeters/Component.cs index d587f820c..8e9ae8bf4 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/HeatMeters/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/HeatMeters/Component.cs @@ -38,7 +38,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation.HeatMeters public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, false, testMethodCfg.TestParams, DebugLevel, out intermediateData); + return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, isLastRepetition, false, testMethodCfg.TestParams, DebugLevel, out intermediateData); } public IList Execute2ndPass(Test test, int repetNr, object data) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Single/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Single/Component.cs index 3a8c0a02c..2611e139f 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Single/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartDeferredEvaluation/Single/Component.cs @@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartDeferredEvaluation.Single public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, false, null, DebugLevel, out intermediateData); + return (new FixedStartDeferredEvaluationSeq()).Execute(test, repetNr, isLastRepetition, false, null, DebugLevel, out intermediateData); } public IList Execute2ndPass(Test test, int repetNr, object data) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Compound/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Compound/Component.cs index 297e3d365..6ead67ea3 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Compound/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Compound/Component.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.Compound public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, true, null, DebugLevel); + return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, isLastRepetition, true, null, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs index 81b3a228f..5a6446081 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/FixedStartMassCollectionSeq.cs @@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, bool compound, HeatMeters.TestParams heatMetersTestParams, Config.Entities.DebugMode debugLevel) @@ -472,7 +472,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); if (e.Contains(Event.Error)) { retVal = Event.Error; break; } if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } @@ -830,7 +830,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { e = StateMachine.WaitRunDevsRunOps(); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); if (e.Contains(Event.Error)) { retVal = Event.Error; break; } if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } @@ -1148,12 +1148,12 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/HeatMeters/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/HeatMeters/Component.cs index 0fc43f7b3..26d37bdc8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/HeatMeters/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/HeatMeters/Component.cs @@ -34,7 +34,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.HeatMeters public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, false, testMethodCfg.TestParams, DebugLevel); + return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, isLastRepetition, false, testMethodCfg.TestParams, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Single/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Single/Component.cs index e78def546..f6703beea 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Single/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/Single/Component.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.Single public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, false, null, DebugLevel); + return (new FixedStartMassCollectionSeq()).Execute(test, repetNr, isLastRepetition, false, null, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Compound/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Compound/Component.cs index b41ad49e2..443e9afd8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Compound/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Compound/Component.cs @@ -34,7 +34,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Compound public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FlyingStartSeq()).Execute(test, repetNr, testMethodCfg.TestParams, null, DebugLevel); + return (new FlyingStartSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.TestParams, null, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs index 5a9aa0eaa..09545df17 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, Compound.TestParams compoundTestParams, HeatMeters.TestParams heatMetersTestParams, Config.Entities.DebugMode debugLevel) @@ -40,7 +40,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart /// /// Test method simulation /// - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); if (compoundTestParams != null) { @@ -56,7 +56,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart else if (test.Name.ToLower().Contains("q1")) MakeSimulated(test.Name, 1, 1, 0, -5.1f); else MakeSimulated(test.Name, 1, 1, 0, 0.9f); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0))); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file @@ -732,12 +732,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStart stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/HeatMeters/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/HeatMeters/Component.cs index f41dd1042..caa955d87 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/HeatMeters/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/HeatMeters/Component.cs @@ -34,7 +34,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.HeatMeters public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FlyingStartSeq()).Execute(test, repetNr, null, testMethodCfg.TestParams, DebugLevel); + return (new FlyingStartSeq()).Execute(test, repetNr, isLastRepetition, null, testMethodCfg.TestParams, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Single/Component.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Single/Component.cs index 6c8379261..83dbc9bd2 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Single/Component.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/Single/Component.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Single public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new FlyingStartSeq()).Execute(test, repetNr, null, null, DebugLevel); + return (new FlyingStartSeq()).Execute(test, repetNr, isLastRepetition, null, null, DebugLevel); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 3fa9f5372..87b5bcbb7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -47,7 +47,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection /// /// Test method simulation /// - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); if (compoundTestParams != null) { @@ -68,7 +68,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection MakeSimulated(test.Name, test.Repeats, repetitionNr, 0, errorPctBase + repetitionNr * 0.1f); } - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0))); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file @@ -1071,11 +1071,12 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 16cf05098..b1a6e4cd9 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -27,7 +27,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, LeakTestParams testParams) + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, LeakTestParams testParams) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -67,7 +67,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); //------------------------------------------------ float pumpPower = test.PumpPower; @@ -129,7 +129,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Test_in_progress); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); //------------------------------------------------ State.Create(string.Format("{0}({1}) : Maximum water pressure set", test.Method, test.Name)) .AddOperation(checkUiOp) @@ -356,7 +356,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, tstRslt)); } - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); @@ -364,13 +364,14 @@ namespace TBF.BenchControl.TestMethods.LeakTest stopTest: - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter)); - /// - /// Quit this sequence /// - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs index 7dba0e19b..846317daf 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs @@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new LeakTestSeq()).Execute(test, repetNr, testMethodCfg.TestParams); + return (new LeakTestSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.TestParams); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index 742a8a505..9c06d3330 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -27,7 +27,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr, PMaxTestParams testParams) + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition, PMaxTestParams testParams) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -68,7 +68,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); //------------------------------------------------ float pumpPower = test.PumpPower; @@ -130,7 +130,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Test_in_progress); - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test)); //------------------------------------------------ State.Create(string.Format("{0}({1}) : Starting the test", test.Method, test.Name)) .AddOperation(checkUiOp) @@ -267,7 +267,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest Bridge.OnTestCompleted(this, new TestCompletedEventArgs(testName, tstRslt)); } - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter)); /// Append the results to the CSV-file allResults.Info(TestResult2CsvLine(testName, test.Part)); @@ -275,13 +275,14 @@ namespace TBF.BenchControl.TestMethods.PMaxTest stopTest: - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.TransitionAfter)); - /// - /// Quit this sequence /// - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs index f2cd80846..9211135a8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs @@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new PMaxTestSeq()).Execute(test, repetNr, testMethodCfg.TestParams); + return (new PMaxTestSeq()).Execute(test, repetNr, isLastRepetition, testMethodCfg.TestParams); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs index 785b1eb09..06564fe58 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/ReferenceFlowmeterCalibrationSeq.cs @@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration /// Event.OpArgumentError . Target flow is out of range /// Event.Error . . . . . . Unspecified error /// - public IList Execute(Config.Entities.Test test, int repetitionNr) + public IList Execute(Config.Entities.Test test, int repetitionNr, bool isLastRepetition) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -378,11 +378,12 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration stopTest: - ///----------------------/// - /// Quit this sequence /// - ///----------------------/// - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create("ReferenceFlowmeterCalibration : Stopping diverter, gate, etc.") .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs index 13a53eaba..6bfd95cb7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs @@ -29,7 +29,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration public IList Execute(Test test, int repetNr, bool isLastRepetition) { - return (new ReferenceFlowmeterCalibrationSeq()).Execute(test, repetNr); + return (new ReferenceFlowmeterCalibrationSeq()).Execute(test, repetNr, isLastRepetition); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetection.cs b/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetection.cs index b3319e857..b099c56f0 100644 --- a/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetection.cs +++ b/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetection.cs @@ -41,7 +41,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection } } - return (new RoiDetectionSeq()).Execute(test, display, repetNr); + return (new RoiDetectionSeq()).Execute(test, display, repetNr, isLastRepetition); } } } diff --git a/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs b/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs index f61236593..7b583bd07 100644 --- a/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/RoiDetection/RoiDetectionSeq.cs @@ -17,7 +17,7 @@ namespace TBF.BenchControl.TestMethods.RoiDetection private static readonly ILog log = LogManager.GetLogger(typeof(RoiDetectionSeq)); - public IList Execute(Test test, GenericDevices.ICameraDisplay display, int repetitionNr) + public IList Execute(Test test, GenericDevices.ICameraDisplay display, int repetitionNr, bool isLastRepetition) { Elde.ControlBoardDev cBrd = StateMachine.ControlBoard; @@ -251,8 +251,12 @@ namespace TBF.BenchControl.TestMethods.RoiDetection stopTest: - if (retVal == Event.UiCmdStop || retVal == Event.Error || retVal == Event.OpArgumentError || retVal == Event.ConfigurationError) - { + /// + /// Quit this sequence + /// + if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError + || retVal == Event.Error || retVal == Event.ConfigurationError) + { State.Create(string.Format("{0}({1}) : Stopping diverter, gate, etc.", test.Method, test.Name)) .AddOperation(checkUiOp) .AddOperation(cBrd.StopPreviousOp()) diff --git a/TestBenchFramework/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs index 1431f5e8f..2619c5d55 100644 --- a/TestBenchFramework/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/SensitivityTest/SensitivityTestSeq.cs @@ -41,7 +41,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest /// /// Test method simulation /// - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.FlowSetting)); if (test.Name.ToLower().Contains("rise") || test.Name.ToLower().Contains("steig")) { @@ -52,7 +52,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest MakeSimulatedCompound(test.Name, 1, 1, 0, 0.7f, 0.9f); } - Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.Completed)); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed)); Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, BatchRslts.GetTestRslt(Results.Utils.GetTestName(test.Name, 1, 1), 0))); allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file