Execute(...) arguments changed everywhere, repetitionNr usage depends on outerLoopMode, outerLoopCounter, ver. 2.12.412

This commit is contained in:
Milan Hanajik 2016-12-10 12:40:35 +01:00
parent f9888a2108
commit 216e08d57c
31 changed files with 48 additions and 48 deletions

View File

@ -53,7 +53,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Test test, DebugMode mode)
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter, DebugMode mode)
{
float simulatedError = 4.5f; /// %
@ -73,7 +73,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start

View File

@ -30,7 +30,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new AdjustmentSeq()).Execute(test, DebugLevel);
return (new AdjustmentSeq()).Execute(test, outerLoopMode, outerLoopCounter, DebugLevel);
}
}
}

View File

@ -30,7 +30,7 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new RoiDetectionSeq()).Execute(test);
return (new RoiDetectionSeq()).Execute(test, outerLoopMode, outerLoopCounter);
}
}
}

View File

@ -16,7 +16,7 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection
private static readonly ILog log = LogManager.GetLogger(typeof(RoiDetectionSeq));
public IList<Event> Execute(Test test)
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;

View File

@ -18,7 +18,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
const int DetectionBufferSize = 9;
const int DetectionKernelSize = 5;
public IList<Event> Execute(Config.Entities.Test test,
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
CombinedWithDetTestParams testParams,
Config.Entities.DebugMode debugLevel)
{
@ -118,7 +118,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// Meters path is required for the following:
readRegistersOp = new Operations.ReadMoreRegistersOp(sensPath.RegisterReaders);
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start
@ -718,7 +718,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -33,7 +33,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new CombinedWithDetectionSeq()).Execute(test, testMethodCfg.TestParams, DebugLevel);
return (new CombinedWithDetectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams, DebugLevel);
}
}
}

View File

@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new EnduranceSeq()).Execute(test, testMethodCfg.Cycle, DebugLevel);
return (new EnduranceSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.Cycle, DebugLevel);
}
}
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test,
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
string enduranceCycleStr,
Config.Entities.DebugMode debugLevel)
{
@ -46,7 +46,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// Initialize repetitionNr (First test =1 )
//====================================
// Transition or SetRoute - Start
@ -549,7 +549,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
}
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test)
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter)
{
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
@ -47,7 +47,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
float[] wmBeginStates = new float[Config.Data.WMsCount];
float[] wmEndStates = new float[Config.Data.WMsCount];
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start
@ -594,7 +594,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -30,7 +30,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced.Single
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FixedStartAdvancedSeq()).Execute(test);
return (new FixedStartAdvancedSeq()).Execute(test, outerLoopMode, outerLoopCounter);
}
}
}

View File

@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.Compound
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FixedStartMassCollectionSeq()).Execute(test, true, null);
return (new FixedStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, true, null);
}
}
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test,
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
bool compound,
HeatMeters.TestParams heatMetersTestParams)
{
@ -49,7 +49,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
float[] wmBeginStates = new float[Config.Data.WMsCount];
float[] wmEndStates = new float[Config.Data.WMsCount];
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start
@ -900,7 +900,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.HeatMeters
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FixedStartMassCollectionSeq()).Execute(test, false, testMethodCfg.TestParams);
return (new FixedStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, false, testMethodCfg.TestParams);
}
}
}

View File

@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.Single
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FixedStartMassCollectionSeq()).Execute(test, false, null);
return (new FixedStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, false, null);
}
}
}

View File

@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Compound
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartSeq()).Execute(test, testMethodCfg.TestParams, null, DebugLevel);
return (new FlyingStartSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams, null, DebugLevel);
}
}
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test,
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
Compound.TestParams compoundTestParams,
HeatMeters.TestParams heatMetersTestParams,
Config.Entities.DebugMode debugLevel)
@ -104,7 +104,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
/// int refPulses = (int)(timeSec * (2000.0f * targetFlow / pOut.FlowMeter.NominalFlow));
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start
@ -604,7 +604,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.HeatMeters
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartSeq()).Execute(test, null, testMethodCfg.TestParams, DebugLevel);
return (new FlyingStartSeq()).Execute(test, outerLoopMode, outerLoopCounter, null, testMethodCfg.TestParams, DebugLevel);
}
}
}

View File

@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Single
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartSeq()).Execute(test, null, null, DebugLevel);
return (new FlyingStartSeq()).Execute(test, outerLoopMode, outerLoopCounter, null, null, DebugLevel);
}
}
}

