47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System.IO;
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Elde.Pump
|
|
{
|
|
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
|
{
|
|
public IComponent GetComponent(IList<IComponent> components) { return new Pump(this, components); }
|
|
public IComponentCfgCtrl GetControl() { return new PumpCfgCtrl(); }
|
|
|
|
///
|
|
/// Serialized parameters
|
|
///
|
|
public int BitPosition;
|
|
public int Delay;
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
PumpCfg()
|
|
{
|
|
Name = "P";
|
|
ParentName = "CB";
|
|
BitPosition = 0;
|
|
Delay = 1;
|
|
}
|
|
|
|
public PumpCfg(IComponentFactory factory)
|
|
: this()
|
|
{
|
|
this.Factory = factory;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}, Parent={1}, Bit={2}, Delay={3}",
|
|
Name,
|
|
(string.IsNullOrEmpty(ParentName) ? "-" : ParentName),
|
|
BitPosition,
|
|
Delay);
|
|
}
|
|
}
|
|
}
|