///
/// Copyright (c) 2016-2017 Sensus Slovensko a.s.
///
using System;
using System.Collections.Generic;
using log4net;
using TBF.Rig.GenericDevices;
namespace TBF.Rig.Dummy.Balance
{
public class Component : ComponentBase, IScale, IOperation
{
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
public int ScaleNr { get { return 0; } }
public double Capacity { get { return 10000.0; } }
public IValve DrainValve { get { return null; } }
public IValve DrainValve2 { get { return null; } }
public bool ContainsMoreThen(float thld) { return (thld == 0); }
public bool IsEmpty() { return true; }
public double EvaporationRate(double t) { return 0; }
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 double Mass { get { return 0; } }
public Component() { }
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
log.Warn(this.ToString());
}
public override void Initialize() { }
public IOperation ZeroOp()
{
return this;
}
public IOperation ReadStableMassOp(ref Boxes.DoubleBox mass, int delayBefore, Common.MassMethod method, int readingsCount, double maxSpread)
{
mass.Val = 0;
return this;
}
public IOperation GetSerNumOp(ref string serialNumber)
{
return null;
}
/// Start this operation
public void Start() { }
/// Run this operation
public Event Run()
{
return Event.ScaleDone;
}
/// Stop this operation
public void Stop() { }
}
}