80 lines
2.2 KiB
C#
80 lines
2.2 KiB
C#
///
|
|
/// Copyright (c) 2016-2017 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using log4net;
|
|
using Config.Entities;
|
|
|
|
namespace TBF.BenchControl.Dummy.Balance
|
|
{
|
|
public class Component : ComponentBase, GenericDevices.IScale, IOperation
|
|
{
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
|
public override string ToString()
|
|
{
|
|
return string.Format("{0}({1})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
|
|
}
|
|
|
|
public Component()
|
|
{
|
|
}
|
|
|
|
public Component(Generic.IComponentCfg cfg)
|
|
: base(cfg)
|
|
{
|
|
log.Debug(this.ToString());
|
|
}
|
|
|
|
public int ScaleNr { get { return 0; } }
|
|
public double Capacity { get { return 10000.0; } }
|
|
public GenericDevices.IValve DrainValve { get { return null; } }
|
|
public bool IsEmpty(double mass) { return true; }
|
|
public bool IsEmpty() { return true; }
|
|
public string Format { get { return "F3"; } }
|
|
public int EmptyTimeSec { get { return 5; } }
|
|
public float BuoyancyTemp { get { return 20.0f; } }
|
|
public float BuoyancyPress { get { return 1.013f; } }
|
|
public float BuoyancyHumi { get { return 50.0f; } }
|
|
|
|
public IOperation TaringOp(ref TBF.Boxes.DoubleBox tara)
|
|
{
|
|
tara.Val = 0;
|
|
return this;
|
|
}
|
|
|
|
public IOperation ReadMassOp(ref TBF.Boxes.DoubleBox mass)
|
|
{
|
|
mass.Val = 0;
|
|
return this;
|
|
}
|
|
|
|
public IOperation ReadStableMassOp(ref TBF.Boxes.DoubleBox mass, int readingsCount, double maxSpread, Config.Entities.MassMethod method)
|
|
{
|
|
mass.Val = 0;
|
|
return this;
|
|
}
|
|
|
|
public IOperation GetSerNumOp(ref string serialNumber)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>Start this operation</summary>
|
|
public void Start()
|
|
{
|
|
}
|
|
|
|
/// <summary>Run this operation</summary>
|
|
public Event Run()
|
|
{
|
|
return Event.BalanceDone;
|
|
}
|
|
|
|
/// <summary>Stop this operation</summary>
|
|
public void Stop()
|
|
{
|
|
}
|
|
}
|
|
}
|