Delay added to IValve and Pumps, no delay functionality yet
This commit is contained in:
@@ -7,27 +7,30 @@ namespace TBF.BenchControl.Elde.Pump
|
||||
public class PumpCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public int BitPosition;
|
||||
public int Delay;
|
||||
|
||||
/// Parameterless constructor
|
||||
public PumpCfg()
|
||||
{
|
||||
Delay = 1;
|
||||
}
|
||||
|
||||
/// Constructor
|
||||
public PumpCfg(IComponentFactory factory, string name, string parentName, int bitPosition)
|
||||
public PumpCfg(IComponentFactory factory, string name, string parentName, int bitPosition, int delay)
|
||||
: base(factory, name, parentName)
|
||||
{
|
||||
this.BitPosition = bitPosition;
|
||||
this.Delay = delay;
|
||||
}
|
||||
|
||||
public IComponentCfg Clone()
|
||||
{
|
||||
return new PumpCfg(Factory, Name, ParentName, BitPosition);
|
||||
return new PumpCfg(Factory, Name, ParentName, BitPosition, Delay);
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("bit={0}", BitPosition);
|
||||
return string.Format("bit={0}, delay={1}s", BitPosition, Delay);
|
||||
}
|
||||
|
||||
public TBF.Entities.Component CreateDbEntity()
|
||||
|
||||
Reference in New Issue
Block a user