49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// Stop the previous control board operation (diverter, gate, etc.)
|
|
/// Events: None or PreviousStopped
|
|
/// </summary>
|
|
/// <param name="controlBoardDev">Control board component reference</param>
|
|
public UpdateTankWeightOp(ControlBoardDev controlBoardDev)
|
|
{
|
|
if (controlBoardDev == null) throw new ArgumentNullException("controlBoardDev");
|
|
this.controlBoard = controlBoardDev;
|
|
|
|
log.Debug(this.ToString());
|
|
}
|
|
|
|
/// <summary>Start this operation</summary>
|
|
public void Start()
|
|
{
|
|
controlBoard.UpdateWeights();
|
|
}
|
|
|
|
/// <summary>Run this operation</summary>
|
|
/// <returns>
|
|
/// Event.None or Event.PreviousStopped
|
|
/// </returns>
|
|
public Event Run()
|
|
{
|
|
controlBoard.UpdateWeights();
|
|
return Event.None;
|
|
}
|
|
|
|
/// <summary>Stop this operation</summary>
|
|
public void Stop()
|
|
{
|
|
}
|
|
}
|
|
}
|