49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
///
|
|
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.WaterMeters.WaterMeter
|
|
{
|
|
public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(WaterMeterCfg) })[0];
|
|
protected override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl() { return new WaterMeterCfgCtrl(); }
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcParams ProcParams;
|
|
public override IParamsProvider GetProcedureParams() { return ProcParams; }
|
|
public override IParamsProvider CreateProcedureParams(Procedure procedure)
|
|
{
|
|
ProcParams procParams = new ProcParams(true);
|
|
procParams.UpdateProcedureParams(Name, procedure);
|
|
return procParams;
|
|
}
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
WaterMeterCfg()
|
|
{
|
|
Name = "WM";
|
|
ParentName = string.Empty;
|
|
ProcParams = new ProcParams(true);
|
|
}
|
|
|
|
public WaterMeterCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}", Name);
|
|
}
|
|
}
|
|
}
|