DB 3.7 --> 3.8, IsFromToInPct (unit for Qfrom/Qto) added to Entities.Test, IBenchInfo, ProcessData..., ver. 3.8.2097
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2020 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
@@ -35,6 +31,7 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
public int CompoundMetersCount { get { return myCfg.CompoundMetersCount; } }
|
||||
public Unit VolumeUnit { get { return myCfg.VolumeUnit; } }
|
||||
public Unit FlowUnit { get { return myCfg.FlowUnit; } }
|
||||
public bool IsFromToInPct { get { return myCfg.IsFromToInPct; } }
|
||||
public Unit MassUnit { get { return myCfg.MassUnit; } }
|
||||
public Unit TempUnit { get { return myCfg.TempUnit; } }
|
||||
public Unit PressUnit { get { return myCfg.PressUnit; } }
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
///
|
||||
/// Copyright (c) 2018-2021 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2018-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
{
|
||||
@@ -37,18 +36,19 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
public int WaterMetersCount; /// 10
|
||||
public int LinesCount; /// 11
|
||||
public int CompoundMetersCount; /// 12
|
||||
public Unit VolumeUnit;
|
||||
public Unit FlowUnit;
|
||||
public Unit MassUnit;
|
||||
public Unit TempUnit;
|
||||
public Unit PressUnit;
|
||||
public Unit LenghtUnit;
|
||||
public Side Side; /// 19
|
||||
public int MaxTestIndex; /// 20 (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
public ProcedureSelection Source1; /// 21
|
||||
public ProcedureSelection Source2; /// 22
|
||||
public ProcedureSelection Source3; /// 23
|
||||
public ProcedureSelection Source4; /// 24
|
||||
public Unit VolumeUnit; /// 13
|
||||
public Unit FlowUnit; /// 14
|
||||
public bool IsFromToInPct; /// 15
|
||||
public Unit MassUnit; /// 16
|
||||
public Unit TempUnit; /// 17
|
||||
public Unit PressUnit; /// 18
|
||||
public Unit LenghtUnit; /// 19
|
||||
public Side Side; /// 20
|
||||
public int MaxTestIndex; /// 21 (MaxPruefindex % 100) value when to reject water meters completely if they are NOK
|
||||
public ProcedureSelection Source1; /// 22
|
||||
public ProcedureSelection Source2; /// 23
|
||||
public ProcedureSelection Source3; /// 24
|
||||
public ProcedureSelection Source4; /// 25
|
||||
|
||||
/// Calibration info serialized parameters displayed in Metrology tab page
|
||||
public string CalibCertificateNr { get; set; }
|
||||
@@ -87,6 +87,7 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
CompoundMetersCount = 1;
|
||||
VolumeUnit = Unit.l;
|
||||
FlowUnit = Unit.m3ph;
|
||||
IsFromToInPct = false;
|
||||
MassUnit = Unit.kg;
|
||||
TempUnit = Unit.C;
|
||||
PressUnit = Unit.bar;
|
||||
@@ -118,18 +119,19 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
"Water meters count", /// 10
|
||||
"Lines count", /// 11
|
||||
"Compound meters count", /// 12
|
||||
"Preffered volume unit",
|
||||
"Preffered flow unit",
|
||||
"Preffered mass unit",
|
||||
"Preffered temperature unit",
|
||||
"Preffered pressure unit",
|
||||
"Preffered lenght unit",
|
||||
Strings.Side, /// 19
|
||||
"Max.test index", /// 20
|
||||
"Procedure selection source 1", /// 21
|
||||
"Procedure selection source 2", /// 22
|
||||
"Procedure selection source 3", /// 23
|
||||
"Procedure selection source 4", /// 24
|
||||
"Preffered volume unit", /// 13
|
||||
"Preffered flow unit", /// 14
|
||||
"Qfrom and Qto preferably in %", /// 15
|
||||
"Preffered mass unit", /// 16
|
||||
"Preffered temperature unit", /// 17
|
||||
"Preffered pressure unit", /// 18
|
||||
"Preffered lenght unit", /// 19
|
||||
Strings.Side, /// 20
|
||||
"Max.test index", /// 21
|
||||
"Procedure selection source 1", /// 22
|
||||
"Procedure selection source 2", /// 23
|
||||
"Procedure selection source 3", /// 24
|
||||
"Procedure selection source 4", /// 25
|
||||
};
|
||||
public string ParamName(int i) { return paramNames[i]; }
|
||||
public int ParamsCount() { return paramNames.Length; }
|
||||
@@ -157,34 +159,36 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 15:
|
||||
return new string[] { Strings.yes, Strings.no };
|
||||
case 16:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Mass))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 16:
|
||||
case 17:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Temperature))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 17:
|
||||
case 18:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Pressure))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 18:
|
||||
case 19:
|
||||
for (Unit unit = 0; unit < Unit.Count; unit++)
|
||||
if (Units.IsQuantity(unit, Quantity.Length))
|
||||
list.Add(unit.ToDescription());
|
||||
return list;
|
||||
case 19:
|
||||
case 20:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
list.Add(side.ToDescription());
|
||||
return list;
|
||||
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
for (ProcedureSelection src = 0; src < ProcedureSelection.Count; src++)
|
||||
list.Add(src.ToDescription());
|
||||
return list;
|
||||
@@ -213,16 +217,17 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
case 12: return CompoundMetersCount.ToString();
|
||||
case 13: return VolumeUnit.ToDescription();
|
||||
case 14: return FlowUnit.ToDescription();
|
||||
case 15: return MassUnit.ToDescription();
|
||||
case 16: return TempUnit.ToDescription();
|
||||
case 17: return PressUnit.ToDescription();
|
||||
case 18: return LenghtUnit.ToDescription();
|
||||
case 19: return Side.ToDescription();
|
||||
case 20: return MaxTestIndex.ToString();
|
||||
case 21: return Source1.ToDescription();
|
||||
case 22: return Source2.ToDescription();
|
||||
case 23: return Source3.ToDescription();
|
||||
case 24: return Source4.ToDescription();
|
||||
case 15: return IsFromToInPct ? Strings.yes : Strings.no;
|
||||
case 16: return MassUnit.ToDescription();
|
||||
case 17: return TempUnit.ToDescription();
|
||||
case 18: return PressUnit.ToDescription();
|
||||
case 19: return LenghtUnit.ToDescription();
|
||||
case 20: return Side.ToDescription();
|
||||
case 21: return MaxTestIndex.ToString();
|
||||
case 22: return Source1.ToDescription();
|
||||
case 23: return Source2.ToDescription();
|
||||
case 24: return Source3.ToDescription();
|
||||
case 25: return Source4.ToDescription();
|
||||
default:
|
||||
return string.Format("{0}: Bench={1}, ID={2}, Mtrs={3}, Lines={4}, Compund mtrs={5}, S1={6}, S2={7}, S3={8}, S4={9}",
|
||||
Name, TestBenchName, TestBenchId, WaterMetersCount, LinesCount, CompoundMetersCount, Source1, Source2, Source3, Source4);
|
||||
@@ -256,22 +261,26 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 15:
|
||||
MassUnit = Units.FromDescription(str);
|
||||
IsFromToInPct = (str == Strings.yes);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 16:
|
||||
TempUnit = Units.FromDescription(str);
|
||||
MassUnit = Units.FromDescription(str);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 17:
|
||||
PressUnit = Units.FromDescription(str);
|
||||
TempUnit = Units.FromDescription(str);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 18:
|
||||
LenghtUnit = Units.FromDescription(str);
|
||||
PressUnit = Units.FromDescription(str);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 19:
|
||||
LenghtUnit = Units.FromDescription(str);
|
||||
return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 20:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
{
|
||||
if (str == side.ToDescription())
|
||||
@@ -289,30 +298,30 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
}
|
||||
return CfgUpdateFlags.Error;
|
||||
|
||||
case 20: MaxTestIndex = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||
case 21: MaxTestIndex = int.Parse(str); return CfgUpdateFlags.RestartRqrd;
|
||||
|
||||
case 21:
|
||||
case 22:
|
||||
for (ProcedureSelection source = 0; source < ProcedureSelection.Count; source++)
|
||||
{
|
||||
if (str == source.ToDescription()) { Source1 = source; return CfgUpdateFlags.RestartRqrd; }
|
||||
}
|
||||
break;
|
||||
|
||||
case 22:
|
||||
case 23:
|
||||
for (ProcedureSelection source = 0; source < ProcedureSelection.Count; source++)
|
||||
{
|
||||
if (str == source.ToDescription()) { Source2 = source; return CfgUpdateFlags.RestartRqrd; }
|
||||
}
|
||||
break;
|
||||
|
||||
case 23:
|
||||
case 24:
|
||||
for (ProcedureSelection source = 0; source < ProcedureSelection.Count; source++)
|
||||
{
|
||||
if (str == source.ToDescription()) { Source3 = source; return CfgUpdateFlags.RestartRqrd; }
|
||||
}
|
||||
break;
|
||||
|
||||
case 24:
|
||||
case 25:
|
||||
for (ProcedureSelection source = 0; source < ProcedureSelection.Count; source++)
|
||||
{
|
||||
if (str == source.ToDescription()) { Source4 = source; return CfgUpdateFlags.RestartRqrd; }
|
||||
@@ -357,21 +366,22 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
if (ParamValues(i).Contains(str)) return true;
|
||||
break;
|
||||
case 19:
|
||||
case 20:
|
||||
for (Side side = 0; side < Side.Count; side++)
|
||||
{
|
||||
if (str == side.ToDescription()) return true;
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
case 21:
|
||||
if (int.TryParse(str, out idummy) && (idummy >= 0)) return true;
|
||||
break;
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
case 25:
|
||||
for (ProcedureSelection source = 0; source < ProcedureSelection.Count; source++)
|
||||
{
|
||||
if (str == source.ToDescription()) return true;
|
||||
@@ -403,6 +413,7 @@ namespace TBF.Rig.DataContainer.iPerlBenchInfo
|
||||
prms.CompoundMetersCount = this.CompoundMetersCount;
|
||||
prms.VolumeUnit = this.VolumeUnit;
|
||||
prms.FlowUnit = this.FlowUnit;
|
||||
prms.IsFromToInPct = this.IsFromToInPct;
|
||||
prms.MassUnit = this.MassUnit;
|
||||
prms.TempUnit = this.TempUnit;
|
||||
prms.PressUnit = this.PressUnit;
|
||||
|
||||
Reference in New Issue
Block a user