43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
|
|
///
|
|||
|
|
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
|||
|
|
///
|
|||
|
|
using System;
|
|||
|
|
using log4net;
|
|||
|
|
|
|||
|
|
namespace TBF.BenchControl.DataContainers.Density
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// Holds measured (true) density 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 RealDensity { get { return myCfg.RealDensity; } }
|
|||
|
|
public double AtTemperature { get { return myCfg.AtTemperature; } }
|
|||
|
|
|
|||
|
|
public Component()
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public Component(Generic.IComponentCfg cfg)
|
|||
|
|
: base(cfg)
|
|||
|
|
{
|
|||
|
|
myCfg = cfg as ComponentCfg;
|
|||
|
|
|
|||
|
|
/// This is to use data in formulas
|
|||
|
|
Config.Data.RealDensity = RealDensity;
|
|||
|
|
Config.Data.AtTemperature = AtTemperature;
|
|||
|
|
|
|||
|
|
/// This is to have data in reports
|
|||
|
|
Results.WMeterRsltItemSpec.RealDensity = RealDensity;
|
|||
|
|
Results.WMeterRsltItemSpec.AtTemperature = AtTemperature;
|
|||
|
|
|
|||
|
|
log.Debug(this.ToString());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|