Config.Data.RealDensity etc., DataContainers.Density and Buoyancy components, related metrology tabs modified/created.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using log4net;
|
||||
|
||||
namespace TBF.BenchControl.DataContainers.Buoyancy
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds measured (true) buoyancy value.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString() { return string.Format("{0}({1})", this.GetType().Namespace.Substring(32), Cfg.ToString(1)); }
|
||||
|
||||
readonly ComponentCfg myCfg;
|
||||
|
||||
public double Buoyancy { get { return myCfg.Buoyancy; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as ComponentCfg;
|
||||
|
||||
/// This is to use data in formulas
|
||||
Config.Data.Buoyancy = Buoyancy;
|
||||
|
||||
/// This is to have data in reports
|
||||
Results.WMeterRsltItemSpec.Buoyancy = Buoyancy;
|
||||
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user