(1) SUEZ cycle: InitOrReadQ2Correction, (Conditional)UpdateQ2Corrections, (2) Flow dir. detection fixed, (3) etc., ver. 2.18.1182

This commit is contained in:
Milan Hanajik
2019-04-03 16:19:46 +02:00
parent e356934ede
commit b235f9ae20
15 changed files with 752 additions and 487 deletions
@@ -1,5 +1,5 @@
///
/// Copyright (c) 2015-2018 Sensus Slovensko a.s.
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
using System.IO;
@@ -20,9 +20,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
public int FactorLimitLo; /// Lower limit for the calibration factor
public int FactorLimitHi; /// Upper limit for the calibration factor
public Counting Counting; /// Initial iPerl counting (Artbitrary, Positive or Negative)
#if ORACLE_DB
public int WMType_ID; /// Required for Oracle DB: ID_WZTyp in table VT_PRUEFPUNKT_SOLL_SD
#endif
public int InitQ2CorrLR;
public int InitQ2CorrRL;
public override void InitializeAll()
@@ -32,9 +32,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
FactorLimitLo = 1000;
FactorLimitHi = 8000;
Counting = Counting.Arbitrary;
#if ORACLE_DB
WMType_ID = 2; /// Value for iPerl DN15
#endif
InitQ2CorrLR = 0;
InitQ2CorrRL = 0;
}
string[] paramNames = new string[]
@@ -44,9 +44,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
"Calib. factor Lo",
"Calib. factor Hi",
"Counting",
#if ORACLE_DB
"WM type ID",
#endif
"Init. Q2 corr. LR",
"Init. Q2 corr. RL",
};
public override string ParamName(int i) { return paramNames[i]; }
public override int ParamsCount() { return paramNames.Length; }
@@ -77,10 +77,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
case 2: return FactorLimitLo.ToString();
case 3: return FactorLimitHi.ToString();
case 4: return Counting.ToString();
#if ORACLE_DB
case 5: return WMType_ID.ToString();
#endif
default: return string.Empty;
case 6: return InitQ2CorrLR.ToString();
case 7: return InitQ2CorrRL.ToString();
default: return string.Empty;
}
}
@@ -103,9 +103,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
if (c.ToString().Equals(strValue)) { Counting = c; return CfgUpdateFlags.None; }
}
break;
#if ORACLE_DB
case 5: WMType_ID = int.Parse(strValue); return CfgUpdateFlags.None;
#endif
case 6: InitQ2CorrLR = int.Parse(strValue); return CfgUpdateFlags.None;
case 7: InitQ2CorrRL = int.Parse(strValue); return CfgUpdateFlags.None;
default: return CfgUpdateFlags.None;
}
@@ -134,11 +134,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
case 4:
for (Counting c = 0; c < Counting.Count; c++) if (c.ToString().Equals(strValue)) return true;
break;
#if ORACLE_DB
case 5: /// WMType_ID
if (int.TryParse(strValue, out iDummy)) return true;
break;
#endif
case 6: /// InitQ2CorrLR
case 7: /// InitQ2CorrRL
if (int.TryParse(strValue, out iDummy) || (iDummy < -127) || (iDummy > 127)) return true;
break;
default:
message = "Invalid index";
return false;
@@ -155,10 +157,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication.iPerlHead
prms.FactorLimitLo = this.FactorLimitLo;
prms.FactorLimitHi = this.FactorLimitHi;
prms.Counting = this.Counting;
#if ORACLE_DB
prms.WMType_ID = this.WMType_ID;
#endif
}
prms.InitQ2CorrLR = this.InitQ2CorrLR;
prms.InitQ2CorrRL = this.InitQ2CorrRL;
}
public IParamsProvider Clone()
{