Everything works OK after serious changes:
- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
This commit is contained in:
@@ -8,26 +8,12 @@ using log4net;
|
||||
|
||||
namespace TBF.BenchControl.Elde
|
||||
{
|
||||
public class ControlBoardDev : IComponent, IDevice, IValveControl
|
||||
public class ControlBoardDev : ComponentBase, IDevice, IValveControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Info:
|
||||
/// Warn:
|
||||
/// Error:
|
||||
/// </summary>
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ControlBoardDev));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("ControlBoardDev: Name={0}, ComPort={1}", controlBoardCfg.Name, controlBoardCfg.ComPortNr);
|
||||
}
|
||||
|
||||
public static void ResetStaticProperties() { }
|
||||
|
||||
ControlBoardCfg controlBoardCfg;
|
||||
public Generic.IComponentCfg Cfg { get { return controlBoardCfg; } }
|
||||
|
||||
public string Name { get { return controlBoardCfg.Name; } }
|
||||
public override string ToString() { return string.Format("ControlBoard({0})", Cfg.ToString(1)); }
|
||||
|
||||
readonly ControlBoardCfg controlBoardCfg;
|
||||
|
||||
///
|
||||
/// Reference to the control board component
|
||||
@@ -159,9 +145,10 @@ namespace TBF.BenchControl.Elde
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ControlBoardDev(ControlBoardCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
if (cfg == null) throw new ArgumentNullException("cfg");
|
||||
this.controlBoardCfg = cfg;
|
||||
controlBoardCfg = cfg;
|
||||
|
||||
#if FUZHOU300 || PT200IL
|
||||
FMFreq = new float[6] { 0, 0, 0, 0, 0, 0 }; /// Nr. of pumps: Fuzhou150=2, Fuzhou300,PT200IL=6
|
||||
#else
|
||||
@@ -169,7 +156,9 @@ namespace TBF.BenchControl.Elde
|
||||
#endif
|
||||
emergencyStop = false;
|
||||
previousEmergencyStop = false;
|
||||
}
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specific pre-initialization for control board only
|
||||
|
||||
Reference in New Issue
Block a user