2015-12-29 09:56:42 +00:00
|
|
|
|
///
|
2015-12-31 23:00:03 +00:00
|
|
|
|
/// Copyright (c) 2015-2016 Sensus Metering Systems
|
2015-12-29 09:56:42 +00:00
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Results.Entities
|
|
|
|
|
|
{
|
|
|
|
|
|
public class TestRslt
|
|
|
|
|
|
{
|
|
|
|
|
|
/// Identity
|
|
|
|
|
|
public virtual int Id { get; protected set; }
|
|
|
|
|
|
public virtual Batch Batch { get; set; }
|
|
|
|
|
|
public virtual TestData TestData { get; set; }
|
2015-12-31 23:00:03 +00:00
|
|
|
|
public virtual Components Components { get; set; }
|
2015-12-29 09:56:42 +00:00
|
|
|
|
public virtual int Part { get; set; }
|
2017-04-12 19:45:58 +00:00
|
|
|
|
public virtual int RepetitionNr { get; set; } /// Repetition number from the set of repeated tests (1...)
|
2015-12-29 09:56:42 +00:00
|
|
|
|
|
2015-12-31 23:00:03 +00:00
|
|
|
|
/// Main results
|
2015-12-29 09:56:42 +00:00
|
|
|
|
public virtual DateTime StartTime { get; set; } /// Date and time of the test start
|
|
|
|
|
|
public virtual DateTime EndTime { get; set; } /// Date and time of the test end
|
2017-04-12 19:45:58 +00:00
|
|
|
|
public virtual int FlowSetTime { get; set; } /// [s] Measurement time in seconds
|
2015-12-29 09:56:42 +00:00
|
|
|
|
public virtual double TestTime { get; set; } /// [s] Measurement time in seconds
|
2015-12-31 23:00:03 +00:00
|
|
|
|
public virtual double PulsesMaster { get; set; }
|
|
|
|
|
|
public virtual double ConstMaster { get; set; } /// [pls/l] Pulses per liter master flow meter
|
|
|
|
|
|
public virtual double MassStartRaw { get; set; } /// [kg]
|
|
|
|
|
|
public virtual double MassStart { get; set; } /// [kg]
|
|
|
|
|
|
public virtual double MassEndRaw { get; set; } /// [kg]
|
|
|
|
|
|
public virtual double MassEnd { get; set; } /// [kg]
|
|
|
|
|
|
public virtual double DensityIn { get; set; } /// [kg/m3]
|
|
|
|
|
|
public virtual double DensityOut { get; set; } /// [kg/m3]
|
|
|
|
|
|
public virtual double DensityDiv { get; set; } /// [kg/m3]
|
|
|
|
|
|
public virtual double Buoyancy { get; set; }
|
2016-08-02 11:42:26 +00:00
|
|
|
|
public virtual double FlowMass { get; set; } /// [kg/h] calculated from conventional true value
|
|
|
|
|
|
public virtual double FlowVolume { get; set; } /// [m3/h]
|
|
|
|
|
|
public virtual double VolumeCTV { get; set; } /// [l] Volume conventional true value
|
|
|
|
|
|
public virtual double VolumeMaster { get; set; } /// [l] Volume from the master flow meter
|
2015-12-31 23:00:03 +00:00
|
|
|
|
public virtual double ErrorMaster { get; set; } /// [%]
|
|
|
|
|
|
|
2016-08-19 12:30:40 +00:00
|
|
|
|
/// Main results of heat meters
|
|
|
|
|
|
public virtual double RefEnergy { get; set; } /// [J] Joul
|
|
|
|
|
|
|
2015-12-31 23:00:03 +00:00
|
|
|
|
/// Auxiliary results
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float AmbTempMean { get; set; } /// [°C] Average ambient air temperature
|
2016-08-19 12:30:40 +00:00
|
|
|
|
public virtual float AmbTempStart { get; set; } /// [°C] Ambient air temperature on test start
|
|
|
|
|
|
public virtual float AmbTempEnd { get; set; } /// [°C] Ambient air temperature on test end
|
|
|
|
|
|
public virtual float AmbTempMin { get; set; } /// [°C] Minimum ambient air temperature
|
|
|
|
|
|
public virtual float AmbTempMax { get; set; } /// [°C] Maximum ambient air temperature
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float AmbPressMean { get; set; } /// [bar] Average ambient air pressure
|
2016-08-19 12:30:40 +00:00
|
|
|
|
public virtual float AmbPressStart { get; set; } /// [bar] Ambient air pressure on test start
|
|
|
|
|
|
public virtual float AmbPressEnd { get; set; } /// [bar] Ambient air pressure on test end
|
|
|
|
|
|
public virtual float AmbPressMin { get; set; } /// [bar] Minimum ambient air pressure
|
|
|
|
|
|
public virtual float AmbPressMax { get; set; } /// [bar] Maximum ambient air pressure
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float AmbHumiMean { get; set; } /// [%] Average ambient air relative humidity
|
2016-08-19 12:30:40 +00:00
|
|
|
|
public virtual float AmbHumiStart { get; set; } /// [%] Ambient air relative humidity on test start
|
|
|
|
|
|
public virtual float AmbHumiEnd { get; set; } /// [%] Ambient air relative humidity on test end
|
|
|
|
|
|
public virtual float AmbHumiMin { get; set; } /// [%] Minimum ambient air relative humidity
|
|
|
|
|
|
public virtual float AmbHumiMax { get; set; } /// [%] Maximum ambient air relative humidity
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float PressUpMean { get; set; } /// [bar] Input water pressure (average)
|
2016-08-02 11:42:26 +00:00
|
|
|
|
public virtual float PressUpStart { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressUpEnd { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressUpMin { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressUpMax { get; set; } /// [bar]
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float PressDownMean { get; set; } /// [bar]
|
2016-08-02 11:42:26 +00:00
|
|
|
|
public virtual float PressDownStart { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDownEnd { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDownMin { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDownMax { get; set; } /// [bar]
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float PressDeltaMean { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDeltaStart { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDeltaEnd { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDeltaMin { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float PressDeltaMax { get; set; } /// [bar]
|
|
|
|
|
|
public virtual float TempUpMean { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempUpStart { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempUpEnd { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempUpMin { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempUpMax { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDownMean { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDownStart { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDownEnd { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDownMin { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDownMax { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDivMean { get; set; } /// [°C]
|
2016-08-02 11:42:26 +00:00
|
|
|
|
public virtual float TempDivStart { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDivEnd { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDivMin { get; set; } /// [°C]
|
|
|
|
|
|
public virtual float TempDivMax { get; set; } /// [°C]
|
2017-05-18 11:22:11 +00:00
|
|
|
|
public virtual float FlowStart { get; set; } /// [m3/h] flow at the start of test from the reference flowmeter
|
|
|
|
|
|
public virtual float FlowEnd { get; set; } /// [m3/h] flow at the end of test from the reference flowmeter
|
|
|
|
|
|
public virtual float FlowMean { get; set; } /// [m3/h] mean flow from the reference flowmeter
|
2017-05-25 12:06:05 +00:00
|
|
|
|
public virtual float FlowMin { get; set; } /// [m3/h] not mapped to DB
|
2017-05-18 11:22:11 +00:00
|
|
|
|
public virtual float FlowMax { get; set; } /// [m3/h]
|
2015-12-29 09:56:42 +00:00
|
|
|
|
|
2016-10-18 16:48:20 +00:00
|
|
|
|
public virtual float Custom1 { get; set; } /// [°C] T ref hi mean
|
|
|
|
|
|
public virtual float Custom2 { get; set; } /// [°C] T ref hi start
|
|
|
|
|
|
public virtual float Custom3 { get; set; } /// [°C] T ref hi end
|
|
|
|
|
|
public virtual float Custom4 { get; set; } /// [°C] T ref hi min
|
|
|
|
|
|
public virtual float Custom5 { get; set; } /// [°C] T ref hi max
|
|
|
|
|
|
public virtual float Custom6 { get; set; } /// [°C] T ref lo mean
|
|
|
|
|
|
public virtual float Custom7 { get; set; } /// [°C] T ref lo start
|
|
|
|
|
|
public virtual float Custom8 { get; set; } /// [°C] T ref lo end
|
|
|
|
|
|
public virtual float Custom9 { get; set; } /// [°C] T ref lo min
|
|
|
|
|
|
public virtual float Custom10 { get; set; } /// [°C] T ref lo max
|
2015-12-29 09:56:42 +00:00
|
|
|
|
|
|
|
|
|
|
/// Wrappers
|
2016-01-03 01:05:35 +00:00
|
|
|
|
public virtual string Name() { return Utils.GetTestName(TestData.Name, TestData.Repeats, RepetitionNr); }
|
2017-04-12 19:45:58 +00:00
|
|
|
|
public virtual int Repeats() { return TestData.Repeats; }
|
2015-12-31 23:00:03 +00:00
|
|
|
|
public virtual double Qfrom() { return TestData.Qfrom; }
|
|
|
|
|
|
public virtual double Qto() { return TestData.Qto; }
|
|
|
|
|
|
public virtual double TargetVolume() { return TestData.TargetVolume; }
|
|
|
|
|
|
public virtual double TargetTime() { return TestData.TargetTime; }
|
|
|
|
|
|
public virtual string Method() { return TestData.Method; }
|
|
|
|
|
|
public virtual double ErrLimLo() { return TestData.ErrLimLo; }
|
|
|
|
|
|
public virtual double ErrLimHi() { return TestData.ErrLimHi; }
|
|
|
|
|
|
public virtual double Uncertainty() { return TestData.Uncertainty; }
|
2016-02-29 18:03:17 +00:00
|
|
|
|
public virtual bool Evaluate() { return TestData.Evaluate; }
|
|
|
|
|
|
public virtual Config.Entities.Publish Publish() { return (Config.Entities.Publish)TestData.Publish; }
|
2015-12-29 09:56:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
2015-12-31 23:00:03 +00:00
|
|
|
|
protected TestRslt()
|
2015-12-29 09:56:42 +00:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TestRslt(Batch batch, TestData testData, int part, int repetitionNr)
|
|
|
|
|
|
: this()
|
|
|
|
|
|
{
|
|
|
|
|
|
Batch = batch;
|
|
|
|
|
|
TestData = testData;
|
|
|
|
|
|
Part = part;
|
|
|
|
|
|
RepetitionNr = repetitionNr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2017-04-12 19:45:58 +00:00
|
|
|
|
public virtual void CopyContentFrom(TestRslt src)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (src == null) return;
|
|
|
|
|
|
|
|
|
|
|
|
Components = src.Components; /// ???
|
|
|
|
|
|
Part = src.Part;
|
|
|
|
|
|
RepetitionNr = src.RepetitionNr;
|
|
|
|
|
|
StartTime = src.StartTime;
|
|
|
|
|
|
EndTime = src.EndTime;
|
|
|
|
|
|
FlowSetTime = src.FlowSetTime;
|
|
|
|
|
|
TestTime = src.TestTime;
|
|
|
|
|
|
PulsesMaster = src.PulsesMaster;
|
|
|
|
|
|
ConstMaster = src.ConstMaster;
|
|
|
|
|
|
MassStartRaw = src.MassStartRaw;
|
|
|
|
|
|
MassStart = src.MassStart;
|
|
|
|
|
|
MassEndRaw = src.MassEndRaw;
|
|
|
|
|
|
MassEnd = src.MassEnd;
|
|
|
|
|
|
DensityIn = src.DensityIn;
|
|
|
|
|
|
DensityOut = src.DensityOut;
|
|
|
|
|
|
DensityDiv = src.DensityDiv;
|
|
|
|
|
|
Buoyancy = src.Buoyancy;
|
|
|
|
|
|
FlowMass = src.FlowMass;
|
|
|
|
|
|
FlowVolume = src.FlowVolume;
|
|
|
|
|
|
VolumeCTV = src.VolumeCTV;
|
|
|
|
|
|
VolumeMaster = src.VolumeMaster;
|
|
|
|
|
|
ErrorMaster = src.ErrorMaster;
|
|
|
|
|
|
RefEnergy = src.RefEnergy;
|
|
|
|
|
|
AmbTempMean = src.AmbTempMean;
|
|
|
|
|
|
AmbTempStart = src.AmbTempStart;
|
|
|
|
|
|
AmbTempEnd = src.AmbTempEnd;
|
|
|
|
|
|
AmbTempMin = src.AmbTempMin;
|
|
|
|
|
|
AmbTempMax = src.AmbTempMax;
|
|
|
|
|
|
AmbPressMean = src.AmbPressMean;
|
|
|
|
|
|
AmbPressStart = src.AmbPressStart;
|
|
|
|
|
|
AmbPressEnd = src.AmbPressEnd;
|
|
|
|
|
|
AmbPressMin = src.AmbPressMin;
|
|
|
|
|
|
AmbPressMax = src.AmbPressMax;
|
|
|
|
|
|
AmbHumiMean = src.AmbHumiMean;
|
|
|
|
|
|
AmbHumiStart = src.AmbHumiStart;
|
|
|
|
|
|
AmbHumiEnd = src.AmbHumiEnd;
|
|
|
|
|
|
AmbHumiMin = src.AmbHumiMin;
|
|
|
|
|
|
AmbHumiMax = src.AmbHumiMax;
|
|
|
|
|
|
PressUpMean = src.PressUpMean;
|
|
|
|
|
|
PressUpStart = src.PressUpStart;
|
|
|
|
|
|
PressUpEnd = src.PressUpEnd;
|
|
|
|
|
|
PressUpMin = src.PressUpMin;
|
|
|
|
|
|
PressUpMax = src.PressUpMax;
|
|
|
|
|
|
PressDownMean = src.PressDownMean;
|
|
|
|
|
|
PressDownStart = src.PressDownStart;
|
|
|
|
|
|
PressDownEnd = src.PressDownEnd;
|
|
|
|
|
|
PressDownMin = src.PressDownMin;
|
|
|
|
|
|
PressDownMax = src.PressDownMax;
|
|
|
|
|
|
PressDeltaMean = src.PressDeltaMean;
|
|
|
|
|
|
PressDeltaStart = src.PressDeltaStart;
|
|
|
|
|
|
PressDeltaEnd = src.PressDeltaEnd;
|
|
|
|
|
|
PressDeltaMin = src.PressDeltaMin;
|
|
|
|
|
|
PressDeltaMax = src.PressDeltaMax;
|
|
|
|
|
|
TempUpMean = src.TempUpMean;
|
|
|
|
|
|
TempUpStart = src.TempUpStart;
|
|
|
|
|
|
TempUpEnd = src.TempUpEnd;
|
|
|
|
|
|
TempUpMin = src.TempUpMin;
|
|
|
|
|
|
TempUpMax = src.TempUpMax;
|
|
|
|
|
|
TempDownMean = src.TempDownMean;
|
|
|
|
|
|
TempDownStart = src.TempDownStart;
|
|
|
|
|
|
TempDownEnd = src.TempDownEnd;
|
|
|
|
|
|
TempDownMin = src.TempDownMin;
|
|
|
|
|
|
TempDownMax = src.TempDownMax;
|
|
|
|
|
|
TempDivMean = src.TempDivMean;
|
|
|
|
|
|
TempDivStart = src.TempDivStart;
|
|
|
|
|
|
TempDivEnd = src.TempDivEnd;
|
|
|
|
|
|
TempDivMin = src.TempDivMin;
|
|
|
|
|
|
TempDivMax = src.TempDivMax;
|
|
|
|
|
|
FlowStart = src.FlowStart;
|
|
|
|
|
|
FlowEnd = src.FlowEnd;
|
2017-05-18 11:22:11 +00:00
|
|
|
|
FlowMean = src.FlowMean;
|
2017-04-12 19:45:58 +00:00
|
|
|
|
FlowMax = src.FlowMax;
|
|
|
|
|
|
Custom1 = src.Custom1;
|
|
|
|
|
|
Custom2 = src.Custom2;
|
|
|
|
|
|
Custom3 = src.Custom3;
|
|
|
|
|
|
Custom4 = src.Custom4;
|
|
|
|
|
|
Custom5 = src.Custom5;
|
|
|
|
|
|
Custom6 = src.Custom6;
|
|
|
|
|
|
Custom7 = src.Custom7;
|
|
|
|
|
|
Custom8 = src.Custom8;
|
|
|
|
|
|
Custom9 = src.Custom9;
|
|
|
|
|
|
Custom10 = src.Custom10;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-12-29 09:56:42 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Format("batch={0}, procedure={1}, test={2}, {3} {4}", Batch.BatchNr, Batch.ProcedureName, Name(), StartTime.ToShortDateString(), StartTime.ToShortTimeString());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|