44 lines
894 B
C#
44 lines
894 B
C#
///
|
|
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using TBF.Rig.ControlBoard.Legacy;
|
|
|
|
namespace TBF.Rig.Elde.Diverter
|
|
{
|
|
public class SwitchDiverterOp : IOperation
|
|
{
|
|
CBoard controlBoard;
|
|
bool toTank;
|
|
int flowMtrNr;
|
|
|
|
public SwitchDiverterOp(CBoard controlBoard, bool toTank, int flowMtrNr)
|
|
{
|
|
this.controlBoard = controlBoard;
|
|
this.toTank = toTank;
|
|
this.flowMtrNr = flowMtrNr;
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
if (toTank)
|
|
{
|
|
controlBoard.DiverterToTank(flowMtrNr);
|
|
}
|
|
else
|
|
{
|
|
controlBoard.DiverterToSink(flowMtrNr);
|
|
}
|
|
}
|
|
|
|
public Event Run()
|
|
{
|
|
return Event.ConditionMet;
|
|
}
|
|
|
|
public void Stop()
|
|
{
|
|
}
|
|
}
|
|
}
|