Preferred units in all BenchInfo components and IBenchInfo, Units.ConvertFrom/To for float.
This commit is contained in:
parent
e0c2004f52
commit
50494fccc9
@ -248,14 +248,14 @@ namespace Config
|
||||
unit == Unit.J || unit == Unit.uSpcm || unit == Unit.ppl || unit == Unit.ppkWh;
|
||||
}
|
||||
|
||||
public static bool IsQuantity(Unit units, Quantity quantity)
|
||||
public static bool IsQuantity(Unit unit, Quantity quantity)
|
||||
{
|
||||
return (quantity == GetQuantity(units));
|
||||
return (quantity == GetQuantity(unit));
|
||||
}
|
||||
|
||||
public static Quantity GetQuantity(Unit units)
|
||||
public static Quantity GetQuantity(Unit unit)
|
||||
{
|
||||
switch (units)
|
||||
switch (unit)
|
||||
{
|
||||
case Unit.pulse:
|
||||
case Unit.degree:
|
||||
@ -360,26 +360,32 @@ namespace Config
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsVolume(Unit units) { return IsQuantity(units, Config.Quantity.Volume); }
|
||||
public static bool IsFlow(Unit units) { return IsQuantity(units, Config.Quantity.Flow); }
|
||||
public static bool IsMass(Unit units) { return IsQuantity(units, Config.Quantity.Mass); }
|
||||
public static bool IsTime(Unit units) { return IsQuantity(units, Config.Quantity.Time); }
|
||||
public static bool IsTemperature(Unit units) { return IsQuantity(units, Config.Quantity.Temperature); }
|
||||
public static bool IsPressure(Unit units) { return IsQuantity(units, Config.Quantity.Pressure); }
|
||||
public static bool IsHumidity(Unit units) { return IsQuantity(units, Config.Quantity.Humidity); }
|
||||
public static bool IsError(Unit units) { return IsQuantity(units, Config.Quantity.Error); }
|
||||
public static bool IsLength(Unit units) { return IsQuantity(units, Config.Quantity.Length); }
|
||||
public static bool IsDensity(Unit units) { return IsQuantity(units, Config.Quantity.Density); }
|
||||
public static bool IsEnergy(Unit units) { return IsQuantity(units, Config.Quantity.Energy); }
|
||||
public static bool IsPulses(Unit units) { return IsQuantity(units, Config.Quantity.Pulses); }
|
||||
public static bool IsPulsePerLtr(Unit units) { return IsQuantity(units, Config.Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit units) { return IsQuantity(units, Config.Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit units) { return IsQuantity(units, Config.Quantity.Conductivity); }
|
||||
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Config.Quantity.Volume); }
|
||||
public static bool IsFlow(Unit unit) { return IsQuantity(unit, Config.Quantity.Flow); }
|
||||
public static bool IsMass(Unit unit) { return IsQuantity(unit, Config.Quantity.Mass); }
|
||||
public static bool IsTime(Unit unit) { return IsQuantity(unit, Config.Quantity.Time); }
|
||||
public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Config.Quantity.Temperature); }
|
||||
public static bool IsPressure(Unit unit) { return IsQuantity(unit, Config.Quantity.Pressure); }
|
||||
public static bool IsHumidity(Unit unit) { return IsQuantity(unit, Config.Quantity.Humidity); }
|
||||
public static bool IsError(Unit unit) { return IsQuantity(unit, Config.Quantity.Error); }
|
||||
public static bool IsLength(Unit unit) { return IsQuantity(unit, Config.Quantity.Length); }
|
||||
public static bool IsDensity(Unit unit) { return IsQuantity(unit, Config.Quantity.Density); }
|
||||
public static bool IsEnergy(Unit unit) { return IsQuantity(unit, Config.Quantity.Energy); }
|
||||
public static bool IsPulses(Unit unit) { return IsQuantity(unit, Config.Quantity.Pulses); }
|
||||
public static bool IsPulsePerLtr(Unit unit) { return IsQuantity(unit, Config.Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit unit) { return IsQuantity(unit, Config.Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit unit) { return IsQuantity(unit, Config.Quantity.Conductivity); }
|
||||
|
||||
|
||||
public static double ConvertTo(Unit units, double v)
|
||||
|
||||
public static float ConvertTo(Unit unit, float v)
|
||||
{
|
||||
switch (units)
|
||||
return (float)ConvertTo(unit, (double)v);
|
||||
}
|
||||
|
||||
public static double ConvertTo(Unit unit, double v)
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.ml: return 1000 * v; /// 1 ml = 0.001 l
|
||||
@ -457,9 +463,15 @@ namespace Config
|
||||
}
|
||||
}
|
||||
|
||||
public static double ConvertFrom(Unit units, double v)
|
||||
|
||||
public static float ConvertFrom(Unit unit, float v)
|
||||
{
|
||||
switch (units)
|
||||
return (float)ConvertFrom(unit, (double)v);
|
||||
}
|
||||
|
||||
public static double ConvertFrom(Unit unit, double v)
|
||||
{
|
||||
switch (unit)
|
||||
{
|
||||
/// Volume: internal representation in l
|
||||
case Unit.ml: return 0.001 * v; /// 0.001 l
|
||||
@ -536,5 +548,20 @@ namespace Config
|
||||
default: return v; /// Do not convert
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a string to a unit
|
||||
/// </summary>
|
||||
/// <param name="description">Unit description string</param>
|
||||
/// <returns>Converted unit or Unit.None if not recognized</returns>
|
||||
public static Unit FromDescription(string description)
|
||||
{
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
{
|
||||
if (unit.ToDescription() == description) return unit;
|
||||
}
|
||||
|
||||
return Unit.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
@ -28,6 +29,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
public string Address4 { get { return myCfg.Address4; } }
|
||||
public string Address5 { get { return myCfg.Address5; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
public Unit VolumeUnit { get { return myCfg.VolumeUnit; } }
|
||||
public Unit FlowUnit { get { return myCfg.FlowUnit; } }
|
||||
public Unit MassUnit { get { return myCfg.MassUnit; } }
|
||||
public Unit TempUnit { get { return myCfg.TempUnit; } }
|
||||
public Unit PressUnit { get { return myCfg.PressUnit; } }
|
||||
public Unit LenghtUnit { get { return myCfg.LenghtUnit; } }
|
||||
|
||||
|
||||
public Component() { }
|
||||
|
||||
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
@ -34,6 +35,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
public Unit VolumeUnit;
|
||||
public Unit FlowUnit;
|
||||
public Unit MassUnit;
|
||||
public Unit TempUnit;
|
||||
public Unit PressUnit;
|
||||
public Unit LenghtUnit;
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
ComponentCfg() {}
|
||||
@ -65,6 +72,13 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
ApprovedBy = string.Empty;
|
||||
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
|
||||
VolumeUnit = Unit.l;
|
||||
FlowUnit = Unit.m3ph;
|
||||
MassUnit = Unit.kg;
|
||||
TempUnit = Unit.C;
|
||||
PressUnit = Unit.bar;
|
||||
LenghtUnit = Unit.mm;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@ -80,20 +94,57 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
"Approval date",
|
||||
"Approved by",
|
||||
"Remote DB use",
|
||||
"Preffered volume unit",
|
||||
"Preffered flow unit",
|
||||
"Preffered mass unit",
|
||||
"Preffered temperature unit",
|
||||
"Preffered pressure unit",
|
||||
"Preffered lenght unit",
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
|
||||
public ICollection<string> ParamValues(int i)
|
||||
{
|
||||
if (i == 10)
|
||||
var list = new List<string>();
|
||||
|
||||
switch (i)
|
||||
{
|
||||
IList<string> list = new List<string>();
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++) list.Add(rdbu.ToDescription());
|
||||
case 10:
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++)
|
||||
list.Add(rdbu.ToDescription());
|
||||
return list;
|
||||
}
|
||||
else
|
||||
{
|
||||
case 11:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Volume))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 12:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Flow))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 13:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Mass))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 14:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Temperature))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 15:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Pressure))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 16:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Length))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -118,6 +169,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
case 8: return ApprovalDate;
|
||||
case 9: return ApprovedBy;
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
case 11: return VolumeUnit.ToDescription();
|
||||
case 12: return FlowUnit.ToDescription();
|
||||
case 13: return MassUnit.ToDescription();
|
||||
case 14: return TempUnit.ToDescription();
|
||||
case 15: return PressUnit.ToDescription();
|
||||
case 16: return LenghtUnit.ToDescription();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@ -155,7 +212,32 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
default: return CfgUpdateFlags.None;
|
||||
case 11:
|
||||
VolumeUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 12:
|
||||
FlowUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 13:
|
||||
MassUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 14:
|
||||
TempUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 15:
|
||||
PressUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 16:
|
||||
LenghtUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
default:
|
||||
return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,6 +267,14 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
if (strValue == rdbu.ToDescription()) return true;
|
||||
}
|
||||
return false;
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
if (ParamValues(i).Contains(strValue)) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
return false;
|
||||
@ -207,6 +297,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.Extended
|
||||
prms.ApprovalDate = this.ApprovalDate;
|
||||
prms.ApprovedBy = this.ApprovedBy;
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
prms.VolumeUnit = this.VolumeUnit;
|
||||
prms.FlowUnit = this.FlowUnit;
|
||||
prms.MassUnit = this.MassUnit;
|
||||
prms.TempUnit = this.TempUnit;
|
||||
prms.PressUnit = this.PressUnit;
|
||||
prms.LenghtUnit = this.LenghtUnit;
|
||||
}
|
||||
|
||||
public Config.Entities.IParamsProvider Clone()
|
||||
|
||||
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
@ -30,6 +31,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
public string Address4 { get { return myCfg.Address4; } }
|
||||
public string Address5 { get { return myCfg.Address5; } }
|
||||
public RemoteDBUse RemoteDBUse { get { return myCfg.RemoteDBUse; } }
|
||||
public Unit VolumeUnit { get { return myCfg.VolumeUnit; } }
|
||||
public Unit FlowUnit { get { return myCfg.FlowUnit; } }
|
||||
public Unit MassUnit { get { return myCfg.MassUnit; } }
|
||||
public Unit TempUnit { get { return myCfg.TempUnit; } }
|
||||
public Unit PressUnit { get { return myCfg.PressUnit; } }
|
||||
public Unit LenghtUnit { get { return myCfg.LenghtUnit; } }
|
||||
public Side Side { get { return myCfg.Side; } }
|
||||
public int MaxTestIndex { get { return myCfg.MaxTestIndex; } } /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
@ -35,6 +36,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
public string ApprovalDate;
|
||||
public string ApprovedBy;
|
||||
public RemoteDBUse RemoteDBUse;
|
||||
public Unit VolumeUnit;
|
||||
public Unit FlowUnit;
|
||||
public Unit MassUnit;
|
||||
public Unit TempUnit;
|
||||
public Unit PressUnit;
|
||||
public Unit LenghtUnit;
|
||||
public Side Side;
|
||||
public int MaxTestIndex; /// (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
|
||||
@ -71,6 +78,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
ApprovalDate = string.Empty;
|
||||
ApprovedBy = string.Empty;
|
||||
RemoteDBUse = RemoteDBUse.LocalDBOnly;
|
||||
VolumeUnit = Unit.l;
|
||||
FlowUnit = Unit.m3ph;
|
||||
MassUnit = Unit.kg;
|
||||
TempUnit = Unit.C;
|
||||
PressUnit = Unit.bar;
|
||||
LenghtUnit = Unit.mm;
|
||||
Side = Side.Left;
|
||||
MaxTestIndex = 4;
|
||||
|
||||
@ -92,6 +105,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
"Approval date",
|
||||
"Approved by",
|
||||
"Remote DB use",
|
||||
"Preffered volume unit",
|
||||
"Preffered flow unit",
|
||||
"Preffered mass unit",
|
||||
"Preffered temperature unit",
|
||||
"Preffered pressure unit",
|
||||
"Preffered lenght unit",
|
||||
Strings.Side,
|
||||
"Max.test index",
|
||||
};
|
||||
@ -100,20 +119,49 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
|
||||
public ICollection<string> ParamValues(int i)
|
||||
{
|
||||
if (i == 10)
|
||||
var list = new List<string>();
|
||||
|
||||
switch (i)
|
||||
{
|
||||
IList<string> list = new List<string>();
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++) list.Add(rdbu.ToDescription());
|
||||
case 10:
|
||||
for (RemoteDBUse rdbu = 0; rdbu < RemoteDBUse.Count; rdbu++)
|
||||
list.Add(rdbu.ToDescription());
|
||||
return list;
|
||||
}
|
||||
else if (i == 11)
|
||||
{
|
||||
IList<string> list = new List<string>();
|
||||
for (Side side = 0; side < Side.Count; side++) list.Add(side.ToDescription());
|
||||
case 11:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Volume))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
}
|
||||
else
|
||||
{
|
||||
case 12:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Flow))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 13:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Mass))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 14:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Temperature))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 15:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Pressure))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 16:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Length))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 17:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
list.Add(side.ToDescription());
|
||||
return list;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -138,8 +186,14 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
case 8: return ApprovalDate;
|
||||
case 9: return ApprovedBy;
|
||||
case 10: return RemoteDBUse.ToDescription();
|
||||
case 11: return Side.ToDescription();
|
||||
case 12: return MaxTestIndex.ToString();
|
||||
case 11: return VolumeUnit.ToDescription();
|
||||
case 12: return FlowUnit.ToDescription();
|
||||
case 13: return MassUnit.ToDescription();
|
||||
case 14: return TempUnit.ToDescription();
|
||||
case 15: return PressUnit.ToDescription();
|
||||
case 16: return LenghtUnit.ToDescription();
|
||||
case 17: return Side.ToDescription();
|
||||
case 18: return MaxTestIndex.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@ -178,6 +232,30 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
case 11:
|
||||
VolumeUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 12:
|
||||
FlowUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 13:
|
||||
MassUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 14:
|
||||
TempUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 15:
|
||||
PressUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 16:
|
||||
LenghtUnit = Units.FromDescription(strValue);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 17:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
{
|
||||
if (strValue == side.ToDescription())
|
||||
@ -195,7 +273,7 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
case 12: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
case 18: MaxTestIndex = int.Parse(strValue); return CfgUpdateFlags.RestartRqrd;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
}
|
||||
@ -218,7 +296,7 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
case 9:
|
||||
return true;
|
||||
case 1:
|
||||
case 12:
|
||||
case 18:
|
||||
if (int.TryParse(strValue, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 10:
|
||||
@ -228,6 +306,14 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
if (ParamValues(i).Contains(strValue)) return true;
|
||||
break;
|
||||
case 17:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
{
|
||||
if (strValue == side.ToDescription()) return true;
|
||||
@ -255,6 +341,12 @@ namespace TBF.Rig.DataContainers.BenchInfo.iPerl
|
||||
prms.ApprovalDate = this.ApprovalDate;
|
||||
prms.ApprovedBy = this.ApprovedBy;
|
||||
prms.RemoteDBUse = this.RemoteDBUse;
|
||||
prms.VolumeUnit = this.VolumeUnit;
|
||||
prms.FlowUnit = this.FlowUnit;
|
||||
prms.MassUnit = this.MassUnit;
|
||||
prms.TempUnit = this.TempUnit;
|
||||
prms.PressUnit = this.PressUnit;
|
||||
prms.LenghtUnit = this.LenghtUnit;
|
||||
prms.Side = this.Side;
|
||||
prms.MaxTestIndex = this.MaxTestIndex;
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2015-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using Common;
|
||||
using Config;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.GenericDevices
|
||||
@ -19,5 +20,11 @@ namespace TBF.Rig.GenericDevices
|
||||
string Address4 { get; }
|
||||
string Address5 { get; }
|
||||
RemoteDBUse RemoteDBUse { get; }
|
||||
Unit VolumeUnit { get; }
|
||||
Unit FlowUnit { get; }
|
||||
Unit MassUnit { get; }
|
||||
Unit TempUnit { get; }
|
||||
Unit PressUnit { get; }
|
||||
Unit LenghtUnit { get; }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user