iPerlCommunication : Default Q2 corrections, ConditnlUpdateQ2CorrRL/LR, fixes in CheckBoxEditMode, MuxBoard and Quido support removed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2017 Sensus Metering Systems
|
||||
/// Copyright (c) 2015-2021 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -40,13 +40,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
public enum MeterType : byte
|
||||
{
|
||||
DN15 = 0,
|
||||
DN15 = 0,
|
||||
CoaxManifold = 1,
|
||||
DN20 = 2,
|
||||
DN25 = 3,
|
||||
DN26 = 4, /// DN25*
|
||||
DN32 = 5,
|
||||
DN40 = 6,
|
||||
DN20 = 2,
|
||||
DN25 = 3, /// DN25 Q3 = 6.3 m3/h
|
||||
DN25_Q3_10 = 4, /// DN25 Q3 = 10 m3/h
|
||||
DN32 = 5,
|
||||
DN40 = 6,
|
||||
AutoDetect,
|
||||
Count /// Number of meter types
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } }
|
||||
public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } }
|
||||
public int Group { get { return iperlHeadCfg.Group; } }
|
||||
public iPerlHead.MeterType MeterType { get { return iperlHeadCfg.MeterType; } }
|
||||
|
||||
public int Position
|
||||
{
|
||||
@@ -59,8 +60,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public ushort FactorLimitHi { get { return (ushort)iperlHeadCfg.ProcParams.FactorLimitHi; } }
|
||||
public Counting InitFlowDir { get { return (iperlHeadCfg != null && iperlHeadCfg.ProcParams != null) ? iperlHeadCfg.ProcParams.Counting : Counting.Arbitrary; } }
|
||||
public int WMType_ID { get { return iperlHeadCfg.ProcParams.WMType_ID; } } /// Required by Oracle DB
|
||||
public int Q2PreCorrectionLR { get { return iperlHeadCfg.ProcParams.InitQ2CorrLR; } } /// Used by InitOrReadQ2Corrections activity
|
||||
public int Q2PreCorrectionRL { get { return iperlHeadCfg.ProcParams.InitQ2CorrRL; } } /// Required by Oracle DB
|
||||
|
||||
|
||||
/// Properties set by the Begin and the End form
|
||||
@@ -974,12 +973,21 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
default:
|
||||
case MeterType.DN15:
|
||||
case MeterType.CoaxManifold: return 1.0;
|
||||
case MeterType.DN20: return 2.0;
|
||||
case MeterType.DN25: return 4.0;
|
||||
case MeterType.DN26:
|
||||
case MeterType.DN32: return 8.0;
|
||||
case MeterType.DN40: return 16.0;
|
||||
case MeterType.CoaxManifold:
|
||||
return 1.0;
|
||||
|
||||
case MeterType.DN20:
|
||||
return 2.0;
|
||||
|
||||
case MeterType.DN25:
|
||||
return 4.0;
|
||||
|
||||
case MeterType.DN25_Q3_10:
|
||||
case MeterType.DN32:
|
||||
return 8.0;
|
||||
|
||||
case MeterType.DN40:
|
||||
return 16.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
public int FactorLimitHi; /// Upper limit for the calibration factor
|
||||
public Counting Counting; /// Initial iPerl counting (Artbitrary, Positive or Negative)
|
||||
public int WMType_ID; /// Required for Oracle DB: ID_WZTyp in table VT_PRUEFPUNKT_SOLL_SD
|
||||
public int InitQ2CorrLR;
|
||||
public int InitQ2CorrRL;
|
||||
|
||||
|
||||
public override void InitializeAll()
|
||||
@@ -36,8 +34,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
FactorLimitHi = 8000;
|
||||
Counting = Counting.Arbitrary;
|
||||
WMType_ID = 2; /// Value for iPerl DN15
|
||||
InitQ2CorrLR = 0;
|
||||
InitQ2CorrRL = 0;
|
||||
}
|
||||
|
||||
string[] paramNames = new string[]
|
||||
@@ -49,8 +45,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
"Calib. factor Hi",
|
||||
"Counting",
|
||||
"WM type ID",
|
||||
"Init. Q2 corr. LR",
|
||||
"Init. Q2 corr. RL",
|
||||
};
|
||||
public override string ParamName(int i) { return paramNames[i]; }
|
||||
public override int ParamsCount() { return paramNames.Length; }
|
||||
@@ -59,13 +53,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
List<string> retVal = new List<string>();
|
||||
var retVal = new List<string>();
|
||||
for (MeterType mt = 0; mt < MeterType.Count; mt++) retVal.Add(mt.ToString());
|
||||
return retVal;
|
||||
}
|
||||
else if (i == 5)
|
||||
{
|
||||
List<string> retVal = new List<string>();
|
||||
var retVal = new List<string>();
|
||||
for (Counting c = 0; c < Counting.Count; c++) retVal.Add(c.ToString());
|
||||
return retVal;
|
||||
}
|
||||
@@ -83,8 +77,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
case 4: return FactorLimitHi.ToString();
|
||||
case 5: return Counting.ToString();
|
||||
case 6: return WMType_ID.ToString();
|
||||
case 7: return InitQ2CorrLR.ToString();
|
||||
case 8: return InitQ2CorrRL.ToString();
|
||||
default: return string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -110,8 +102,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
break;
|
||||
case 6: WMType_ID = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 7: InitQ2CorrLR = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
case 8: InitQ2CorrRL = int.Parse(strValue); return CfgUpdateFlags.None;
|
||||
default: return CfgUpdateFlags.None;
|
||||
}
|
||||
|
||||
@@ -143,10 +133,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
break;
|
||||
case 6: /// WMType_ID
|
||||
if (int.TryParse(strValue, out iDummy)) return true;
|
||||
break;
|
||||
case 7: /// InitQ2CorrLR
|
||||
case 8: /// InitQ2CorrRL
|
||||
if (int.TryParse(strValue, out iDummy) || (iDummy < -127) || (iDummy > 127)) return true;
|
||||
break;
|
||||
default:
|
||||
message = "Invalid index";
|
||||
@@ -166,8 +152,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
prms.FactorLimitHi = this.FactorLimitHi;
|
||||
prms.Counting = this.Counting;
|
||||
prms.WMType_ID = this.WMType_ID;
|
||||
prms.InitQ2CorrLR = this.InitQ2CorrLR;
|
||||
prms.InitQ2CorrRL = this.InitQ2CorrRL;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
|
||||
Reference in New Issue
Block a user