RegulValveTandem op SetFlowOp should be functional, to be tested

This commit is contained in:
Milan Hanajik
2015-02-03 10:30:24 +01:00
parent ab8aa61a29
commit 5806a65a0c
10 changed files with 139 additions and 99 deletions
@@ -15,7 +15,7 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
/// Set by the constructor
readonly ControlBoardDev controlBoard;
readonly RegulValveTandem regulValve;
readonly Elde.RegulValve.RegulValve regulValve;
readonly int regulValveNr;
readonly float posLoPct;
readonly float posHiPct;
@@ -31,19 +31,19 @@ namespace TBF.BenchControl.Elde.RegulValveTandem
/// Events: FlowSet, FlowTimeOut
/// </summary>
/// <param name="ControlBoard">Control board device</param>
/// <param name="regulValve">Regulation valve component</param>
/// <param name="_regulValve">Regulation valve component</param>
/// <param name="posLoPct">Lower limit of the position to be achieved</param>
/// <param name="posHiPct">Upper limit of the position to be achieved</param>
/// <param name="timeout">Timeout in sec. for setting the flow</param>
/// <remarks>Only Elde.Valve flow are used, other flow on the lists are ignored</remarks>
public SetRegulValvePositionOp(ControlBoardDev controlBoard, RegulValveTandem regulValve, float posLoPct, float posHiPct, int timeout)
public SetRegulValvePositionOp(ControlBoardDev controlBoard, IRegulValve regV, float posLoPct, float posHiPct, int timeout)
{
if (controlBoard == null) throw new ArgumentNullException("ctrlBoard");
this.controlBoard = controlBoard;
this.regulValve = regulValve as RegulValveTandem;
if (regulValve == null) throw new ArgumentNullException("regValve is null or not Elde");
this.regulValveNr = this.regulValve.Idx1;
regulValve = regV as Elde.RegulValve.RegulValve;
if (regulValve == null) throw new ArgumentNullException("regValve is null or not Elde");
regulValveNr = this.regulValve.Idx1;
this.posLoPct = posLoPct;
this.posHiPct = posHiPct;