From b2226ad779b2c178f789d565a012d3687de4c5b5 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Thu, 21 Feb 2019 16:00:01 +0100 Subject: [PATCH] iPerlCommunication : TestModeConfig value verified after switching to a test mode. --- .../iPerlCommunication/iPerlCommunicationForm.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs index 597e32fb8..495a87a2d 100644 --- a/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs +++ b/TBF/BenchControl/TestMethods/iPerlCommunication/iPerlCommunicationForm.cs @@ -972,13 +972,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication { /// Verify the configuration error = CommErr.Verify; - byte[] cfg_0_3 = null; + byte[] config = null; for (int j = 0; j < cfg.MaxCommRetries; j++) { - if (0 == ReadRequestPort(threadId, ihead, MessageID.Configuration, 0, 4, out cfg_0_3, cfg.CommTimeout)) + if (0 == ReadRequestPort(threadId, ihead, MessageID.Configuration, 0, ConfigStruct.Length, out config, cfg.CommTimeout)) { - ihead.ConfigStruct.Update(0, cfg_0_3); - if (ihead.ConfigStruct.MeterState == MeterState.Test) + ihead.ConfigStruct = ConfigStruct.FromByteArray(config); + if ((ihead.ConfigStruct.MeterState == MeterState.Test) && (ihead.ConfigStruct.TestModeConfig == testModeConfig)) { error = CommErr.None; resultStr = ihead.ConfigStruct.ToString(1);