StartMeasurementOp interface changed: OutputPath is the first argment
This commit is contained in:
parent
2985338d7e
commit
d7e6a69ca9
@ -464,9 +464,9 @@ namespace TBF.BenchControl.Elde
|
||||
/// <param name="readers">An array of register readers</param>
|
||||
/// <param name="refPulses">Number of reference pulses to complete the test</param>
|
||||
/// <returns>Created operation</returns>
|
||||
public IOperation StartMeasurementOp(IFlowMeter flowMeter, IDiverter diverter, TestMethods method, int refPulses, float filterConstant)
|
||||
public IOperation StartMeasurementOp(OutputPath outputPath, TestMethods method, int refPulses, float filterConstant)
|
||||
{
|
||||
return new StartMeasurementOp(this, flowMeter, diverter, method, refPulses, filterConstant);
|
||||
return new StartMeasurementOp(this, outputPath, method, refPulses, filterConstant);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -25,21 +25,22 @@ namespace TBF.BenchControl.Elde
|
||||
/// Starts the measurement.
|
||||
/// Events: MeasurementStarted
|
||||
/// </summary>
|
||||
/// <param name="controlBoardDev">Control board component reference</param>
|
||||
/// <param name="flowMeter">Flow meter component reference</param>
|
||||
/// <param name="readers">Register readers references</param>
|
||||
/// <param name="volume">Water volume for the test in liters</param>
|
||||
public StartMeasurementOp(ControlBoardDev controlBoardDev, GenericDevices.IFlowMeter flowMeter,
|
||||
GenericDevices.IDiverter diverter, TestMethods method, int refPulses, float filterConstant)
|
||||
/// <param name="controlBoard">Control board component reference</param>
|
||||
/// <param name="outputPath">Specifies used components</param>
|
||||
/// <param name="method">Test method</param>
|
||||
/// <param name="refPulses">Test duration in number of reference flowmeter pulses</param>
|
||||
/// <param name="filterConstant">Specifies filter for watermeter pulses</param>
|
||||
public StartMeasurementOp(ControlBoardDev controlBoard, OutputPath outputPath,
|
||||
TestMethods method, int refPulses, float filterConstant)
|
||||
{
|
||||
if (controlBoardDev == null) throw new ArgumentNullException("controlBoardDev");
|
||||
this.controlBoard = controlBoardDev;
|
||||
if (controlBoard == null) throw new ArgumentNullException("controlBoardDev");
|
||||
this.controlBoard = controlBoard;
|
||||
|
||||
if (flowMeter is Elde.FlowMeter.FlowMeter)
|
||||
if (outputPath.FlowMeter is Elde.FlowMeter.FlowMeter)
|
||||
{
|
||||
flowMeterIdx = (flowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
||||
flowMeterIdx = (outputPath.FlowMeter as Elde.FlowMeter.FlowMeter).Idx1;
|
||||
}
|
||||
else if (flowMeter is Elde.FlowMeterTwins.FlowMeter)
|
||||
else if (outputPath.FlowMeter is Elde.FlowMeterTwins.FlowMeter)
|
||||
{
|
||||
flowMeterIdx = 0;
|
||||
}
|
||||
@ -48,9 +49,9 @@ namespace TBF.BenchControl.Elde
|
||||
throw new ArgumentException("flowMeter is null or is not Elde");
|
||||
}
|
||||
|
||||
if (diverter is Elde.Diverter.Diverter)
|
||||
if (outputPath.Diverter is Elde.Diverter.Diverter)
|
||||
{
|
||||
diverterIdx = (diverter as Elde.Diverter.Diverter).AdcNr - 4;
|
||||
diverterIdx = (outputPath.Diverter as Elde.Diverter.Diverter).AdcNr - 4;
|
||||
}
|
||||
|
||||
this.refPulses = refPulses;
|
||||
|
||||
@ -176,8 +176,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment
|
||||
State.Create("Adjustment : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro, totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -231,7 +231,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
State.Create("CombinedMeters : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -409,7 +409,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
State.Create(Strings.Start_the_test)
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -285,7 +285,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters
|
||||
State.Create("FixedStartCombinedMeters : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
2 * totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -285,7 +285,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection
|
||||
State.Create("FixedStartMassCollection : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
2 * totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -129,7 +129,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart
|
||||
State.Create("FlyingStart : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
@ -243,8 +243,10 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
State.Create("FlyingStartCollectionMethod : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperations(measureOperations)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath,
|
||||
Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
totalPulses,
|
||||
(float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
{
|
||||
|
||||
@ -201,7 +201,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration
|
||||
//------------------------------------------------
|
||||
State.Create("ReferenceFlowmeterCalibration : Starting the test")
|
||||
.AddOperation(checkUiOp)
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath.FlowMeter, outPath.Diverter, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
.AddOperation(cBrd.StartMeasurementOp(outPath, Elde.TestMethods.Diverter | Elde.TestMethods.Synchro,
|
||||
totalPulses, (float)test.TolerRed))
|
||||
.EnterState();
|
||||
do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user