Transition between two repetitions added.
This commit is contained in:
parent
98fc15a709
commit
7d1d95305f
@ -700,7 +700,7 @@ namespace TBF.BenchControl.Sequences
|
||||
!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out transitionBefore, out transitionBetween, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
@ -727,7 +727,7 @@ namespace TBF.BenchControl.Sequences
|
||||
!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out transitionBefore, out transitionBetween, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
@ -764,9 +764,11 @@ namespace TBF.BenchControl.Sequences
|
||||
/// e = testMethod.Execute(test, outerLoopMode, (outerLoopMode ? outerLoopCounter: repetNr));
|
||||
///
|
||||
Event rsltTransBefore = Event.Done;
|
||||
Event rsltTransBetween = Event.Done;
|
||||
Event rsltTransAfter = Event.Done;
|
||||
{
|
||||
int timeEstTransBefore = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBefore) : 1;
|
||||
int timeEstTransBetween = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBetween) : 1;
|
||||
int timeEstTransAfter = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionAfter) : 1;
|
||||
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, timeEstTransBefore, 1, 30, 0, Convert.ToInt32(test.TstTime) + 15, timeEstTransAfter, 0 });
|
||||
@ -781,6 +783,7 @@ namespace TBF.BenchControl.Sequences
|
||||
bool currentTestFinished = true;
|
||||
if (rsltTransBefore == Event.Done)
|
||||
{
|
||||
bool doOneMoreRepetition = false;
|
||||
do
|
||||
{
|
||||
log.InfoFormat("Test {0}: Execute(., {1}, {2})", test.Name, repetNr, isOuterLoopMode || repetNr == test.Repeats);
|
||||
@ -801,8 +804,16 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
if (e.Contains(Event.OuterLoopStart)) break; /// Do not repeat OuterLoopStart test in this loop
|
||||
if (currentTestFinished && !isOuterLoopMode) repetNr++;
|
||||
|
||||
doOneMoreRepetition = currentTestFinished && !isOuterLoopMode && (repetNr <= test.Repeats);
|
||||
|
||||
if (testMethod.DoTransitions() && doOneMoreRepetition)
|
||||
{
|
||||
rsltTransBetween = Transition(transitionBetween, TransitionContext.BeforeTest); /// Transition or SetRoute - start of test
|
||||
log.InfoFormat("Test {0}: Transition({1}, BetweenTests) returned {2}", test.Name, (transitionBetween == null ? "null" : transitionBetween.Name), rsltTransBetween);
|
||||
}
|
||||
}
|
||||
while (currentTestFinished && !isOuterLoopMode && repetNr <= test.Repeats);
|
||||
while ((rsltTransBetween == Event.Done) && doOneMoreRepetition);
|
||||
|
||||
if (currentTestFinished && !isOuterLoopMode && repetNr > test.Repeats) repetNr = 1; /// Reset repetNr
|
||||
}
|
||||
@ -815,7 +826,7 @@ namespace TBF.BenchControl.Sequences
|
||||
}
|
||||
}
|
||||
|
||||
if (rsltTransBefore == Event.Error || e.Contains(Event.Error))
|
||||
if (rsltTransBefore == Event.Error || rsltTransBetween == Event.Error|| e.Contains(Event.Error))
|
||||
{
|
||||
isOuterLoopMode = false;
|
||||
goto error;
|
||||
@ -882,8 +893,8 @@ namespace TBF.BenchControl.Sequences
|
||||
StateMachine.GetPaths(dfrrdData.Test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg);
|
||||
out transitionBefore, out transitionBetween, out transitionAfter,
|
||||
out errorMsg);
|
||||
|
||||
ITestMethodWith2ndPass testMethod = TbfComponents.FindComponent(dfrrdData.Test.Method) as ITestMethodWith2ndPass;
|
||||
|
||||
@ -929,7 +940,7 @@ namespace TBF.BenchControl.Sequences
|
||||
!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out transitionBefore, out transitionBetween, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
@ -959,6 +970,7 @@ namespace TBF.BenchControl.Sequences
|
||||
Event rsltTransAfter = Event.Done;
|
||||
{
|
||||
int timeEstTransBefore = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBefore) : 1;
|
||||
int timeEstTransBetween = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionBetween) : 1;
|
||||
int timeEstTransAfter = testMethod.DoTransitions() ? GetTransitionTimeEst(transitionAfter) : 1;
|
||||
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 1, timeEstTransBefore, 1, 30, 0, Convert.ToInt32(test.TstTime) + 15, timeEstTransAfter, 0 });
|
||||
|
||||
@ -58,6 +58,7 @@ namespace TBF.BenchControl.Sequences
|
||||
protected static BenchControl.HeatMetersPath heatMetersPath;
|
||||
|
||||
protected static TransitionSequence transitionBefore;
|
||||
protected static TransitionSequence transitionBetween;
|
||||
protected static TransitionSequence transitionAfter;
|
||||
|
||||
|
||||
|
||||
@ -602,6 +602,7 @@ namespace TBF.BenchControl
|
||||
out MetersPath pmtrs,
|
||||
out HeatMetersPath phmtrs,
|
||||
out TransitionSequence transitionBefore,
|
||||
out TransitionSequence transitionBetween,
|
||||
out TransitionSequence transitionAfter,
|
||||
out string errorMsg)
|
||||
{
|
||||
@ -610,7 +611,8 @@ namespace TBF.BenchControl
|
||||
pout = null;
|
||||
phmtrs = null;
|
||||
transitionBefore = null;
|
||||
transitionAfter = null;
|
||||
transitionBetween = null;
|
||||
transitionAfter = null;
|
||||
|
||||
foreach (var path in feedingPaths)
|
||||
{
|
||||
@ -654,7 +656,8 @@ namespace TBF.BenchControl
|
||||
foreach (var tr in TransitionSequences)
|
||||
{
|
||||
if (tr.Name == test.RelTransBefore) transitionBefore = tr;
|
||||
if (tr.Name == test.TransitionAfter) transitionAfter = tr;
|
||||
if (tr.Name == test.RelTransBetween) transitionBetween = tr;
|
||||
if (tr.Name == test.TransitionAfter) transitionAfter = tr;
|
||||
}
|
||||
|
||||
if (pout.Scale == null)
|
||||
|
||||
@ -1149,6 +1149,7 @@ namespace TBF
|
||||
HeatMeterSensors,
|
||||
#endif
|
||||
TrnStart,
|
||||
TrnBetween,
|
||||
TrnStop,
|
||||
ColumnsCount
|
||||
}
|
||||
@ -1168,7 +1169,8 @@ namespace TBF
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.Heat_meter_sensors, Width = 110 });
|
||||
#endif
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionStart_chdr, Width = 100 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionBetween_chdr, Width = 100 });
|
||||
lv.Columns.Add(new ColumnHeader { Text = Strings.TransitionEnd_chdr, Width = 100 });
|
||||
|
||||
processEditors = new Control[]
|
||||
{
|
||||
@ -1181,8 +1183,9 @@ namespace TBF
|
||||
#if HEAT_METERS
|
||||
new ComboBox(), /// Heat meters
|
||||
#endif
|
||||
new ComboBox(), /// TransitionStart
|
||||
new ComboBox(), /// TransitionEnd
|
||||
new ComboBox(), /// Transition-Start
|
||||
new ComboBox(), /// Transition-Between
|
||||
new ComboBox(), /// Transition-End
|
||||
};
|
||||
|
||||
foreach (var path in feedingPaths) ((ComboBox)processEditors[(int)ProcessClmn.Feeding]).Items.Add(path.Name);
|
||||
@ -1194,11 +1197,13 @@ namespace TBF
|
||||
#endif
|
||||
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnStart]).Items.Add("---");
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnBetween]).Items.Add("---");
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add("---");
|
||||
foreach (var trans in transitionSequences)
|
||||
{
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnStart]).Items.Add(trans.Name);
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add(trans.Name);
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnBetween]).Items.Add(trans.Name);
|
||||
((ComboBox)processEditors[(int)ProcessClmn.TrnStop]).Items.Add(trans.Name);
|
||||
}
|
||||
|
||||
foreach (var ctrl in processEditors)
|
||||
@ -1234,6 +1239,7 @@ namespace TBF
|
||||
lvi.SubItems.Add(test.HeatMetersPath);
|
||||
#endif
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBefore) ? "---" : test.RelTransBefore);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.RelTransBetween) ? "---" : test.RelTransBetween);
|
||||
lvi.SubItems.Add(string.IsNullOrEmpty(test.TransitionAfter) ? "---" : test.TransitionAfter);
|
||||
|
||||
processListViewEx.Items.Add(lvi);
|
||||
@ -1285,7 +1291,11 @@ namespace TBF
|
||||
{
|
||||
entity.RelTransBefore = lvi.SubItems[(int)ProcessClmn.TrnStart].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnStart].Text;
|
||||
}
|
||||
if ((processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnStop].Text))
|
||||
if ((processEditors[(int)ProcessClmn.TrnBetween] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnBetween].Text))
|
||||
{
|
||||
entity.RelTransBetween = lvi.SubItems[(int)ProcessClmn.TrnBetween].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnBetween].Text;
|
||||
}
|
||||
if ((processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(lvi.SubItems[(int)ProcessClmn.TrnStop].Text))
|
||||
{
|
||||
entity.TransitionAfter = lvi.SubItems[(int)ProcessClmn.TrnStop].Text.Equals("---") ? string.Empty : lvi.SubItems[(int)ProcessClmn.TrnStop].Text;
|
||||
}
|
||||
@ -1360,6 +1370,7 @@ namespace TBF
|
||||
((e.SubItem == (int)ProcessClmn.Output) && !(processEditors[(int)ProcessClmn.Output] as ComboBox).Items.Contains(e.DisplayText)) ||
|
||||
((e.SubItem == (int)ProcessClmn.Sensor) && !(processEditors[(int)ProcessClmn.Sensor] as ComboBox).Items.Contains(e.DisplayText)) ||
|
||||
((e.SubItem == (int)ProcessClmn.TrnStart) && !(processEditors[(int)ProcessClmn.TrnStart] as ComboBox).Items.Contains(e.DisplayText)) ||
|
||||
((e.SubItem == (int)ProcessClmn.TrnBetween) && !(processEditors[(int)ProcessClmn.TrnBetween] as ComboBox).Items.Contains(e.DisplayText)) ||
|
||||
((e.SubItem == (int)ProcessClmn.TrnStop) && !(processEditors[(int)ProcessClmn.TrnStop] as ComboBox).Items.Contains(e.DisplayText)))
|
||||
{
|
||||
e.DisplayText = e.Item.SubItems[e.SubItem].Text;
|
||||
|
||||
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("2.18.1062.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1062.0")]
|
||||
[assembly: AssemblyVersion("2.18.1063.0")]
|
||||
[assembly: AssemblyFileVersion("2.18.1063.0")]
|
||||
|
||||
13
TBF/Resources/Strings.Designer.cs
generated
13
TBF/Resources/Strings.Designer.cs
generated
@ -4924,7 +4924,16 @@ namespace TBF.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Transition - End.
|
||||
/// Looks up a localized string similar to Between rep. - transition.
|
||||
/// </summary>
|
||||
internal static string TransitionBetween_chdr {
|
||||
get {
|
||||
return ResourceManager.GetString("TransitionBetween_chdr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End - transiiton.
|
||||
/// </summary>
|
||||
internal static string TransitionEnd_chdr {
|
||||
get {
|
||||
@ -4942,7 +4951,7 @@ namespace TBF.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Transition - Start.
|
||||
/// Looks up a localized string similar to Start - transition.
|
||||
/// </summary>
|
||||
internal static string TransitionStart_chdr {
|
||||
get {
|
||||
|
||||
@ -1009,13 +1009,13 @@
|
||||
<value>Tol. červený. [%]</value>
|
||||
</data>
|
||||
<data name="TransitionEnd_chdr" xml:space="preserve">
|
||||
<value>Přechod - Konec</value>
|
||||
<value>Konec - přechod</value>
|
||||
</data>
|
||||
<data name="Transitions" xml:space="preserve">
|
||||
<value>Přechody</value>
|
||||
</data>
|
||||
<data name="TransitionStart_chdr" xml:space="preserve">
|
||||
<value>Přechod - Start</value>
|
||||
<value>Start - přechod</value>
|
||||
</data>
|
||||
<data name="Type" xml:space="preserve">
|
||||
<value>Typ</value>
|
||||
@ -1341,4 +1341,7 @@
|
||||
<data name="Manual_level_measurement" xml:space="preserve">
|
||||
<value>Ručné zadávání výšky hladiny</value>
|
||||
</data>
|
||||
<data name="TransitionBetween_chdr" xml:space="preserve">
|
||||
<value>Mezi opak. - přechod</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -758,10 +758,10 @@
|
||||
<value>Emergency STOP</value>
|
||||
</data>
|
||||
<data name="TransitionEnd_chdr" xml:space="preserve">
|
||||
<value>Transition - End</value>
|
||||
<value>End - transiiton</value>
|
||||
</data>
|
||||
<data name="TransitionStart_chdr" xml:space="preserve">
|
||||
<value>Transition - Start</value>
|
||||
<value>Start - transition</value>
|
||||
</data>
|
||||
<data name="Starting_the_cameras" xml:space="preserve">
|
||||
<value>Starting the cameras</value>
|
||||
@ -1879,4 +1879,7 @@
|
||||
<data name="Manual_level_measurement" xml:space="preserve">
|
||||
<value>Manual level measurement</value>
|
||||
</data>
|
||||
<data name="TransitionBetween_chdr" xml:space="preserve">
|
||||
<value>Between rep. - transition</value>
|
||||
</data>
|
||||
</root>
|
||||
7
TODO.txt
7
TODO.txt
@ -1,9 +1,12 @@
|
||||
Vyroba:
|
||||
- Zobrazit vysledok 1. testu ihned
|
||||
- Odlogovat zo zvysenej urovne po 10 min.
|
||||
|
||||
Igor
|
||||
- cerveny RV
|
||||
- kalibracia meraca hladiny
|
||||
- stabilne meranie hladiny
|
||||
- niekedy neprepne diverter
|
||||
- sekvencia medzi opakovanymi skuskami
|
||||
|
||||
- testovanie citlivosti vodomera
|
||||
- zivotnostne: menit prietok 15 min.
|
||||
- diverter test (prietok 1x, vahy bud vzdy alebo 1x)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user