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