2015-04-15 18:32:56 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System.IO;
|
2015-01-02 18:14:19 +00:00
|
|
|
|
using System.Collections.Generic;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
using System.Xml.Serialization;
|
|
|
|
|
|
using TBF.BenchControl.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.Elde.PumpWithFM
|
|
|
|
|
|
{
|
|
|
|
|
|
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
|
|
|
|
|
{
|
2015-01-02 18:14:19 +00:00
|
|
|
|
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
|
|
|
|
|
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
|
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
|
/// Serialized parameters
|
|
|
|
|
|
///
|
2014-07-28 07:54:35 +00:00
|
|
|
|
public int BitPosition;
|
|
|
|
|
|
public int FMIndex;
|
2014-09-06 06:10:08 +00:00
|
|
|
|
public int Delay;
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2014-12-31 12:46:33 +00:00
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
|
|
|
|
PumpCfg()
|
2014-07-28 07:54:35 +00:00
|
|
|
|
{
|
2015-06-22 12:24:06 +00:00
|
|
|
|
Name = "P";
|
2014-12-29 15:00:27 +00:00
|
|
|
|
ParentName = "CB";
|
|
|
|
|
|
BitPosition = 0;
|
|
|
|
|
|
FMIndex = 0;
|
2014-09-06 06:10:08 +00:00
|
|
|
|
Delay = 1;
|
2014-12-29 15:00:27 +00:00
|
|
|
|
}
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2014-12-29 15:00:27 +00:00
|
|
|
|
public PumpCfg(IComponentFactory factory)
|
|
|
|
|
|
: this()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Factory = factory;
|
|
|
|
|
|
}
|
2014-07-28 07:54:35 +00:00
|
|
|
|
|
2014-12-29 15:00:27 +00:00
|
|
|
|
public string ToString(int i)
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Format("Name={0}, Parent={1}, Bit={2}, FMIndex={3}, Delay={4}",
|
|
|
|
|
|
Name,
|
|
|
|
|
|
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
|
|
|
|
|
|
BitPosition,
|
|
|
|
|
|
FMIndex,
|
|
|
|
|
|
Delay);
|
|
|
|
|
|
}
|
2014-07-28 07:54:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|