diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs index 7bffd32bb..1a89cb035 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/LeakTestSeq.cs @@ -37,15 +37,19 @@ namespace TBF.BenchControl.TestMethods.LeakTest processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this); + TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 }); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.JustStarted)); - // Transition or SetRoute - Start + // Transition or SetRoute - Start switch (Transition(transitionBefore, TransitionContext.BeforeTest)) { case Event.Error: { retVal = Event.Error; goto stopTest; } case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } } - /// Start the test, initialize test results + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionBefore)); + + /// Start the test, initialize test results Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, 1, inPath, benchPath, outPath, sensPath, 0)); string testName = Results.Utils.GetTestName(test.Name, test.Repeats, 1); @@ -71,7 +75,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); - //------------------------------------------------ + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.FlowSetting)); + //------------------------------------------------ float pumpPower = test.PumpPower; int startTime = StateMachine.Time; @@ -131,7 +136,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Test_in_progress); - //------------------------------------------------ + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); + //------------------------------------------------ State.Create("LeakTest : Maximum water pressure set") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) @@ -383,7 +389,9 @@ namespace TBF.BenchControl.TestMethods.LeakTest stopTest: - /// + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + + /// /// Quit this sequence /// State.Create("LeakTest : Stopping diverter, gate, etc.") @@ -405,7 +413,9 @@ namespace TBF.BenchControl.TestMethods.LeakTest case Event.UiCmdStop: { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; } } - /// Create a list with one item 'retVal' (default is Event.Done) and return it + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Completed)); + + /// Create a list with one item 'retVal' (default is Event.Done) and return it IList retList = new List(1); retList.Add(retVal); return retList; diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs index e153b97b4..86582be39 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/PMaxTestSeq.cs @@ -37,6 +37,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this); + TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 1, 30, Convert.ToInt32(test.TstTime) + 15, 0, 0 }); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.JustStarted)); // Transition or SetRoute - Start switch (Transition(transitionBefore, TransitionContext.BeforeTest)) @@ -45,6 +47,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } } + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionBefore)); + /// Start the test, initialize test results Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, 1, inPath, benchPath, outPath, sensPath, 0)); string testName = Results.Utils.GetTestName(test.Name, test.Repeats, 1); @@ -72,7 +76,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Setting_the_water_pressure); - //------------------------------------------------ + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.FlowSetting)); + //------------------------------------------------ float pumpPower = test.PumpPower; int startTime = StateMachine.Time; @@ -132,8 +137,9 @@ namespace TBF.BenchControl.TestMethods.PMaxTest //------------------------------------------------ Bridge.OnActivity(this, Strings.Test_in_progress); + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Test)); //------------------------------------------------ - State.Create("PMaxTest : Starting the test") + State.Create("PMaxTest : Starting the test") .AddOperation(checkUiOp) .AddOperation(benchPath.TempIn.ReadTempOp(ref TempIn)) .AddOperation(benchPath.TempOut.ReadTempOp(ref TempOut)) @@ -297,7 +303,9 @@ namespace TBF.BenchControl.TestMethods.PMaxTest stopTest: - /// + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.TransitionAfter)); + + /// /// Quit this sequence /// State.Create("PMaxTest : Stopping diverter, gate, etc.") @@ -311,7 +319,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest } while (!e.Contains(Event.PreviousStopped)); - /// Transition sequence at the end of test + /// Transition sequence at the end of test /// Prevent overwriting 'retVal' in case it was set to non-default value earlier switch (Transition(transitionAfter, (retVal == Event.Done) ? TransitionContext.AfterTest : TransitionContext.Stop)) { @@ -319,6 +327,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest case Event.UiCmdStop: { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; } } + Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Completed)); + /// Create a list with one item 'retVal' (default is Event.Done) and return it IList retList = new List(1); retList.Add(retVal);