IComponentCfg and IComponentFactory interfaces and all derived classes modified.
This commit is contained in:
parent
4d616939ad
commit
8dae45e10e
@ -46,12 +46,16 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
|
||||
/// <summary>
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
|
||||
: this(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
public Ambient(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
ambientCfg = cfg;
|
||||
ambientCfg = cfg as AmbientCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Ambient(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Comet
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Ambient.Comet
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -50,9 +50,14 @@ namespace TBF.BenchControl.Ambient.Greco
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public Ambient(AmbientCfg cfg, IList<Generic.IComponent> components)
|
||||
: this(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
public Ambient(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
ambientCfg = cfg;
|
||||
ambientCfg = cfg as AmbientCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Ambient.Greco
|
||||
{
|
||||
public class AmbientCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Ambient(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Ambient.Greco
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Ambient.Greco
|
||||
|
||||
public IComponent DummyComponent() { return new Ambient(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Ambient(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new AmbientCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -29,11 +29,11 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
{
|
||||
}
|
||||
|
||||
public Component(ComponentCfg cfg)
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
benchInfoCfg = cfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
benchInfoCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Component(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Munich
|
||||
@ -14,6 +15,8 @@ namespace TBF.BenchControl.BenchInfo.Munich
|
||||
|
||||
public IComponent DummyComponent() { return new Component(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ComponentCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -29,10 +29,10 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
{
|
||||
}
|
||||
|
||||
public Component(ComponentCfg cfg)
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
BenchInfoCfg = cfg;
|
||||
BenchInfoCfg = cfg as ComponentCfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Component(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchInfo.Polska
|
||||
@ -14,6 +14,8 @@ namespace TBF.BenchControl.BenchInfo.Polska
|
||||
|
||||
public IComponent DummyComponent() { return new Component(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ComponentCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -43,10 +43,10 @@ namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
{
|
||||
}
|
||||
|
||||
public CameraRoi(CameraRoiCfg cfg, IList<Generic.IComponent> components)
|
||||
public CameraRoi(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
cameraRoiCfg = cfg;
|
||||
cameraRoiCfg = cfg as CameraRoiCfg;
|
||||
ltrsPerPulse = (PulsesPerLtr <= float.Epsilon) ? 0 : (1 / PulsesPerLtr);
|
||||
|
||||
if (cfg.DebugLevel != DebugMode.Off)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -13,7 +13,6 @@ namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
{
|
||||
public class CameraRoiCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new CameraRoi(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new CameraRoiCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Cameras.CameraRoi
|
||||
|
||||
public IComponent DummyComponent() { return new CameraRoi(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new CameraRoi(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new CameraRoiCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -66,10 +66,10 @@ namespace TBF.BenchControl.Cameras.IdcCamera
|
||||
{
|
||||
}
|
||||
|
||||
public IdcCamera(IdcCameraCfg cfg, IList<Generic.IComponent> components)
|
||||
public IdcCamera(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
idcCameraCfg = cfg;
|
||||
idcCameraCfg = cfg as IdcCameraCfg;
|
||||
cameraNr = nextCameraNr++;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Cameras.IdcCamera
|
||||
{
|
||||
public class IdcCameraCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new IdcCamera(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new IdcCameraCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Cameras.IdcCamera
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Cameras.IdcCamera
|
||||
|
||||
public IComponent DummyComponent() { return new IdcCamera(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new IdcCamera(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new IdcCameraCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -49,12 +49,12 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
|
||||
public Database() {}
|
||||
|
||||
public Database(DatabaseCfg cfg)
|
||||
public Database(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
DBCfg = cfg;
|
||||
DBCfg = cfg as DatabaseCfg;
|
||||
|
||||
switch (cfg.Separator)
|
||||
switch (DBCfg.Separator)
|
||||
{
|
||||
default:
|
||||
case Separator.None: separatorStr = string.Empty; break;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -30,7 +29,6 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
|
||||
public class DatabaseCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Database(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new DatabaseCfgCtrl(); }
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DB.SensusOracle
|
||||
@ -14,6 +15,8 @@ namespace TBF.BenchControl.DB.SensusOracle
|
||||
|
||||
public IComponent DummyComponent() { return new Database(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Database(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new DatabaseCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -116,10 +116,10 @@ namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
/// Ambient temperature / humidity / pressure meter 'Greco' connected via serial interface (RS232)
|
||||
/// Connection settings: 19200 Bd 8-bits No-parity 1-stop-bit Flow control: none or hardware.
|
||||
/// </summary>
|
||||
public Pump(PumpCfg cfg, IList<Generic.IComponent> components)
|
||||
public Pump(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pumpCfg = cfg;
|
||||
pumpCfg = cfg as PumpCfg;
|
||||
|
||||
controlBoard = (Elde.ControlBoardDev)TbfComponents.FindComponent("CB", components); /// TODO: replace "CB"
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
{
|
||||
public class PumpCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Danfoss.VLT2800
|
||||
|
||||
public IComponent DummyComponent() { return new Pump(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new float[Config.Data.CompoundWMsCount * 2];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
wmEndState = new float[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Combined
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Combined
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -58,13 +58,14 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
serialNr = new string[Config.Data.CompoundWMsCount];
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.CompoundWMsCount];
|
||||
wmEndState = new string[Config.Data.CompoundWMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Munich
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -58,13 +58,14 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Munich3
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Munich3
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
wmEndState = new float[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard12
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Standard12
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
wmEndState = new float[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard24
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Standard24
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
wmEndState = new float[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard48
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Standard48
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
wmEndState = new float[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.Standard6
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.Standard6
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -72,10 +72,10 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg;
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.WMStates
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.WMStates
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -67,9 +67,11 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
}
|
||||
|
||||
public EntryForm(EntryFormCfg cfg)
|
||||
: base(cfg)
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
serialNr = new string[Config.Data.WMsCount];
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new float[Config.Data.WMsCount];
|
||||
@ -77,7 +79,6 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
wmEndState = new float[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
entryFormCfg = cfg;
|
||||
currentOp = CurrentOp.None;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
{
|
||||
public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new EntryForm(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.DataEntry.iPerl
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.DataEntry.iPerl
|
||||
|
||||
public IComponent DummyComponent() { return new EntryForm(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new EntryForm(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde
|
||||
{
|
||||
public class ControlBoardCfg : ComponentCfgBase, IComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new ControlBoardDev(this); }
|
||||
public IComponentCfgCtrl GetControl() { return new ControlBoardCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -206,10 +206,10 @@ namespace TBF.BenchControl.Elde
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ControlBoardDev(ControlBoardCfg cfg)
|
||||
public ControlBoardDev(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
controlBoardCfg = cfg;
|
||||
controlBoardCfg = cfg as ControlBoardCfg;
|
||||
|
||||
#if DN100 || MUNICH || FUZHOU150
|
||||
FMFreq = new float[2] { 0, 0 }; /// Nr. of pumps: Fuzhou150=2, Fuzhou300=6, newer=6
|
||||
@ -222,7 +222,7 @@ namespace TBF.BenchControl.Elde
|
||||
routeMask = 0;
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
if (i < cfg.VirtualValvesRangeLo || i > cfg.VirtualValvesRangeHi)
|
||||
if (i < controlBoardCfg.VirtualValvesRangeLo || i > controlBoardCfg.VirtualValvesRangeHi)
|
||||
{
|
||||
routeMask = routeMask | ((ulong)1 << i);
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
@ -16,6 +15,8 @@ namespace TBF.BenchControl.Elde
|
||||
|
||||
public IComponent DummyComponent() { return new ControlBoardDev(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new ControlBoardDev(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ControlBoardCfg(this); }
|
||||
|
||||
public IComponentCfgCtrl CreateCfgCtrl() { return new ControlBoardCfgCtrl(); }
|
||||
|
||||
@ -43,16 +43,16 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
}
|
||||
|
||||
public Diverter(DiverterCfg cfg, IList<Generic.IComponent> components)
|
||||
public Diverter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
diverterCfg = cfg;
|
||||
diverterCfg = cfg as DiverterCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
if (cfg.BitPosition < 0 || cfg.BitPosition >= 64) throw new ArgumentOutOfRangeException("position");
|
||||
this.mask = (((ulong)1) << cfg.BitPosition);
|
||||
if (diverterCfg.BitPosition < 0 || diverterCfg.BitPosition >= 64) throw new ArgumentOutOfRangeException("position");
|
||||
this.mask = (((ulong)1) << diverterCfg.BitPosition);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
{
|
||||
public class DiverterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Diverter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new DiverterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Diverter
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.Diverter
|
||||
|
||||
public IComponent DummyComponent() { return new Diverter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Diverter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new DiverterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -36,10 +36,10 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
|
||||
Clear();
|
||||
}
|
||||
|
||||
public RegisterReader(RegisterReaderCfg cfg, IList<Generic.IComponent> components)
|
||||
public RegisterReader(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
registerReaderCfg = cfg;
|
||||
registerReaderCfg = cfg as RegisterReaderCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -12,7 +12,6 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
|
||||
{
|
||||
public class RegisterReaderCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new RegisterReader(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new RegisterReaderCfgCtrl(); }
|
||||
|
||||
/// <summary> Procedure parameters </summary>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.FixedStartRegisterReader
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader
|
||||
|
||||
public IComponent DummyComponent() { return new RegisterReader(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new RegisterReader(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new RegisterReaderCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -37,10 +37,10 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
{
|
||||
}
|
||||
|
||||
public FlowMeter(FlowMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
public FlowMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
flowMeterCfg = cfg;
|
||||
flowMeterCfg = cfg as FlowMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
{
|
||||
public class FlowMeterCfg : ComponentCfgBase, GenericDevices.ICalibInfoCfg, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new FlowMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.FlowMeter
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.FlowMeter
|
||||
|
||||
public IComponent DummyComponent() { return new FlowMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new FlowMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new FlowMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -38,10 +38,10 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
{
|
||||
}
|
||||
|
||||
public FlowMeter(FlowMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
public FlowMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
flowMeterCfg = cfg;
|
||||
flowMeterCfg = cfg as FlowMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
{
|
||||
public class FlowMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new FlowMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins
|
||||
|
||||
public IComponent DummyComponent() { return new FlowMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new FlowMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new FlowMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -25,16 +25,16 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
}
|
||||
|
||||
public PressureMeter(PressureMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
public PressureMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pressureMeterCfg = cfg;
|
||||
pressureMeterCfg = cfg as PressureMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
Idx0 = cfg.Idx0;
|
||||
RS485Address = cfg.RS485Address;
|
||||
Idx0 = pressureMeterCfg.Idx0;
|
||||
RS485Address = pressureMeterCfg.RS485Address;
|
||||
|
||||
/// Prepare data for SendCalibData() control board component method
|
||||
ControlBoard.MeretRS485Address[Idx0] = RS485Address;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new PressureMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PressureMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeter
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.PressureMeter
|
||||
|
||||
public IComponent DummyComponent() { return new PressureMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new PressureMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -25,10 +25,10 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
}
|
||||
|
||||
public PressureMeter(PressureMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
public PressureMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pressureMeterCfg = cfg;
|
||||
pressureMeterCfg = cfg as PressureMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajik
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -12,7 +11,6 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
{
|
||||
public class PressureMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new PressureMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PressureMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
//// Author: Milan Hanajik
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
//
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
@ -14,6 +14,8 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal
|
||||
|
||||
public IComponent DummyComponent() { return new PressureMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new PressureMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -36,10 +36,10 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
{
|
||||
}
|
||||
|
||||
public Pump(PumpCfg cfg, IList<Generic.IComponent> components)
|
||||
public Pump(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pumpCfg = cfg;
|
||||
pumpCfg = cfg as PumpCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
{
|
||||
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Pump
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
|
||||
public IComponent DummyComponent() { return new Pump(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -46,15 +46,15 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
{
|
||||
}
|
||||
|
||||
public Pump(PumpCfg cfg, IList<Generic.IComponent> components)
|
||||
public Pump(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pumpCfg = cfg;
|
||||
pumpCfg = cfg as PumpCfg;
|
||||
|
||||
pump1 = (GenericDevices.IPump)TbfComponents.FindComponent(cfg.Pump1, components);
|
||||
pump1 = (GenericDevices.IPump)TbfComponents.FindComponent(pumpCfg.Pump1, components);
|
||||
if (pump1 == null) throw new Exception("Cannot find component Pump 1");
|
||||
|
||||
pump2 = (GenericDevices.IPump)TbfComponents.FindComponent(cfg.Pump2, components);
|
||||
pump2 = (GenericDevices.IPump)TbfComponents.FindComponent(pumpCfg.Pump2, components);
|
||||
if (pump2 == null) throw new Exception("Cannot find component Pump 2");
|
||||
|
||||
pumpFm1 = pump1 as GenericDevices.IPumpFM;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
{
|
||||
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PumpTandem
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.PumpTandem
|
||||
|
||||
public IComponent DummyComponent() { return new Pump(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -51,10 +51,10 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
/// </summary>
|
||||
/// <param name="cfg">Pump configuration object</param>
|
||||
/// <param name="components">List of all components (used to find the control board)</param>
|
||||
public Pump(PumpCfg cfg, IList<Generic.IComponent> components)
|
||||
public Pump(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
pumpCfg = cfg;
|
||||
pumpCfg = cfg as PumpCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
{
|
||||
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.PumpWithFM
|
||||
|
||||
public IComponent DummyComponent() { return new Pump(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Pump(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new PumpCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -39,10 +39,10 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
Clear();
|
||||
}
|
||||
|
||||
public RegisterReader(RegisterReaderCfg cfg, IList<Generic.IComponent> components)
|
||||
public RegisterReader(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
registerReaderCfg = cfg;
|
||||
registerReaderCfg = cfg as RegisterReaderCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -12,7 +12,6 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
{
|
||||
public class RegisterReaderCfg : ComponentCfgBase, Generic.IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new RegisterReader(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new RegisterReaderCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.RegisterReader
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.RegisterReader
|
||||
|
||||
public IComponent DummyComponent() { return new RegisterReader(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new RegisterReader(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new RegisterReaderCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -87,10 +87,10 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
{
|
||||
}
|
||||
|
||||
public RegulValve(RegulValveCfg cfg, IList<Generic.IComponent> components)
|
||||
public RegulValve(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
RegulValveCfg = cfg;
|
||||
RegulValveCfg = cfg as RegulValveCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
{
|
||||
public class RegulValveCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new RegulValve(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new RegulValveCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.RegulValve
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.RegulValve
|
||||
|
||||
public IComponent DummyComponent() { return new RegulValve(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new RegulValve(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new RegulValveCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -41,10 +41,10 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
{
|
||||
}
|
||||
|
||||
public RegulValveTandem(RegulValveTandemCfg cfg, IList<Generic.IComponent> components)
|
||||
public RegulValveTandem(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
RegulValveTandemCfg = cfg;
|
||||
RegulValveTandemCfg = cfg as RegulValveTandemCfg;
|
||||
|
||||
regulValve = (RegulValve.RegulValve)TbfComponents.FindComponent(RegulValveTandemCfg.RegulValveName, components);
|
||||
if (regulValve == null) throw new Exception("Cannot find regulation valve");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
{
|
||||
public class RegulValveTandemCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new RegulValveTandem(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new RegulValveTandemCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
|
||||
public IComponent DummyComponent() { return new RegulValveTandem(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new RegulValveTandem(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new RegulValveTandemCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -29,10 +29,10 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
}
|
||||
|
||||
public TempMeter(TempMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
public TempMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
tempMtrCfg = cfg;
|
||||
tempMtrCfg = cfg as TempMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -11,7 +11,6 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new TempMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeter
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.TempMeter
|
||||
|
||||
public IComponent DummyComponent() { return new TempMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TempMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -24,10 +24,10 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
}
|
||||
|
||||
public TempMeter(TempMeterCfg cfg, IList<Generic.IComponent> components)
|
||||
public TempMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
tempMtrCfg = cfg;
|
||||
tempMtrCfg = cfg as TempMeterCfg;
|
||||
|
||||
ControlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (ControlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
/// Author: Milan Hanajik
|
||||
///
|
||||
using System;
|
||||
@ -12,7 +12,6 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new TempMeter(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajik
|
||||
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
@ -14,6 +14,8 @@ namespace TBF.BenchControl.Elde.TempMeterInternal
|
||||
|
||||
public IComponent DummyComponent() { return new TempMeter(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TempMeter(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -35,10 +35,10 @@ namespace TBF.BenchControl.Elde.Valve
|
||||
{
|
||||
}
|
||||
|
||||
public Valve(ValveCfg cfg, IList<Generic.IComponent> components)
|
||||
public Valve(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
valveCfg = cfg;
|
||||
valveCfg = cfg as ValveCfg;
|
||||
|
||||
controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
@ -49,9 +49,9 @@ namespace TBF.BenchControl.Elde.Valve
|
||||
}
|
||||
this.Mask = (((ulong)1) << valveCfg.BitPosition);
|
||||
|
||||
if (cfg.CoupledToName != null)
|
||||
if (valveCfg.CoupledToName != null)
|
||||
{
|
||||
coupledTo = (IValve)TbfComponents.FindComponent(cfg.CoupledToName, components);
|
||||
coupledTo = (IValve)TbfComponents.FindComponent(valveCfg.CoupledToName, components);
|
||||
}
|
||||
|
||||
log.Debug(this.ToString());
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.Valve
|
||||
{
|
||||
public class ValveCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new Valve(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new ValveCfgCtrl(); }
|
||||
|
||||
///
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.Valve
|
||||
@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.Valve
|
||||
|
||||
public IComponent DummyComponent() { return new Valve(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Valve(cfg, components); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new ValveCfg(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
|
||||
@ -23,10 +23,10 @@ namespace TBF.BenchControl.Elde.ValveEx
|
||||
{
|
||||
}
|
||||
|
||||
public Valve(ValveCfg cfg, IList<Generic.IComponent> components)
|
||||
public Valve(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
valveCfg = cfg;
|
||||
valveCfg = cfg as ValveCfg;
|
||||
|
||||
//controlBoard = (ControlBoardDev)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
//if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user