using System;
using log4net;
namespace TBF.BenchControl.Elde
{
public class UpdateTankWeightOp : IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(UpdateTankWeightOp));
public override string ToString() { return string.Format("UpdateTankWeightOp(.)"); }
/// Set by the constructor
readonly ControlBoardDev controlBoard;
///
/// Stop the previous control board operation (diverter, gate, etc.)
/// Events: None or PreviousStopped
///
/// Control board component reference
public UpdateTankWeightOp(ControlBoardDev controlBoardDev)
{
if (controlBoardDev == null) throw new ArgumentNullException("controlBoardDev");
this.controlBoard = controlBoardDev;
log.Debug(this.ToString());
}
/// Start this operation
public void Start()
{
controlBoard.UpdateWeights();
}
/// Run this operation
///
/// Event.None or Event.PreviousStopped
///
public Event Run()
{
controlBoard.UpdateWeights();
return Event.None;
}
/// Stop this operation
public void Stop()
{
}
}
}