/// /// Copyright (c) 2013-2015 Sensus Metering Systems /// using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using TBF.BenchControl.Generic; 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(); } /// /// Serialized parameters /// public int Idx0; /// 0..3 public byte RS485Address; /// 0..255 /// Private parameterless constructor invoked by all other (public) constructors PressureMeterCfg() { Name = "Pr"; ParentName = "CB"; Idx0 = 0; RS485Address = 99; } public PressureMeterCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, Parent={1}, Idx0={2}, Address={3}", Name, (string.IsNullOrEmpty(ParentName) ? "-" : ParentName), Idx0, RS485Address); } } }