diff --git a/TestBenchFramework/BenchControl/Ambient/Comet/Ambient.cs b/TestBenchFramework/BenchControl/Ambient/Comet/Ambient.cs index 32f491543..10d938721 100644 --- a/TestBenchFramework/BenchControl/Ambient/Comet/Ambient.cs +++ b/TestBenchFramework/BenchControl/Ambient/Comet/Ambient.cs @@ -46,12 +46,16 @@ namespace TBF.BenchControl.Ambient.Comet /// /// 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. /// public Ambient(AmbientCfg cfg, IList components) + : this(cfg) + { + } + + public Ambient(Generic.IComponentCfg cfg) : base(cfg) { - ambientCfg = cfg; + ambientCfg = cfg as AmbientCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/Ambient/Comet/AmbientCfg.cs b/TestBenchFramework/BenchControl/Ambient/Comet/AmbientCfg.cs index 95bc41eca..91f2974de 100644 --- a/TestBenchFramework/BenchControl/Ambient/Comet/AmbientCfg.cs +++ b/TestBenchFramework/BenchControl/Ambient/Comet/AmbientCfg.cs @@ -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 components) { return new Ambient(this, components); } public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Ambient/Comet/Factory.cs b/TestBenchFramework/BenchControl/Ambient/Comet/Factory.cs index 04bc41cbc..179ad1686 100644 --- a/TestBenchFramework/BenchControl/Ambient/Comet/Factory.cs +++ b/TestBenchFramework/BenchControl/Ambient/Comet/Factory.cs @@ -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 components) { return new Ambient(cfg); } + public IComponentCfg DefaultConfig() { return new AmbientCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Ambient/Greco/Ambient.cs b/TestBenchFramework/BenchControl/Ambient/Greco/Ambient.cs index 839cb4262..91d347316 100644 --- a/TestBenchFramework/BenchControl/Ambient/Greco/Ambient.cs +++ b/TestBenchFramework/BenchControl/Ambient/Greco/Ambient.cs @@ -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. /// public Ambient(AmbientCfg cfg, IList components) + : this(cfg) + { + } + + public Ambient(Generic.IComponentCfg cfg) : base(cfg) { - ambientCfg = cfg; + ambientCfg = cfg as AmbientCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/Ambient/Greco/AmbientCfg.cs b/TestBenchFramework/BenchControl/Ambient/Greco/AmbientCfg.cs index 6631b7954..a2749cc30 100644 --- a/TestBenchFramework/BenchControl/Ambient/Greco/AmbientCfg.cs +++ b/TestBenchFramework/BenchControl/Ambient/Greco/AmbientCfg.cs @@ -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 components) { return new Ambient(this, components); } public IComponentCfgCtrl GetControl() { return new AmbientCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Ambient/Greco/Factory.cs b/TestBenchFramework/BenchControl/Ambient/Greco/Factory.cs index 0d8ac70f7..fa636d56f 100644 --- a/TestBenchFramework/BenchControl/Ambient/Greco/Factory.cs +++ b/TestBenchFramework/BenchControl/Ambient/Greco/Factory.cs @@ -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 components) { return new Ambient(cfg); } + public IComponentCfg DefaultConfig() { return new AmbientCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/BenchInfo/Munich/Component.cs b/TestBenchFramework/BenchControl/BenchInfo/Munich/Component.cs index c42c09d81..e83fccf37 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Munich/Component.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Munich/Component.cs @@ -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()); + } } } diff --git a/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentCfg.cs b/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentCfg.cs index 098c5c84b..083a44af6 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentCfg.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentCfg.cs @@ -14,7 +14,6 @@ namespace TBF.BenchControl.BenchInfo.Munich /// public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Component(this); } public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentFactory.cs b/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentFactory.cs index 73caa34c2..4572bed53 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentFactory.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Munich/ComponentFactory.cs @@ -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 components) { return new Component(cfg); } + public IComponentCfg DefaultConfig() { return new ComponentCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/BenchInfo/Polska/Component.cs b/TestBenchFramework/BenchControl/BenchInfo/Polska/Component.cs index d4a8e28dd..3b7ccca62 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Polska/Component.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Polska/Component.cs @@ -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()); } } diff --git a/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentCfg.cs b/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentCfg.cs index f93e86008..1fc4d6308 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentCfg.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentCfg.cs @@ -14,7 +14,6 @@ namespace TBF.BenchControl.BenchInfo.Polska /// public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Component(this); } public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentFactory.cs b/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentFactory.cs index 116ea1640..05f8941b8 100644 --- a/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentFactory.cs +++ b/TestBenchFramework/BenchControl/BenchInfo/Polska/ComponentFactory.cs @@ -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 components) { return new Component(cfg); } + public IComponentCfg DefaultConfig() { return new ComponentCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoi.cs b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoi.cs index a4d44e111..d766602db 100644 --- a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoi.cs +++ b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoi.cs @@ -43,10 +43,10 @@ namespace TBF.BenchControl.Cameras.CameraRoi { } - public CameraRoi(CameraRoiCfg cfg, IList components) + public CameraRoi(Generic.IComponentCfg cfg, IList components) : base(cfg) { - cameraRoiCfg = cfg; + cameraRoiCfg = cfg as CameraRoiCfg; ltrsPerPulse = (PulsesPerLtr <= float.Epsilon) ? 0 : (1 / PulsesPerLtr); if (cfg.DebugLevel != DebugMode.Off) diff --git a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfg.cs b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfg.cs index 672ada102..7135ec854 100644 --- a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfg.cs +++ b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiCfg.cs @@ -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 components) { return new CameraRoi(this, components); } public IComponentCfgCtrl GetControl() { return new CameraRoiCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiFactory.cs b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiFactory.cs index f0ac9b70a..5cf3d5c19 100644 --- a/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiFactory.cs +++ b/TestBenchFramework/BenchControl/Cameras/CameraRoi/CameraRoiFactory.cs @@ -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 components) { return new CameraRoi(cfg, components); } + public IComponentCfg DefaultConfig() { return new CameraRoiCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCamera.cs b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCamera.cs index 9d3b623f7..ebab1e41f 100644 --- a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCamera.cs +++ b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCamera.cs @@ -66,10 +66,10 @@ namespace TBF.BenchControl.Cameras.IdcCamera { } - public IdcCamera(IdcCameraCfg cfg, IList components) + public IdcCamera(Generic.IComponentCfg cfg, IList components) : base(cfg) { - idcCameraCfg = cfg; + idcCameraCfg = cfg as IdcCameraCfg; cameraNr = nextCameraNr++; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfg.cs b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfg.cs index 4be3b51e1..0c46d55cc 100644 --- a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfg.cs +++ b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraCfg.cs @@ -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 components) { return new IdcCamera(this, components); } public IComponentCfgCtrl GetControl() { return new IdcCameraCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraFactory.cs b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraFactory.cs index 31718665e..b677b1827 100644 --- a/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraFactory.cs +++ b/TestBenchFramework/BenchControl/Cameras/IdcCamera/IdcCameraFactory.cs @@ -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 components) { return new IdcCamera(cfg, components); } + public IComponentCfg DefaultConfig() { return new IdcCameraCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs b/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs index 12b89f175..490d150ec 100644 --- a/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs +++ b/TestBenchFramework/BenchControl/DB/SensusOracle/Database.cs @@ -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; diff --git a/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseCfg.cs b/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseCfg.cs index 114c213f6..3ab7d4bfe 100644 --- a/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseCfg.cs +++ b/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseCfg.cs @@ -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 components) { return new Database(this); } public IComponentCfgCtrl GetControl() { return new DatabaseCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseFactory.cs b/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseFactory.cs index 0a43afe8f..ca0cbed6b 100644 --- a/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseFactory.cs +++ b/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseFactory.cs @@ -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 components) { return new Database(cfg); } + public IComponentCfg DefaultConfig() { return new DatabaseCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Danfoss/VLT2800/Pump.cs b/TestBenchFramework/BenchControl/Danfoss/VLT2800/Pump.cs index 812ee31d0..8cb105a5b 100644 --- a/TestBenchFramework/BenchControl/Danfoss/VLT2800/Pump.cs +++ b/TestBenchFramework/BenchControl/Danfoss/VLT2800/Pump.cs @@ -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. /// - public Pump(PumpCfg cfg, IList components) + public Pump(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpCfg.cs b/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpCfg.cs index 0f4350253..041604828 100644 --- a/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpCfg.cs +++ b/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpCfg.cs @@ -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 components) { return new Pump(this, components); } public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpFactory.cs b/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpFactory.cs index 438c5448f..d55923e3f 100644 --- a/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpFactory.cs +++ b/TestBenchFramework/BenchControl/Danfoss/VLT2800/PumpFactory.cs @@ -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 components) { return new Pump(cfg, components); } + public IComponentCfg DefaultConfig() { return new PumpCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs index 8ff1d80f4..c55c97efa 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormCfg.cs index 5f9726d1e..0e71ffc88 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormCfg.cs @@ -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 components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormFactory.cs index 95beb1cab..c64e87db1 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Combined/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs index 021d353a3..909a0a21b 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfg.cs index ffe6c339b..fffc08d46 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Munich { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormFactory.cs index 8f1178f88..7f931d359 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs index 135508b71..36d2855cd 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfg.cs index a958cd962..15e0fa761 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Munich3 { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormFactory.cs index 0857c2bf9..db50cb4c0 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Munich3/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryForm.cs index a49d0a0a1..5c1259804 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormCfg.cs index 9b57ec6dd..839e9d727 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard12 { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormFactory.cs index 70ce9fe58..a26ea967f 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard12/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryForm.cs index c3ebaebac..e6643df7f 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormCfg.cs index cce7c118d..11ad2a7e3 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard24 { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormFactory.cs index 240b1b3f3..d2117f748 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard24/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryForm.cs index 2f1900830..ef85fc6d2 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormCfg.cs index b817082df..b1b8fdae4 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard48 { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormFactory.cs index b461172d5..ca6499d63 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard48/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryForm.cs index 7e51aa921..c07d72050 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormCfg.cs index 72d32ed8e..aace68f5f 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.DataEntry.Standard6 { public class EntryFormCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormFactory.cs index b31c9a773..a61f2ab3f 100644 --- a/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/Standard6/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs index 4d6f5c272..d5bd242ab 100644 --- a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryForm.cs @@ -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; diff --git a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfg.cs index 02c08fcd9..2005f3ada 100644 --- a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormCfg.cs @@ -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 components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormFactory.cs index 573e14d8f..ccab13cd2 100644 --- a/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/WMStates/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryForm.cs b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryForm.cs index ca9fec2c7..6ade43804 100644 --- a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryForm.cs +++ b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryForm.cs @@ -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()); } diff --git a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormCfg.cs b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormCfg.cs index cd4ca2b8e..13275a530 100644 --- a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormCfg.cs +++ b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormCfg.cs @@ -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 components) { return new EntryForm(this); } public IComponentCfgCtrl GetControl() { return new EntryFormCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormFactory.cs b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormFactory.cs index 12b4e8f9f..14495fa09 100644 --- a/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormFactory.cs +++ b/TestBenchFramework/BenchControl/DataEntry/iPerl/EntryFormFactory.cs @@ -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 components) { return new EntryForm(cfg); } + public IComponentCfg DefaultConfig() { return new EntryFormCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardCfg.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardCfg.cs index c8e70e0cd..7bf376246 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardCfg.cs @@ -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 components) { return new ControlBoardDev(this); } public IComponentCfgCtrl GetControl() { return new ControlBoardCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs index 2b3dff639..65679f5fa 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardDev.cs @@ -206,10 +206,10 @@ namespace TBF.BenchControl.Elde /// /// Constructor /// - 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); } diff --git a/TestBenchFramework/BenchControl/Elde/ControlBoardFactory.cs b/TestBenchFramework/BenchControl/Elde/ControlBoardFactory.cs index 7109721db..4e98f6dd2 100644 --- a/TestBenchFramework/BenchControl/Elde/ControlBoardFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/ControlBoardFactory.cs @@ -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 components) { return new ControlBoardDev(cfg); } + public IComponentCfg DefaultConfig() { return new ControlBoardCfg(this); } public IComponentCfgCtrl CreateCfgCtrl() { return new ControlBoardCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/Elde/Diverter/Diverter.cs b/TestBenchFramework/BenchControl/Elde/Diverter/Diverter.cs index 6c2239df0..6cd1f95dd 100644 --- a/TestBenchFramework/BenchControl/Elde/Diverter/Diverter.cs +++ b/TestBenchFramework/BenchControl/Elde/Diverter/Diverter.cs @@ -43,16 +43,16 @@ namespace TBF.BenchControl.Elde.Diverter { } - public Diverter(DiverterCfg cfg, IList components) + public Diverter(Generic.IComponentCfg cfg, IList 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); diff --git a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfg.cs b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfg.cs index 9c2860483..ab7ddf6ad 100644 --- a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterCfg.cs @@ -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 components) { return new Diverter(this, components); } public IComponentCfgCtrl GetControl() { return new DiverterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterFactory.cs b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterFactory.cs index a61dd7765..012c6748d 100644 --- a/TestBenchFramework/BenchControl/Elde/Diverter/DiverterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/Diverter/DiverterFactory.cs @@ -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 components) { return new Diverter(cfg, components); } + public IComponentCfg DefaultConfig() { return new DiverterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs index 2f26a8ab9..499744d16 100644 --- a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs +++ b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReader.cs @@ -36,10 +36,10 @@ namespace TBF.BenchControl.Elde.FixedStartRegisterReader Clear(); } - public RegisterReader(RegisterReaderCfg cfg, IList components) + public RegisterReader(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfg.cs b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfg.cs index 63d02f127..e99ffd6f8 100644 --- a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderCfg.cs @@ -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 components) { return new RegisterReader(this, components); } public IComponentCfgCtrl GetControl() { return new RegisterReaderCfgCtrl(); } /// Procedure parameters diff --git a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderFactory.cs b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderFactory.cs index 926b21957..bb11a1d1d 100644 --- a/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/FixedStartRegisterReader/RegisterReaderFactory.cs @@ -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 components) { return new RegisterReader(cfg, components); } + public IComponentCfg DefaultConfig() { return new RegisterReaderCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeter.cs b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeter.cs index b11c08ea5..f76f1db73 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeter.cs @@ -37,10 +37,10 @@ namespace TBF.BenchControl.Elde.FlowMeter { } - public FlowMeter(FlowMeterCfg cfg, IList components) - : base(cfg) + public FlowMeter(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfg.cs index ae3b48cfc..4e4b0aa5b 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterCfg.cs @@ -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 components) { return new FlowMeter(this, components); } public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterFactory.cs index 4943b89b6..03c9da742 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeter/FlowMeterFactory.cs @@ -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 components) { return new FlowMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new FlowMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeter.cs b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeter.cs index 1b33d399f..a94167cb7 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeter.cs @@ -38,10 +38,10 @@ namespace TBF.BenchControl.Elde.FlowMeterTwins { } - public FlowMeter(FlowMeterCfg cfg, IList components) + public FlowMeter(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfg.cs index 855825004..595ad22e8 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterCfg.cs @@ -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 components) { return new FlowMeter(this, components); } public IComponentCfgCtrl GetControl() { return new FlowMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterFactory.cs index 41ea97e1c..5f5f7d900 100644 --- a/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/FlowMeterTwins/FlowMeterFactory.cs @@ -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 components) { return new FlowMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new FlowMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeter.cs b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeter.cs index 5569ddff4..820110cd9 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeter.cs @@ -25,16 +25,16 @@ namespace TBF.BenchControl.Elde.PressureMeter { } - public PressureMeter(PressureMeterCfg cfg, IList components) - : base(cfg) + public PressureMeter(Generic.IComponentCfg cfg, IList 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; diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfg.cs index 12597847a..d0c616cbe 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterCfg.cs @@ -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 components) { return new PressureMeter(this, components); } public IComponentCfgCtrl GetControl() { return new PressureMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterFactory.cs index 1c074b439..c1bf2c8ab 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeter/PressureMeterFactory.cs @@ -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 components) { return new PressureMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeter.cs b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeter.cs index 38850054e..f4cb2972a 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeter.cs @@ -25,10 +25,10 @@ namespace TBF.BenchControl.Elde.PressureMeterInternal { } - public PressureMeter(PressureMeterCfg cfg, IList components) + public PressureMeter(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterCfg.cs index 6d871e493..48f4af8ea 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterCfg.cs @@ -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 components) { return new PressureMeter(this, components); } public IComponentCfgCtrl GetControl() { return new PressureMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterFactory.cs index b3d777213..0f542ea08 100644 --- a/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/PressureMeterInternal/PressureMeterFactory.cs @@ -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 components) { return new PressureMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/Pump/Pump.cs b/TestBenchFramework/BenchControl/Elde/Pump/Pump.cs index 6652c5202..90678adca 100644 --- a/TestBenchFramework/BenchControl/Elde/Pump/Pump.cs +++ b/TestBenchFramework/BenchControl/Elde/Pump/Pump.cs @@ -36,10 +36,10 @@ namespace TBF.BenchControl.Elde.Pump { } - public Pump(PumpCfg cfg, IList components) + public Pump(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/Pump/PumpCfg.cs b/TestBenchFramework/BenchControl/Elde/Pump/PumpCfg.cs index c62ec700c..0b6a680d2 100644 --- a/TestBenchFramework/BenchControl/Elde/Pump/PumpCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/Pump/PumpCfg.cs @@ -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 components) { return new Pump(this, components); } public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/Pump/PumpFactory.cs b/TestBenchFramework/BenchControl/Elde/Pump/PumpFactory.cs index e31b872c5..e445a88a3 100644 --- a/TestBenchFramework/BenchControl/Elde/Pump/PumpFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/Pump/PumpFactory.cs @@ -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 components) { return new Pump(cfg, components); } + public IComponentCfg DefaultConfig() { return new PumpCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs index 29ee1e4cf..db741c98f 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/Pump.cs @@ -46,15 +46,15 @@ namespace TBF.BenchControl.Elde.PumpTandem { } - public Pump(PumpCfg cfg, IList components) + public Pump(Generic.IComponentCfg cfg, IList 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; diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs index ea67d746a..dc0cb2e74 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpCfg.cs @@ -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 components) { return new Pump(this, components); } public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs index 3127083e1..0a151dbb4 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpTandem/PumpFactory.cs @@ -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 components) { return new Pump(cfg, components); } + public IComponentCfg DefaultConfig() { return new PumpCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs b/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs index 9ef3c4153..b59527d20 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpWithFM/Pump.cs @@ -51,10 +51,10 @@ namespace TBF.BenchControl.Elde.PumpWithFM /// /// Pump configuration object /// List of all components (used to find the control board) - public Pump(PumpCfg cfg, IList components) + public Pump(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfg.cs b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfg.cs index 45f786a39..0e32c0d74 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpCfg.cs @@ -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 components) { return new Pump(this, components); } public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpFactory.cs b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpFactory.cs index 79c86ae72..566ce6a3b 100644 --- a/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/PumpWithFM/PumpFactory.cs @@ -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 components) { return new Pump(cfg, components); } + public IComponentCfg DefaultConfig() { return new PumpCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs index 0173fb59b..003e8c19c 100644 --- a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs +++ b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReader.cs @@ -39,10 +39,10 @@ namespace TBF.BenchControl.Elde.RegisterReader Clear(); } - public RegisterReader(RegisterReaderCfg cfg, IList components) + public RegisterReader(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfg.cs b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfg.cs index 29294bb6d..0986f7fba 100644 --- a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderCfg.cs @@ -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 components) { return new RegisterReader(this, components); } public IComponentCfgCtrl GetControl() { return new RegisterReaderCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderFactory.cs b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderFactory.cs index 1059f6177..35059abd1 100644 --- a/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/RegisterReader/RegisterReaderFactory.cs @@ -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 components) { return new RegisterReader(cfg, components); } + public IComponentCfg DefaultConfig() { return new RegisterReaderCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs index 93fddb16a..dc506d2a3 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValve.cs @@ -87,10 +87,10 @@ namespace TBF.BenchControl.Elde.RegulValve { } - public RegulValve(RegulValveCfg cfg, IList components) + public RegulValve(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs index fb98dee00..b48dc3523 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveCfg.cs @@ -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 components) { return new RegulValve(this, components); } public IComponentCfgCtrl GetControl() { return new RegulValveCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs index 8235af644..7f44e3d41 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValve/RegulValveFactory.cs @@ -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 components) { return new RegulValve(cfg, components); } + public IComponentCfg DefaultConfig() { return new RegulValveCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs index c71284d6f..826c66dcf 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandem.cs @@ -41,10 +41,10 @@ namespace TBF.BenchControl.Elde.RegulValveTandem { } - public RegulValveTandem(RegulValveTandemCfg cfg, IList components) + public RegulValveTandem(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemCfg.cs b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemCfg.cs index a5598848d..7dea1a5bd 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemCfg.cs @@ -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 components) { return new RegulValveTandem(this, components); } public IComponentCfgCtrl GetControl() { return new RegulValveTandemCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemFactory.cs b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemFactory.cs index b8346830b..dedb1835e 100644 --- a/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/RegulValveTandem/RegulValveTandemFactory.cs @@ -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 components) { return new RegulValveTandem(cfg, components); } + public IComponentCfg DefaultConfig() { return new RegulValveTandemCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeter.cs b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeter.cs index 194e6d3f7..f473ce086 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeter.cs @@ -29,10 +29,10 @@ namespace TBF.BenchControl.Elde.TempMeter { } - public TempMeter(TempMeterCfg cfg, IList components) + public TempMeter(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfg.cs index f807eb194..71ccdb588 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterCfg.cs @@ -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 components) { return new TempMeter(this, components); } public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterFactory.cs index 14c2b0e35..bd4414053 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeter/TempMeterFactory.cs @@ -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 components) { return new TempMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeter.cs b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeter.cs index 915bd28c9..7ed5b0b16 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeter.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeter.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.Elde.TempMeterInternal { } - public TempMeter(TempMeterCfg cfg, IList components) + public TempMeter(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterCfg.cs b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterCfg.cs index e00f09baa..a6b6cc603 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterCfg.cs @@ -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 components) { return new TempMeter(this, components); } public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterFactory.cs b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterFactory.cs index fc7b48fbf..15d6269e2 100644 --- a/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/TempMeterInternal/TempMeterFactory.cs @@ -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 components) { return new TempMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/Valve/Valve.cs b/TestBenchFramework/BenchControl/Elde/Valve/Valve.cs index e7e331712..ca9a119e4 100644 --- a/TestBenchFramework/BenchControl/Elde/Valve/Valve.cs +++ b/TestBenchFramework/BenchControl/Elde/Valve/Valve.cs @@ -35,10 +35,10 @@ namespace TBF.BenchControl.Elde.Valve { } - public Valve(ValveCfg cfg, IList components) + public Valve(Generic.IComponentCfg cfg, IList 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()); diff --git a/TestBenchFramework/BenchControl/Elde/Valve/ValveCfg.cs b/TestBenchFramework/BenchControl/Elde/Valve/ValveCfg.cs index d7155fbea..1bcbb4c58 100644 --- a/TestBenchFramework/BenchControl/Elde/Valve/ValveCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/Valve/ValveCfg.cs @@ -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 components) { return new Valve(this, components); } public IComponentCfgCtrl GetControl() { return new ValveCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/Valve/ValveFactory.cs b/TestBenchFramework/BenchControl/Elde/Valve/ValveFactory.cs index c5c7cacd9..2f0808133 100644 --- a/TestBenchFramework/BenchControl/Elde/Valve/ValveFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/Valve/ValveFactory.cs @@ -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 components) { return new Valve(cfg, components); } + public IComponentCfg DefaultConfig() { return new ValveCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Elde/ValveEx/Valve.cs b/TestBenchFramework/BenchControl/Elde/ValveEx/Valve.cs index 0b25be305..256eed8b4 100644 --- a/TestBenchFramework/BenchControl/Elde/ValveEx/Valve.cs +++ b/TestBenchFramework/BenchControl/Elde/ValveEx/Valve.cs @@ -23,10 +23,10 @@ namespace TBF.BenchControl.Elde.ValveEx { } - public Valve(ValveCfg cfg, IList components) + public Valve(Generic.IComponentCfg cfg, IList 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"); diff --git a/TestBenchFramework/BenchControl/Elde/ValveEx/ValveCfg.cs b/TestBenchFramework/BenchControl/Elde/ValveEx/ValveCfg.cs index c49703909..f1eae1d4f 100644 --- a/TestBenchFramework/BenchControl/Elde/ValveEx/ValveCfg.cs +++ b/TestBenchFramework/BenchControl/Elde/ValveEx/ValveCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System.IO; using System.Collections.Generic; @@ -10,7 +10,6 @@ namespace TBF.BenchControl.Elde.ValveEx { public class ValveCfg : ComponentCfgBase, IComponentCfg { - public IComponent GetComponent(IList components) { return new Valve(this, components); } public IComponentCfgCtrl GetControl() { return new ValveCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Elde/ValveEx/ValveFactory.cs b/TestBenchFramework/BenchControl/Elde/ValveEx/ValveFactory.cs index b666323e9..993deaecf 100644 --- a/TestBenchFramework/BenchControl/Elde/ValveEx/ValveFactory.cs +++ b/TestBenchFramework/BenchControl/Elde/ValveEx/ValveFactory.cs @@ -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.Elde.ValveEx @@ -13,6 +14,8 @@ namespace TBF.BenchControl.Elde.ValveEx public IComponent DummyComponent() { return new Valve(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Valve(cfg, components); } + public IComponentCfg DefaultConfig() { return new ValveCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Generic/IComponentCfg.cs b/TestBenchFramework/BenchControl/Generic/IComponentCfg.cs index c294c934e..c3785f8c8 100644 --- a/TestBenchFramework/BenchControl/Generic/IComponentCfg.cs +++ b/TestBenchFramework/BenchControl/Generic/IComponentCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System.Collections.Generic; @@ -50,7 +50,6 @@ namespace TBF.BenchControl.Generic /// /// Object instance factory-like methods /// - IComponent GetComponent(IList components); IComponentCfgCtrl GetControl(); /// diff --git a/TestBenchFramework/BenchControl/Generic/IComponentFactory.cs b/TestBenchFramework/BenchControl/Generic/IComponentFactory.cs index 0aaedd365..0005050f3 100644 --- a/TestBenchFramework/BenchControl/Generic/IComponentFactory.cs +++ b/TestBenchFramework/BenchControl/Generic/IComponentFactory.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System.Collections.Generic; @@ -15,6 +15,14 @@ namespace TBF.BenchControl.Generic /// IComponent DummyComponent(); + /// + /// Returns a component with the given configuration + /// + /// Component comfiguration + /// List of all component + /// Component instance + IComponent GetComponent(IComponentCfg cfg, IList components); + /// /// Returns the default configuration /// diff --git a/TestBenchFramework/BenchControl/Keithley/RS232/Factory.cs b/TestBenchFramework/BenchControl/Keithley/RS232/Factory.cs index 47f13adfb..b6d173ef5 100644 --- a/TestBenchFramework/BenchControl/Keithley/RS232/Factory.cs +++ b/TestBenchFramework/BenchControl/Keithley/RS232/Factory.cs @@ -1,6 +1,7 @@ /// /// Copyright (c) 2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Keithley.RS232 @@ -13,6 +14,8 @@ namespace TBF.BenchControl.Keithley.RS232 public IComponent DummyComponent() { return new Multimeter(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Multimeter(cfg); } + public IComponentCfg DefaultConfig() { return new MultimeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Keithley/RS232/Multimeter.cs b/TestBenchFramework/BenchControl/Keithley/RS232/Multimeter.cs index 4d613e376..a3f91a378 100644 --- a/TestBenchFramework/BenchControl/Keithley/RS232/Multimeter.cs +++ b/TestBenchFramework/BenchControl/Keithley/RS232/Multimeter.cs @@ -37,11 +37,11 @@ namespace TBF.BenchControl.Keithley.RS232 /// 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. /// - public Multimeter(MultimeterCfg cfg, IList components) + public Multimeter(Generic.IComponentCfg cfg) : base(cfg) { + modbusCommonCfg = cfg as MultimeterCfg; serialPort = null; - modbusCommonCfg = cfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/Keithley/RS232/MultimeterCfg.cs b/TestBenchFramework/BenchControl/Keithley/RS232/MultimeterCfg.cs index 854cdb72e..6a2fd6288 100644 --- a/TestBenchFramework/BenchControl/Keithley/RS232/MultimeterCfg.cs +++ b/TestBenchFramework/BenchControl/Keithley/RS232/MultimeterCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.Keithley.RS232 { public class MultimeterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Multimeter(this, components); } public IComponentCfgCtrl GetControl() { return new MultimeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/Factory.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/Factory.cs index 82bcbe066..8ea2ee2f2 100644 --- a/TestBenchFramework/BenchControl/Keithley/TempMeter/Factory.cs +++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/Factory.cs @@ -1,6 +1,7 @@ /// /// Copyright (c) 2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Keithley.TempMeter @@ -13,6 +14,8 @@ namespace TBF.BenchControl.Keithley.TempMeter public IComponent DummyComponent() { return new TempMeter(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TempMeter(cfg, components); } + public IComponentCfg DefaultConfig() { return new TempMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeter.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeter.cs index cc0948c19..77ba5c174 100644 --- a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeter.cs +++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeter.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.Keithley.TempMeter { } - public TempMeter(TempMeterCfg cfg, IList components) + public TempMeter(Generic.IComponentCfg cfg, IList components) : base(cfg) { - tempMtrCfg = cfg; + tempMtrCfg = cfg as TempMeterCfg; Multimeter = (Multimeter)TbfComponents.FindComponent(cfg.ParentName, components); if (Multimeter == null) throw new Exception("Cannot find " + Name + " parent"); diff --git a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs index 553761d60..9e763c60e 100644 --- a/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs +++ b/TestBenchFramework/BenchControl/Keithley/TempMeter/TempMeterCfg.cs @@ -11,7 +11,6 @@ namespace TBF.BenchControl.Keithley.TempMeter { public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg { - public IComponent GetComponent(IList components) { return new TempMeter(this, components); } public IComponentCfgCtrl GetControl() { return new TempMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceCfg.cs b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceCfg.cs index f70a2f49a..9b7ff94b0 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceCfg.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceCfg.cs @@ -1,6 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems -/// Author: Milan Hanajik +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System; using System.IO; @@ -13,7 +12,6 @@ namespace TBF.BenchControl.MettlerToledo.Multi { public class BalanceCfg : ComponentCfgBase, GenericDevices.IBalanceCfg, GenericDevices.ICalibInfoCfg { - public IComponent GetComponent(IList components) { return new BalanceDev(this); } public IComponentCfgCtrl GetControl() { return new BalanceCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceDev.cs b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceDev.cs index 3e79ff94a..a13252a3d 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceDev.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceDev.cs @@ -83,11 +83,11 @@ namespace TBF.BenchControl.MettlerToledo.Multi /// Constructor /// /// Balance properties - public BalanceDev(BalanceCfg cfg) + public BalanceDev(Generic.IComponentCfg cfg) : base(cfg) { - balanceCfg = cfg; - if (cfg.IdNr == 1) balance1Cfg = cfg; + balanceCfg = cfg as BalanceCfg; + if (balanceCfg.IdNr == 1) balance1Cfg = balanceCfg; balanceNr = nextBalanceIdx++; Masses = new float[nextBalanceIdx]; /// (re)initialize the static array of masses of all balances diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceFactory.cs b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceFactory.cs index 29955c189..7767ef1a1 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceFactory.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Multi/BalanceFactory.cs @@ -1,6 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems -/// Author: Milan Hanajik +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System.Collections.Generic; using TBF.BenchControl.Generic; @@ -16,6 +15,8 @@ namespace TBF.BenchControl.MettlerToledo.Multi public IComponent DummyComponent() { return new BalanceDev(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new BalanceDev(cfg); } + public IComponentCfg DefaultConfig() { return new BalanceCfg(this); } public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceCfg.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceCfg.cs index 9d12feb21..6769c432e 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceCfg.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceCfg.cs @@ -12,12 +12,6 @@ namespace TBF.BenchControl.MettlerToledo.Standard { public class BalanceCfg : ComponentCfgBase, GenericDevices.IBalanceCfg, GenericDevices.ICalibInfoCfg { - public IComponent GetComponent(IList components) - { - if (Factory.ClassName.Equals("MettlerToledoBalanceNew")) return new BalanceNewDev(this); - else if (Factory.ClassName.Equals("MettlerToledoBalanceOld")) return new BalanceOld(this); - else return new BalanceDev(this); - } public IComponentCfgCtrl GetControl() { return new BalanceCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceDev.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceDev.cs index 09eaefcfb..61c7b85ac 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceDev.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceDev.cs @@ -82,10 +82,10 @@ namespace TBF.BenchControl.MettlerToledo.Standard /// /// Balance properties /// A list of components loaded so far - public BalanceDev(BalanceCfg cfg) + public BalanceDev(Generic.IComponentCfg cfg) : base(cfg) { - balanceCfg = cfg; + balanceCfg = cfg as BalanceCfg; balanceNr = nextBalanceIdx++; Masses = new float[nextBalanceIdx]; /// (re)initialize the static array of masses of all balances diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceFactory.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceFactory.cs index 28edb1abb..6c7cc287b 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceFactory.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceFactory.cs @@ -1,6 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// Author: Milan Hanajik +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System.Collections.Generic; using TBF.BenchControl.Generic; @@ -16,6 +15,8 @@ namespace TBF.BenchControl.MettlerToledo.Standard public IComponent DummyComponent() { return new BalanceDev(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new BalanceDev(cfg); } + public IComponentCfg DefaultConfig() { return new BalanceCfg(this); } public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs index 073e7023f..4cdf2edbc 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewDev.cs @@ -36,7 +36,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard { } - public BalanceNewDev(BalanceCfg cfg) + public BalanceNewDev(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewFactory.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewFactory.cs index 23b4f2984..034428594 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewFactory.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceNewFactory.cs @@ -1,6 +1,5 @@ /// -/// Copyright (c) 2013-2015 Sensus Metering Systems -/// Author: Milan Hanajik +/// Copyright (c) 2013-2016 Sensus Metering Systems /// using System.Collections.Generic; using TBF.BenchControl.Generic; @@ -16,6 +15,8 @@ namespace TBF.BenchControl.MettlerToledo.Standard public IComponent DummyComponent() { return new BalanceNewDev(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new BalanceNewDev(cfg); } + public IComponentCfg DefaultConfig() { return new BalanceCfg(this); } public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOld.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOld.cs index 89917b7a9..f208f82a6 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOld.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOld.cs @@ -31,7 +31,7 @@ namespace TBF.BenchControl.MettlerToledo.Standard { } - public BalanceOld(BalanceCfg cfg) + public BalanceOld(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOldFactory.cs b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOldFactory.cs index 0515bd18c..dc1da032b 100644 --- a/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOldFactory.cs +++ b/TestBenchFramework/BenchControl/MettlerToledo/Standard/BalanceOldFactory.cs @@ -1,6 +1,5 @@ /// /// Copyright (c) 2016 Sensus Metering Systems -/// Author: Milan Hanajik /// using System.Collections.Generic; using TBF.BenchControl.Generic; @@ -16,6 +15,8 @@ namespace TBF.BenchControl.MettlerToledo.Standard public IComponent DummyComponent() { return new BalanceOld(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new BalanceOld(cfg); } + public IComponentCfg DefaultConfig() { return new BalanceCfg(this); } public IComponentCfgCtrl CreateCfgCtrl() { return new BalanceCfgCtrl(); } diff --git a/TestBenchFramework/BenchControl/Modbus/Common/Factory.cs b/TestBenchFramework/BenchControl/Modbus/Common/Factory.cs index d5e0511c9..007f1307b 100644 --- a/TestBenchFramework/BenchControl/Modbus/Common/Factory.cs +++ b/TestBenchFramework/BenchControl/Modbus/Common/Factory.cs @@ -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.Modbus.Common @@ -13,6 +14,8 @@ namespace TBF.BenchControl.Modbus.Common public IComponent DummyComponent() { return new Modbus(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Modbus(cfg); } + public IComponentCfg DefaultConfig() { return new ModbusCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Modbus/Common/Modbus.cs b/TestBenchFramework/BenchControl/Modbus/Common/Modbus.cs index b7e86357b..52ce6b027 100644 --- a/TestBenchFramework/BenchControl/Modbus/Common/Modbus.cs +++ b/TestBenchFramework/BenchControl/Modbus/Common/Modbus.cs @@ -37,11 +37,11 @@ namespace TBF.BenchControl.Modbus.Common /// 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. /// - public Modbus(ModbusCfg cfg, IList components) + public Modbus(Generic.IComponentCfg cfg) : base(cfg) { serialPort = null; - modbusCommonCfg = cfg; + modbusCommonCfg = cfg as ModbusCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/Modbus/Common/ModbusCfg.cs b/TestBenchFramework/BenchControl/Modbus/Common/ModbusCfg.cs index 1ccbed151..fc35b3c0f 100644 --- a/TestBenchFramework/BenchControl/Modbus/Common/ModbusCfg.cs +++ b/TestBenchFramework/BenchControl/Modbus/Common/ModbusCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System.IO; using System.Collections.Generic; @@ -11,7 +11,6 @@ namespace TBF.BenchControl.Modbus.Common { public class ModbusCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Modbus(this, components); } public IComponentCfgCtrl GetControl() { return new ModbusCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Modbus/QuidoRS/Factory.cs b/TestBenchFramework/BenchControl/Modbus/QuidoRS/Factory.cs index 577ed5dc0..387937c0f 100644 --- a/TestBenchFramework/BenchControl/Modbus/QuidoRS/Factory.cs +++ b/TestBenchFramework/BenchControl/Modbus/QuidoRS/Factory.cs @@ -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.Modbus.QuidoRS @@ -13,6 +14,8 @@ namespace TBF.BenchControl.Modbus.QuidoRS public IComponent DummyComponent() { return new QuidoRS(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new QuidoRS(cfg, components); } + public IComponentCfg DefaultConfig() { return new QuidoRSCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRS.cs b/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRS.cs index b93f0187c..909f265fa 100644 --- a/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRS.cs +++ b/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRS.cs @@ -25,10 +25,10 @@ namespace TBF.BenchControl.Modbus.QuidoRS { } - public QuidoRS(QuidoRSCfg cfg, IList components) + public QuidoRS(Generic.IComponentCfg cfg, IList components) : base(cfg) { - quidoRSCfg = cfg; + quidoRSCfg = cfg as QuidoRSCfg; modbus = (GenericDevices.IModbus)TbfComponents.FindComponent(cfg.ParentName, components); if (modbus == null) throw new Exception("Cannot find " + Name + " parent"); diff --git a/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRSCfg.cs b/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRSCfg.cs index b59062230..741a7edc1 100644 --- a/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRSCfg.cs +++ b/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRSCfg.cs @@ -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.Modbus.QuidoRS { public class QuidoRSCfg : ComponentCfgBase, Generic.IChildComponentCfg { - public IComponent GetComponent(IList components) { return new QuidoRS(this, components); } public IComponentCfgCtrl GetControl() { return new QuidoRSCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactoryCompound.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactoryCompound.cs index b12345960..3fe4553b1 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactoryCompound.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactoryCompound.cs @@ -2,6 +2,7 @@ /// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Output.FileWriters.Basic @@ -14,6 +15,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic public IComponent DummyComponent() { return new Writer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Writer(cfg); } + public IComponentCfg DefaultConfig() { return new WriterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactorySingle.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactorySingle.cs index 8d60d5a60..77f633401 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactorySingle.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/FactorySingle.cs @@ -2,6 +2,7 @@ /// Copyright (c) 2013-2016 Sensus Metering Systems /// using System; +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Output.FileWriters.Basic @@ -14,6 +15,8 @@ namespace TBF.BenchControl.Output.FileWriters.Basic public IComponent DummyComponent() { return new Writer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Writer(cfg); } + public IComponentCfg DefaultConfig() { return new WriterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/Writer.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/Writer.cs index 8c79dc846..81dd72146 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/Writer.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/Writer.cs @@ -35,12 +35,12 @@ namespace TBF.BenchControl.Output.FileWriters.Basic public Writer() {} - public Writer(WriterCfg cfg) - : base(cfg) + public Writer(Generic.IComponentCfg cfg) + : base(cfg) { - writerCfg = cfg; + writerCfg = cfg as WriterCfg; - switch (cfg.Separator) + switch (writerCfg.Separator) { default: case Separator.None: separatorStr = string.Empty; break; diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/WriterCfg.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/WriterCfg.cs index 59044b7d8..61630ec1c 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Basic/WriterCfg.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Basic/WriterCfg.cs @@ -46,7 +46,6 @@ namespace TBF.BenchControl.Output.FileWriters.Basic public class WriterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Writer(this); } public IComponentCfgCtrl GetControl() { return new WriterCfgCtrl(); } public string DestinationPath; /// Directory path into which the results will be saved diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactoryCompound.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactoryCompound.cs index ca2aa849f..b6db680d3 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactoryCompound.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactoryCompound.cs @@ -2,6 +2,7 @@ /// Copyright (c) 2016 Sensus Metering Systems /// using System; +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Output.FileWriters.Enhanced @@ -14,6 +15,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced public IComponent DummyComponent() { return new Writer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Writer(cfg); } + public IComponentCfg DefaultConfig() { return new WriterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactorySingle.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactorySingle.cs index 14ad8e3e3..8429dd8a5 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactorySingle.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/FactorySingle.cs @@ -2,6 +2,7 @@ /// Copyright (c) 2016 Sensus Metering Systems /// using System; +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Output.FileWriters.Enhanced @@ -14,6 +15,8 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced public IComponent DummyComponent() { return new Writer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Writer(cfg); } + public IComponentCfg DefaultConfig() { return new WriterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs index aff85b499..ea4709458 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/Writer.cs @@ -39,12 +39,12 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced public Writer() {} - public Writer(WriterCfg cfg) + public Writer(Generic.IComponentCfg cfg) : base(cfg) { - writerCfg = cfg; + writerCfg = cfg as WriterCfg; - switch (cfg.Separator) + switch (writerCfg.Separator) { default: case Separator.None: separatorStr = string.Empty; break; diff --git a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/WriterCfg.cs b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/WriterCfg.cs index 18e88e502..2c5a2c855 100644 --- a/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/WriterCfg.cs +++ b/TestBenchFramework/BenchControl/Output/FileWriters/Enhanced/WriterCfg.cs @@ -46,7 +46,6 @@ namespace TBF.BenchControl.Output.FileWriters.Enhanced public class WriterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Writer(this); } public IComponentCfgCtrl GetControl() { return new WriterCfgCtrl(); } public string DestinationPath; /// Directory path into which the results will be saved diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/Printer.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/Printer.cs index d9bbced71..58a025955 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/Printer.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/Printer.cs @@ -22,10 +22,10 @@ namespace TBF.BenchControl.ResultsPrinters.Basic public Printer() { } - public Printer(PrinterCfg cfg) - : base(cfg) + public Printer(Generic.IComponentCfg cfg) + : base(cfg) { - printerCfg = cfg; + printerCfg = cfg as PrinterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfg.cs index 65c204b65..feb8308a5 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterCfg.cs @@ -12,7 +12,6 @@ namespace TBF.BenchControl.ResultsPrinters.Basic { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterFactory.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterFactory.cs index 70c7a15ad..69406bbbf 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterFactory.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Basic/PrinterFactory.cs @@ -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.ResultsPrinters.Basic @@ -13,6 +14,8 @@ namespace TBF.BenchControl.ResultsPrinters.Basic public IComponent DummyComponent() { return new Printer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Printer(cfg); } + public IComponentCfg DefaultConfig() { return new PrinterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/Printer.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/Printer.cs index 1fbc25718..5f96a5cfe 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/Printer.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/Printer.cs @@ -22,10 +22,10 @@ namespace TBF.BenchControl.ResultsPrinters.Cevak public Printer() { } - public Printer(PrinterCfg cfg) - : base(cfg) + public Printer(Generic.IComponentCfg cfg) + : base(cfg) { - printerCfg = cfg; + printerCfg = cfg as PrinterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterCfg.cs index 8204fbe3c..3bcdfbd0e 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterCfg.cs @@ -12,7 +12,6 @@ namespace TBF.BenchControl.ResultsPrinters.Cevak { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterFactory.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterFactory.cs index 26347cb46..e1a068265 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterFactory.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Cevak/PrinterFactory.cs @@ -1,6 +1,7 @@ /// /// Copyright (c) 2013-2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.ResultsPrinters.Cevak @@ -13,6 +14,8 @@ namespace TBF.BenchControl.ResultsPrinters.Cevak public IComponent DummyComponent() { return new Printer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Printer(cfg); } + public IComponentCfg DefaultConfig() { return new PrinterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/Printer.cs b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/Printer.cs index 835dc87c2..584ec87e0 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/Printer.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/Printer.cs @@ -21,10 +21,10 @@ namespace TBF.BenchControl.ResultsPrinters.LabelPrinter public Printer() { } - public Printer(PrinterCfg cfg) + public Printer(Generic.IComponentCfg cfg) : base(cfg) { - printerCfg = cfg; + printerCfg = cfg as PrinterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterCfg.cs index 1aed448c0..7c66f57fd 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -12,7 +12,6 @@ namespace TBF.BenchControl.ResultsPrinters.LabelPrinter { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterFactory.cs b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterFactory.cs index 24636066c..858ea1f1a 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterFactory.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/LabelPrinter/PrinterFactory.cs @@ -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.ResultsPrinters.LabelPrinter @@ -13,6 +14,8 @@ namespace TBF.BenchControl.ResultsPrinters.LabelPrinter public IComponent DummyComponent() { return new Printer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Printer(cfg); } + public IComponentCfg DefaultConfig() { return new PrinterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/Printer.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/Printer.cs index 24e1234d7..49400847d 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/Printer.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/Printer.cs @@ -31,10 +31,10 @@ namespace TBF.BenchControl.ResultsPrinters.Munich { } - public Printer(PrinterCfg cfg) + public Printer(Generic.IComponentCfg cfg) : base(cfg) { - printerCfg = cfg; + printerCfg = cfg as PrinterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs index 81ab12b3d..3cbeb7a6e 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterCfg.cs @@ -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.ResultsPrinters.Munich { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterFactory.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterFactory.cs index c95dd7698..57a367ae1 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterFactory.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Munich/PrinterFactory.cs @@ -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.ResultsPrinters.Munich @@ -13,6 +14,8 @@ namespace TBF.BenchControl.ResultsPrinters.Munich public IComponent DummyComponent() { return new Printer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Printer(cfg); } + public IComponentCfg DefaultConfig() { return new PrinterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/Printer.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/Printer.cs index 82012893f..8c8b7b8d3 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/Printer.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/Printer.cs @@ -22,10 +22,10 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska public Printer() { } - public Printer(PrinterCfg cfg) + public Printer(Generic.IComponentCfg cfg) : base(cfg) { - printerCfg = cfg; + printerCfg = cfg as PrinterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterCfg.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterCfg.cs index c804dad47..ed93ab578 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterCfg.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterCfg.cs @@ -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.ResultsPrinters.Zapiska { public class PrinterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new Printer(this); } public IComponentCfgCtrl GetControl() { return new PrinterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterFactory.cs b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterFactory.cs index 496d59cc3..7a48c4a92 100644 --- a/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterFactory.cs +++ b/TestBenchFramework/BenchControl/ResultsPrinters/Zapiska/PrinterFactory.cs @@ -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.ResultsPrinters.Zapiska @@ -13,6 +14,8 @@ namespace TBF.BenchControl.ResultsPrinters.Zapiska public IComponent DummyComponent() { return new Printer(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Printer(cfg); } + public IComponentCfg DefaultConfig() { return new PrinterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TbfComponents.cs b/TestBenchFramework/BenchControl/TbfComponents.cs index 69c2fc6d9..9431f1a35 100644 --- a/TestBenchFramework/BenchControl/TbfComponents.cs +++ b/TestBenchFramework/BenchControl/TbfComponents.cs @@ -132,7 +132,7 @@ namespace TBF.BenchControl IComponentFactory cmpntFactory = BenchControl.TbfComponents.CmpntFactoryFromClassName(entity.ClassName); if (cmpntFactory == null) continue; - IComponent cmpnt = cmpntFactory.CmpntCfgFromCmpntEntity(entity).GetComponent(components); + IComponent cmpnt = cmpntFactory.GetComponent(cmpntFactory.CmpntCfgFromCmpntEntity(entity), components); /// /// Inherit DebugMode from the parent (if any) diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs index e84beb558..c21efdba1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.Adjustment { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs index 7b53b73b7..c9e7c3b7d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodCfg.cs @@ -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.TestMethods.Adjustment { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs index ddbc87f24..d7eddf5ce 100644 --- a/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/Adjustment/TestMethodFactory.cs @@ -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.TestMethods.Adjustment @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.Adjustment public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetection.cs b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetection.cs index 7cedd91c6..e2ab05f62 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetection.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetection.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection { } - public RoiDetection(RoiDetectionCfg cfg) + public RoiDetection(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfg.cs b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfg.cs index 888902cf7..0cab14351 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionCfg.cs @@ -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.TestMethods.CameraRoiDetection { public class RoiDetectionCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new RoiDetection(this); } public IComponentCfgCtrl GetControl() { return new RoiDetectionCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionFactory.cs b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionFactory.cs index 2df7eb64b..88320d9ef 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CameraRoiDetection/RoiDetectionFactory.cs @@ -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.TestMethods.CameraRoiDetection @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.CameraRoiDetection public IComponent DummyComponent() { return new RoiDetection(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new RoiDetection(cfg); } + public IComponentCfg DefaultConfig() { return new RoiDetectionCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethod.cs index aad067907..274f5da08 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethod.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfg.cs index 48f73707e..01899ef1e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodCfg.cs @@ -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.TestMethods.CombinedMeters { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodFactory.cs index 28ba7b09a..e4d4e8c5e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedMeters/TestMethodFactory.cs @@ -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.TestMethods.CombinedMeters @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethod.cs index 63e72f956..b51afb3be 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethod.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfg.cs index 899137d3a..abc1d2b2e 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodCfg.cs @@ -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.TestMethods.CombinedWithDetection { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters diff --git a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodFactory.cs index 6e09c65c7..42b0c86ba 100644 --- a/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/CombinedWithDetection/TestMethodFactory.cs @@ -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.TestMethods.CombinedWithDetection @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethod.cs index 963883764..6235d5913 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs index a105b2ca3..e4f511b9b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodCfg.cs @@ -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.TestMethods.FixedStartAdvanced { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs index 9a4c96e24..5684dbd43 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartAdvanced/TestMethodFactory.cs @@ -1,6 +1,7 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.TestMethods.FixedStartAdvanced @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartAdvanced public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethod.cs index 10f68acfe..4bd2321ec 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs index 12cb479d9..ade19d727 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodCfg.cs @@ -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.TestMethods.FixedStartCombinedMeters { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs index d47e35b1f..2b5270910 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartCombinedMeters/TestMethodFactory.cs @@ -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.TestMethods.FixedStartCombinedMeters @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartCombinedMeters public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethod.cs index acd13e061..1551bb733 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs index 6d76540a2..028a52041 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodCfg.cs @@ -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.TestMethods.FixedStartMassCollection { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs index 25df703cc..69367980d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FixedStartMassCollection/TestMethodFactory.cs @@ -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.TestMethods.FixedStartMassCollection @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.FixedStartMassCollection public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethod.cs index b5cbc22c8..2ce4ac27f 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStart { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs index 91a0b272b..e8944faeb 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodCfg.cs @@ -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.TestMethods.FlyingStart { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs index 74c066586..b3df97914 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStart/TestMethodFactory.cs @@ -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.TestMethods.FlyingStart @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStart public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs index 4bee21b11..a952e86d9 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethod.cs @@ -1,6 +1,5 @@ /// /// Copyright (c) 2013-2015 Sensus Metering Systems -/// Author: Milan Hanajík /// using System; using System.Collections.Generic; @@ -23,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs index 647d47061..dce6cac91 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodCfg.cs @@ -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,21 +12,18 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors - TestMethodCfg() - { - Name = "FlyingStartCollection"; - ParentName = string.Empty; - } + TestMethodCfg() { } - public TestMethodCfg(IComponentFactory factory) + public TestMethodCfg(string name, IComponentFactory factory) : this() { - this.Factory = factory; - } + Name = name; + Factory = factory; + ParentName = string.Empty; + } public string ToString(int i) { diff --git a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs index 451b90465..468eb0218 100644 --- a/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/FlyingStartMassCollection/TestMethodFactory.cs @@ -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.TestMethods.FlyingStartMassCollection @@ -13,7 +14,9 @@ namespace TBF.BenchControl.TestMethods.FlyingStartMassCollection public IComponent DummyComponent() { return new TestMethod(); } - public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + + public IComponentCfg DefaultConfig() { return new TestMethodCfg("FlyingStartCollection", this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { diff --git a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethod.cs index 190fc9963..12f5e19e2 100644 --- a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethod.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.TestMethods.HeatMeters { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodCfg.cs index 5c55bf3ac..1ba517262 100644 --- a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodCfg.cs @@ -12,7 +12,6 @@ namespace TBF.BenchControl.TestMethods.HeatMeters { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters diff --git a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodFactory.cs index d3203e175..b098a163d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/HeatMeters/TestMethodFactory.cs @@ -1,6 +1,7 @@ /// /// Copyright (c) 2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.TestMethods.HeatMeters @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.HeatMeters public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs index acfbf1c56..4d33019b8 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethod.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.TestMethods.LeakTest { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodCfg.cs index 217a90511..8515e7f21 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodCfg.cs @@ -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.TestMethods.LeakTest { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters diff --git a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodFactory.cs index 05869f8d8..ee0453eb1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/LeakTest/TestMethodFactory.cs @@ -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.TestMethods.LeakTest @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.LeakTest public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs index 8a9f996ad..2ac7d0930 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethod.cs @@ -24,10 +24,10 @@ namespace TBF.BenchControl.TestMethods.PMaxTest { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodCfg.cs index 85ae3e5d2..6bf947243 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodCfg.cs @@ -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.TestMethods.PMaxTest { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters diff --git a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodFactory.cs index 9f31c91c0..95ba9537f 100644 --- a/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/PMaxTest/TestMethodFactory.cs @@ -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.TestMethods.PMaxTest @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.PMaxTest public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs index d36073ed4..b225f4fc7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethod.cs @@ -22,7 +22,7 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { log.Debug(this.ToString()); diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs index ddd855874..df4104f47 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodCfg.cs @@ -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.TestMethods.ReferenceFlowmeterCalibration { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Private parameterless constructor invoked by all other (public) constructors diff --git a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs index cc9983155..ba73a866b 100644 --- a/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/ReferenceFlowmeterCalibration/TestMethodFactory.cs @@ -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.TestMethods.ReferenceFlowmeterCalibration @@ -13,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.ReferenceFlowmeterCalibration public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethod.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethod.cs index 80f55d915..4d4db2bf7 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethod.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethod.cs @@ -49,10 +49,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { } - public TestMethod(TestMethodCfg cfg) + public TestMethod(Generic.IComponentCfg cfg) : base(cfg) { - testMethodCfg = cfg; + testMethodCfg = cfg as TestMethodCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodCfg.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodCfg.cs index 82b3ecab1..7f0681201 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodCfg.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodCfg.cs @@ -1,5 +1,5 @@ /// -/// Copyright (c) 2015 Sensus Metering Systems +/// Copyright (c) 2015-2016 Sensus Metering Systems /// using System; using System.Collections.Generic; @@ -12,7 +12,6 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new TestMethod(this); } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodFactory.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodFactory.cs index b28d0e11b..de644c2bf 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodFactory.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/TestMethodFactory.cs @@ -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.TestMethods.iPerlCommunication @@ -14,6 +14,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication public IComponent DummyComponent() { return new TestMethod(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new TestMethod(cfg); } + public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeter.cs b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeter.cs index d11436782..66714c1b4 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeter.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeter.cs @@ -93,11 +93,11 @@ namespace TBF.BenchControl.WaterMeters.Munich ClearData(); } - public WaterMeter(WaterMeterCfg cfg) + public WaterMeter(Generic.IComponentCfg cfg) : base(cfg) { ClearData(); - waterMeterCfg = cfg; + waterMeterCfg = cfg as WaterMeterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterCfg.cs b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterCfg.cs index d423548b8..71fbd4c47 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterCfg.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterCfg.cs @@ -13,7 +13,6 @@ namespace TBF.BenchControl.WaterMeters.Munich { public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new WaterMeter(this); } public IComponentCfgCtrl GetControl() { return new WaterMeterCfgCtrl(); } /// Procedure parameters diff --git a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterFactory.cs b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterFactory.cs index b913f555f..d621f7a24 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterFactory.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/Munich/WaterMeterFactory.cs @@ -1,6 +1,7 @@ /// /// Copyright (c) 2016 Sensus Metering Systems /// +using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.WaterMeters.Munich @@ -13,6 +14,8 @@ namespace TBF.BenchControl.WaterMeters.Munich public IComponent DummyComponent() { return new WaterMeter(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new WaterMeter(cfg); } + public IComponentCfg DefaultConfig() { return new WaterMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeter.cs b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeter.cs index bc1ab9345..ddb5e827d 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeter.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeter.cs @@ -93,11 +93,11 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter ClearData(); } - public WaterMeter(WaterMeterCfg cfg) + public WaterMeter(Generic.IComponentCfg cfg) : base(cfg) { ClearData(); - waterMeterCfg = cfg; + waterMeterCfg = cfg as WaterMeterCfg; log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs index bf3875402..982fcec47 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterCfg.cs @@ -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.WaterMeters.WaterMeter { public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new WaterMeter(this); } public IComponentCfgCtrl GetControl() { return new WaterMeterCfgCtrl(); } /// Procedure parameters diff --git a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterFactory.cs b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterFactory.cs index b4f4e9f5e..dca767b3b 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterFactory.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/WaterMeter/WaterMeterFactory.cs @@ -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.WaterMeters.WaterMeter @@ -13,6 +14,8 @@ namespace TBF.BenchControl.WaterMeters.WaterMeter public IComponent DummyComponent() { return new WaterMeter(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new WaterMeter(cfg); } + public IComponentCfg DefaultConfig() { return new WaterMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) diff --git a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs index 9999a21c8..d77e36cdb 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeter.cs @@ -374,13 +374,13 @@ namespace TBF.BenchControl.WaterMeters.iPerl ClearData(); } - public WaterMeter(WaterMeterCfg cfg) + public WaterMeter(Generic.IComponentCfg cfg) : base(cfg) { ClearData(); - iPerlCfg = cfg; - ltrsPerPulse = (cfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 0 : (1 / cfg.ProcParams.PulsesPerLtr); + iPerlCfg = cfg as WaterMeterCfg; + ltrsPerPulse = (iPerlCfg.ProcParams.PulsesPerLtr <= float.Epsilon) ? 0 : (1 / iPerlCfg.ProcParams.PulsesPerLtr); log.Debug(this.ToString()); } diff --git a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterCfg.cs b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterCfg.cs index 979bd6191..776e80842 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterCfg.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterCfg.cs @@ -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; @@ -14,7 +13,6 @@ namespace TBF.BenchControl.WaterMeters.iPerl { public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg { - public IComponent GetComponent(IList components) { return new WaterMeter(this); } public IComponentCfgCtrl GetControl() { return new WaterMeterCfgCtrl(); } /// diff --git a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterFactory.cs b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterFactory.cs index 15968dc33..2034f5191 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterFactory.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/iPerl/WaterMeterFactory.cs @@ -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.WaterMeters.iPerl @@ -14,6 +14,8 @@ namespace TBF.BenchControl.WaterMeters.iPerl public IComponent DummyComponent() { return new WaterMeter(); } + public IComponent GetComponent(IComponentCfg cfg, IList components) { return new WaterMeter(cfg); } + public IComponentCfg DefaultConfig() { return new WaterMeterCfg(this); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)