tbf/TestBenchFramework/BenchControl/Modbus/QuidoRS/QuidoRSCfg.cs
Milan Hanajik f2da177517 Modbus and QuidoRS components added
WaterMeters folder created, WaterMeter component relocated within the project, iPerl component added
WaterMeters.iPerl implements IRegisterReader interface, TODO: Implement WaterMeter.ReadPulses( ) function
iPerlAdjustment test method added
2015-07-31 19:18:56 +02:00

45 lines
1.1 KiB
C#

///
/// 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<IComponent> 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));
}
}
}