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
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
///
|
||||
/// 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user