From 78f9b10255f1a16743c41c2ee1da061d2ed8668e Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 23 Mar 2021 09:47:07 +0100 Subject: [PATCH] cBrd.StopPreviousOp( ) ---> cBrd.Stop( ) in FlyingStart.... test sequences, etc., ver. 3.1.1604 --- TBF/Properties/AssemblyInfo.cs | 4 ++-- .../TestMethods/Adjustment/AdjustmentSeq.cs | 18 +++++--------- .../DiverterTest/DiverterTestSeq.cs | 17 ++++--------- .../TestMethods/FlyingStart/FlyingStartSeq.cs | 8 ++++--- .../FlyingStartFirstRepetWithMassCollSeq.cs | 18 +++++--------- .../FlyingStartMassCollComparativeSeq.cs | 19 +++++---------- .../FlyingStartMassCollProlongedSeq.cs | 19 +++++---------- .../FlyingStartMassCollectionSeq.cs | 8 ++++--- .../FlyingStartTankCollectionSeq.cs | 19 +++++---------- .../TestMethods/PulsesTest/PulsesTestSeq.cs | 24 +++++++------------ 10 files changed, 56 insertions(+), 98 deletions(-) diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index 9ace58492..37a3cfaae 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("3.1.1603.0")] -[assembly: AssemblyFileVersion("3.1.1603.0")] +[assembly: AssemblyVersion("3.1.1604.0")] +[assembly: AssemblyFileVersion("3.1.1604.0")] diff --git a/TBF/Rig/TestMethods/Adjustment/AdjustmentSeq.cs b/TBF/Rig/TestMethods/Adjustment/AdjustmentSeq.cs index c50c517a9..0bd59e53a 100644 --- a/TBF/Rig/TestMethods/Adjustment/AdjustmentSeq.cs +++ b/TBF/Rig/TestMethods/Adjustment/AdjustmentSeq.cs @@ -539,18 +539,12 @@ namespace TBF.Rig.TestMethods.Adjustment /// /// 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()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } return new List { retVal }; diff --git a/TBF/Rig/TestMethods/DiverterTest/DiverterTestSeq.cs b/TBF/Rig/TestMethods/DiverterTest/DiverterTestSeq.cs index 1bf593548..e1cd920c4 100644 --- a/TBF/Rig/TestMethods/DiverterTest/DiverterTestSeq.cs +++ b/TBF/Rig/TestMethods/DiverterTest/DiverterTestSeq.cs @@ -919,19 +919,12 @@ namespace TBF.Rig.TestMethods.DiverterTest /// /// Quit this sequence /// - if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError - || retVal == Event.Error || retVal == Event.ConfigurationError) + 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()) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) break; - } - while (!e.Contains(Event.PreviousStopped)); + cBrd.Stop(false); } stopTestWOStoppingDivGateEtc: diff --git a/TBF/Rig/TestMethods/FlyingStart/FlyingStartSeq.cs b/TBF/Rig/TestMethods/FlyingStart/FlyingStartSeq.cs index 73c6507ca..9b45a0726 100644 --- a/TBF/Rig/TestMethods/FlyingStart/FlyingStartSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStart/FlyingStartSeq.cs @@ -732,9 +732,11 @@ namespace TBF.Rig.TestMethods.FlyingStart /// /// Quit this sequence /// - if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError - || retVal == Event.Error || retVal == Event.ConfigurationError) - { + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { cBrd.Stop(false); } diff --git a/TBF/Rig/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs b/TBF/Rig/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs index 5cad61ef6..2ba76dc4c 100644 --- a/TBF/Rig/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartFirstRepetWithMassColl/FlyingStartFirstRepetWithMassCollSeq.cs @@ -1086,18 +1086,12 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl /// /// 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()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) { if (retVal == Event.Done) retVal = Event.UiCmdStop; break; } - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } return new List { retVal }; diff --git a/TBF/Rig/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs b/TBF/Rig/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs index 7b57d7b43..c918bd646 100644 --- a/TBF/Rig/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartMassCollComparative/FlyingStartMassCollComparativeSeq.cs @@ -1193,19 +1193,12 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative /// /// 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()) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) break; - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } return new List { retVal }; diff --git a/TBF/Rig/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs b/TBF/Rig/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs index 6f0ee225e..dfecdbf53 100644 --- a/TBF/Rig/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartMassCollProlonged/FlyingStartMassCollProlongedSeq.cs @@ -1011,19 +1011,12 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged /// /// 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()) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) break; - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } stopTestWOStoppingDivGateEtc: diff --git a/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs b/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs index 6b23bf869..263ae3509 100644 --- a/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartMassCollection/FlyingStartMassCollectionSeq.cs @@ -1064,9 +1064,11 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection /// /// Quit this sequence /// - if (isLastRepetition || retVal == Event.UiCmdStop || retVal == Event.OpArgumentError - || retVal == Event.Error || retVal == Event.ConfigurationError) - { + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { cBrd.Stop(false); } diff --git a/TBF/Rig/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs b/TBF/Rig/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs index 3da78597e..464532d29 100644 --- a/TBF/Rig/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs +++ b/TBF/Rig/TestMethods/FlyingStartTankCollection/FlyingStartTankCollectionSeq.cs @@ -756,19 +756,12 @@ namespace TBF.Rig.TestMethods.FlyingStartTankCollection /// /// 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()) - .EnterState(); - do - { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) break; - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } return new List { retVal }; diff --git a/TBF/Rig/TestMethods/PulsesTest/PulsesTestSeq.cs b/TBF/Rig/TestMethods/PulsesTest/PulsesTestSeq.cs index 87906c186..8b692f0f1 100644 --- a/TBF/Rig/TestMethods/PulsesTest/PulsesTestSeq.cs +++ b/TBF/Rig/TestMethods/PulsesTest/PulsesTestSeq.cs @@ -79,10 +79,10 @@ namespace TBF.Rig.TestMethods.PulsesTest } } - IList e; /// Events from currently running operations + IList e; /// Events from currently running operations Event retVal = Event.Done; - TBF.Rig.ControlBoard.IControlBoard cBrd = StateMachine.ControlBoard; - checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state + TBF.Rig.ControlBoard.Uni.UniCB cBrd = StateMachine.ControlBoard as TBF.Rig.ControlBoard.Uni.UniCB; + checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state processDataLoggingOp = new TBF.Rig.Operations.ProcessDataLoggingOp(processDataLogger, this, false); if (cBrd is ControlBoard.Uni.UniCB) @@ -508,18 +508,12 @@ namespace TBF.Rig.TestMethods.PulsesTest /// /// 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()) - .EnterState(); - do { - e = StateMachine.WaitRunDevsRunOps(); - if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; break; } - } - while (!e.Contains(Event.PreviousStopped)); + if (isLastRepetition || retVal == Event.UiCmdStop + || retVal == Event.OpArgumentError + || retVal == Event.Error + || retVal == Event.ConfigurationError) + { + cBrd.Stop(false); } return new List { retVal };