Some shared classes and interfaces moved to project Common, re-factorization.
This commit is contained in:
@@ -13,7 +13,7 @@ namespace TBF.Rig.DataContainers.BackupAndSecurityOptions
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -111,7 +111,7 @@ namespace TBF.Rig.DataContainers.BackupAndSecurityOptions
|
||||
prms.PasswdExpirationPeriodDays = this.PasswdExpirationPeriodDays;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
prms.LenghtUnit = this.LenghtUnit;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -351,7 +351,7 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
prms.MaxTestIndex = this.MaxTestIndex;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace TBF.Rig.DataContainers.Buoyancy
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -114,7 +114,7 @@ namespace TBF.Rig.DataContainers.Buoyancy
|
||||
prms.Buoyancy = this.Buoyancy;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace TBF.Rig.DataContainers.Density
|
||||
/// <summary>
|
||||
/// Holds backup and security options - serializable configuration.
|
||||
/// </summary>
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -124,7 +124,7 @@ namespace TBF.Rig.DataContainers.Density
|
||||
prms.AtTemperature = this.AtTemperature;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ComponentCfg pars = new ComponentCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace TBF.Rig.DataContainers.Evaporation
|
||||
/// </summary>
|
||||
public double EvaporationRate(double temperature)
|
||||
{
|
||||
return Config.Formulas.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
|
||||
return MeasurementCorrection.GetCorrection(temperature, Corrections) / 3600.0; /// Converted from kg/h to kg/s
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace TBF.Rig.DataEntry.DataStream
|
||||
prms.ShowCycleEndForm = this.ShowCycleEndForm;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
EntryFormCfg pars = new EntryFormCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace TBF.Rig.DataEntry.Double24
|
||||
prms.Column2Destination = Column2Destination;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
EntryFormCfg pars = new EntryFormCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -19,13 +19,13 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public Config.Unit DefaultUnits;
|
||||
public Common.Unit DefaultUnits;
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
|
||||
[XmlIgnore]
|
||||
public Config.Unit Units;
|
||||
public Common.Unit Units;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
@@ -39,7 +39,7 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
|
||||
DefaultUnits = Config.Unit.kWh;
|
||||
DefaultUnits = Common.Unit.kWh;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
|
||||
@@ -204,9 +204,9 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Config.Unit units = 0; units < Config.Unit.Count; units++)
|
||||
for (Common.Unit units = 0; units < Common.Unit.Count; units++)
|
||||
{
|
||||
if (Config.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
if (Common.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
unitsComboBox.Text = entryFormCfg.Units.ToString();
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
|
||||
private void unitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Common.Unit u = 0; u < Common.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == unitsComboBox.Text)
|
||||
{
|
||||
@@ -304,7 +304,7 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
EnergyEndState[i] = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,7 +317,7 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
EnergyStartState[i] = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -507,8 +507,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -519,8 +519,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -531,8 +531,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -543,8 +543,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -555,8 +555,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -567,8 +567,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -579,8 +579,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox19.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox19.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox19.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox19.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -591,8 +591,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox20.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox20.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox20.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox20.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -603,8 +603,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox21.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox21.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox21.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox21.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -615,8 +615,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox22.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox22.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox22.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox22.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -627,8 +627,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox23.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox23.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox23.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox23.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -639,8 +639,8 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox24.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox24.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox24.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox24.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -19,13 +19,13 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
public Config.Unit DefaultUnits;
|
||||
public Common.Unit DefaultUnits;
|
||||
public bool EnterSerialNrsAtTheEnd;
|
||||
public bool ShowCycleEndForm;
|
||||
public bool SensusExtensions;
|
||||
|
||||
[XmlIgnore]
|
||||
public Config.Unit Units;
|
||||
public Common.Unit Units;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
EntryFormCfg()
|
||||
@@ -39,7 +39,7 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
Factory = factory;
|
||||
ParentName = string.Empty;
|
||||
|
||||
DefaultUnits = Config.Unit.kWh;
|
||||
DefaultUnits = Common.Unit.kWh;
|
||||
EnterSerialNrsAtTheEnd = false;
|
||||
ShowCycleEndForm = false;
|
||||
SensusExtensions = false;
|
||||
|
||||
@@ -196,9 +196,9 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
{
|
||||
Localize();
|
||||
|
||||
for (Config.Unit units = 0; units < Config.Unit.Count; units++)
|
||||
for (Common.Unit units = 0; units < Common.Unit.Count; units++)
|
||||
{
|
||||
if (Config.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
if (Common.Units.IsEnergy(units)) unitsComboBox.Items.Add(units.ToString());
|
||||
}
|
||||
unitsComboBox.Text = entryFormCfg.Units.ToString();
|
||||
|
||||
@@ -275,7 +275,7 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
|
||||
private void unitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Common.Unit u = 0; u < Common.Unit.Count; u++)
|
||||
{
|
||||
if (u.ToString() == unitsComboBox.Text)
|
||||
{
|
||||
@@ -296,7 +296,7 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
if (endTextBoxes[i].Visible && endTextBoxes[i].Enabled)
|
||||
{
|
||||
WMEndState[i] = Utils.ParseUDouble(endTextBoxes[i].Text);
|
||||
EnergyEndState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
EnergyEndState[i] = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyEndTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,7 +309,7 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
WMStartStateStr[i] = startTextBoxes[i].Text;
|
||||
WMStartState[i] = Utils.ParseUDouble(startTextBoxes[i].Text);
|
||||
EnergyStartStateStr[i] = energyStartTextBoxes[i].Text;
|
||||
EnergyStartState[i] = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
EnergyStartState[i] = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(energyStartTextBoxes[i].Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,8 +426,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox13.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox13.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -438,8 +438,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox14.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox14.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -450,8 +450,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox15.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox15.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -462,8 +462,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox16.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox16.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -474,8 +474,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox17.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox17.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
@@ -486,8 +486,8 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
double err = 0;
|
||||
try
|
||||
{
|
||||
double endState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Config.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
double endState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(endTextBox18.Text));
|
||||
double startState = Common.Units.ConvertFrom(entryFormCfg.Units, Utils.ParseUDouble(startTextBox18.Text));
|
||||
err = 100.0 * (endState - startState - refEnergy) / refEnergy;
|
||||
}
|
||||
catch { err = 1000.0f; };
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace TBF.Rig.DataEntry.Standard24
|
||||
System.Windows.Forms.Form modelessDlg;
|
||||
public bool Completed { get { return (modelessDlg is IHasCompleted) ? (modelessDlg as IHasCompleted).Completed : true; } }
|
||||
|
||||
Config.Unit volumeUnit;
|
||||
Common.Unit volumeUnit;
|
||||
double refVolume;
|
||||
double errLimLo;
|
||||
double errLimHi;
|
||||
@@ -76,7 +76,7 @@ namespace TBF.Rig.DataEntry.Standard24
|
||||
wmStartStateStr = new string[TBF.Data.WMsCount];
|
||||
wmEndState = new double[TBF.Data.WMsCount];
|
||||
wmCycleEndState = new string[TBF.Data.WMsCount];
|
||||
volumeUnit = (TBF.Rig.Sequences.ProcessData.BenchInfo != null) ? TBF.Rig.Sequences.ProcessData.BenchInfo.VolumeUnit : Config.Unit.l;
|
||||
volumeUnit = (TBF.Rig.Sequences.ProcessData.BenchInfo != null) ? TBF.Rig.Sequences.ProcessData.BenchInfo.VolumeUnit : Common.Unit.l;
|
||||
currentOp = CurrentOp.None;
|
||||
log.FatalFormat("{0} initialized: {1}", Name, this);
|
||||
}
|
||||
|
||||
@@ -170,11 +170,11 @@ namespace TBF.Rig.Elde
|
||||
|
||||
if (nr % 2 == 1)
|
||||
{
|
||||
text = string.Format("T = {0:F1} °F", Config.Units.ConvertTo(Config.Unit.F, temp));
|
||||
text = string.Format("T = {0:F1} °F", Common.Units.ConvertTo(Common.Unit.F, temp));
|
||||
}
|
||||
else if (temp != 0)
|
||||
{
|
||||
text = string.Format("SP = {0:F1} °F", Config.Units.ConvertTo(Config.Unit.F, temp));
|
||||
text = string.Format("SP = {0:F1} °F", Common.Units.ConvertTo(Common.Unit.F, temp));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Boxes;
|
||||
@@ -51,7 +52,7 @@ namespace TBF.Rig.Elde.Diverter
|
||||
/// </summary>
|
||||
public double TestTimeCorrection(double flow)
|
||||
{
|
||||
return Config.Formulas.GetCorrection(flow, Corrections);
|
||||
return MeasurementCorrection.GetCorrection(flow, Corrections);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Elde.FixedStartRegisterReader
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -26,12 +27,12 @@ namespace TBF.Rig.Elde.FlowMeter
|
||||
if (flow == 0) return LtrPerPulse; /// To avoid division by zero
|
||||
|
||||
/// Apply correction
|
||||
var rangeCorrections = new List<Config.Entities.MeasurementCorrection>();
|
||||
var rangeCorrections = new List<MeasurementCorrection>();
|
||||
foreach (var corr in Corrections)
|
||||
{
|
||||
if (corr.RangeIx == rangeIx) rangeCorrections.Add(corr);
|
||||
}
|
||||
double correctedFlow = Config.Formulas.CorrectedValue(flow, rangeCorrections);
|
||||
double correctedFlow = MeasurementCorrection.CorrectedValue(flow, rangeCorrections);
|
||||
return (LtrPerPulse * correctedFlow / flow);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.Rig.Elde.FlowMeterTriplet
|
||||
@@ -23,7 +24,7 @@ namespace TBF.Rig.Elde.FlowMeterTriplet
|
||||
public double LtrPerPulseCorrected(double flow, int rangeIx)
|
||||
{
|
||||
/// Apply correction
|
||||
double correctedFlow = Config.Formulas.CorrectedValue(flow, Corrections);
|
||||
double correctedFlow = MeasurementCorrection.CorrectedValue(flow, Corrections);
|
||||
return (LtrPerPulse * correctedFlow / flow);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,8 +93,8 @@ namespace TBF.Rig.Elde.PressureMeter
|
||||
/// <returns>Pressure in mBar</returns>
|
||||
public float ReadPressure()
|
||||
{
|
||||
double rawPressure = Config.Units.ConvertFrom(Config.Unit.kPa, ControlBoard.Pressure(Idx0));
|
||||
double correctedPressure = Config.Formulas.CorrectedValue(rawPressure, Corrections);
|
||||
double rawPressure = Common.Units.ConvertFrom(Common.Unit.kPa, ControlBoard.Pressure(Idx0));
|
||||
double correctedPressure = Config.Entities.MeasurementCorrection.CorrectedValue(rawPressure, Corrections);
|
||||
return (float)correctedPressure;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
|
||||
@@ -97,8 +98,8 @@ namespace TBF.Rig.Elde.RegulValve
|
||||
nominalFlow = flowMeter.NominalFlow;
|
||||
maximalFlow = nominalFlow * 1.25;
|
||||
|
||||
double rdrdFlowLoBeforeCorr = requiredFlowLo - Config.Formulas.GetCorrection(requiredFlowLo, flowMeter.Corrections);
|
||||
double rdrdFlowHiBeforeCorr = requiredFlowHi - Config.Formulas.GetCorrection(requiredFlowHi, flowMeter.Corrections);
|
||||
double rdrdFlowLoBeforeCorr = requiredFlowLo - MeasurementCorrection.GetCorrection(requiredFlowLo, flowMeter.Corrections);
|
||||
double rdrdFlowHiBeforeCorr = requiredFlowHi - MeasurementCorrection.GetCorrection(requiredFlowHi, flowMeter.Corrections);
|
||||
this.reqFlowAve = (rdrdFlowLoBeforeCorr + rdrdFlowHiBeforeCorr) / 2;
|
||||
this.requiredFlowLo = (RqrdFlowRangeRatio * rdrdFlowLoBeforeCorr) + ((1 - RqrdFlowRangeRatio) * this.reqFlowAve); /// Move the lower limit a bit of the range up
|
||||
this.requiredFlowHi = (RqrdFlowRangeRatio * rdrdFlowHiBeforeCorr) + ((1 - RqrdFlowRangeRatio) * this.reqFlowAve); /// Move the upper limit a bit of the range down
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace TBF.Rig.Elde.TempMeter
|
||||
{
|
||||
if (Cfg.DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
return Config.Entities.MeasurementCorrection.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
}
|
||||
else if (Cfg.DebugLevel == DebugMode.Simulate)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace TBF.Rig.Elde.TempMeterInternal
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
return Config.Entities.MeasurementCorrection.CorrectedValue((double)ControlBoard.Temperature(Idx0), Corrections);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace TBF.Rig.Elde.TempMeterMeret
|
||||
|
||||
public double ReadTemperature()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue((double)ControlBoard.Temperature(tempMtrCfg.TempIdx0), Corrections);
|
||||
return Config.Entities.MeasurementCorrection.CorrectedValue((double)ControlBoard.Temperature(tempMtrCfg.TempIdx0), Corrections);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Elde.TempMeterMeret
|
||||
{
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, Config.Entities.IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
public class TempMeterCfg : ComponentCfgBase, IChildComponentCfg, IParamsProvider, TBF.Rig.GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TempMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -175,7 +175,7 @@ namespace TBF.Rig.Elde.TempMeterMeret
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
TempMeterCfg pars = new TempMeterCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Hart.Common
|
||||
{
|
||||
public class HartCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class HartCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(HartCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -234,7 +234,7 @@ namespace TBF.Rig.Hart.Common
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
HartCfg pars = new HartCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace TBF.Rig.Hart.Nivotrack
|
||||
/// <returns></returns>
|
||||
public double ReadLevel()
|
||||
{
|
||||
return Config.Formulas.CorrectedValue(rawLevel_mm, Corrections);
|
||||
return Config.Entities.MeasurementCorrection.CorrectedValue(rawLevel_mm, Corrections);
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
|
||||
@@ -12,7 +12,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Hart.Nivotrack
|
||||
{
|
||||
public class NivotrackCfg : ComponentCfgBase, Generic.IChildComponentCfg, Config.Entities.IParamsProvider, GenericDevices.ICalibInfoCfg
|
||||
public class NivotrackCfg : ComponentCfgBase, Generic.IChildComponentCfg, IParamsProvider, GenericDevices.ICalibInfoCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(NivotrackCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -182,7 +182,7 @@ namespace TBF.Rig.Hart.Nivotrack
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
NivotrackCfg pars = new NivotrackCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
/// Get the serial number
|
||||
/// </summary>
|
||||
/// <remarks>After a successful SetUnits(kg) mass is still sent in g. MH 15.10.2013</remarks>
|
||||
public void SendSetUnitsCmd(Config.Unit unit)
|
||||
public void SendSetUnitsCmd(Common.Unit unit)
|
||||
{
|
||||
if (balanceCfg.DebugLevel == DebugMode.Simulate) return;
|
||||
|
||||
@@ -305,23 +305,23 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
stringBuilder.Clear();
|
||||
switch (unit)
|
||||
{
|
||||
case Config.Unit.g:
|
||||
case Common.Unit.g:
|
||||
log.InfoFormat("{0} - SetUnits({1}) - \"U g\\r\\n\"", Name, unit);
|
||||
serialPort.Write("U g\r\n");
|
||||
break;
|
||||
case Config.Unit.t:
|
||||
case Common.Unit.t:
|
||||
log.InfoFormat("{0} - SetUnits({1}) - \"U t\\r\\n\"", Name, unit);
|
||||
serialPort.Write("U t\r\n");
|
||||
break;
|
||||
case Config.Unit.lb:
|
||||
case Common.Unit.lb:
|
||||
log.InfoFormat("{0} - SetUnits({1}) - \"U lb\\r\\n\"", Name, unit);
|
||||
serialPort.Write("U lb\r\n");
|
||||
break;
|
||||
case Config.Unit.oz:
|
||||
case Common.Unit.oz:
|
||||
log.InfoFormat("{0} - SetUnits({1}) - \"U oz\\r\\n\"", Name, unit);
|
||||
serialPort.Write("U oz\r\n");
|
||||
break;
|
||||
case Config.Unit.kg:
|
||||
case Common.Unit.kg:
|
||||
default:
|
||||
log.InfoFormat("{0} - SetUnits({1}) - \"U kg\\r\\n\"", Name, unit);
|
||||
serialPort.Write("U kg\r\n");
|
||||
@@ -430,7 +430,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
CultureInfo.InvariantCulture,
|
||||
out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = \"{1}<cr><lf>\", Mass = {2}", Name, received, mass);
|
||||
@@ -441,7 +441,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
CultureInfo.InvariantCulture,
|
||||
out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = \"{1}<cr><lf>\", Mass = {2}", Name, received, mass);
|
||||
@@ -469,7 +469,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
CultureInfo.InvariantCulture,
|
||||
out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = \"{1}<cr><lf>\", Mass = {2}", Name, received, mass);
|
||||
@@ -497,7 +497,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
CultureInfo.InvariantCulture,
|
||||
out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[2]), mass);
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = \"{1}<cr><lf>\", Tara = {2}", Name, received, mass);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
CultureInfo.InvariantCulture,
|
||||
out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = \"{1}<cr><lf>\", Tara = {2}", Name, received, mass);
|
||||
}
|
||||
@@ -623,13 +623,13 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
/// </summary>
|
||||
/// <param name="unitStr">String: "kg", "g", "t", "lb" or "oz" expected</param>
|
||||
/// <returns></returns>
|
||||
protected Config.Unit ParseUnit(string unitStr)
|
||||
protected Common.Unit ParseUnit(string unitStr)
|
||||
{
|
||||
if (unitStr == "g") return Config.Unit.g;
|
||||
if (unitStr == "t") return Config.Unit.t;
|
||||
if (unitStr == "lb") return Config.Unit.lb;
|
||||
if (unitStr == "oz") return Config.Unit.oz;
|
||||
return Config.Unit.kg;
|
||||
if (unitStr == "g") return Common.Unit.g;
|
||||
if (unitStr == "t") return Common.Unit.t;
|
||||
if (unitStr == "lb") return Common.Unit.lb;
|
||||
if (unitStr == "oz") return Common.Unit.oz;
|
||||
return Common.Unit.kg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
double.TryParse(field[2], NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = {1}, Mass = {2}", Name,
|
||||
@@ -205,7 +205,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
double.TryParse(field[2], NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.WarnFormat("{0} - Balance response = {1}, Mass = {2}", Name,
|
||||
received.Replace("\r", "<cr>").Replace("\n", "<lf>"), mass);
|
||||
@@ -270,7 +270,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
/// </summary>
|
||||
/// <param name="units"></param>
|
||||
/// <returns>SetUnitsOp instance reference casted to IOperaton</returns>
|
||||
public IOperation SetUnitsOp(Config.Unit units)
|
||||
public IOperation SetUnitsOp(Common.Unit units)
|
||||
{
|
||||
return new SetUnitsOp(this, units);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
double.TryParse(field[2], NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = {1}, Mass = {2}", Name,
|
||||
@@ -133,7 +133,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
double.TryParse(field[2], NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
Masses[balanceNr] = mass;
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = {1}, Mass = {2}", Name,
|
||||
@@ -176,7 +176,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
double.TryParse(field[2], NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite,
|
||||
CultureInfo.InvariantCulture, out mass))
|
||||
{
|
||||
mass = Config.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
mass = Common.Units.ConvertFrom(ParseUnit(field[3]), mass);
|
||||
msrmntState = MsrmntState.Valid;
|
||||
log.InfoFormat("{0} - Balance response = {1}, Mass = {2}", Name,
|
||||
received.Replace("\r", "<cr>").Replace("\n", "<lf>"), mass);
|
||||
@@ -231,7 +231,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
/// </summary>
|
||||
/// <param name="units"></param>
|
||||
/// <returns>SetUnitsOp instance reference casted to IOperaton</returns>
|
||||
public IOperation SetUnitsOp(Config.Unit units)
|
||||
public IOperation SetUnitsOp(Common.Unit units)
|
||||
{
|
||||
return new SetUnitsOp(this, units);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
|
||||
/// Set by the constructor
|
||||
BalanceDev scale;
|
||||
Config.Unit units;
|
||||
Common.Unit units;
|
||||
bool activityStarted;
|
||||
|
||||
/// <summary>
|
||||
@@ -24,7 +24,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
/// </summary>
|
||||
/// <param name="scale">Balance device instance</param>
|
||||
/// <param name="result">Reference to the serialNumber</param>
|
||||
public SetUnitsOp(BalanceDev scale, Config.Unit units)
|
||||
public SetUnitsOp(BalanceDev scale, Common.Unit units)
|
||||
{
|
||||
if (scale == null) throw new ArgumentNullException("balanceDev");
|
||||
this.scale = scale;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Modbus.Easytherm
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Modbus.Novus
|
||||
|
||||
@@ -47,8 +47,8 @@ namespace TBF.Rig.Modbus.PressureMeter.Meret
|
||||
/// <returns>Pressure in mBar</returns>
|
||||
public float ReadPressure()
|
||||
{
|
||||
double rawPressure = Config.Units.ConvertFrom(Config.Unit.kPa, receivedPressure);
|
||||
double correctedPressure = Config.Formulas.CorrectedValue(rawPressure, Corrections);
|
||||
double rawPressure = Units.ConvertFrom(Unit.kPa, receivedPressure);
|
||||
double correctedPressure = Config.Entities.MeasurementCorrection.CorrectedValue(rawPressure, Corrections);
|
||||
return (float)correctedPressure;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Modbus.UltrasoundLevelMeter
|
||||
{
|
||||
public class LevelMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class LevelMeterCfg : ComponentCfgBase, Generic.IChildComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(LevelMeterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -131,7 +131,7 @@ namespace TBF.Rig.Modbus.UltrasoundLevelMeter
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
LevelMeterCfg pars = new LevelMeterCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Modbus.WaterAnalyzer
|
||||
{
|
||||
public class AnalyzerCfg : ComponentCfgBase, Generic.IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class AnalyzerCfg : ComponentCfgBase, Generic.IChildComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AnalyzerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -132,7 +132,7 @@ namespace TBF.Rig.Modbus.WaterAnalyzer
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
AnalyzerCfg pars = new AnalyzerCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Modbus.WaterAnalyzer2
|
||||
{
|
||||
public class AnalyzerCfg : ComponentCfgBase, Generic.IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class AnalyzerCfg : ComponentCfgBase, Generic.IChildComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(AnalyzerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -155,7 +155,7 @@ namespace TBF.Rig.Modbus.WaterAnalyzer2
|
||||
}
|
||||
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
AnalyzerCfg pars = new AnalyzerCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace TBF.Rig.Output.DB.SensusOracle
|
||||
while (dr.Read())
|
||||
{
|
||||
int pruefungsNr = dr.GetInt32(0);
|
||||
double flow = Config.Units.ConvertFrom(Unit.lph, dr.GetDouble(1));
|
||||
double flow = Common.Units.ConvertFrom(Unit.lph, dr.GetDouble(1));
|
||||
int testTime = dr.GetInt32(2);
|
||||
double errLimHi = dr.GetDouble(3);
|
||||
double errLimLo = dr.GetDouble(4);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace TBF.Rig.Output.EventTriggers.Iperl
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -156,7 +156,7 @@ namespace TBF.Rig.Output.EventTriggers.Iperl
|
||||
prms.PrintCaption = this.PrintCaption;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace TBF.Rig.Output.EventTriggers.Standard
|
||||
/// <summary>
|
||||
/// Serializable configuration of Output.EventTriggers.Standard component.
|
||||
/// </summary>
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class TriggerCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TriggerCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -403,7 +403,7 @@ namespace TBF.Rig.Output.EventTriggers.Standard
|
||||
prms.E36 = this.E36; /// 34 or 37
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
TriggerCfg pars = new TriggerCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -511,7 +511,7 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
|
||||
void WriteOneToDisk(TextWriter logger, string id, Results.Entities.TestRslt tr)
|
||||
{
|
||||
logger.WriteLine(string.Format("Prüfvolumen{0}={1}", id, Config.Units.ConvertTo(Unit.l, tr.TestData.TargetVolume).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Prüfvolumen{0}={1}", id, Common.Units.ConvertTo(Unit.l, tr.TestData.TargetVolume).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Prüfmasse{0}={1}", id, 0)); /// 3,72610
|
||||
logger.WriteLine(string.Format("Temp1_P{0}={1}", id, 0)); /// 20,0
|
||||
logger.WriteLine(string.Format("Temp2_P{0}={1}", id, 0)); /// 20,0
|
||||
@@ -521,8 +521,8 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
logger.WriteLine(string.Format("Temp6_P{0}={1}", id, 0)); /// 20,0
|
||||
logger.WriteLine(string.Format("Temp7_P{0}={1}", id, 0)); /// 0,0
|
||||
logger.WriteLine(string.Format("Temp8_P{0}={1}", id, 0)); /// 0,0
|
||||
logger.WriteLine(string.Format("Druck1_P{0}={1}", id, Config.Units.ConvertTo(Unit.bar, tr.PressUpMean).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Druck2_P{0}={1}", id, Config.Units.ConvertTo(Unit.bar, tr.PressDownMean).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Druck1_P{0}={1}", id, Common.Units.ConvertTo(Unit.bar, tr.PressUpMean).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Druck2_P{0}={1}", id, Common.Units.ConvertTo(Unit.bar, tr.PressDownMean).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("K-Faktor{0}={1}", id, 0)); /// 0,99820080
|
||||
logger.WriteLine(string.Format("Q_Waage{0}={1}", id, 0)); /// 26,89887
|
||||
logger.WriteLine(string.Format("Q_Vergleich{0}={1}", id, 0)); /// 26,83427
|
||||
@@ -534,8 +534,8 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
logger.WriteLine(string.Format("VZ_Nummer{0}={1}", id, 0)); /// 3
|
||||
logger.WriteLine(string.Format("Anfangsgewicht{0}={1}", id, 0)); /// 4,66535
|
||||
logger.WriteLine(string.Format("Endgewicht{0}={1}", id, 0)); /// 8,39145
|
||||
logger.WriteLine(string.Format("MinDurchfluss{0}={1}", id, Config.Units.ConvertTo(Unit.lph, tr.FlowMin).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("MaxDurchfluss{0}={1}", id, Config.Units.ConvertTo(Unit.lph, tr.FlowMax).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("MinDurchfluss{0}={1}", id, Common.Units.ConvertTo(Unit.lph, tr.FlowMin).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("MaxDurchfluss{0}={1}", id, Common.Units.ConvertTo(Unit.lph, tr.FlowMax).ToString(Program.AltCulture)));
|
||||
logger.WriteLine(string.Format("Q_Einstellzeit{0}={1}", id, 0)); /// 4,17
|
||||
logger.WriteLine(string.Format("Pumpennummer{0}={1}", id, 0)); /// 3
|
||||
logger.WriteLine(string.Format("Drehzahl{0}={1}", id, 0)); /// 1743
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
{
|
||||
public class WriterCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class WriterCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(WriterCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -139,7 +139,7 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
prms.DayFolders = this.DayFolders;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
WriterCfg pars = new WriterCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace TBF.Rig.Output.FlexFlow
|
||||
prms.SendUserId = this.SendUserId;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
FlexFlowCfg pars = new FlexFlowCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.Rig
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace TBF.Rig.RegisterReaders.DataStream.MefImport
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class MefImportCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class MefImportCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(MefImportCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -108,7 +108,7 @@ namespace TBF.Rig.RegisterReaders.DataStream.MefImport
|
||||
prms.CatalogDir = this.CatalogDir;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
MefImportCfg pars = new MefImportCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace TBF.Rig.RegisterReaders.DataStream.Reader
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench - serializable configuration.
|
||||
/// </summary>
|
||||
public class ReaderCfg : ComponentCfgBase, Generic.IChildComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ReaderCfg : ComponentCfgBase, Generic.IChildComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ReaderCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -118,7 +118,7 @@ namespace TBF.Rig.RegisterReaders.DataStream.Reader
|
||||
prms.Position = this.Position;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ReaderCfg pars = new ReaderCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace TBF.Rig.RegisterReaders.KPackE.Radio
|
||||
for (int offset = 0; offset <= (data.Count - MinRcvdTlgrmLen); offset++)
|
||||
{
|
||||
if (DataFitFrame(data, offset, KPackETelegramFrame) &&
|
||||
(data[offset + 14] == Telegram.ClaculateTelegramChecksum(SubArray(data, offset + 2, 12))))
|
||||
(data[offset + 14] == Telegram.CalculateTelegramChecksum(SubArray(data, offset + 2, 12))))
|
||||
{
|
||||
/// Read the telegram
|
||||
KPackE_Type type = (KPackE_Type)((data[offset + 4] >> 5) & 0x07);
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.KPackE.RegisterReader
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
///
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PulsesFromEldeCB
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
{
|
||||
@@ -10,13 +11,13 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
public readonly int FrameLength; /// Frame length in characters/bytes, 0 = unknown
|
||||
public readonly double FrameFrequency; /// Number of frames per second (Hz)
|
||||
|
||||
public readonly Config.Unit VolumeUnits;
|
||||
public readonly Unit VolumeUnits;
|
||||
public readonly double VolumeScaleFactor; /// Volume in VolumeInits = volmeRaw / VolumeScaleFactor
|
||||
public readonly int VolumeFieldStart; /// Start of the volume field: 0-based index of the first character, -1 = no volume field in the frame
|
||||
public readonly int VolumeFieldEnd; /// End of the volume field: 0-based index of the last character
|
||||
public readonly FieldFormat VolumeFieldFormat; /// Hexadecimal or Decimal
|
||||
|
||||
public readonly Config.Unit TimeUnits;
|
||||
public readonly Unit TimeUnits;
|
||||
public readonly double TimeScaleFactor; /// Time in TimeUnits = timeRaw / TimeScaleFactor
|
||||
public readonly int TimeFieldStart; /// Start of the time field: 0-based index of the first character, -1 = no time field in the frame
|
||||
public readonly int TimeFieldEnd; /// End of the time field: 0-based index of the last character
|
||||
@@ -38,9 +39,9 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
public readonly long RawTimeIncrementPerFrame;
|
||||
|
||||
public FrameFormat(int frameLength, double frameFrequency,
|
||||
Config.Unit volumeUnits, double volumeScaleFactor,
|
||||
Unit volumeUnits, double volumeScaleFactor,
|
||||
int volumeFieldStart, int volumeFieldEnd, FieldFormat volumeFieldFormat,
|
||||
Config.Unit timeUnits, double timeScaleFactor,
|
||||
Unit timeUnits, double timeScaleFactor,
|
||||
int timeFieldStart, int timeFieldEnd, FieldFormat timeFieldFormat)
|
||||
{
|
||||
FrameLength = frameLength;
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
public int FrameLength; /// Frame length in characters/bytes, 0 = unknown
|
||||
public double FrameFrequency; /// Number of frames per second, 0 = unknown
|
||||
|
||||
public Config.Unit VolumeUnits;
|
||||
public Common.Unit VolumeUnits;
|
||||
public double VolumeScaleFactor; /// Volume =
|
||||
public int VolumeFieldStart; /// Start of the volume field: 0-based index of the first character, -1 = no volume field in the frame
|
||||
public int VolumeFieldEnd; /// End of the volume field: 0-based index of the last character
|
||||
public FieldFormat VolumeFieldFormat; /// Hexadecimal or Decimal
|
||||
|
||||
public Config.Unit TimeUnits;
|
||||
public Common.Unit TimeUnits;
|
||||
public double TimeScaleFactor; /// Time =
|
||||
public int TimeFieldStart; /// Start of the time field: 0-based index of the first character, -1 = no time field in the frame
|
||||
public int TimeFieldEnd; /// End of the time field: 0-based index of the last character
|
||||
@@ -40,13 +40,13 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
FrameLength = 42;
|
||||
FrameFrequency = 8;
|
||||
|
||||
VolumeUnits = Config.Unit.l;
|
||||
VolumeUnits = Common.Unit.l;
|
||||
VolumeScaleFactor = 16000;
|
||||
VolumeFieldStart = 17;
|
||||
VolumeFieldEnd = 22;
|
||||
VolumeFieldFormat = FieldFormat.HexadecimalWindow;
|
||||
|
||||
TimeUnits = Config.Unit.s;
|
||||
TimeUnits = Common.Unit.s;
|
||||
TimeScaleFactor = 8192;
|
||||
TimeFieldStart = 29;
|
||||
TimeFieldEnd = 36;
|
||||
@@ -112,9 +112,9 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
case 2: FrameFrequency = Utils.ParseUDouble(strValue); return CfgUpdateFlags.None;
|
||||
|
||||
case 3:
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (Config.Units.IsQuantity(u, Config.Quantity.Volume) && u.ToDescription().Equals(strValue))
|
||||
if (Units.IsQuantity(u, Quantity.Volume) && u.ToDescription().Equals(strValue))
|
||||
{
|
||||
VolumeUnits = u;
|
||||
return CfgUpdateFlags.None;
|
||||
@@ -132,9 +132,9 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
break;
|
||||
|
||||
case 8:
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (Config.Units.IsQuantity(u, Config.Quantity.Time) && u.ToDescription().Equals(strValue))
|
||||
if (Units.IsQuantity(u, Quantity.Time) && u.ToDescription().Equals(strValue))
|
||||
{
|
||||
TimeUnits = u;
|
||||
return CfgUpdateFlags.None;
|
||||
@@ -180,9 +180,9 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
break;
|
||||
|
||||
case 3:
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (Config.Units.IsQuantity(u, Config.Quantity.Volume) && u.ToDescription().Equals(strValue))
|
||||
if (Units.IsQuantity(u, Quantity.Volume) && u.ToDescription().Equals(strValue))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -199,9 +199,9 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
break;
|
||||
|
||||
case 8:
|
||||
for (Config.Unit u = 0; u < Config.Unit.Count; u++)
|
||||
for (Unit u = 0; u < Unit.Count; u++)
|
||||
{
|
||||
if (Config.Units.IsQuantity(u, Config.Quantity.Time) && u.ToDescription().Equals(strValue))
|
||||
if (Units.IsQuantity(u, Quantity.Time) && u.ToDescription().Equals(strValue))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
public int FrameLength { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.FrameLength : 0; } }
|
||||
public double FrameFrequency { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.FrameFrequency : 0; } }
|
||||
|
||||
public Config.Unit VolumeUnits { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeUnits : Config.Unit.l; } }
|
||||
public Common.Unit VolumeUnits { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeUnits : Common.Unit.l; } }
|
||||
public double VolumeScaleFactor { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeScaleFactor : 1; } }
|
||||
public int VolumeFieldStart { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeFieldStart : 0; } }
|
||||
public int VolumeFieldEnd { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeFieldEnd : 0; } }
|
||||
public FieldFormat VolumeFieldFormat { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.VolumeFieldFormat : FieldFormat.None; } }
|
||||
|
||||
public Config.Unit TimeUnits { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.TimeUnits : Config.Unit.s; } }
|
||||
public Common.Unit TimeUnits { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.TimeUnits : Common.Unit.s; } }
|
||||
public double TimeScaleFactor { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.TimeScaleFactor : 1; } }
|
||||
public int TimeFieldStart { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.TimeFieldStart : 0; } }
|
||||
public int TimeFieldEnd { get { return (myCfg.ProcParams != null) ? myCfg.ProcParams.TimeFieldEnd : 0; } }
|
||||
@@ -633,11 +633,11 @@ namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
public event EventHandler<FrameReceivedEventArgs> FrameReceivedHandler;
|
||||
|
||||
|
||||
public static double UnitVolume(Config.Unit units, double scaleFactor)
|
||||
public static double UnitVolume(Common.Unit units, double scaleFactor)
|
||||
{
|
||||
if (Config.Units.IsQuantity(units, Config.Quantity.Volume))
|
||||
if (Common.Units.IsQuantity(units, Common.Quantity.Volume))
|
||||
{
|
||||
return Config.Units.ConvertFrom(units, 1.0) * scaleFactor;
|
||||
return Common.Units.ConvertFrom(units, 1.0) * scaleFactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.SerialStream
|
||||
|
||||
@@ -1582,9 +1582,9 @@ namespace TBF.Rig.Sequences
|
||||
tstRslt.TestTime = tstRslt.TargetTime();
|
||||
tstRslt.PulsesMaster = (outPath.FlowMeter.LtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / outPath.FlowMeter.LtrPerPulse) : 1;
|
||||
tstRslt.MassStartRaw = 0;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEndRaw = tstRslt.TargetVolume() * Config.Formulas.RealDensity() / 1000.0f;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime;
|
||||
tstRslt.FlowVolume = 3.6 * outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
@@ -1697,9 +1697,9 @@ namespace TBF.Rig.Sequences
|
||||
tstRslt.TestTime = tstRslt.TargetTime();
|
||||
tstRslt.PulsesMaster = (outPath.FlowMeter.LtrPerPulse > 1E-6) ? (1.0075 * tstRslt.TargetVolume() / outPath.FlowMeter.LtrPerPulse) : 1;
|
||||
tstRslt.MassStartRaw = 0;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEndRaw = tstRslt.TargetVolume() * Config.Formulas.RealDensity() / 1000.0f;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, outPath.Scale.Corrections);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart) / tstRslt.TestTime;
|
||||
tstRslt.FlowVolume = 3.6 * outPath.FlowMeter.LtrPerPulse * tstRslt.PulsesMaster / tstRslt.TestTime;
|
||||
tstRslt.MassOfEvapWater = 0;
|
||||
|
||||
@@ -1,235 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TBF.Rig
|
||||
{
|
||||
public class Telegram
|
||||
{
|
||||
const UInt16 crcSeed = 0xFFFF; // Initial crc value
|
||||
const UInt16 crcGP = 0xA001; // Generating polynomial
|
||||
|
||||
/// <summary>
|
||||
/// For standard CRC16 (remainder of division)
|
||||
/// to start a new crc, set CRC16 = SEED
|
||||
/// then for each byte call UpdateCRC(byte, &CRC16);
|
||||
/// CRC16 will contain the result
|
||||
/// (if you calculate all of the incoming data
|
||||
/// INCLUDING the crc, the result should be 0x0000
|
||||
/// and if you are sending the crc be sure to
|
||||
/// send the bytes in the correct order)
|
||||
/// <summary>
|
||||
static void UpdateCRC(byte b, ref UInt16 crc)
|
||||
{
|
||||
crc ^= (UInt16)b;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
bool carry = (crc & 0x0001) != 0;
|
||||
crc >>= 1;
|
||||
if (carry) crc ^= crcGP;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the CRC from a data telegram (an array of bytes).
|
||||
/// A complete telegram including two bytes reserved for the CRC
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>Calculated CRC</returns>
|
||||
public static UInt16 ClaculateTelegramCRC(byte[] data)
|
||||
{
|
||||
UInt16 crc = crcSeed;
|
||||
for (int i = 0; i < data.Length - 2; i++) UpdateCRC(data[i], ref crc);
|
||||
return crc;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function modifies the last 2 bytes in the message buffer
|
||||
/// by the CRC calculated from the remaining first (Lenght - 2) bytes.
|
||||
/// A complete telegram including two bytes reserved for the CRC
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
public static void UpdateTelegramCRC(byte[] data)
|
||||
{
|
||||
int len = data.Length;
|
||||
if (len < 2) return;
|
||||
|
||||
UInt16 crc = ClaculateTelegramCRC(data);
|
||||
|
||||
data[len - 2] = (byte)(crc & 0xFF);
|
||||
data[len - 1] = (byte)(crc >> 8);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function compares the last 2 bytes in the message buffer
|
||||
/// with the CRC calculated from the remaining first (Lenght - 2) bytes.
|
||||
/// A complete telegram including two bytes reserved for the CRC
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>true if the CRC in the telegram is correct</returns>
|
||||
public static bool VerifyTelegramCRC(byte[] data)
|
||||
{
|
||||
int len = data.Length;
|
||||
if (len < 2) return false;
|
||||
|
||||
UInt16 crc = ClaculateTelegramCRC(data);
|
||||
|
||||
return (data[len - 2] == (byte)(crc & 0xFF)) && (data[len - 1] == (byte)(crc >> 8));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the checksum from a data telegram (an array of bytes).
|
||||
/// A complete telegram including one byte reserved for the checksum
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>Calculated checksum</returns>
|
||||
public static byte ClaculateTelegramChecksum(byte[] data)
|
||||
{
|
||||
byte checksum = 0;
|
||||
for (int i = 0; i < data.Length - 1; i++) checksum = (byte)(checksum ^ data[i]);
|
||||
return checksum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the checksum from a data telegram (an array of bytes).
|
||||
/// A complete telegram including one bytes reserved for the checksum
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="hartPreambLen">Length of HART telegram preamble (FF bytes)</param>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>Calculated checksum</returns>
|
||||
public static byte ClaculateTelegramChecksum(int hartPreambLen, byte[] data)
|
||||
{
|
||||
byte checksum = 0;
|
||||
for (int i = hartPreambLen; i < data.Length - 1; i++) checksum = (byte)(checksum ^ data[i]);
|
||||
return checksum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function modifies the last byte in the message buffer
|
||||
/// by the checksum calculated from the remaining first (Lenght - 1) bytes.
|
||||
/// A complete telegram including one bytes reserved for the checksum
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
public static void UpdateTelegramChecksum(byte[] data)
|
||||
{
|
||||
int len = data.Length;
|
||||
if (len < 1) return;
|
||||
data[len - 1] = ClaculateTelegramChecksum(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function modifies the last byte in the message buffer
|
||||
/// by the checksum calculated from the preceeding (Lenght - hartPreambLen - 1) bytes.
|
||||
/// First hartPreambLen bytes in the telegram are skipped.
|
||||
/// A complete telegram including preamble and one bytes reserved for the checksum
|
||||
/// after data bytes must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="hartPreambLen">Length of HART telegram preamble (FF bytes)</param>
|
||||
/// <param name="data">Data telegram</param>
|
||||
public static void UpdateTelegramChecksum(int hartPreambLen, byte[] data)
|
||||
{
|
||||
if (data.Length - hartPreambLen < 1) return;
|
||||
data[data.Length - 1] = ClaculateTelegramChecksum(hartPreambLen, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function compares the last byte in the message buffer
|
||||
/// with the checksum calculated from the remaining first (Lenght - 1) bytes.
|
||||
/// A complete telegram including two bytes reserved for the checksum
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>true if the checksum in the telegram is correct</returns>
|
||||
public static bool VerifyTelegramChecksum(byte[] data)
|
||||
{
|
||||
int len = data.Length;
|
||||
if (len < 1) return false;
|
||||
return (data[len - 1] == ClaculateTelegramChecksum(data));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function compares the last byte in the message buffer
|
||||
/// with the checksum calculated from the remaining first (Lenght - 1) bytes.
|
||||
/// A complete telegram including two bytes reserved for the checksum
|
||||
/// must be supplied as an argument.
|
||||
/// </summary>
|
||||
/// <param name="hartPreambLen">Length of HART telegram preamble (FF bytes)</param>
|
||||
/// <param name="data">Data telegram</param>
|
||||
/// <returns>true if the checksum in the telegram is correct</returns>
|
||||
public static bool VerifyTelegramChecksum(int hartPreambLen, byte[] data)
|
||||
{
|
||||
if (data.Length - hartPreambLen < 1) return false;
|
||||
return (data[data.Length - 1] == ClaculateTelegramChecksum(hartPreambLen, data));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static string LogTelegram(string intro, byte[] data, int from = 0, int len = -1)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder(256);
|
||||
|
||||
int length = (len >= 0) ? len : (data.Length - from);
|
||||
|
||||
sb.Append(intro);
|
||||
sb.Append(length.ToString());
|
||||
sb.Append(" bytes:");
|
||||
|
||||
for (int i = from; i < from + length; i++)
|
||||
{
|
||||
byte b = data[i];
|
||||
sb.Append(" ");
|
||||
sb.Append(((int)b).ToString("X2"));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string LogTelegram(string intro, IList<byte> data, int from = 0, int len = -1)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder(256);
|
||||
|
||||
int length = (len >= 0) ? len : (data.Count - from);
|
||||
|
||||
sb.Append(intro);
|
||||
sb.Append(length.ToString());
|
||||
sb.Append(" bytes:");
|
||||
|
||||
for (int i = from; i < from + length; i++)
|
||||
{
|
||||
byte b = data[i];
|
||||
sb.Append(" ");
|
||||
sb.Append(((int)b).ToString("X2"));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static string LogTelegram(string intro, string data)
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder(80);
|
||||
|
||||
sb.Append(intro);
|
||||
sb.Append(data.Length.ToString());
|
||||
sb.Append(" bytes:");
|
||||
foreach (var d in data)
|
||||
{
|
||||
sb.Append(" ");
|
||||
sb.Append(((int)d).ToString("X2"));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -680,9 +680,9 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
|
||||
double massOfEvaporatedWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
|
||||
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.RefPulses); /// Pulses of the master flow meter (test total)
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + massOfEvaporatedWater) / tstRslt.TestTime; /// [kg/h]
|
||||
double flow = 3.6 * LtrPerRefPulse * cBrd.RefPulses / tstRslt.TestTime; /// [m3/h]
|
||||
tstRslt.MassOfEvapWater = massOfEvaporatedWater;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -689,9 +689,9 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
|
||||
tstRslt.PulsesMaster = Convert.ToDouble(cumulativeEtPulses[0]); /// Pulses of the master flow meter (test total)
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassOfEvapWater = (double)tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) / tstRslt.TestTime; /// [kg/h]
|
||||
tstRslt.FlowVolume = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -520,8 +520,8 @@ namespace TBF.Rig.TestMethods.FixedStartAdvanced
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double massStart = Config.Entities.MeasurementCorrection.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Entities.MeasurementCorrection.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2);
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
+2
-2
@@ -828,8 +828,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollDeferredEval
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double massStart = Config.Entities.MeasurementCorrection.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Entities.MeasurementCorrection.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2);
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -829,8 +829,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollection
|
||||
while (!e.Contains(Event.PreviousStopped));
|
||||
|
||||
|
||||
double massStart = Config.Formulas.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Formulas.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double massStart = Config.Entities.MeasurementCorrection.CorrectedValue(StartMass.Val, scale.Corrections);
|
||||
double massEnd = Config.Entities.MeasurementCorrection.CorrectedValue(EndMass.Val, scale.Corrections);
|
||||
double densityOut = Config.Formulas.WaterDensityFromTempPress((TempUpStat.Average + TempDownStat.Average) / 2,
|
||||
(PressUpStat.Average + PressDownStat.Average) / 2);
|
||||
double buoyancy = Config.Formulas.Buoyancy();
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -561,7 +561,7 @@ namespace TBF.Rig.TestMethods.FlyingStart
|
||||
energyRslt.VolumeStart = 0;
|
||||
energyRslt.VolumeEnd = 0;
|
||||
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / tstRslt.PulsesMaster); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Common.Units.ConvertFrom(Common.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.TestTime = tstRslt.TestTime; /// [s]
|
||||
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
+3
-3
@@ -749,9 +749,9 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
|
||||
tstRslt.MassOfEvapWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) / tstRslt.TestTime; /// [kg/h]
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Batch.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) / tstRslt.DensityLine; /// [l] commercially true volume
|
||||
if ((outPath.Diverter != null) && (tstRslt.TestTime > float.Epsilon))
|
||||
@@ -940,7 +940,7 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl
|
||||
energyRslt.VolumeStart = 0;
|
||||
energyRslt.VolumeEnd = 0;
|
||||
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / tstRslt.PulsesMaster); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Common.Units.ConvertFrom(Common.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s]
|
||||
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
+1
-1
@@ -1021,7 +1021,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative
|
||||
energyRslt.VolumeStart = 0;
|
||||
energyRslt.VolumeEnd = 0;
|
||||
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / tstRslt.PulsesMaster); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Common.Units.ConvertFrom(Common.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s]
|
||||
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using TBF.Rig.GenericDevices;
|
||||
@@ -809,9 +810,9 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged
|
||||
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
|
||||
tstRslt.MassOfEvapWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassStart = MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.FlowMass = 3600 * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) * totalPulses / (tstRslt.TestTime * massPulses); /// [kg/h]
|
||||
double flow = 3.6 * LtrPerRefPulse * totalPulses / tstRslt.TestTime; /// [m3/h]
|
||||
tstRslt.VolumeCTV = 1000 * tstRslt.Batch.Buoyancy * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) / tstRslt.DensityLine; /// [l] commercially true volume of collected water
|
||||
@@ -968,7 +969,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged
|
||||
energyRslt.VolumeStart = 0;
|
||||
energyRslt.VolumeEnd = 0;
|
||||
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / totalPulses); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Common.Units.ConvertFrom(Common.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s]
|
||||
|
||||
energyRslt.Error = Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -735,9 +735,9 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
||||
tstRslt.TimeBtwnMassMsrmnts = tMass2 - tMass1;
|
||||
tstRslt.PulsesMaster = Convert.ToDouble(cBrd.RefPulses); /// Pulses of the master flow meter (test total)
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassOfEvapWater = tstRslt.TimeBtwnMassMsrmnts * outPath.Scale.EvaporationRate(tstRslt.TempDivMean);
|
||||
tstRslt.FlowMass = 3600.0 * (tstRslt.MassEnd - tstRslt.MassStart + tstRslt.MassOfEvapWater) / tstRslt.TestTime; /// [kg/h]
|
||||
double flow = 3.6 * LtrPerRefPulse * tstRslt.PulsesMaster / tstRslt.TestTime; /// [m3/h]
|
||||
@@ -895,7 +895,7 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection
|
||||
energyRslt.VolumeStart = 0;
|
||||
energyRslt.VolumeEnd = 0;
|
||||
energyRslt.VolumeRef = tstRslt.RefEnergy * (energyRslt.PulsesMaster / tstRslt.PulsesMaster); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Config.Units.ConvertFrom(Config.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.VolumeMeter = energyRslt.PulsesMeter * Common.Units.ConvertFrom(Common.Unit.kWh, energyRegReader.LtrsPerPulse); /// [J]
|
||||
energyRslt.TestTime = cBrd.ImpulseTime(i + 1); /// [s]
|
||||
|
||||
energyRslt.Error = Config.Formulas.ErrorFromVolumes(energyRslt.VolumeMeter, energyRslt.VolumeRef);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -368,8 +368,8 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
{
|
||||
tstRslt.MassStartRaw = StartMass.Val;
|
||||
tstRslt.MassEndRaw = EndMass.Val;
|
||||
tstRslt.MassStart = Config.Formulas.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Formulas.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
tstRslt.MassStart = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassStartRaw, scale.Corrections);
|
||||
tstRslt.MassEnd = Config.Entities.MeasurementCorrection.CorrectedValue(tstRslt.MassEndRaw, scale.Corrections);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Results.Entities;
|
||||
using TBF.Resources;
|
||||
|
||||
@@ -71,7 +72,7 @@ namespace TBF.Rig.TestMethods.ManualEntry
|
||||
{
|
||||
labels[i].Text = items[i].Caption;
|
||||
groupBoxes[i].Visible = true;
|
||||
if (items[i].Quantity == Config.Quantity.Boolean)
|
||||
if (items[i].Quantity == Quantity.Boolean)
|
||||
{
|
||||
textBoxes[i].Visible = false;
|
||||
yesRadioButtons[i].Visible = true;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.Configs.NameOnly;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
/// <returns>Calculated Q2 correction factor</returns>
|
||||
public double CalculateQ2CorrectionFactor(Results.Entities.MeterTestRslt q2adjResult, double calibTarget, double nominalFlow, int currentFactor = 0)
|
||||
{
|
||||
double nominalTestFlowLph = Config.Units.ConvertTo(Config.Unit.lph, nominalFlow);
|
||||
double nominalTestFlowLph = Common.Units.ConvertTo(Common.Unit.lph, nominalFlow);
|
||||
double volumeRefShiftedToTarget = q2adjResult.VolumeRef * (1.0 + calibTarget / 100.0);
|
||||
double q2adjErrorShiftedToTarget = Config.Formulas.ErrorFromVolumes(q2adjResult.VolumeMeter, volumeRefShiftedToTarget);
|
||||
|
||||
@@ -1047,9 +1047,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
switch (units)
|
||||
{
|
||||
default:
|
||||
case VolumeUnits.m3: return Config.Units.ConvertFrom(Config.Unit.m3, 1.0); /// 1 liter
|
||||
case VolumeUnits.UK_gallon: return Config.Units.ConvertFrom(Config.Unit.UKgal, 1.0); /// 1 imperial gallon
|
||||
case VolumeUnits.US_gallon: return Config.Units.ConvertFrom(Config.Unit.USgal, 1.0); /// 1 US gallon
|
||||
case VolumeUnits.m3: return Common.Units.ConvertFrom(Common.Unit.m3, 1.0); /// 1 liter
|
||||
case VolumeUnits.UK_gallon: return Common.Units.ConvertFrom(Common.Unit.UKgal, 1.0); /// 1 imperial gallon
|
||||
case VolumeUnits.US_gallon: return Common.Units.ConvertFrom(Common.Unit.USgal, 1.0); /// 1 US gallon
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Xml.Serialization;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.Rig
|
||||
|
||||
@@ -10,7 +10,7 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Various.ErrorFlags
|
||||
{
|
||||
public class ErrorsCfg : ComponentCfgBase, IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class ErrorsCfg : ComponentCfgBase, IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ErrorsCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -121,7 +121,7 @@ namespace TBF.Rig.Various.ErrorFlags
|
||||
prms.Q1Names = this.Q1Names;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
ErrorsCfg pars = new ErrorsCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace TBF.Rig.Various.StatisticsMonitoring
|
||||
/// <summary>
|
||||
/// Serializable configuration of Various.StatisticsMonitoring component.
|
||||
/// </summary>
|
||||
public class StatisticsCfg : ComponentCfgBase, Generic.IComponentCfg, Config.Entities.IParamsProvider
|
||||
public class StatisticsCfg : ComponentCfgBase, Generic.IComponentCfg, IParamsProvider
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(StatisticsCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
@@ -113,7 +113,7 @@ namespace TBF.Rig.Various.StatisticsMonitoring
|
||||
prms.iPerlHeadFailureRateThreshold = this.iPerlHeadFailureRateThreshold; /// 1
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
StatisticsCfg pars = new StatisticsCfg();
|
||||
CopyContentTo(pars);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user