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
45 lines
1.1 KiB
C#
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));
|
|
}
|
|
}
|
|
}
|