Initial version with config UI, w/o functionality, added to the project
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.Elde.RegulValveTandem
|
||||
{
|
||||
public class RegulValveTandemCfg : ComponentCfgBase, IChildComponentCfg
|
||||
{
|
||||
public IComponent GetComponent(IList<IComponent> components) { return new RegulValveTandem(this, components); }
|
||||
public IComponentCfgCtrl GetControl() { return new RegulValveTandemCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public string RegulValveName; /// Name of the regulation valve used to control the flow
|
||||
public string FixedRVName; /// Name of the regulation valve with a fixed position
|
||||
public int StableTimeMs; /// 200..1500 ms
|
||||
public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions
|
||||
public int FlowStableSec; /// 0..60 sec
|
||||
|
||||
/// <summary>
|
||||
/// Stabilization time when setting the flow: 0=200ms, step 50ms, max. 1.5 sec.
|
||||
/// </summary>
|
||||
public int StableTime { get { return (StableTimeMs - 200) / 50; } }
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
RegulValveTandemCfg()
|
||||
{
|
||||
Name = "RegulationValve";
|
||||
ParentName = string.Empty;
|
||||
|
||||
RegulValveName = "RV1";
|
||||
FixedRVName = "RV2";
|
||||
|
||||
StableTimeMs = 500;
|
||||
StoredPositionReuse = false;
|
||||
FlowStableSec = 5;
|
||||
}
|
||||
|
||||
public RegulValveTandemCfg(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
}
|
||||
|
||||
public string ToString(int i)
|
||||
{
|
||||
return string.Format("Name={0}, ControlledRVName={1}, ADC-FixedRVName={2}, StabTm={3}ms, PosReuse={4}, FlowStable={5}s",
|
||||
Name,
|
||||
RegulValveName,
|
||||
FixedRVName,
|
||||
StableTimeMs,
|
||||
StoredPositionReuse,
|
||||
FlowStableSec);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user