From fcf4f6bdcf5e7f19e2be94f8e26d5346d270f653 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 25 Aug 2015 11:47:21 +0200 Subject: [PATCH] iPerlComm logging/display modifications: real PCB# shown, etc. Preparation for "Q2 corrected from ..." activity, version 1.5.99. --- .../iPerlCommunicationForm.cs | 2 +- .../iPerlCommunicationSeq.cs | 22 +++++++++++++++++-- .../WaterMeters/iPerl/ConfigStruct.cs | 10 ++++----- TestBenchFramework/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 51224cdbb..f2c3325e1 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -937,7 +937,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication (rdData != null) && (rdData.Length == 2) && (rdData[0] == q2CorrRFlow) && (rdData[1] == q2CorrLFlow)) { error = CommErr.None; - resultStr = string.Format("Group={0}, Board={1}, Q2 correction factors set: RightFlow = {2}, LeftFlow = {3}", + resultStr = string.Format("Grp{0}/Brd{1} Q2 factors: R-flow={2}, L-flow={3}", wm.Group, wm.MuxBoardNr, q2CorrRFlow, q2CorrLFlow); rfidDataLogger.Warn(resultStr); break; diff --git a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs index 3214d58f5..b4f3d229d 100644 --- a/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs +++ b/TestBenchFramework/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationSeq.cs @@ -1,6 +1,5 @@ /// /// Copyright (c) 2015 Sensus Metering Systems -/// Author: Milan Hanajík /// using System; using System.Collections.Generic; @@ -59,7 +58,26 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication case Event.UiCmdStop: { retVal = Event.UiCmdStop; goto stopTest; } } - if (testParams.Activity.Contains("Simulate")) + const string Q2correctedFromCmd = "Q2 corrected from "; + + if (testParams.Activity.Contains(Q2correctedFromCmd)) + { + string fromTestName = testParams.Activity.Substring(Q2correctedFromCmd.Length); + + Entities.TestResult oriTestResult = null; + foreach (var tr in results) + { + if ((tr.TestName == fromTestName)) + { + oriTestResult = tr; + break; + } + } + + Entities.TestResult correctedTestResult = new Entities.TestResult(Entities.MetersKind.Single); + + } + else if (testParams.Activity.Contains("Simulate")) { IList rList = new List(1); diff --git a/TestBenchFramework/BenchControl/WaterMeters/iPerl/ConfigStruct.cs b/TestBenchFramework/BenchControl/WaterMeters/iPerl/ConfigStruct.cs index 7bec607df..4bffb4f24 100644 --- a/TestBenchFramework/BenchControl/WaterMeters/iPerl/ConfigStruct.cs +++ b/TestBenchFramework/BenchControl/WaterMeters/iPerl/ConfigStruct.cs @@ -191,14 +191,14 @@ namespace TBF.BenchControl.WaterMeters.iPerl public override string ToString() { - return string.Format("Config: V{0} State={1} VLoBattT={2}s LoBattT={3}s TestModeT={4}s EPThld={5} PCBNr={6} TestModeCfg={7} RadioAddr={8} TempCalib={9} AlarmMask={10} CfgCheckSum={11}", + return string.Format("Config: V{0} State={1} VLoBattT={2}s LoBattT={3}s TestModeT={4}s EPThld={5} PCB#={6} TMCfg={7} RadioAddr={8} TempCalib={9} AlarmMask={10} CfgCheckSum={11}", Version, MeterState, TargetTimeVeryLowBatt, TargetTimeLowBatt, TestModeTime, EmptyPipeThreshold, - PCBNumber[0].ToString("X2") + PCBNumber[1].ToString("X2") + PCBNumber[2].ToString("X2") + PCBNumber[3].ToString("X2") + PCBNumber[4].ToString("X2"), + PCBNumber2String(), TestModeConfig.ToString("X2"), RadioAddress, TempCalibration, @@ -208,15 +208,15 @@ namespace TBF.BenchControl.WaterMeters.iPerl public string ToString(int sel) { - return string.Format("{1} PCBNr={6} TestModeCfg={7}", + return string.Format("{1} PCB#={6} TMCfg={7}", Version, MeterState, TargetTimeVeryLowBatt, TargetTimeLowBatt, TestModeTime, EmptyPipeThreshold, - PCBNumber[0].ToString("X2") + PCBNumber[1].ToString("X2") + PCBNumber[2].ToString("X2") + PCBNumber[3].ToString("X2") + PCBNumber[4].ToString("X2"), - TestModeConfig.ToString("X2"), + PCBNumber2String(), + TestModeConfig.ToString("X2"), RadioAddress, TempCalibration, AlarmMask.ToString("X4"), diff --git a/TestBenchFramework/Properties/AssemblyInfo.cs b/TestBenchFramework/Properties/AssemblyInfo.cs index 15049efa0..68f960bcb 100644 --- a/TestBenchFramework/Properties/AssemblyInfo.cs +++ b/TestBenchFramework/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("1.5.98.1")] -[assembly: AssemblyFileVersion("1.5.98.1")] +[assembly: AssemblyVersion("1.5.99.1")] +[assembly: AssemblyFileVersion("1.5.99.1")]