iPerlCommunication : DelayBetweenRetries introduced.

This commit is contained in:
Milan Hanajik 2019-10-25 12:53:11 +02:00
parent 870d57fb67
commit 1ca6b182d4
4 changed files with 168 additions and 42 deletions

View File

@ -21,6 +21,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
/// Serialized parameters
///
public int CommTimeout; /// Communication timeout in ms (500 .. 5000)
public int DelayBetweenRetries; /// Delay between communication retries in ms (0 .. 5000)
public int MaxCommRetries; /// Max. number of retries (1 .. 10)
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
public bool UseMuxBoards;

View File

@ -1,5 +1,5 @@
///
/// Copyright (c) 2015 Sensus Metering Systems
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
using System.Windows.Forms;
@ -50,7 +50,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
rfidPortBoard4TextBox.Text = config.RfidPortNrBoard4.ToString();
commTimeoutTextBox.Text = config.CommTimeout.ToString();
maxCommRetriesTextBox.Text = config.MaxCommRetries.ToString();
nrThreadsTextBox.Text = config.NrThreads.ToString();
delayBetweenRetriesTextBox.Text = config.DelayBetweenRetries.ToString();
nrThreadsTextBox.Text = config.NrThreads.ToString();
iperlCheckErrorsToStopTextBox.Text = config.IperlCheckErrorsToStop.ToString();
}
@ -64,6 +65,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
rfidPortBoard4TextBox.Enabled = true;
commTimeoutTextBox.Enabled = true;
maxCommRetriesTextBox.Enabled = true;
delayBetweenRetriesTextBox.Enabled = true;
nrThreadsTextBox.Enabled = true;
iperlCheckErrorsToStopTextBox.Enabled = true;
}
@ -103,7 +105,12 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Max. retries' should be in range 1 .. 10";
}
if (!int.TryParse(nrThreadsTextBox.Text, out dummy) || (dummy != 1 && dummy != 2 && dummy != 4))
if (!int.TryParse(delayBetweenRetriesTextBox.Text, out dummy) || dummy < 0 || dummy > 5000)
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Comm. timeout' should be in range 0 .. 5000";
}
if (!int.TryParse(nrThreadsTextBox.Text, out dummy) || (dummy != 1 && dummy != 2 && dummy != 4))
{
flags |= CfgUpdateFlags.Error;
message += Environment.NewLine + "'Nr. threads' should be 1, 2 or 4";
@ -143,6 +150,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
tmp = int.Parse(maxCommRetriesTextBox.Text);
if (config.MaxCommRetries != tmp) { config.MaxCommRetries = tmp; flags = CfgUpdateFlags.RestartRqrd; }
tmp = int.Parse(delayBetweenRetriesTextBox.Text);
if (config.DelayBetweenRetries != tmp) { config.DelayBetweenRetries = tmp; flags = CfgUpdateFlags.RestartRqrd; }
tmp = int.Parse(nrThreadsTextBox.Text);
if (config.NrThreads != tmp) { config.NrThreads = tmp; flags = CfgUpdateFlags.RestartRqrd; }

View File

@ -53,16 +53,18 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.iperlCheckErrorsToStopTextBox = new System.Windows.Forms.TextBox();
this.iperlCheckErrorsToStopLabel = new System.Windows.Forms.Label();
this.delayBetweenRetriesTextBox = new System.Windows.Forms.TextBox();
this.delayBetweenRetriesLabel = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// nameTextBox
//
this.nameTextBox.Enabled = false;
this.nameTextBox.Location = new System.Drawing.Point(154, 25);
this.nameTextBox.Location = new System.Drawing.Point(165, 25);
this.nameTextBox.Name = "nameTextBox";
this.nameTextBox.Size = new System.Drawing.Size(130, 20);
this.nameTextBox.TabIndex = 5;
this.nameTextBox.TabIndex = 2;
//
// nameLabel
//
@ -70,22 +72,22 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.nameLabel.Location = new System.Drawing.Point(23, 28);
this.nameLabel.Name = "nameLabel";
this.nameLabel.Size = new System.Drawing.Size(35, 13);
this.nameLabel.TabIndex = 4;
this.nameLabel.TabIndex = 1;
this.nameLabel.Text = "Name";
//
// classNameLabel
//
this.classNameLabel.AutoSize = true;
this.classNameLabel.Location = new System.Drawing.Point(153, 7);
this.classNameLabel.Location = new System.Drawing.Point(164, 7);
this.classNameLabel.Name = "classNameLabel";
this.classNameLabel.Size = new System.Drawing.Size(83, 13);
this.classNameLabel.TabIndex = 3;
this.classNameLabel.TabIndex = 0;
this.classNameLabel.Text = "ComonentName";
//
// rfidPortBoard1TextBox
//
this.rfidPortBoard1TextBox.Enabled = false;
this.rfidPortBoard1TextBox.Location = new System.Drawing.Point(130, 44);
this.rfidPortBoard1TextBox.Location = new System.Drawing.Point(289, 20);
this.rfidPortBoard1TextBox.Name = "rfidPortBoard1TextBox";
this.rfidPortBoard1TextBox.Size = new System.Drawing.Size(45, 20);
this.rfidPortBoard1TextBox.TabIndex = 2;
@ -93,7 +95,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard1Label
//
this.rfidPortBoard1Label.AutoSize = true;
this.rfidPortBoard1Label.Location = new System.Drawing.Point(12, 47);
this.rfidPortBoard1Label.Location = new System.Drawing.Point(171, 23);
this.rfidPortBoard1Label.Name = "rfidPortBoard1Label";
this.rfidPortBoard1Label.Size = new System.Drawing.Size(96, 13);
this.rfidPortBoard1Label.TabIndex = 1;
@ -102,7 +104,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard2TextBox
//
this.rfidPortBoard2TextBox.Enabled = false;
this.rfidPortBoard2TextBox.Location = new System.Drawing.Point(130, 66);
this.rfidPortBoard2TextBox.Location = new System.Drawing.Point(289, 42);
this.rfidPortBoard2TextBox.Name = "rfidPortBoard2TextBox";
this.rfidPortBoard2TextBox.Size = new System.Drawing.Size(45, 20);
this.rfidPortBoard2TextBox.TabIndex = 4;
@ -110,7 +112,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard2Label
//
this.rfidPortBoard2Label.AutoSize = true;
this.rfidPortBoard2Label.Location = new System.Drawing.Point(12, 69);
this.rfidPortBoard2Label.Location = new System.Drawing.Point(171, 45);
this.rfidPortBoard2Label.Name = "rfidPortBoard2Label";
this.rfidPortBoard2Label.Size = new System.Drawing.Size(96, 13);
this.rfidPortBoard2Label.TabIndex = 3;
@ -119,7 +121,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard3TextBox
//
this.rfidPortBoard3TextBox.Enabled = false;
this.rfidPortBoard3TextBox.Location = new System.Drawing.Point(130, 88);
this.rfidPortBoard3TextBox.Location = new System.Drawing.Point(289, 64);
this.rfidPortBoard3TextBox.Name = "rfidPortBoard3TextBox";
this.rfidPortBoard3TextBox.Size = new System.Drawing.Size(45, 20);
this.rfidPortBoard3TextBox.TabIndex = 6;
@ -127,7 +129,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard3Label
//
this.rfidPortBoard3Label.AutoSize = true;
this.rfidPortBoard3Label.Location = new System.Drawing.Point(12, 91);
this.rfidPortBoard3Label.Location = new System.Drawing.Point(171, 67);
this.rfidPortBoard3Label.Name = "rfidPortBoard3Label";
this.rfidPortBoard3Label.Size = new System.Drawing.Size(96, 13);
this.rfidPortBoard3Label.TabIndex = 5;
@ -136,7 +138,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard4TextBox
//
this.rfidPortBoard4TextBox.Enabled = false;
this.rfidPortBoard4TextBox.Location = new System.Drawing.Point(130, 110);
this.rfidPortBoard4TextBox.Location = new System.Drawing.Point(289, 86);
this.rfidPortBoard4TextBox.Name = "rfidPortBoard4TextBox";
this.rfidPortBoard4TextBox.Size = new System.Drawing.Size(45, 20);
this.rfidPortBoard4TextBox.TabIndex = 8;
@ -144,7 +146,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// rfidPortBoard4Label
//
this.rfidPortBoard4Label.AutoSize = true;
this.rfidPortBoard4Label.Location = new System.Drawing.Point(12, 113);
this.rfidPortBoard4Label.Location = new System.Drawing.Point(171, 89);
this.rfidPortBoard4Label.Name = "rfidPortBoard4Label";
this.rfidPortBoard4Label.Size = new System.Drawing.Size(96, 13);
this.rfidPortBoard4Label.TabIndex = 7;
@ -153,10 +155,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
// commTimeoutTextBox
//
this.commTimeoutTextBox.Enabled = false;
this.commTimeoutTextBox.Location = new System.Drawing.Point(154, 47);
this.commTimeoutTextBox.Location = new System.Drawing.Point(165, 47);
this.commTimeoutTextBox.Name = "commTimeoutTextBox";
this.commTimeoutTextBox.Size = new System.Drawing.Size(45, 20);
this.commTimeoutTextBox.TabIndex = 17;
this.commTimeoutTextBox.TabIndex = 4;
//
// commTimeoutLabel
//
@ -164,16 +166,16 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.commTimeoutLabel.Location = new System.Drawing.Point(23, 50);
this.commTimeoutLabel.Name = "commTimeoutLabel";
this.commTimeoutLabel.Size = new System.Drawing.Size(98, 13);
this.commTimeoutLabel.TabIndex = 16;
this.commTimeoutLabel.TabIndex = 3;
this.commTimeoutLabel.Text = "Comm. timeout [ms]";
//
// maxCommRetriesTextBox
//
this.maxCommRetriesTextBox.Enabled = false;
this.maxCommRetriesTextBox.Location = new System.Drawing.Point(154, 69);
this.maxCommRetriesTextBox.Location = new System.Drawing.Point(165, 69);
this.maxCommRetriesTextBox.Name = "maxCommRetriesTextBox";
this.maxCommRetriesTextBox.Size = new System.Drawing.Size(45, 20);
this.maxCommRetriesTextBox.TabIndex = 19;
this.maxCommRetriesTextBox.TabIndex = 6;
//
// maxNrRetriesLabel
//
@ -181,24 +183,24 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.maxNrRetriesLabel.Location = new System.Drawing.Point(23, 72);
this.maxNrRetriesLabel.Name = "maxNrRetriesLabel";
this.maxNrRetriesLabel.Size = new System.Drawing.Size(61, 13);
this.maxNrRetriesLabel.TabIndex = 18;
this.maxNrRetriesLabel.TabIndex = 5;
this.maxNrRetriesLabel.Text = "Max. retries";
//
// nrThreadsTextBox
//
this.nrThreadsTextBox.Enabled = false;
this.nrThreadsTextBox.Location = new System.Drawing.Point(154, 91);
this.nrThreadsTextBox.Location = new System.Drawing.Point(165, 113);
this.nrThreadsTextBox.Name = "nrThreadsTextBox";
this.nrThreadsTextBox.Size = new System.Drawing.Size(45, 20);
this.nrThreadsTextBox.TabIndex = 21;
this.nrThreadsTextBox.TabIndex = 10;
//
// nrThreadsLabel
//
this.nrThreadsLabel.AutoSize = true;
this.nrThreadsLabel.Location = new System.Drawing.Point(23, 94);
this.nrThreadsLabel.Location = new System.Drawing.Point(23, 116);
this.nrThreadsLabel.Name = "nrThreadsLabel";
this.nrThreadsLabel.Size = new System.Drawing.Size(59, 13);
this.nrThreadsLabel.TabIndex = 20;
this.nrThreadsLabel.TabIndex = 9;
this.nrThreadsLabel.Text = "Nr. threads";
//
// useMuxBrdsCheckBox
@ -223,10 +225,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.groupBox1.Controls.Add(this.rfidPortBoard3TextBox);
this.groupBox1.Controls.Add(this.rfidPortBoard4Label);
this.groupBox1.Controls.Add(this.rfidPortBoard4TextBox);
this.groupBox1.Location = new System.Drawing.Point(26, 119);
this.groupBox1.Location = new System.Drawing.Point(26, 142);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(363, 139);
this.groupBox1.TabIndex = 23;
this.groupBox1.Size = new System.Drawing.Size(363, 117);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Multiplexer boards connected to USB ports";
//
@ -236,7 +238,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.iperlCheckErrorsToStopTextBox.Location = new System.Drawing.Point(239, 267);
this.iperlCheckErrorsToStopTextBox.Name = "iperlCheckErrorsToStopTextBox";
this.iperlCheckErrorsToStopTextBox.Size = new System.Drawing.Size(45, 20);
this.iperlCheckErrorsToStopTextBox.TabIndex = 25;
this.iperlCheckErrorsToStopTextBox.TabIndex = 13;
//
// iperlCheckErrorsToStopLabel
//
@ -244,13 +246,32 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
this.iperlCheckErrorsToStopLabel.Location = new System.Drawing.Point(23, 270);
this.iperlCheckErrorsToStopLabel.Name = "iperlCheckErrorsToStopLabel";
this.iperlCheckErrorsToStopLabel.Size = new System.Drawing.Size(202, 13);
this.iperlCheckErrorsToStopLabel.TabIndex = 24;
this.iperlCheckErrorsToStopLabel.TabIndex = 12;
this.iperlCheckErrorsToStopLabel.Text = "iperl_check errors count to stop the cycle";
//
// delayBetweenRetriesTextBox
//
this.delayBetweenRetriesTextBox.Enabled = false;
this.delayBetweenRetriesTextBox.Location = new System.Drawing.Point(165, 91);
this.delayBetweenRetriesTextBox.Name = "delayBetweenRetriesTextBox";
this.delayBetweenRetriesTextBox.Size = new System.Drawing.Size(45, 20);
this.delayBetweenRetriesTextBox.TabIndex = 8;
//
// delayBetweenRetriesLabel
//
this.delayBetweenRetriesLabel.AutoSize = true;
this.delayBetweenRetriesLabel.Location = new System.Drawing.Point(23, 94);
this.delayBetweenRetriesLabel.Name = "delayBetweenRetriesLabel";
this.delayBetweenRetriesLabel.Size = new System.Drawing.Size(131, 13);
this.delayBetweenRetriesLabel.TabIndex = 7;
this.delayBetweenRetriesLabel.Text = "Delay between retries [ms]";
//
// TestMethodCfgCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.delayBetweenRetriesTextBox);
this.Controls.Add(this.delayBetweenRetriesLabel);
this.Controls.Add(this.iperlCheckErrorsToStopTextBox);
this.Controls.Add(this.iperlCheckErrorsToStopLabel);
this.Controls.Add(this.groupBox1);
@ -296,5 +317,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox iperlCheckErrorsToStopTextBox;
private System.Windows.Forms.Label iperlCheckErrorsToStopLabel;
private System.Windows.Forms.TextBox delayBetweenRetriesTextBox;
private System.Windows.Forms.Label delayBetweenRetriesLabel;
}
}

