/// /// Copyright (c) 2015-2017 Sensus Metering Systems /// using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Sockets; using System.Xml.Serialization; using Config.Entities; using TBF.BenchControl.Generic; using TBF.Resources; namespace TBF.BenchControl.TestMethods.GenesisCommunication.GenesisHead { public class GenesisHeadCfg : ComponentCfgBase, Generic.IComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(GenesisHeadCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl() { return new GenesisHeadCfgCtrl(); } /// /// Serialized parameters /// public int SlotNr; /// Number written to QuidoRS to connct the watermeter to RfidComPort, 1 .. 10 /// Procedure parameters [XmlIgnore] public ProcParams ProcParams; public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; } public override IParamsProvider CreateProcParamsProvider() { return new ProcParams(true); } [XmlIgnore] public MeterType MeterType { get { return (ProcParams != null) ? ProcParams.MeterType : MeterType.AutoDetect; } } /// Private parameterless constructor invoked by all other (public) constructors GenesisHeadCfg() { Name = "Genesis"; ParentName = string.Empty; SlotNr = 0; ProcParams = new ProcParams(true); } public GenesisHeadCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("{0} SlotNr={1}", Name, SlotNr ); } } }