Endurance : Switching test : Progress bar update and statistics added.
This commit is contained in:
@@ -121,6 +121,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
int flowSetTime = StateMachine.Time - flowSetTime0;
|
||||
double currentFlow = RefFlow.Val;
|
||||
|
||||
|
||||
if (test.Part <= 3) /// 0 = measurement
|
||||
/// 1 = measurement through line 1
|
||||
/// 2 = measurement through line 2
|
||||
@@ -398,6 +399,14 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
/// Endurance test : switching mode
|
||||
///
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Endurance_cycle_execution);
|
||||
//------------------------------------------------
|
||||
|
||||
int estimtdEndTime = StateMachine.Time + (int)test.TstTime;
|
||||
ClearAllStatistics();
|
||||
|
||||
///
|
||||
/// Update CyclePar[] array
|
||||
///
|
||||
@@ -420,15 +429,9 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
cyclePar[2 * stepsCount + 1] = 0;
|
||||
cyclePar[2 * stepsCount + 2] = 0;
|
||||
cyclePar[0] = duration / 10;
|
||||
|
||||
uint[] originalCyclePar = cBrd.CyclePar;
|
||||
|
||||
cBrd.CyclePar = cyclePar;
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Endurance_cycle_execution);
|
||||
//------------------------------------------------
|
||||
///
|
||||
cBrd.CyclePar = cyclePar;
|
||||
///
|
||||
State.Create("Endurance : Cycle parameters upload")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -446,11 +449,17 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
e = StateMachine.WaitRunDevsRunOps();
|
||||
if (e.Contains(Event.Error)) { retVal = Event.Error; goto stopTest; }
|
||||
if (TestAndLogUiCmdStop(test, e)) { retVal = Event.UiCmdStop; goto stopTest; }
|
||||
|
||||
RefFreq.Val = cBrd.ReferenceFreq;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
|
||||
UpdateAllStatistics();
|
||||
}
|
||||
while (!e.Contains(Event.CommandCompleted));
|
||||
|
||||
bool stopInProgress = false;
|
||||
|
||||
bool stopInProgress = false;
|
||||
///
|
||||
State.Create("Endurance : Cycle execution")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp((int)test.TstTime, Event.TimerExpired))
|
||||
@@ -473,11 +482,34 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
stopInProgress = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
int remainingTime = Math.Max(estimtdEndTime - StateMachine.Time, 0);
|
||||
if (remainingTime > 60)
|
||||
{
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} {2} {3} {4}", Strings.Test_in_progress, remainingTime / 60, "min", remainingTime % 60, Strings.sec));
|
||||
}
|
||||
else
|
||||
{
|
||||
Bridge.OnActivity(this, string.Format("{0} ... {1} s", Strings.Test_in_progress, remainingTime));
|
||||
}
|
||||
//------------------------------------------------
|
||||
|
||||
RefFreq.Val = cBrd.ReferenceFreq;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
|
||||
UpdateAllStatistics();
|
||||
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next));
|
||||
|
||||
|
||||
State.Create("Endurance : Extra delay to be sure the last endurance cycle completed")
|
||||
//------------------------------------------------
|
||||
Bridge.OnActivity(this, Strings.Last_cycle_wait_please);
|
||||
//------------------------------------------------
|
||||
State.Create("Endurance : Extra delay to be sure the last endurance cycle completed")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(new Operations.TimerOp((int)(duration / 1000) + 1, Event.TimerExpired))
|
||||
.AddOperation(benchPath.TempMtrUp.ReadTempOp(ref TempUp))
|
||||
@@ -497,7 +529,15 @@ namespace TBF.BenchControl.TestMethods.Endurance
|
||||
{
|
||||
stopInProgress = true;
|
||||
}
|
||||
}
|
||||
|
||||
RefFreq.Val = cBrd.ReferenceFreq;
|
||||
RefFlow.Val = cBrd.ReferenceFlow;
|
||||
|
||||
UpdateAllStatistics();
|
||||
|
||||
Bridge.OnProcessData(this, new ProcessDataEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Test));
|
||||
}
|
||||
while (!e.Contains(Event.TimerExpired) && !e.Contains(Event.Next));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user