View File

@ -277,7 +277,8 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
case 3: retv = writeRequestPort4(messageID, offset, length, pBuf, timeout); break;
}
Thread.Sleep(250);
/// Delay min. 250 ms
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
///
/// Logging
@ -937,6 +938,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
resultStr = ihead.ConfigStruct.ToString(1);
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
ClosePort(threadId, ihead); /// Close RFID port
@ -989,10 +993,18 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout)) { error = CommErr.None; break; }
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout))
{
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
Thread.Sleep(250);
/// Delay min. 250 ms
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
}
if (error == CommErr.None && (ihead.ConfigStruct.TestModeConfig != testModeConfig))
@ -1008,9 +1020,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
Thread.Sleep(250);
/// Delay min. 250 ms
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
}
if (error == CommErr.None)
@ -1020,10 +1036,18 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
byte[] cmd = new byte[1] { (byte)Command.SetTestMode };
for (int j = 0; j < cfg.MaxCommRetries; j++)
{
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout)) { error = CommErr.None; break; }
if (0 == WriteRequestPort(threadId, ihead, MessageID.Command, 0, 1, cmd, cfg.CommTimeout))
{
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
Thread.Sleep(250);
/// Delay min. 250 ms
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
}
/// Now the meter should be in the Test mode ... verify
@ -1044,6 +1068,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
break;
}
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
@ -1075,6 +1102,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
#if VERIFY_ACTIVE_MODE
@ -1099,6 +1129,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
}
}
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
#else
@ -1151,6 +1184,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = ihead.VerifyIPerlType() ? CommErr.None : CommErr.WrongIPerlType;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
ClosePort(threadId, ihead); /// Close RFID port
@ -1194,6 +1230,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = ihead.VerifyIPerlType() ? CommErr.None : CommErr.WrongIPerlType;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
ClosePort(threadId, ihead); /// Close RFID port
@ -1512,8 +1551,16 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
ihead.CalibrationStructV4.Update(data, 2);
ihead.CalibrationStructV4.Update(dataLNA, 34);
writeAndVerifyRetries++;
if ((writeAndVerifyRetries <= cfg.MaxCommRetries) && (cfg.DelayBetweenRetries > 0))
{
/// Delay between retries
Thread.Sleep(cfg.DelayBetweenRetries);
}
}
while (++writeAndVerifyRetries <= cfg.MaxCommRetries);
while (writeAndVerifyRetries <= cfg.MaxCommRetries);
ClosePort(threadId, ihead); /// Close RFID port
@ -1599,6 +1646,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
ihead.CalibrationStruct.Update(data, 2);
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
if (error == CommErr.None)
@ -1616,6 +1666,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
resultStr = ihead.CalibrationStruct.ToString();
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
@ -1671,6 +1724,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
ihead.CalibrationStructV4.Update(data, 2);
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
if (error == CommErr.None)
@ -1688,6 +1744,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
resultStr = ihead.CalibrationStructV4.ToString();
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
@ -1722,6 +1781,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
if ((error == CommErr.None) && (rdData != null) && (rdData.Length == 2))
@ -1776,7 +1838,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
///
/// Verification disabled on 16.02.2016
@ -1798,6 +1863,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
resultStr = string.Format("Q2 correction set to LR={0}, RL={1}", factorLR, factorRL);
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
#else
@ -1860,7 +1928,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
///
/// Verification disabled on 16.02.2016
@ -1883,10 +1954,13 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
ihead.Q2CorrectionFactor = 0;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
#else
if (error == CommErr.None)
if (error == CommErr.None)
{
resultStr = "2Hz correction reset to 0";
ihead.Hz2Correction = 0;
@ -2173,6 +2247,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
else if (q2CorrType == Q2CorrType.LR)
@ -2188,6 +2265,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
else
@ -2203,6 +2283,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
error = CommErr.None;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
@ -2230,6 +2313,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
if (q2CorrType != Q2CorrType.RL) wm.Q2CorrLFlow = ihead.Q2CorrLFlow = (int)(sbyte)q2CorrLFlow;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
#else
@ -2305,7 +2391,10 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
wm.Hz2CorrectionDone = ihead.Hz2CorrectionDone = true;
break;
}
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
///
/// Verification disabled on 16.02.2016
@ -2330,6 +2419,9 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
wm.Hz2CorrectionDone = ihead.Hz2CorrectionDone;
break;
}
/// Delay between retries
if (cfg.DelayBetweenRetries > 0) Thread.Sleep(cfg.DelayBetweenRetries);
}
}
#else