Delay added to IValve and Pumps, no delay functionality yet

This commit is contained in:
Milan Hanajik
2014-09-06 08:10:08 +02:00
parent 6933442e76
commit 87f42ba291
13 changed files with 102 additions and 23 deletions
@@ -14,11 +14,12 @@ namespace TBF.BenchControl.Elde.Valve
class SwitchPoint
{
public int TimeSec;
public IList<IValve> VOpen;
public IList<IValve> VClose;
public ulong MasksOpen;
public ulong MasksClose;
public int TimeSec; /// Time [s]
public IList<IValve> VOpen; /// List of valves to open in this point of time
public IList<IValve> VClose; /// List of valves to close in this point of time
public ulong MasksOpen; /// OR-ed bitmasks of valves to open in this point of time
public ulong MasksClose; /// OR-ed bitmasks of valves to close in this point of time
public int MaxDelay; /// Max. delay in [s] of all valves to be opened or closed
}
IList<SwitchPoint> switchPointsRaw;
@@ -39,8 +40,8 @@ namespace TBF.BenchControl.Elde.Valve
foreach (var valve in StateMachine.CoupledValves)
{
if ((!valve.Invert && valvesOpen.Contains(valve.CoupledTo)) ||
(valve.Invert && valvesClose.Contains(valve.CoupledTo)))
if ((!valve.InvertCouple && valvesOpen.Contains(valve.CoupledTo)) ||
(valve.InvertCouple && valvesClose.Contains(valve.CoupledTo)))
{
/// The coupled valve 'valve' is opening
int time = valve.LagOpening;
@@ -55,8 +56,8 @@ namespace TBF.BenchControl.Elde.Valve
VClose = new List<IValve>() });
}
}
else if ((!valve.Invert && valvesClose.Contains(valve.CoupledTo)) ||
(valve.Invert && valvesOpen.Contains(valve.CoupledTo)))
else if ((!valve.InvertCouple && valvesClose.Contains(valve.CoupledTo)) ||
(valve.InvertCouple && valvesOpen.Contains(valve.CoupledTo)))
{
/// The coupled valve 'valve' is closing
int time = valve.LagClosing;