MainSeq, ITestMethod and all test methods changed, transitions are done in MainSeq (DoTransitions()), no outerLoopCounter, ver. 2.17.757
This commit is contained in:
@@ -18,7 +18,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
const int DetectionBufferSize = 9;
|
||||
const int DetectionKernelSize = 5;
|
||||
|
||||
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
|
||||
public IList<Event> Execute(Config.Entities.Test test, int repetitionNr,
|
||||
SensitivityTestParams testParams,
|
||||
Config.Entities.DebugMode debugLevel)
|
||||
{
|
||||
@@ -41,8 +41,6 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
///
|
||||
/// Test method simulation
|
||||
///
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.JustStarted));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Config.Entities.Progress.FlowSetting));
|
||||
|
||||
if (test.Name.ToLower().Contains("rise") || test.Name.ToLower().Contains("steig"))
|
||||
@@ -121,25 +119,12 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
/// Meters path is required for the following:
|
||||
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
|
||||
|
||||
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
|
||||
|
||||
//====================================
|
||||
// Transition or SetRoute - Start
|
||||
//====================================
|
||||
switch (Transition(transitionBefore, TransitionContext.BeforeTest))
|
||||
{
|
||||
case Event.Error: goto error;
|
||||
case Event.UiCmdStop: goto stopTest;
|
||||
}
|
||||
|
||||
//====================================
|
||||
loop:
|
||||
/// Start the test, initialize test results
|
||||
Bridge.OnTestSelected(this, new TestSelectedEventArgs(test, repetitionNr, inPath, benchPath, outPath, sensPath, (int)totalPulses));
|
||||
string testName = Results.Utils.GetTestName(test.Name, test.Repeats, repetitionNr);
|
||||
TestStartTime = DateTime.Now;
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, 1, 120, 30, 0, Convert.ToInt32(test.TstTime) + 15, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.JustStarted));
|
||||
|
||||
Qrise = 0;
|
||||
|
||||
@@ -528,11 +513,6 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
/// Append the results to the CSV-file
|
||||
allResults.Info(TestResult2CsvLine(testName, test.Part));
|
||||
|
||||
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
|
||||
{
|
||||
goto loop;
|
||||
}
|
||||
|
||||
///----------------------///
|
||||
/// Quit this sequence ///
|
||||
///----------------------///
|
||||
@@ -549,15 +529,6 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet) || ((inPath.Pump is GenericDevices.IPumpFM) && !e.Contains(Event.TurnPumpOnOffDone)));
|
||||
|
||||
/// Transition or SetRoute - End
|
||||
switch (Transition(transitionAfter, TransitionContext.AfterTest))
|
||||
{
|
||||
case Event.Error: goto error;
|
||||
case Event.UiCmdStop: goto stopTest;
|
||||
}
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed));
|
||||
|
||||
/// Create the return value - a list with one event Event.Done - and return
|
||||
IList<Event> retval1 = new List<Event>(1);
|
||||
retval1.Add(Event.Done);
|
||||
@@ -578,8 +549,6 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Aborted));
|
||||
|
||||
IList<Event> retval2 = new List<Event>(1);
|
||||
retval2.Add(Event.UiCmdStop);
|
||||
return retval2;
|
||||
@@ -594,12 +563,10 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
do
|
||||
{
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) goto error;
|
||||
if (e.Contains(Event.Error)) break;
|
||||
}
|
||||
while (!e.Contains(Event.ValvesSet));
|
||||
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, 1, Config.Entities.Progress.Aborted));
|
||||
|
||||
IList<Event> retval3 = new List<Event>(1);
|
||||
retval3.Add(Event.Error);
|
||||
return retval3;
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
readonly TestMethodCfg testMethodCfg;
|
||||
|
||||
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||
public bool DoTransitions() { return true; }
|
||||
|
||||
public TestMethod()
|
||||
{
|
||||
@@ -29,9 +30,9 @@ namespace TBF.BenchControl.TestMethods.SensitivityTest
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
return (new SensitivityTestSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams, DebugLevel);
|
||||
return (new SensitivityTestSeq()).Execute(test, repetNr, testMethodCfg.TestParams, DebugLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user