View File

@ -36,7 +36,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.Compound
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartMassCollectionSeq()).Execute(test, testMethodCfg.TestParams, null, DebugLevel);
return (new FlyingStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams, null, DebugLevel);
}
}
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test,
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter,
Compound.CombinedTestParams compoundTestParams,
HeatMeters.TestParams heatMetersTestParams,
Config.Entities.DebugMode debugLevel)
@ -99,7 +99,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse;
int totalPulses = (int)(test.Volume / LtrPerRefPulse + 0.5f);
int repetitionNr = 1; /// First test: repetitionNr = 1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr = 1
//====================================
// Transition or SetRoute - Start
@ -910,7 +910,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection
/// Append the results to the CSV-file
allResults.Info(TestResult2CsvLine(testName, test.Part));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -35,7 +35,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.HeatMeters
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartMassCollectionSeq()).Execute(test, null, testMethodCfg.TestParams, DebugLevel);
return (new FlyingStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, null, testMethodCfg.TestParams, DebugLevel);
}
}
}

View File

@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.Single
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new FlyingStartMassCollectionSeq()).Execute(test, null, null, DebugLevel);
return (new FlyingStartMassCollectionSeq()).Execute(test, outerLoopMode, outerLoopCounter, null, null, DebugLevel);
}
}
}

View File

@ -27,7 +27,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test, LeakTestParams testParams)
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter, LeakTestParams testParams)
{
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;

View File

@ -33,7 +33,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new LeakTestSeq()).Execute(test, testMethodCfg.TestParams);
return (new LeakTestSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams);
}
}
}

View File

@ -27,7 +27,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test, PMaxTestParams testParams)
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter, PMaxTestParams testParams)
{
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;

View File

@ -33,7 +33,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new PMaxTestSeq()).Execute(test, testMethodCfg.TestParams);
return (new PMaxTestSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg.TestParams);
}
}
}

View File

@ -26,7 +26,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test)
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter)
{
Elde.ControlBoardDev cBrd = StateMachine.ControlBoard;
@ -34,7 +34,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
Event retVal = Event.Done;
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
LtrPerRefPulse = outPath.FlowMeter.LtrPerPulse; /// [ltr/pulse], nominal flow in [m3/h]
/// Notes:
/// float timeHr = volumeLtr / (1000.0f * targetFlow);
@ -44,7 +44,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
processDataLoggingOp = new TBF.BenchControl.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
int repetitionNr = 1; /// First test: repetitionNr=1
int repetitionNr = outerLoopMode ? outerLoopCounter : 1; /// First test: repetitionNr=1
//====================================
// Transition or SetRoute - Start
@ -403,7 +403,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetitionNr, Config.Entities.Progress.Completed));
if (++repetitionNr <= test.Repeats)
if (!outerLoopMode && (++repetitionNr <= test.Repeats))
{
goto loop;
}

View File

@ -30,7 +30,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new ReferenceFlowmeterCalibrationSeq()).Execute(test);
return (new ReferenceFlowmeterCalibrationSeq()).Execute(test, outerLoopMode, outerLoopCounter);
}
}
}

View File

@ -101,7 +101,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
public IList<Event> Execute(Test test, bool outerLoopMode, int outerLoopCounter)
{
return (new iPerlCommunicationSeq()).Execute(test, testMethodCfg, testMethodCfg.TestParams);
return (new iPerlCommunicationSeq()).Execute(test, outerLoopMode, outerLoopCounter, testMethodCfg, testMethodCfg.TestParams);
}
}
}

View File

@ -47,7 +47,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
/// Event.OpArgumentError . Target flow is out of range
/// Event.Error . . . . . . Unspecified error
/// </returns>
public IList<Event> Execute(Config.Entities.Test test, TestMethodCfg cfg, iPerlCommunicationParams testParams)
public IList<Event> Execute(Config.Entities.Test test, bool outerLoopMode, int outerLoopCounter, TestMethodCfg cfg, iPerlCommunicationParams testParams)
{
IList<Event> e = new List<Event>(); /// Events from currently running operations
Event retVal = Event.Done;

View File

@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.12.411.1")]
[assembly: AssemblyFileVersion("2.12.411.1")]
[assembly: AssemblyVersion("2.12.412.1")]
[assembly: AssemblyFileVersion("2.12.412.1")]