ProcedureParams initialization/constructors modified. ProcedureParamsBase modified.

This commit is contained in:
Milan Hanajik 2017-05-01 15:57:37 +02:00
parent 8a9eba9e76
commit fa57c51786
35 changed files with 119 additions and 38 deletions

View File

@ -102,6 +102,11 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
{
}
public RRProcedureParams(bool initialize)
{
if (initialize) InitializeAll();
}
public RRProcedureParams(ComponentProcedure procedureParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procedureParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
RRProcedureParams procParams = new RRProcedureParams();
RRProcedureParams procParams = new RRProcedureParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -30,7 +30,7 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
{
Name = "Dummy";
ParentName = "CB";
ProcParams = new RRProcedureParams();
ProcParams = new RRProcedureParams(true);
}
public RegisterReaderCfg(IComponentFactory factory)

View File

@ -102,6 +102,11 @@ namespace TBF.BenchControl.Elde.RegisterReader
{
}
public RRProcedureParams(bool initialize)
{
if (initialize) InitializeAll();
}
public RRProcedureParams(ComponentProcedure procedureParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procedureParamsEntity;

View File

@ -22,7 +22,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
RRProcedureParams procParams = new RRProcedureParams();
RRProcedureParams procParams = new RRProcedureParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -30,7 +30,7 @@ namespace TBF.BenchControl.Elde.RegisterReader
/// Private parameterless constructor invoked by all other (public) constructors
RegisterReaderCfg()
{
ProcParams = new RRProcedureParams();
ProcParams = new RRProcedureParams(true);
}
public RegisterReaderCfg(string name, IComponentFactory factory)

View File

@ -24,7 +24,7 @@ namespace TBF.BenchControl.Modbus.Easytherm
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
ProcParams procParams = new ProcParams();
ProcParams procParams = new ProcParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -36,7 +36,7 @@ namespace TBF.BenchControl.Modbus.Easytherm
Name = "Easytherm";
ParentName = "Modbus";
ModbusAddress = 49;
ProcParams = new ProcParams();
ProcParams = new ProcParams(true);
}
public EasythermCfg(IComponentFactory factory)

View File

@ -109,6 +109,11 @@ namespace TBF.BenchControl.Modbus.Easytherm
{
}
public ProcParams(bool initialize)
{
if (initialize) InitializeAll();
}
public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procParamsEntity;

View File

@ -128,10 +128,12 @@ namespace TBF.BenchControl.Network.Camera.Roi
{
}
}
public ProcedureParams()
public ProcedureParams() { }
public ProcedureParams(bool initialize)
{
if (initialize) InitializeAll();
}
public ProcedureParams(ComponentProcedure procedureParamsEntity, string componentName, Procedure procedure)

View File

@ -24,7 +24,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
ProcedureParams procParams = new ProcedureParams();
ProcedureParams procParams = new ProcedureParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -38,7 +38,7 @@ namespace TBF.BenchControl.Network.Camera.Roi
/// Private parameterless constructor invoked by all other (public) constructors
RoiCfg()
{
ProcParams = new ProcedureParams();
ProcParams = new ProcedureParams(true);
}
public RoiCfg(string name, IComponentFactory factory)

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2013-2015 Sensus Metering Systems
/// Copyright (c) 2013-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
@ -51,7 +51,6 @@ namespace TBF.BenchControl
}
/// Create a new entity and add it to the list test.MoreParams
InitializeAll();
this.procedureParamsEntity = this.ToDbEntity(cmpntName, procedure);
this.procedure = procedure;
this.componentName = cmpntName;

View File

@ -142,6 +142,11 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
{
}
public CombinedWithDetTestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public CombinedWithDetTestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
CombinedWithDetTestParams testParams = new CombinedWithDetTestParams();
CombinedWithDetTestParams testParams = new CombinedWithDetTestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new CombinedWithDetTestParams();
TestParams = new CombinedWithDetTestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -23,7 +23,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
TestParams testParams = new TestParams();
TestParams testParams = new TestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -33,7 +33,7 @@ namespace TBF.BenchControl.TestMethods.Endurance
TestMethodCfg()
{
#if false
TestParams = new TestParams();
TestParams = new TestParams(true);
#endif
}

View File

