Heat meters path checked when a test with heat meters is started.
This commit is contained in:
@@ -487,10 +487,11 @@ namespace TBF.BenchControl.Sequences
|
||||
/// Try to fetch all test paths and transitions
|
||||
/// to detect configuration errors as early as possible.
|
||||
string errorMsg;
|
||||
if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
if (!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
goto select_cycle_or_test;
|
||||
@@ -504,11 +505,12 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
/// Fetch the test paths and transitions
|
||||
string errorMsg;
|
||||
if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
if (!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
goto select_cycle_or_test;
|
||||
}
|
||||
@@ -585,11 +587,12 @@ namespace TBF.BenchControl.Sequences
|
||||
/// Try to fetch all test paths and transitions
|
||||
/// to detect configuration errors as early as possible.
|
||||
string errorMsg;
|
||||
if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
if (!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
goto select_cycle_or_test;
|
||||
}
|
||||
@@ -602,11 +605,12 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
/// Fetch the test paths and transitions
|
||||
string errorMsg;
|
||||
if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
if (!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
goto select_cycle_or_test;
|
||||
}
|
||||
@@ -659,10 +663,11 @@ namespace TBF.BenchControl.Sequences
|
||||
|
||||
/// Fetch the test paths and transitions
|
||||
string errorMsg;
|
||||
if (!StateMachine.GetPaths(test, out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
if (!StateMachine.GetPaths(test, (StateMachine.Procedure.MetersKind == MetersKind.HeatMeter),
|
||||
out inPath, out benchPath, out outPath, out sensPath,
|
||||
out heatMetersPath,
|
||||
out transitionBefore, out transitionAfter,
|
||||
out errorMsg))
|
||||
{
|
||||
UiBridge.Bridge.OnError(this, errorMsg);
|
||||
goto select_cycle_or_test;
|
||||
|
||||
@@ -418,6 +418,7 @@ namespace TBF.BenchControl
|
||||
/// <param name="errorMsg">Error message in case of incorrect configuration</param>
|
||||
/// <returns>true when loaded configuration is correct (all four paths are defined !=null, etc.)</returns>
|
||||
public static bool GetPaths(Test test,
|
||||
bool heatMetersPathRequired,
|
||||
out FeedingPath pfeed,
|
||||
out BenchPath pben,
|
||||
out OutputPath pout,
|
||||
@@ -462,12 +463,12 @@ namespace TBF.BenchControl
|
||||
{
|
||||
if (test.HeatMetersPath == path.Name) { phmtrs = new HeatMetersPath(path, components); break; }
|
||||
}
|
||||
if (phmtrs == null)
|
||||
{
|
||||
errorMsg = "Cannot load paths";
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
if (heatMetersPathRequired && phmtrs == null)
|
||||
{
|
||||
errorMsg = "Cannot load heat meters sensors";
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var tr in TransitionSequences)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user