34 lines
728 B
C#
34 lines
728 B
C#
///
|
|
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
|
///
|
|
using TBF.Rig.ControlBoard.Uni;
|
|
|
|
namespace TBF.Rig.Uni.Diverter
|
|
{
|
|
public class SwitchDiverterOp : IOperation
|
|
{
|
|
readonly UniCB cBoard;
|
|
readonly int diverterNr; /// 1 .. 5
|
|
readonly bool toTank;
|
|
|
|
public SwitchDiverterOp(UniCB cBoard, int diverterNr, bool toTank)
|
|
{
|
|
this.cBoard = cBoard;
|
|
this.diverterNr = diverterNr;
|
|
this.toTank = toTank;
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
cBoard.SwitchDiverter(false, diverterNr, toTank);
|
|
}
|
|
|
|
public Event Run()
|
|
{
|
|
return Event.ConditionMet;
|
|
}
|
|
|
|
public void Stop() { }
|
|
}
|
|
}
|