FixedStartMassCollelction in progress.
This commit is contained in:
@@ -527,16 +527,6 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
return new TaringOp(this, ref tara);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
/// <param name="result">Reference to a variable for the measured mass in kg</param>
|
||||
/// <returns>ReadMassOp instance reference casted to IOperaton</returns>
|
||||
public IOperation ReadMassOp(ref DoubleBox mass)
|
||||
{
|
||||
return new ReadMassOp(this, ref mass);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone, Error
|
||||
/// </summary>
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.Rig.MettlerToledo.Standard
|
||||
{
|
||||
public class ReadMassOp : IOperation
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(ReadMassOp));
|
||||
public override string ToString() { return string.Format("ReadMassOp(.,.)"); }
|
||||
|
||||
/// Set by the constructor
|
||||
BalanceDev scale;
|
||||
DoubleBox result;
|
||||
|
||||
/// <summary>
|
||||
/// Events: BalanceDone (always)
|
||||
/// </summary>
|
||||
/// <param name="scale">Balance device instance</param>
|
||||
/// <param name="result">Reference to the measured mass in kg</param>
|
||||
public ReadMassOp(BalanceDev scale, ref DoubleBox result)
|
||||
{
|
||||
if (scale == null) throw new ArgumentNullException("balanceDev");
|
||||
this.scale = scale;
|
||||
this.result = result;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
|
||||
/// <summary>Start this operation</summary>
|
||||
public void Start()
|
||||
{
|
||||
result.Val = scale.Mass;
|
||||
}
|
||||
|
||||
/// <summary>Run this operation</summary>
|
||||
/// <returns>
|
||||
/// Event.BalanceDone
|
||||
/// </returns>
|
||||
public Event Run()
|
||||
{
|
||||
result.Val = scale.Mass;
|
||||
return Event.ScaleDone;
|
||||
}
|
||||
|
||||
/// <summary>Stop this operation</summary>
|
||||
public void Stop()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user