Start/stop valve switch time measurement implemented in StandingStart... test methods, ver. 3.8.2100
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -18,8 +18,10 @@ namespace TBF.Rig.BuiltIn
|
||||
/// Set by the constructor
|
||||
IControlBoard cb;
|
||||
DateTimeBox timeStamp;
|
||||
FloatBox switchTime;
|
||||
int startStopValveBitNr = 0;
|
||||
|
||||
IList<SwitchPoint> switchPointsRaw;
|
||||
IList<SwitchPoint> switchPointsRaw;
|
||||
IList<SwitchPoint> switchPoints;
|
||||
int nextIx;
|
||||
int swStartTime;
|
||||
@@ -165,21 +167,37 @@ namespace TBF.Rig.BuiltIn
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// OPEN or CLOSE start/stop valve and associated valves and/or pumps.
|
||||
/// Events: ValvesSet
|
||||
/// </summary>
|
||||
/// <param name="cb">Control board device</param>
|
||||
/// </summary>
|
||||
/// <param name="cb">Control board device</param>
|
||||
/// <param name="open">true: open start valve, false: close start valve</param>
|
||||
/// <param name="outPath">OutputPath specifying the start valve and associated valves/pumps</param>
|
||||
/// <param name="timeStamp">Time stamp of the real valve switch (open or close)</param>
|
||||
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
|
||||
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
|
||||
public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp)
|
||||
: this(cb, open, outPath, timeStamp, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OPEN or CLOSE start/stop valve and associated valves and/or pumps.
|
||||
/// Events: ValvesSet
|
||||
/// </summary>
|
||||
/// <param name="cb">Control board device</param>
|
||||
/// <param name="open">true: open start valve, false: close start valve</param>
|
||||
/// <param name="outPath">OutputPath specifying the start valve and associated valves/pumps</param>
|
||||
/// <param name="timeStamp">Time stamp of the real valve switch (open or close)</param>
|
||||
/// <remarks>Only Elde.Valve valves are used, other valves on the lists are ignored</remarks>
|
||||
public SetValvesOp(IControlBoard cb, bool open, OutputPath outPath, DateTimeBox timeStamp, FloatBox switchTime)
|
||||
{
|
||||
this.cb = cb;
|
||||
if (this.cb == null) throw new ArgumentNullException("ctrlBoard");
|
||||
|
||||
this.timeStamp = timeStamp;
|
||||
this.switchTime = switchTime;
|
||||
this.startStopValveBitNr = outPath.StartValve1 is Valve.Valve ? (outPath.StartValve1 as Valve.Valve).BitPosition : 0;
|
||||
|
||||
IList<IValve> none = new List<IValve>(); /// An empty list of valves
|
||||
switchPointsRaw = new List<SwitchPoint>();
|
||||
@@ -286,6 +304,10 @@ namespace TBF.Rig.BuiltIn
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
if (switchTime != null && startStopValveBitNr >= 16 && startStopValveBitNr <= 23 && cb is ControlBoard.Uni.UniCB)
|
||||
{
|
||||
switchTime.Val = (cb as ControlBoard.Uni.UniCB).Data.ValveSwitchTime[startStopValveBitNr - 16];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user