/// /// Copyright (c) 2013-2015 Sensus Metering Systems /// 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 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 float FixedRVPosition; /// Fixed RV position 0 .. 100 in [%] public bool StoredPositionReuse; /// true = store and re-use previous regulation valve positions public int FlowStableSec; /// 0..60 sec /// Private parameterless constructor invoked by all other (public) constructors RegulValveTandemCfg() { Name = "RegulationValve"; ParentName = string.Empty; RegulValveName = "RV1"; FixedRVName = "RV2"; FixedRVPosition = 50.0f; StoredPositionReuse = false; FlowStableSec = 5; } public RegulValveTandemCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, RegulVName={1}, FixedRVName={2}, FixedRVPos={3}%, PosReuse={4}, FlowStable={5}s", Name, RegulValveName, FixedRVName, FixedRVPosition.ToString("F0"), StoredPositionReuse, FlowStableSec); } } }