@ -102,6 +102,11 @@ namespace TBF.BenchControl.TestMethods.Endurance
{
}
public TestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.HeatMeters
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
TestParams testParams = new TestParams();
TestParams testParams = new TestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.HeatMeters
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new TestParams();
TestParams = new TestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -180,6 +180,11 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection.HeatMeters
{
}
public TestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Compound
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
TestParams testParams = new TestParams();
TestParams testParams = new TestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Compound
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new TestParams();
TestParams = new TestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -102,6 +102,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.Compound
{
}
public TestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.HeatMeters
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
TestParams testParams = new TestParams();
TestParams testParams = new TestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.HeatMeters
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new TestParams();
TestParams = new TestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -180,6 +180,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStart.HeatMeters
{
}
public TestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -102,6 +102,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.Compound
{
}
public CombinedTestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public CombinedTestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.Compound
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
CombinedTestParams testParams = new CombinedTestParams();
CombinedTestParams testParams = new CombinedTestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.Compound
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new CombinedTestParams();
TestParams = new CombinedTestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.HeatMeters
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
TestParams testParams = new TestParams();
TestParams testParams = new TestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.HeatMeters
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new TestParams();
TestParams = new TestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -180,6 +180,11 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection.HeatMeters
{
}
public TestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public TestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -127,6 +127,11 @@ namespace TBF.BenchControl.TestMethods.LeakTest
{
}
public LeakTestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public LeakTestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
LeakTestParams testParams = new LeakTestParams();
LeakTestParams testParams = new LeakTestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new LeakTestParams();
TestParams = new LeakTestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -120,6 +120,11 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
{
}
public PMaxTestParams(bool initialize)
{
if (initialize) InitializeAll();
}
public PMaxTestParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -20,7 +20,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
PMaxTestParams testParams = new PMaxTestParams();
PMaxTestParams testParams = new PMaxTestParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
/// Private parameterless constructor invoked by all other (public) constructors
TestMethodCfg()
{
TestParams = new PMaxTestParams();
TestParams = new PMaxTestParams(true);
}
public TestMethodCfg(string name, IComponentFactory factory)

View File

@ -32,7 +32,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
public override IParamsProvider GetTestParams() { return TestParams; }
public override IParamsProvider CreateTestParams(Test test)
{
iPerlCommunicationParams testParams = new iPerlCommunicationParams();
iPerlCommunicationParams testParams = new iPerlCommunicationParams(true);
testParams.UpdateTestParams(Name, test);
return testParams;
}
@ -50,7 +50,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
MaxCommRetries = 4;
NrThreads = 2; /// 1, 2 or 4 threads
TestParams = new iPerlCommunicationParams();
TestParams = new iPerlCommunicationParams(true);
}
public TestMethodCfg(IComponentFactory factory)

View File

@ -117,6 +117,11 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
{
}
public iPerlCommunicationParams(bool initialize)
{
if (initialize) InitializeAll();
}
public iPerlCommunicationParams(ComponentTest testParamsEntity, string componentName, Test test)
{
this.testParamsEntity = testParamsEntity;

View File

@ -166,6 +166,11 @@ namespace TBF.BenchControl.WaterMeters.Munich
{
}
public ProcParams(bool initialize)
{
if (initialize) InitializeAll();
}
public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procParamsEntity;

View File

@ -21,7 +21,7 @@ namespace TBF.BenchControl.WaterMeters.Munich
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
ProcParams procParams = new ProcParams();
ProcParams procParams = new ProcParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -31,7 +31,7 @@ namespace TBF.BenchControl.WaterMeters.Munich
{
Name = "WM";
ParentName = string.Empty;
ProcParams = new ProcParams();
ProcParams = new ProcParams(true);
}
public WaterMeterCfg(IComponentFactory factory)

View File

@ -327,6 +327,11 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
{
}
public ProcParams(bool initialize)
{
if (initialize) InitializeAll();
}
public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procParamsEntity;

View File

@ -18,7 +18,7 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
ProcParams procParams = new ProcParams();
ProcParams procParams = new ProcParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -28,7 +28,7 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter
{
Name = "WM";
ParentName = string.Empty;
ProcParams = new ProcParams();
ProcParams = new ProcParams(true);
}
public WaterMeterCfg(IComponentFactory factory)

View File

@ -337,6 +337,11 @@ namespace TBF.BenchControl.WaterMeters.iPerl
{
}
public ProcParams(bool initialize)
{
if (initialize) InitializeAll();
}
public ProcParams(ComponentProcedure procParamsEntity, string componentName, Procedure procedure)
{
this.procedureParamsEntity = procParamsEntity;

View File

@ -34,7 +34,7 @@ namespace TBF.BenchControl.WaterMeters.iPerl
public override IParamsProvider GetProcedureParams() { return ProcParams; }
public override IParamsProvider CreateProcedureParams(Procedure procedure)
{
ProcParams procParams = new ProcParams();
ProcParams procParams = new ProcParams(true);
procParams.UpdateProcedureParams(Name, procedure);
return procParams;
}
@ -51,7 +51,7 @@ namespace TBF.BenchControl.WaterMeters.iPerl
OptoComPortNr = 10;
RfidComPortNr = 0; /// = use mux. board
MuxBoardNr = 1;
ProcParams = new ProcParams();
ProcParams = new ProcParams(true);
}
public WaterMeterCfg(IComponentFactory factory)