39 lines
882 B
C#
39 lines
882 B
C#
///
|
|
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
|
///
|
|
namespace TBF.BenchControl.Uni.Diverter
|
|
{
|
|
public class SwitchDiverterOp : IOperation
|
|
{
|
|
TBF.BenchControl.ControlBoard.Uni.UniCB cBoard;
|
|
bool toTank;
|
|
int diverterNr; /// 1 .. 5
|
|
|
|
public SwitchDiverterOp(TBF.BenchControl.ControlBoard.Uni.UniCB cBoard, bool toTank, int diverterNr)
|
|
{
|
|
this.cBoard = cBoard;
|
|
this.toTank = toTank;
|
|
this.diverterNr = diverterNr;
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
if (toTank)
|
|
{
|
|
cBoard.DiverterToTank(diverterNr);
|
|
}
|
|
else
|
|
{
|
|
cBoard.DiverterToSink(diverterNr);
|
|
}
|
|
}
|
|
|
|
public Event Run()
|
|
{
|
|
return Event.ConditionMet;
|
|
}
|
|
|
|
public void Stop() { }
|
|
}
|
|
}
|