polishing - work now
This commit is contained in:
@@ -2,7 +2,7 @@ using NfcC7_DLL.NfcHanler.Protocols;
|
||||
|
||||
namespace NfcC7_DLL.NfcHanler;
|
||||
|
||||
public class HFCHeadInfo
|
||||
public class HeadInfo
|
||||
{
|
||||
string SerialNr { get; set; }
|
||||
OptoHeadStatus OptoHeadStatus { get; set; }
|
||||
@@ -1,12 +1,19 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
|
||||
namespace TBF.Rig.Generic
|
||||
{
|
||||
public interface ITestParams
|
||||
public interface ITestParams : IParamsProvider
|
||||
{
|
||||
|
||||
public string Activity { get; set; } /// Communication activity
|
||||
public bool SimultWithPrevious { get; set; }
|
||||
public bool SimultWithNext { get; set; }
|
||||
|
||||
void UpdateFromDbEntity(ComponentTest dbEntity);
|
||||
void FromDbEntity(string componentName, Test test);
|
||||
ComponentTest ToDbEntity(string componentName, Test test);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR
|
||||
{
|
||||
public interface IArg
|
||||
{
|
||||
int Value { get; }
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface ICombiHeadParams
|
||||
{
|
||||
///
|
||||
/// NFC S4.5 Combihead params
|
||||
///
|
||||
public int MciTimeoutMs { get; set; }
|
||||
public int BaudRate { get; set; }
|
||||
public int DataBits { get; set; }
|
||||
public Parity ParityBit { get; set; }
|
||||
public StopBits StopBits { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface ICommunicationTimeOuts
|
||||
{
|
||||
/// Communication timeout in ms (500 .. 5000)
|
||||
public int DelayBetweenRetries { get; set; } /// Delay between communication retries in ms (0 .. 5000)
|
||||
public int MaxCommRetries { get; set; } /// Max. number of retries (1 .. 10)
|
||||
public int WaitTimeAfterFailure { get; set; } /// Wait time after communication failure in ms
|
||||
public int PassThroughWaitTime { get; set; } /// Pass Through wait time for radio parameters in ms
|
||||
public int NrThreads { get; set; } /// Numbwr of parallel threads (1, 2 or 4)
|
||||
public int CommTimeout { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface ISerialPortData
|
||||
{
|
||||
|
||||
public Boolean? CliExists { get;}
|
||||
public string CmdClientName { get; set; }
|
||||
public string PortName { get; set; }
|
||||
public int MeterType { get; set; }
|
||||
public string SerialPortCmdClientPath { get; }
|
||||
public IArg MeterArg { get; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Ports;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface ITestMethodCfg : IComponentCfg, ICommunicationTimeOuts, ICombiHeadParams, IWebService
|
||||
{
|
||||
|
||||
public abstract IComponentCfgCtrl GetControl(IList<Component> cmpntEntities);
|
||||
public abstract string ToString(int i);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface IWebService
|
||||
{
|
||||
public bool UseWebService { get; set; }
|
||||
public string BaseUrl { get; set; }
|
||||
public string RelativeUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.IO.Ports;
|
||||
using System.Xml.Serialization;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl
|
||||
{
|
||||
public interface IiPerlTestMethodCfg : ITestMethodCfg
|
||||
{
|
||||
///
|
||||
/// Serialized parameters
|
||||
///
|
||||
|
||||
|
||||
|
||||
public int IperlCheckErrorsToStop { get; set; }
|
||||
|
||||
|
||||
|
||||
public int DfltQ2c_15_rl { get; set; }
|
||||
public int DfltQ2c_15_lr { get; set; }
|
||||
public int DfltQ2c_20_rl { get; set; }
|
||||
public int DfltQ2c_20_lr { get; set; }
|
||||
public int DfltQ2c_25_63_rl { get; set; }
|
||||
public int DfltQ2c_25_63_lr { get; set; }
|
||||
public int DfltQ2c_25_10_rl { get; set; }
|
||||
public int DfltQ2c_25_10_lr { get; set; }
|
||||
public int DfltQ2c_32_rl { get; set; }
|
||||
public int DfltQ2c_32_lr { get; set; }
|
||||
public int DfltQ2c_40_rl { get; set; }
|
||||
public int DfltQ2c_40_lr { get; set; }
|
||||
|
||||
public bool UseWebService { get; set; }
|
||||
public string BaseUrl { get; set; }
|
||||
public string RelativeUrl { get; set; }
|
||||
|
||||
/// <summary> Test parameters </summary>
|
||||
[XmlIgnore]
|
||||
public ITestParams TestParams { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Sensus.iPerl.RfidCom.Structures;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
|
||||
namespace NfcC7_DLL.NfcHanler.Utils
|
||||
{
|
||||
public class SerialPortData : ISerialPortData
|
||||
{
|
||||
private Boolean? _cliExists;
|
||||
public bool? CliExists
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_cliExists == null || !_cliExists.HasValue)
|
||||
{
|
||||
_cliExists = File.Exists(SerialPortCmdClientPath);
|
||||
}
|
||||
|
||||
return _cliExists.Value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string SerialPortCmdClientPath {
|
||||
get {
|
||||
#if DEBUG
|
||||
return Path.Combine("C:","TBF","Cli", CmdClientName);
|
||||
#else
|
||||
return Path.Combine("..","Cli", CmdClientName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
public string CmdClientName { get; set; } = "HalCli.exe";
|
||||
public string PortName { get; set; }
|
||||
public int MeterType { get; set; }
|
||||
|
||||
public class EMeterArg : IArg{
|
||||
public int Value { get; }
|
||||
public string Name { get; }
|
||||
|
||||
private EMeterArg(int value, string name)
|
||||
{
|
||||
Value = value;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public static readonly EMeterArg Calibration = new EMeterArg(0, "Calibration");
|
||||
public static readonly EMeterArg AllParams = new EMeterArg(2, "AllParams");
|
||||
public static readonly EMeterArg DeviceId = new EMeterArg(3, "DeviceId");
|
||||
public static readonly EMeterArg OptoHead = new EMeterArg(4, "OptoHead");
|
||||
|
||||
}
|
||||
|
||||
public IArg MeterArg { get{return _eMeterArg;} }
|
||||
|
||||
EMeterArg _eMeterArg = EMeterArg.AllParams;
|
||||
|
||||
private static readonly Dictionary<EMeterArg, string> _commandsRead = new Dictionary<EMeterArg, string>
|
||||
{
|
||||
{ EMeterArg.AllParams, "-p {0} -m {1} --operation readall" },
|
||||
{ EMeterArg.DeviceId, "-p {0} -m {1} --operation read --parameter DeviceId" },
|
||||
{ EMeterArg.OptoHead, "-p {0} -m {1} --operation read --parameter \"OpticalDataMode\"" }
|
||||
};
|
||||
|
||||
public string DefaultArgSettingsRead(IArg eMeterArg)
|
||||
{
|
||||
EMeterArg meterArg = eMeterArg as EMeterArg;
|
||||
if (meterArg != null && _commandsRead.TryGetValue(meterArg, out var cmd))
|
||||
return string.Format(cmd, PortName, MeterType);
|
||||
|
||||
throw new Exception("Not implemented correct command!");
|
||||
}
|
||||
|
||||
private static readonly Dictionary<EMeterArg, string> _commandsWrite = new Dictionary<EMeterArg, string>
|
||||
{
|
||||
{ EMeterArg.Calibration, "-p {0} -m {1} --operation write --parameter Calibration --value {2}" },
|
||||
{ EMeterArg.OptoHead, "-p {0} -m {1} --operation write --parameter \"OpticalDataMode\" --value {arg}" },
|
||||
|
||||
};
|
||||
|
||||
public string DefaultArgSettingsWrite(IArg eMeterArg, string arg)
|
||||
{
|
||||
EMeterArg meterArg = eMeterArg as EMeterArg;
|
||||
if (meterArg != null && _commandsRead.TryGetValue(meterArg, out var cmd))
|
||||
return string.Format(cmd, PortName, MeterType);
|
||||
|
||||
throw new Exception("Not implemented correct command!");
|
||||
}
|
||||
|
||||
public SerialPortData(
|
||||
string portName,
|
||||
string cmdClientName,
|
||||
int meterType)
|
||||
{
|
||||
PortName = portName;
|
||||
CmdClientName = cmdClientName;
|
||||
MeterType = meterType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
using System;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
{
|
||||
public class IPerlCommunicationsTimeOut : ICommunicationTimeOuts
|
||||
{
|
||||
public int DelayBetweenRetries { get; set; }
|
||||
public int MaxCommRetries { get; set; }
|
||||
public int WaitTimeAfterFailure { get; set; }
|
||||
public int PassThroughWaitTime { get; set; }
|
||||
public int NrThreads { get; set; }
|
||||
public int CommTimeout { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using log4net;
|
||||
using Sensus.iPerl.NfcHandler;
|
||||
using Sensus.iPerl.RfidCom.Exceptions;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
@@ -14,7 +14,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
internal class NfcServices
|
||||
{
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IntIPerlReader iperlHead, MCI_Protocol.StructName structName, int offset, int length, out byte[] buffer)
|
||||
internal static int ReadRequest(ITestMethodCfg cfg, IntIPerlReader iperlHead, MCI_Protocol.StructName structName, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
for (int i = 0; i < cfg.MaxCommRetries; i++)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
return 3;
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IntIPerlReader iperlHead, MCI_Protocol.StructName structName, int offset, int length, byte[] buffer)
|
||||
internal static int WriteRequest(ITestMethodCfg cfg, IntIPerlReader iperlHead, MCI_Protocol.StructName structName, int offset, int length, byte[] buffer)
|
||||
{
|
||||
NfcDataHandler _nfcDataHandler = new NfcDataHandler();
|
||||
MessageEventHandlers(_nfcDataHandler);
|
||||
@@ -85,7 +85,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
}
|
||||
}
|
||||
|
||||
private static void OpenConnection(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, IntIPerlReader iperlHead)
|
||||
private static void OpenConnection(NfcDataHandler nfcDataHandler, ITestMethodCfg cfg, IntIPerlReader iperlHead)
|
||||
{
|
||||
string comPort = $"COM{iperlHead.RfidComPortNr}";
|
||||
int retryCount = 0 ;
|
||||
@@ -129,7 +129,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
nfcDataHandler.Close();
|
||||
}
|
||||
|
||||
private static byte[] MciRead(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, StructName structName, ushort offset, int length)
|
||||
private static byte[] MciRead(NfcDataHandler nfcDataHandler, ITestMethodCfg cfg, StructName structName, ushort offset, int length)
|
||||
{
|
||||
bool isReadValues = false;
|
||||
int retryCount = 0;
|
||||
@@ -176,7 +176,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
return new byte[length];
|
||||
}
|
||||
|
||||
private static void MciWrite(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, MCI_Protocol.StructName structName, ushort offset, int length, byte[] payload)
|
||||
private static void MciWrite(NfcDataHandler nfcDataHandler, ITestMethodCfg cfg, MCI_Protocol.StructName structName, ushort offset, int length, byte[] payload)
|
||||
{
|
||||
int retryCount = 0;
|
||||
Write:
|
||||
|
||||
@@ -6,17 +6,17 @@ using Sensus.iPerl.RfidCom;
|
||||
using Sensus.iPerl.RfidCom.Exceptions;
|
||||
using Sensus.iPerl.RfidCom.Helper;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
{
|
||||
internal class RfidServices
|
||||
{
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationForm));
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(SmartCommunicationForm));
|
||||
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
internal static int ReadRequest(ITestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
for (int i = 0; i < cfg.MaxCommRetries; i++)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
return 3;
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
internal static int WriteRequest(ITestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
{
|
||||
RfidLogic writer = new RfidLogic($"COM{iperlHead.RfidComPortNr}");
|
||||
string payload = RfidHelper.ConvertByteArrayToHexString(buffer);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
{
|
||||
internal class SimulationServices
|
||||
{
|
||||
const int Q2CorrFactorsAddr = Uni.SharedDialogs.iPerlCommunication.iPerlCommunicationConstants.Q2CorrFactorsAddr;
|
||||
const int Q2CorrFactorsAddr = iPerlCommunicationConstants.Q2CorrFactorsAddr;
|
||||
|
||||
internal static int ReadRequest(IntIPerlReader iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
@@ -36,7 +37,7 @@ namespace TBF.Rig.RegisterReaders.CommonRR.IPerl.communication
|
||||
return iperlHead.Name.Equals("iPerl13") ? 2 : 0; /// Simulates an error on position 13
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset,
|
||||
internal static int WriteRequest(ITestMethodCfg cfg, IntIPerlReader iperlHead, MessageID messageID, int offset,
|
||||
int length, byte[] buffer)
|
||||
{
|
||||
return 0;
|
||||
|
||||
@@ -12,7 +12,7 @@ using Sensus.iPerl.NfcHandler;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
using CalibrationStruct = TBF.Rig.RegisterReaders.CommonRR.IPerl.communication.CalibrationStruct;
|
||||
using CalibrationStructV4 = TBF.Rig.RegisterReaders.CommonRR.IPerl.communication.CalibrationStructV4;
|
||||
using CommunicationInterface = TBF.Rig.RegisterReaders.CommonRR.CommunicationInterface;
|
||||
@@ -79,7 +79,8 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader
|
||||
}
|
||||
|
||||
public bool Disabled;
|
||||
public bool CommFailed;
|
||||
public bool _commFailed;
|
||||
public bool CommFailed { get => _commFailed; set => _commFailed = value; }
|
||||
public int ResultCode;
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Windows.Forms;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl.communication;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI.test;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.TestMethods.SmartTest;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
///
|
||||
|
||||
using System;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using Config.Resources;
|
||||
using log4net;
|
||||
using Sensus.iPerl.RfidCom.Helper;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
@@ -23,7 +23,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
try
|
||||
{
|
||||
byte[] pcb = null;
|
||||
int readRetVal = iPerlCommunicationForm.ReadRequestPort(iHead, CommonRR.MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
int readRetVal = IPerlCorrections.ReadRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, CommonRR.MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
if (readRetVal == 0)
|
||||
{
|
||||
return RfidHelper.HexLiteral2Unsigned(RfidHelper.SwapHexcode(BitConverter.ToString(pcb).Replace("-", string.Empty))).ToString();
|
||||
@@ -40,7 +40,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
internal static string SetActiveMode(IPerlReader iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)CommonRR.Command.SetActiveMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
internal static string SetTestMode(IPerlReader iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)CommonRR.Command.SetTestMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -68,7 +68,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -81,7 +81,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.communication
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -6,7 +6,7 @@ using Sensus.iPerl.RfidCom;
|
||||
using Sensus.iPerl.RfidCom.Exceptions;
|
||||
using Sensus.iPerl.RfidCom.Helper;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader.comminication
|
||||
@@ -14,7 +14,7 @@ namespace TBF.Rig.RegisterReaders.PoseidonReader.comminication
|
||||
internal class RfidServices
|
||||
{
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationForm));
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(SmartCommunicationForm));
|
||||
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IPerlReader iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
|
||||
@@ -2,12 +2,13 @@ using System;
|
||||
using System.Linq;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl.communication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.PoseidonReader.comminication
|
||||
{
|
||||
internal class SimulationServices
|
||||
{
|
||||
const int Q2CorrFactorsAddr = Uni.SharedDialogs.iPerlCommunication.iPerlCommunicationConstants.Q2CorrFactorsAddr;
|
||||
const int Q2CorrFactorsAddr = iPerlCommunicationConstants.Q2CorrFactorsAddr;
|
||||
|
||||
internal static int ReadRequest(IPerlReader iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ using Sensus.iPerl.NfcHandler;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
using CalibrationStruct = TBF.Rig.RegisterReaders.CommonRR.IPerl.communication.CalibrationStruct;
|
||||
using CalibrationStructV4 = TBF.Rig.RegisterReaders.CommonRR.IPerl.communication.CalibrationStructV4;
|
||||
using CommunicationInterface = TBF.Rig.RegisterReaders.CommonRR.CommunicationInterface;
|
||||
@@ -59,6 +59,8 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI
|
||||
get { return _iPerlCfg.RfidComPortNr; }
|
||||
}
|
||||
|
||||
public bool CommFailed { get; set; }
|
||||
|
||||
public int OptoComPortNr
|
||||
{
|
||||
get { return _iPerlCfg.OptoComPortNr; }
|
||||
@@ -130,7 +132,6 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI
|
||||
}
|
||||
|
||||
public bool Disabled;
|
||||
public bool CommFailed;
|
||||
public int ResultCode;
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Windows.Forms;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl.communication;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI.test;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.iPerlReaderUNI
|
||||
{
|
||||
|
||||
@@ -7,58 +7,20 @@ using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
using TBF.Rig.TestMethods.SmartTest;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.iPerlReaderUNI
|
||||
{
|
||||
public class TestMethodCfg : ComponentCfgBase, IComponentCfg
|
||||
public class TestMethodCfg : ComponentCfgBase, ITestMethodCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new TestMethodCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// 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 WaitTimeAfterFailure; /// Wait time after communication failure in ms
|
||||
public int PassThroughWaitTime; /// Pass Through wait time for radio parameters in ms
|
||||
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
|
||||
public int IperlCheckErrorsToStop;
|
||||
|
||||
///
|
||||
/// NFC S4.5 Combihead params
|
||||
///
|
||||
public int MciTimeoutMs;
|
||||
public int BaudRate;
|
||||
public int DataBits;
|
||||
public Parity ParityBit;
|
||||
public StopBits StopBits;
|
||||
|
||||
public int DfltQ2c_15_rl;
|
||||
public int DfltQ2c_15_lr;
|
||||
public int DfltQ2c_20_rl;
|
||||
public int DfltQ2c_20_lr;
|
||||
public int DfltQ2c_25_63_rl;
|
||||
public int DfltQ2c_25_63_lr;
|
||||
public int DfltQ2c_25_10_rl;
|
||||
public int DfltQ2c_25_10_lr;
|
||||
public int DfltQ2c_32_rl;
|
||||
public int DfltQ2c_32_lr;
|
||||
public int DfltQ2c_40_rl;
|
||||
public int DfltQ2c_40_lr;
|
||||
|
||||
public bool UseWebService;
|
||||
public string BaseUrl;
|
||||
public string RelativeUrl;
|
||||
|
||||
/// <summary> Test parameters </summary>
|
||||
[XmlIgnore]
|
||||
public iPerlCommunicationParams TestParams;
|
||||
public override IParamsProvider GetRuntimeTestParamsProvider() { return TestParams; }
|
||||
public override IParamsProvider CreateTestParamsProvider() { return new iPerlCommunicationParams(true); }
|
||||
public override IParamsProvider GetUITestParamsProvider(Test test)
|
||||
@@ -96,5 +58,27 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI
|
||||
{
|
||||
return string.Format("Name={0}, CommTimeout={1}, MaxRetries={2}, NrThreads={3}", Name, CommTimeout, MaxCommRetries, NrThreads);
|
||||
}
|
||||
|
||||
public int CommTimeout { get; set; }
|
||||
public int DelayBetweenRetries { get; set; }
|
||||
public int MaxCommRetries { get; set; }
|
||||
public int WaitTimeAfterFailure { get; set; }
|
||||
public int PassThroughWaitTime { get; set; }
|
||||
public int NrThreads { get; set; }
|
||||
public int IperlCheckErrorsToStop { get; set; }
|
||||
public int MciTimeoutMs { get; set; }
|
||||
public int BaudRate { get; set; }
|
||||
public int DataBits { get; set; }
|
||||
public Parity ParityBit { get; set; }
|
||||
public StopBits StopBits { get; set; }
|
||||
|
||||
/// <summary> Test parameters </summary>
|
||||
[XmlIgnore]
|
||||
public iPerlCommunicationParams TestParams;
|
||||
|
||||
|
||||
public bool UseWebService { get; set; }
|
||||
public string BaseUrl { get; set; }
|
||||
public string RelativeUrl { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ using log4net;
|
||||
using Sensus.iPerl.RfidCom.Helper;
|
||||
using System;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
|
||||
namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
{
|
||||
@@ -24,7 +24,7 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
try
|
||||
{
|
||||
byte[] pcb = null;
|
||||
int readRetVal = iPerlCommunicationForm.ReadRequestPort(iHead, MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
int readRetVal = IPerlCorrections.ReadRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
if (readRetVal == 0)
|
||||
{
|
||||
return RfidHelper.HexLiteral2Unsigned(RfidHelper.SwapHexcode(BitConverter.ToString(pcb).Replace("-", string.Empty))).ToString();
|
||||
@@ -41,7 +41,7 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
internal static string SetActiveMode(IntIPerlReader iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
internal static string SetTestMode(IntIPerlReader iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)Command.SetTestMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -69,7 +69,7 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -82,7 +82,7 @@ namespace TBF.Rig.RegisterReaders.iPerlReaderUNI.test
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -20,6 +20,8 @@ using TBF.Rig.Output.Printers.GroupPrinting.Single;
|
||||
using TBF.UiBridge;
|
||||
using SharedComponents;
|
||||
using System.Text;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
{
|
||||
@@ -55,19 +57,19 @@ namespace TBF.Rig.Sequences
|
||||
try
|
||||
{
|
||||
/// 1nd argument
|
||||
TestMethods.iPerlCommunication.TestMethodCfg iPerlCfg = cfg as TestMethods.iPerlCommunication.TestMethodCfg;
|
||||
ITestMethodCfg iPerlCfgIPerl = cfg as ITestMethodCfg;
|
||||
|
||||
/// 2rd argument: as is
|
||||
|
||||
/// 3th argument
|
||||
IList<TestMethods.iPerlCommunication.iPerlCommunicationParams> iPerlCommParams = new List<TestMethods.iPerlCommunication.iPerlCommunicationParams>();
|
||||
foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as TestMethods.iPerlCommunication.iPerlCommunicationParams);
|
||||
IList<iPerlCommunicationParams> iPerlCommParams = new List<iPerlCommunicationParams>();
|
||||
foreach (var tp in multiTestParams) iPerlCommParams.Add(tp as iPerlCommunicationParams);
|
||||
|
||||
/*myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(iPerlCfg, tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();*/
|
||||
|
||||
myRef.modelessDlg = new TestMethods.iPerlCommunication.iPerlCommunicationForm(
|
||||
testMethod as TBF.Rig.TestMethods.iPerlCommunication.TestMethod, tests, iPerlCommParams);
|
||||
myRef.modelessDlg = new SmartCommunicationForm(
|
||||
testMethod , tests, iPerlCommParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -11,7 +11,7 @@ using TBF.Rig.GenericDevices;
|
||||
using TBF.Boxes;
|
||||
using TBF.Resources;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ using TBF.UiBridge;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.Sequences
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace TBF.Rig.Sequences
|
||||
///
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, SmartComponentBase method, Test test, iPerlCommunicationParams testParams)
|
||||
{
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(method, test, testParams);
|
||||
myRef.modelessDlg = new SmartCommunicationForm(method, test, testParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using TBF.Rig.Sequences;
|
||||
using Dirichlet.Numerics;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig
|
||||
{
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
/// Copyright (c) 2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.TestMethods.SmartTest
|
||||
{
|
||||
|
||||
public class SequenceConditionOp : ISequenceConditionOp, IOperation
|
||||
{
|
||||
public SequenceConditionOp(TestMethod testMethodComponent, ConditionID id)
|
||||
public SequenceConditionOp(TestMethod testMethodComponent, ConditionId id)
|
||||
: base(testMethodComponent, id)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@ using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Uni.SharedDialogs.iPerlCommunication;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using TBF.UiBridge;
|
||||
using ConditionID = TBF.Rig.Uni.SharedDialogs.iPerlCommunication.ConditionID;
|
||||
using iPerlCommunicationSeq = TBF.Rig.Sequences.iPerlCommunicationSeq;
|
||||
using TestMethodCfg = TBF.Rig.RegisterReaders.iPerlReaderUNI.TestMethodCfg;
|
||||
|
||||
@@ -93,10 +92,10 @@ namespace TBF.Rig.TestMethods.SmartTest
|
||||
|
||||
void CreateMilestonesAndConditions()
|
||||
{
|
||||
IperlCommMilestone = new bool[(int)ConditionID.Count];
|
||||
IperlCommMilestone = new bool[(int)ConditionId.Count];
|
||||
|
||||
sequenceConditionOps = new List<IOperation>();
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
for (ConditionId id = ConditionId.A; id < ConditionId.Count; id++)
|
||||
{
|
||||
sequenceConditionOps.Add(new SequenceConditionOp(this, id));
|
||||
}
|
||||
@@ -135,16 +134,16 @@ namespace TBF.Rig.TestMethods.SmartTest
|
||||
}
|
||||
|
||||
|
||||
public int ConditionsCount { get { return (int)ConditionID.Count; } }
|
||||
public int ConditionsCount { get { return (int)ConditionId.Count; } }
|
||||
|
||||
public string ConditionName(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? ConditionOp(i).ToString() : string.Empty;
|
||||
return (i >= 0 && i < (int)ConditionId.Count) ? ConditionOp(i).ToString() : string.Empty;
|
||||
}
|
||||
|
||||
public IOperation ConditionOp(int i)
|
||||
{
|
||||
return (i >= 0 && i < (int)ConditionID.Count) ? sequenceConditionOps[i] : null;
|
||||
return (i >= 0 && i < (int)ConditionId.Count) ? sequenceConditionOps[i] : null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
|
||||
namespace TBF.Rig.TestMethods.SmartTest
|
||||
@@ -15,7 +16,7 @@ namespace TBF.Rig.TestMethods.SmartTest
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
TestMethodCfg config;
|
||||
ITestMethodCfg config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
@@ -43,28 +44,32 @@ namespace TBF.Rig.TestMethods.SmartTest
|
||||
void Redraw()
|
||||
{
|
||||
if (config == null) return; /// Control was not loaded, settings were not changed
|
||||
|
||||
classNameLabel.Text = config.Factory.ClassName;
|
||||
nameTextBox.Text = config.Name;
|
||||
commTimeoutTextBox.Text = config.CommTimeout.ToString();
|
||||
maxCommRetriesTextBox.Text = config.MaxCommRetries.ToString();
|
||||
delayBetweenRetriesTextBox.Text = config.DelayBetweenRetries.ToString();
|
||||
nrThreadsTextBox.Text = config.NrThreads.ToString();
|
||||
iperlCheckErrorsToStopTextBox.Text = config.IperlCheckErrorsToStop.ToString();
|
||||
delayBetweenRetriesTextBox.Text = config.DelayBetweenRetries.ToString();
|
||||
nrThreadsTextBox.Text = config.NrThreads.ToString();
|
||||
|
||||
if (config is IiPerlTestMethodCfg cfg)
|
||||
{
|
||||
iperlCheckErrorsToStopTextBox.Text = cfg.IperlCheckErrorsToStop.ToString();
|
||||
textBox15rl.Text = cfg.DfltQ2c_15_rl.ToString();
|
||||
textBox15lr.Text = cfg.DfltQ2c_15_lr.ToString();
|
||||
textBox20rl.Text = cfg.DfltQ2c_20_rl.ToString();
|
||||
textBox20lr.Text = cfg.DfltQ2c_20_lr.ToString();
|
||||
textBox25_63rl.Text = cfg.DfltQ2c_25_63_rl.ToString();
|
||||
textBox25_63lr.Text = cfg.DfltQ2c_25_63_lr.ToString();
|
||||
textBox25_10rl.Text = cfg.DfltQ2c_25_10_rl.ToString();
|
||||
textBox25_10lr.Text = cfg.DfltQ2c_25_10_lr.ToString();
|
||||
textBox32rl.Text = cfg.DfltQ2c_32_rl.ToString();
|
||||
textBox32lr.Text = cfg.DfltQ2c_32_lr.ToString();
|
||||
textBox40rl.Text = cfg.DfltQ2c_40_rl.ToString();
|
||||
textBox40lr.Text = cfg.DfltQ2c_40_lr.ToString();
|
||||
}
|
||||
|
||||
textBox15rl.Text = config.DfltQ2c_15_rl.ToString();
|
||||
textBox15lr.Text = config.DfltQ2c_15_lr.ToString();
|
||||
textBox20rl.Text = config.DfltQ2c_20_rl.ToString();
|
||||
textBox20lr.Text = config.DfltQ2c_20_lr.ToString();
|
||||
textBox25_63rl.Text = config.DfltQ2c_25_63_rl.ToString();
|
||||
textBox25_63lr.Text = config.DfltQ2c_25_63_lr.ToString();
|
||||
textBox25_10rl.Text = config.DfltQ2c_25_10_rl.ToString();
|
||||
textBox25_10lr.Text = config.DfltQ2c_25_10_lr.ToString();
|
||||
textBox32rl.Text = config.DfltQ2c_32_rl.ToString();
|
||||
textBox32lr.Text = config.DfltQ2c_32_lr.ToString();
|
||||
textBox40rl.Text = config.DfltQ2c_40_rl.ToString();
|
||||
textBox40lr.Text = config.DfltQ2c_40_lr.ToString();
|
||||
|
||||
useWebServiceCheckBox.Checked = config.UseWebService;
|
||||
useWebServiceCheckBox.Checked = config.UseWebService;
|
||||
baseUrlTextBox.Text = config.BaseUrl;
|
||||
relativeUrlTextBox.Text = config.RelativeUrl;
|
||||
}
|
||||
@@ -204,29 +209,77 @@ namespace TBF.Rig.TestMethods.SmartTest
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.CommTimeout, commTimeoutTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.MaxCommRetries, maxCommRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DelayBetweenRetries, delayBetweenRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.NrThreads, nrThreadsTextBox.Text, CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.IperlCheckErrorsToStop, iperlCheckErrorsToStopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
var CommTimeout = config.CommTimeout;
|
||||
var MaxCommRetries = config.MaxCommRetries;
|
||||
var DelayBetweenRetries = config.DelayBetweenRetries;
|
||||
var NrThreads = config.NrThreads;
|
||||
var UseWebService = config.UseWebService;
|
||||
var BaseUrl = config.BaseUrl;
|
||||
var RelativeUrl = config.RelativeUrl;
|
||||
|
||||
flags |= UpdateDifferent(ref CommTimeout, commTimeoutTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref MaxCommRetries, maxCommRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DelayBetweenRetries, delayBetweenRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref NrThreads, nrThreadsTextBox.Text, CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
if (config is IiPerlTestMethodCfg cfg)
|
||||
{
|
||||
|
||||
var IperlCheckErrorsToStop = cfg.IperlCheckErrorsToStop;
|
||||
var DfltQ2c_15_rl = cfg.DfltQ2c_15_rl;
|
||||
var DfltQ2c_15_lr = cfg.DfltQ2c_15_lr;
|
||||
var DfltQ2c_20_rl = cfg.DfltQ2c_20_rl;
|
||||
var DfltQ2c_20_lr = cfg.DfltQ2c_20_lr;
|
||||
var DfltQ2c_25_63_rl = cfg.DfltQ2c_25_63_rl;
|
||||
var DfltQ2c_25_63_lr = cfg.DfltQ2c_25_63_lr;
|
||||
var DfltQ2c_25_10_rl = cfg.DfltQ2c_25_10_rl;
|
||||
var DfltQ2c_25_10_lr = cfg.DfltQ2c_25_10_lr;
|
||||
var DfltQ2c_32_rl = cfg.DfltQ2c_32_rl;
|
||||
var DfltQ2c_32_lr = cfg.DfltQ2c_32_lr;
|
||||
var DfltQ2c_40_rl = cfg.DfltQ2c_40_rl;
|
||||
var DfltQ2c_40_lr = cfg.DfltQ2c_40_lr;
|
||||
|
||||
flags |= UpdateDifferent(ref IperlCheckErrorsToStop, iperlCheckErrorsToStopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_15_rl, textBox15rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_15_lr, textBox15lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_20_rl, textBox20rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_20_lr, textBox20lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_63_rl, textBox25_63rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_63_lr, textBox25_63lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_10_rl, textBox25_10rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_10_lr, textBox25_10lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_32_rl, textBox32rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_32_lr, textBox32lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_40_rl, textBox40rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_40_lr, textBox40lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
cfg.IperlCheckErrorsToStop = IperlCheckErrorsToStop;
|
||||
cfg.DfltQ2c_15_rl = DfltQ2c_15_rl;
|
||||
cfg.DfltQ2c_15_lr = DfltQ2c_15_lr;
|
||||
cfg.DfltQ2c_20_rl = DfltQ2c_20_rl;
|
||||
cfg.DfltQ2c_20_lr = DfltQ2c_20_lr;
|
||||
cfg.DfltQ2c_25_63_rl = DfltQ2c_25_63_rl;
|
||||
cfg.DfltQ2c_25_63_lr = DfltQ2c_25_63_lr;
|
||||
cfg.DfltQ2c_25_10_rl = DfltQ2c_25_10_rl;
|
||||
cfg.DfltQ2c_25_10_lr = DfltQ2c_25_10_lr;
|
||||
cfg.DfltQ2c_32_rl = DfltQ2c_32_rl;
|
||||
cfg.DfltQ2c_32_lr = DfltQ2c_32_lr;
|
||||
cfg.DfltQ2c_40_rl = DfltQ2c_40_rl;
|
||||
cfg.DfltQ2c_40_lr = DfltQ2c_40_lr;
|
||||
}
|
||||
flags |= UpdateDifferent(ref UseWebService, useWebServiceCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref BaseUrl, baseUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref RelativeUrl, relativeUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_15_rl, textBox15rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_15_lr, textBox15lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_20_rl, textBox20rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_20_lr, textBox20lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_63_rl, textBox25_63rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_63_lr, textBox25_63lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_10_rl, textBox25_10rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_10_lr, textBox25_10lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_32_rl, textBox32rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_32_lr, textBox32lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_40_rl, textBox40rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_40_lr, textBox40lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref config.UseWebService, useWebServiceCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BaseUrl, baseUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.RelativeUrl, relativeUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
config.CommTimeout = CommTimeout;
|
||||
config.MaxCommRetries = MaxCommRetries;
|
||||
config.DelayBetweenRetries = DelayBetweenRetries;
|
||||
config.NrThreads = NrThreads;
|
||||
config.UseWebService = UseWebService;
|
||||
config.BaseUrl = BaseUrl;
|
||||
config.RelativeUrl = RelativeUrl;
|
||||
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
TestMethod.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
|
||||
@@ -7,6 +7,7 @@ using System;
|
||||
using System.Threading;
|
||||
using TBF.Rig.Hart.Common;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
@@ -26,7 +27,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
try
|
||||
{
|
||||
byte[] pcb = null;
|
||||
int readRetVal = iPerlCommunicationForm.ReadRequestPort(iHead, MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
int readRetVal = IPerlCorrections.ReadRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, RegisterReaders.CommonRR.MessageID.Configuration, Sensus.iPerl.NfcHandler.MCI_Protocol.StructName.Configuration, 16, 5, out pcb);
|
||||
if (readRetVal == 0)
|
||||
{
|
||||
return RfidHelper.HexLiteral2Unsigned(RfidHelper.SwapHexcode(BitConverter.ToString(pcb).Replace("-", string.Empty))).ToString();
|
||||
@@ -43,7 +44,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
internal static string SetActiveMode(IperlHead iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)Command.SetActiveMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, RegisterReaders.CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -56,7 +57,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
internal static string SetTestMode(IperlHead iHead)
|
||||
{
|
||||
byte[] cmd = new byte[1] { (byte)Command.SetTestMode };
|
||||
if (0 == iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
if (0 == IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, RegisterReaders.CommonRR.MessageID.Command, StructName.Command, 0, 1, cmd))
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
@@ -71,7 +72,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg, iHead, RegisterReaders.CommonRR.MessageID.RadioPassthrough, StructName.RadioParams, 0x1898, 1, new byte[] { (byte)3 }); // WakeUpInterval
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -84,7 +85,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
try
|
||||
{
|
||||
int retValue = iPerlCommunicationForm.WriteRequestPort(iHead, MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
int retValue = IPerlCorrections.WriteRequestPort(SmartCommunicationForm.TestMethodCfg,iHead, RegisterReaders.CommonRR.MessageID.RadioPassthrough, StructName.RadioInfo, 0x1804, 1, new byte[] { (byte)1 }); // System Status
|
||||
return 0 == retValue ? "OK" : "Error";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public bool CanTest(MetersKind meters) { return meters == MetersKind.Single; }
|
||||
public bool DoTransitions() { return false; }
|
||||
|
||||
public bool SimultWithPrevious { get { return testMethodCfg.TestParams.SimultWithPrevious; } }
|
||||
public bool SimultWithNext { get { return testMethodCfg.TestParams.SimultWithNext; } }
|
||||
public bool SimultWithPrevious { get { return _testMethodCfgIPerl.TestParams.SimultWithPrevious; } }
|
||||
public bool SimultWithNext { get { return _testMethodCfgIPerl.TestParams.SimultWithNext; } }
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
@@ -40,18 +40,18 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
CfgChangeHandler += delegate(object sender, CfgChangeArgs args)
|
||||
{
|
||||
TestMethodCfg tmpCfg = args.Cfg as TestMethodCfg;
|
||||
if (tmpCfg != null && tmpCfg.Name.Equals(Name))
|
||||
TestMethodCfg_IPerl tmpCfgIPerl = args.Cfg as TestMethodCfg_IPerl;
|
||||
if (tmpCfgIPerl != null && tmpCfgIPerl.Name.Equals(Name))
|
||||
{
|
||||
if (args.Command == CfgChangeCmd.CfgChange)
|
||||
{
|
||||
testMethodCfg.CommTimeout = tmpCfg.CommTimeout;
|
||||
testMethodCfg.DelayBetweenRetries = tmpCfg.DelayBetweenRetries;
|
||||
testMethodCfg.MaxCommRetries = tmpCfg.MaxCommRetries;
|
||||
testMethodCfg.IperlCheckErrorsToStop = tmpCfg.IperlCheckErrorsToStop;
|
||||
testMethodCfg.UseWebService = tmpCfg.UseWebService;
|
||||
testMethodCfg.BaseUrl = tmpCfg.BaseUrl;
|
||||
testMethodCfg.RelativeUrl = tmpCfg.RelativeUrl;
|
||||
_testMethodCfgIPerl.CommTimeout = tmpCfgIPerl.CommTimeout;
|
||||
_testMethodCfgIPerl.DelayBetweenRetries = tmpCfgIPerl.DelayBetweenRetries;
|
||||
_testMethodCfgIPerl.MaxCommRetries = tmpCfgIPerl.MaxCommRetries;
|
||||
_testMethodCfgIPerl.IperlCheckErrorsToStop = tmpCfgIPerl.IperlCheckErrorsToStop;
|
||||
_testMethodCfgIPerl.UseWebService = tmpCfgIPerl.UseWebService;
|
||||
_testMethodCfgIPerl.BaseUrl = tmpCfgIPerl.BaseUrl;
|
||||
_testMethodCfgIPerl.RelativeUrl = tmpCfgIPerl.RelativeUrl;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -60,7 +60,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
#endregion Configuration Change Handling
|
||||
|
||||
|
||||
readonly TestMethodCfg testMethodCfg;
|
||||
readonly TestMethodCfg_IPerl _testMethodCfgIPerl;
|
||||
|
||||
public bool[] IperlCommMilestone;
|
||||
IList<IOperation> sequenceConditionOps;
|
||||
@@ -73,7 +73,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
public TestMethod(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
_testMethodCfgIPerl = cfg as TestMethodCfg_IPerl;
|
||||
CreateMilestonesAndConditions();
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
if (DebugLevel == DebugMode.Normal)
|
||||
{
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, this, testMethodCfg.TestParams);
|
||||
return (new iPerlCommunicationSeq()).Execute(test, repetNr, this, _testMethodCfgIPerl.TestParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
@@ -14,13 +15,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public bool ShowMore { get { return false; } }
|
||||
|
||||
TestMethodCfg config;
|
||||
TestMethodCfg_IPerl config;
|
||||
public IComponentCfg Config
|
||||
{
|
||||
get { return config as IComponentCfg; }
|
||||
set
|
||||
{
|
||||
config = value as TestMethodCfg;
|
||||
config = value as TestMethodCfg_IPerl;
|
||||
Redraw();
|
||||
}
|
||||
}
|
||||
@@ -203,29 +204,72 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
flags |= (CfgUpdateFlags.AnyChange | CfgUpdateFlags.RestartRqrd);
|
||||
}
|
||||
|
||||
flags |= UpdateDifferent(ref config.CommTimeout, commTimeoutTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.MaxCommRetries, maxCommRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DelayBetweenRetries, delayBetweenRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.NrThreads, nrThreadsTextBox.Text, CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.IperlCheckErrorsToStop, iperlCheckErrorsToStopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
var CommTimeout = config.CommTimeout;;
|
||||
var MaxCommRetries = config.MaxCommRetries;
|
||||
var DelayBetweenRetries = config.DelayBetweenRetries;
|
||||
var NrThreads = config.NrThreads;
|
||||
var IperlCheckErrorsToStop = config.IperlCheckErrorsToStop;
|
||||
var DfltQ2c_15_rl = config.DfltQ2c_15_rl;
|
||||
var DfltQ2c_15_lr = config.DfltQ2c_15_lr;
|
||||
var DfltQ2c_20_rl = config.DfltQ2c_20_rl;
|
||||
var DfltQ2c_20_lr = config.DfltQ2c_20_lr;
|
||||
var DfltQ2c_25_63_rl = config.DfltQ2c_25_63_rl;
|
||||
var DfltQ2c_25_63_lr = config.DfltQ2c_25_63_lr;
|
||||
var DfltQ2c_25_10_rl = config.DfltQ2c_25_10_rl;
|
||||
var DfltQ2c_25_10_lr = config.DfltQ2c_25_10_lr;
|
||||
var DfltQ2c_32_rl = config.DfltQ2c_32_rl;
|
||||
var DfltQ2c_32_lr = config.DfltQ2c_32_lr;
|
||||
var DfltQ2c_40_rl = config.DfltQ2c_40_rl;
|
||||
var DfltQ2c_40_lr = config.DfltQ2c_40_lr;
|
||||
var UseWebService = config.UseWebService;
|
||||
var BaseUrl = config.BaseUrl;
|
||||
var RelativeUrl = config.RelativeUrl;
|
||||
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_15_rl, textBox15rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_15_lr, textBox15lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_20_rl, textBox20rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_20_lr, textBox20lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_63_rl, textBox25_63rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_63_lr, textBox25_63lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_10_rl, textBox25_10rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_25_10_lr, textBox25_10lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_32_rl, textBox32rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_32_lr, textBox32lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_40_rl, textBox40rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.DfltQ2c_40_lr, textBox40lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref CommTimeout, commTimeoutTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref MaxCommRetries, maxCommRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DelayBetweenRetries, delayBetweenRetriesTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref NrThreads, nrThreadsTextBox.Text, CfgUpdateFlags.RestartRqrd | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref IperlCheckErrorsToStop, iperlCheckErrorsToStopTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref config.UseWebService, useWebServiceCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.BaseUrl, baseUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref config.RelativeUrl, relativeUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_15_rl, textBox15rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_15_lr, textBox15lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_20_rl, textBox20rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_20_lr, textBox20lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_63_rl, textBox25_63rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_63_lr, textBox25_63lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_10_rl, textBox25_10rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_25_10_lr, textBox25_10lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_32_rl, textBox32rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_32_lr, textBox32lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_40_rl, textBox40rl.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref DfltQ2c_40_lr, textBox40lr.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
flags |= UpdateDifferent(ref UseWebService, useWebServiceCheckBox.Checked, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref BaseUrl, baseUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
flags |= UpdateDifferent(ref RelativeUrl, relativeUrlTextBox.Text, CfgUpdateFlags.InvokeCfgChange | CfgUpdateFlags.AnyChange);
|
||||
|
||||
|
||||
config.CommTimeout = CommTimeout;
|
||||
config.MaxCommRetries = MaxCommRetries;
|
||||
config.DelayBetweenRetries = DelayBetweenRetries;
|
||||
config.NrThreads = NrThreads;
|
||||
config.IperlCheckErrorsToStop = IperlCheckErrorsToStop;
|
||||
config.DfltQ2c_15_rl = DfltQ2c_15_rl;
|
||||
config.DfltQ2c_15_lr = DfltQ2c_15_lr;
|
||||
config.DfltQ2c_20_rl = DfltQ2c_20_rl;
|
||||
config.DfltQ2c_20_lr = DfltQ2c_20_lr;
|
||||
config.DfltQ2c_25_63_rl = DfltQ2c_25_63_rl;
|
||||
config.DfltQ2c_25_63_lr = DfltQ2c_25_63_lr;
|
||||
config.DfltQ2c_25_10_rl = DfltQ2c_25_10_rl;
|
||||
config.DfltQ2c_25_10_lr = DfltQ2c_25_10_lr;
|
||||
config.DfltQ2c_32_rl = DfltQ2c_32_rl;
|
||||
config.DfltQ2c_32_lr = DfltQ2c_32_lr;
|
||||
config.DfltQ2c_40_rl = DfltQ2c_40_rl;
|
||||
config.DfltQ2c_40_lr = DfltQ2c_40_lr;
|
||||
config.UseWebService = UseWebService;
|
||||
config.BaseUrl = BaseUrl;
|
||||
config.RelativeUrl = RelativeUrl;
|
||||
|
||||
if ((flags & CfgUpdateFlags.InvokeCfgChange) != 0)
|
||||
{
|
||||
TestMethod.OnCfgChange(this, new CfgChangeArgs(CfgChangeCmd.CfgChange, config));
|
||||
|
||||
+36
-44
@@ -8,56 +8,18 @@ using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.RegisterReaders.CommonRR.IPerl;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
public class TestMethodCfg_IPerl : ComponentCfgBase, IiPerlTestMethodCfg
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg_IPerl) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new TestMethodCfgCtrl(); }
|
||||
|
||||
///
|
||||
/// 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 WaitTimeAfterFailure; /// Wait time after communication failure in ms
|
||||
public int PassThroughWaitTime; /// Pass Through wait time for radio parameters in ms
|
||||
public int NrThreads; /// Numbwr of parallel threads (1, 2 or 4)
|
||||
public int IperlCheckErrorsToStop;
|
||||
|
||||
///
|
||||
/// NFC S4.5 Combihead params
|
||||
///
|
||||
public int MciTimeoutMs;
|
||||
public int BaudRate;
|
||||
public int DataBits;
|
||||
public Parity ParityBit;
|
||||
public StopBits StopBits;
|
||||
|
||||
public int DfltQ2c_15_rl;
|
||||
public int DfltQ2c_15_lr;
|
||||
public int DfltQ2c_20_rl;
|
||||
public int DfltQ2c_20_lr;
|
||||
public int DfltQ2c_25_63_rl;
|
||||
public int DfltQ2c_25_63_lr;
|
||||
public int DfltQ2c_25_10_rl;
|
||||
public int DfltQ2c_25_10_lr;
|
||||
public int DfltQ2c_32_rl;
|
||||
public int DfltQ2c_32_lr;
|
||||
public int DfltQ2c_40_rl;
|
||||
public int DfltQ2c_40_lr;
|
||||
|
||||
public bool UseWebService;
|
||||
public string BaseUrl;
|
||||
public string RelativeUrl;
|
||||
|
||||
/// <summary> Test parameters </summary>
|
||||
[XmlIgnore]
|
||||
public iPerlCommunicationParams TestParams;
|
||||
//
|
||||
public override IParamsProvider GetRuntimeTestParamsProvider() { return TestParams; }
|
||||
public override IParamsProvider CreateTestParamsProvider() { return new iPerlCommunicationParams(true); }
|
||||
public override IParamsProvider GetUITestParamsProvider(Test test)
|
||||
@@ -66,7 +28,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
TestMethodCfg()
|
||||
TestMethodCfg_IPerl()
|
||||
{
|
||||
Name = "iPerlCommunication";
|
||||
ParentName = string.Empty;
|
||||
@@ -85,7 +47,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
TestParams = CreateTestParamsProvider() as iPerlCommunicationParams;
|
||||
}
|
||||
|
||||
public TestMethodCfg(IComponentFactory factory)
|
||||
public TestMethodCfg_IPerl(IComponentFactory factory)
|
||||
: this()
|
||||
{
|
||||
this.Factory = factory;
|
||||
@@ -95,5 +57,35 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
return string.Format("Name={0}, CommTimeout={1}, MaxRetries={2}, NrThreads={3}", Name, CommTimeout, MaxCommRetries, NrThreads);
|
||||
}
|
||||
|
||||
|
||||
public int DelayBetweenRetries { get; set; }
|
||||
public int MaxCommRetries { get; set; }
|
||||
public int WaitTimeAfterFailure { get; set; }
|
||||
public int PassThroughWaitTime { get; set; }
|
||||
public int NrThreads { get; set; }
|
||||
public int CommTimeout { get; set; }
|
||||
public int IperlCheckErrorsToStop { get; set; }
|
||||
public int MciTimeoutMs { get; set; }
|
||||
public int BaudRate { get; set; }
|
||||
public int DataBits { get; set; }
|
||||
public Parity ParityBit { get; set; }
|
||||
public StopBits StopBits { get; set; }
|
||||
public int DfltQ2c_15_rl { get; set; }
|
||||
public int DfltQ2c_15_lr { get; set; }
|
||||
public int DfltQ2c_20_rl { get; set; }
|
||||
public int DfltQ2c_20_lr { get; set; }
|
||||
public int DfltQ2c_25_63_rl { get; set; }
|
||||
public int DfltQ2c_25_63_lr { get; set; }
|
||||
public int DfltQ2c_25_10_rl { get; set; }
|
||||
public int DfltQ2c_25_10_lr { get; set; }
|
||||
public int DfltQ2c_32_rl { get; set; }
|
||||
public int DfltQ2c_32_lr { get; set; }
|
||||
public int DfltQ2c_40_rl { get; set; }
|
||||
public int DfltQ2c_40_lr { get; set; }
|
||||
public bool UseWebService { get; set; }
|
||||
public string BaseUrl { get; set; }
|
||||
public string RelativeUrl { get; set; }
|
||||
public ITestParams TestParams { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TestMethod(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new TestMethodCfg(this); }
|
||||
public IComponentCfg DefaultConfig() { return new TestMethodCfg_IPerl(this); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
|
||||
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg_IPerl.Serializer, component, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+51
-51
@@ -48,9 +48,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
|
||||
public partial class iPerlCommunicationForm : Form, GenericDevices.IHasCompleted
|
||||
public partial class iPerlCommunicationFormTestMethod : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationForm));
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationFormTestMethod));
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
|
||||
const int Hz2CorrFactorsAddr = 0x1875; /// Used by Reset2HzCorrection(...) and Write2HzCorrection(...)
|
||||
@@ -112,21 +112,21 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <returns>Value returned by readRequestPort(...)</returns>
|
||||
public static int ReadRequestPort(IperlHead iperlHead, MessageID messageID, StructName structName, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
|
||||
Thread.Sleep(Math.Max(250, CfgIPerl.DelayBetweenRetries));
|
||||
if (iperlHead.DebugLevel == DebugMode.FailureDuringOperation) iperlHead.DebugLevel = DebugMode.Normal;
|
||||
|
||||
if (iperlHead.DebugLevel != DebugMode.Normal) // Simulation
|
||||
{
|
||||
return SimulationServices.ReadRequest(cfg, iperlHead, messageID, offset, length, out buffer);
|
||||
return SimulationServices.ReadRequest(CfgIPerl, iperlHead, messageID, offset, length, out buffer);
|
||||
}
|
||||
|
||||
if (iperlHead.CommInterface == CommunicationInterface.NFC) // NFC Interface
|
||||
{
|
||||
return NfcServices.ReadRequest(cfg, iperlHead, structName, offset, length, out buffer);
|
||||
return NfcServices.ReadRequest(CfgIPerl, iperlHead, structName, offset, length, out buffer);
|
||||
}
|
||||
else // RFID Interface
|
||||
{
|
||||
return RfidServices.ReadRequest(cfg, iperlHead, messageID, offset, length, out buffer);
|
||||
return RfidServices.ReadRequest(CfgIPerl, iperlHead, messageID, offset, length, out buffer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,21 +137,21 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <returns>Value returned by writeRequestPort(...)</returns>
|
||||
public static int WriteRequestPort(IperlHead iperlHead, MessageID messageID, StructName structName, int offset, int length, byte[] buffer)
|
||||
{
|
||||
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
|
||||
Thread.Sleep(Math.Max(250, CfgIPerl.DelayBetweenRetries));
|
||||
if (iperlHead.DebugLevel == DebugMode.FailureDuringOperation) iperlHead.DebugLevel = DebugMode.Normal;
|
||||
|
||||
if (iperlHead.DebugLevel != DebugMode.Normal) // Simulation
|
||||
{
|
||||
return SimulationServices.WriteRequest(cfg, iperlHead, messageID, offset, length, buffer);
|
||||
return SimulationServices.WriteRequest(CfgIPerl, iperlHead, messageID, offset, length, buffer);
|
||||
}
|
||||
|
||||
if (iperlHead.CommInterface == CommunicationInterface.NFC) // NFC Interface
|
||||
{
|
||||
return NfcServices.WriteRequest(cfg, iperlHead, structName, offset, length, buffer);
|
||||
return NfcServices.WriteRequest(CfgIPerl, iperlHead, structName, offset, length, buffer);
|
||||
}
|
||||
else // RFID Interface
|
||||
{
|
||||
return RfidServices.WriteRequest(cfg, iperlHead, messageID, offset, length, buffer);
|
||||
return RfidServices.WriteRequest(CfgIPerl, iperlHead, messageID, offset, length, buffer);
|
||||
}
|
||||
}
|
||||
#endregion iPerl_Head_RFID_Interface: ReadRequestPort, WriteRequestPort
|
||||
@@ -192,7 +192,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// RFID multiplexer PCB / RFID serial port and worker thread related variables
|
||||
///
|
||||
static TestMethod testMethod;
|
||||
public static TestMethodCfg cfg;
|
||||
public static TestMethodCfg_IPerl CfgIPerl;
|
||||
static IList<Config.Entities.Test> tests;
|
||||
static IList<iPerlCommunicationParams> multiTestParams;
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
|
||||
/// <summary> Parameterless constructor (without watermeters, threads) </summary>
|
||||
public iPerlCommunicationForm()
|
||||
public iPerlCommunicationFormTestMethod()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
@@ -217,10 +217,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Constructor for checkBox states (active/inactive iPerl head) editing.
|
||||
/// </summary>
|
||||
/// <param name="checkBoxes">Initial check box states</param>
|
||||
public iPerlCommunicationForm(bool isCheckBoxesEditMode)
|
||||
public iPerlCommunicationFormTestMethod(bool isCheckBoxesEditMode)
|
||||
: this()
|
||||
{
|
||||
iPerlCommunicationForm.cfg = new TestMethodCfg(null); // default iPerl Head communication params
|
||||
iPerlCommunicationFormTestMethod.CfgIPerl = new TestMethodCfg_IPerl(null); // default iPerl Head communication params
|
||||
if (isCheckBoxesEditMode)
|
||||
{
|
||||
checkBoxesEditMode = true;
|
||||
@@ -252,7 +252,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Constructor for one iPerlCommunication 'test'
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public iPerlCommunicationForm(TestMethod testMethod, Test test, iPerlCommunicationParams testParams)
|
||||
public iPerlCommunicationFormTestMethod(TestMethod testMethod, Test test, iPerlCommunicationParams testParams)
|
||||
: this(testMethod, new List<Test> { test }, new List<iPerlCommunicationParams> { testParams })
|
||||
{
|
||||
}
|
||||
@@ -261,15 +261,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Constructor for multiple iPerlCommunication 'tests'
|
||||
/// </summary>
|
||||
/// <param name="waterMetersCount">Number of text boxes for serial numbers</param>
|
||||
public iPerlCommunicationForm(TestMethod testMethod, IList<Test> tests, IList<iPerlCommunicationParams> multiTestParams)
|
||||
public iPerlCommunicationFormTestMethod(TestMethod testMethod, IList<Test> tests, IList<iPerlCommunicationParams> multiTestParams)
|
||||
: this()
|
||||
{
|
||||
checkBoxesEditMode = false;
|
||||
|
||||
iPerlCommunicationForm.testMethod = testMethod;
|
||||
iPerlCommunicationForm.cfg = testMethod.Cfg as TestMethodCfg;
|
||||
iPerlCommunicationForm.tests = tests;
|
||||
iPerlCommunicationForm.multiTestParams = multiTestParams;
|
||||
iPerlCommunicationFormTestMethod.testMethod = testMethod;
|
||||
iPerlCommunicationFormTestMethod.CfgIPerl = testMethod.Cfg as TestMethodCfg_IPerl;
|
||||
iPerlCommunicationFormTestMethod.tests = tests;
|
||||
iPerlCommunicationFormTestMethod.multiTestParams = multiTestParams;
|
||||
|
||||
if (multiTestParams.Count > 0)
|
||||
{
|
||||
@@ -347,13 +347,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
/// group numbers are >=1, lastGroup == 0 means there is no group
|
||||
lastGroup = 0;
|
||||
foreach (var iPerl in iPerlCommunicationForm.iperlHeads)
|
||||
foreach (var iPerl in iPerlCommunicationFormTestMethod.iperlHeads)
|
||||
{
|
||||
if (iPerl.Group > lastGroup) lastGroup = iPerl.Group;
|
||||
}
|
||||
|
||||
workerThreads = new List<Thread>();
|
||||
for (int i = 0; i < cfg.NrThreads; i++)
|
||||
for (int i = 0; i < CfgIPerl.NrThreads; i++)
|
||||
{
|
||||
Thread thread = new Thread(Worker);
|
||||
thread.CurrentCulture = CultureInfo.CurrentCulture;
|
||||
@@ -362,7 +362,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
muxBrdOrGroup14Nrs = new List<int>();
|
||||
foreach (var iPerl in iPerlCommunicationForm.iperlHeads)
|
||||
foreach (var iPerl in iPerlCommunicationFormTestMethod.iperlHeads)
|
||||
{
|
||||
if (!muxBrdOrGroup14Nrs.Contains(iPerl.MuxBoardNrOrGroup14)) muxBrdOrGroup14Nrs.Add(iPerl.MuxBoardNrOrGroup14);
|
||||
}
|
||||
@@ -671,7 +671,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
#if TURA_SPECIAL
|
||||
int threadIx = threadID; /// Just one thread for TURA_SPECIAL
|
||||
#else
|
||||
for (int threadIx = threadID; threadIx < threadID + 4; threadIx += cfg.NrThreads)
|
||||
for (int threadIx = threadID; threadIx < threadID + 4; threadIx += CfgIPerl.NrThreads)
|
||||
#endif
|
||||
{
|
||||
bool wmFound = false;
|
||||
@@ -924,7 +924,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
/// Delay min. 250 ms
|
||||
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
|
||||
Thread.Sleep(Math.Max(250, CfgIPerl.DelayBetweenRetries));
|
||||
}
|
||||
|
||||
if (error == CommErr.None && (ihead.ConfigStruct.TestModeConfig != testModeConfig))
|
||||
@@ -939,7 +939,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
/// Delay min. 250 ms
|
||||
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
|
||||
Thread.Sleep(Math.Max(250, CfgIPerl.DelayBetweenRetries));
|
||||
}
|
||||
|
||||
if (error == CommErr.None)
|
||||
@@ -953,7 +953,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}
|
||||
|
||||
/// Delay min. 250 ms
|
||||
Thread.Sleep(Math.Max(250, cfg.DelayBetweenRetries));
|
||||
Thread.Sleep(Math.Max(250, CfgIPerl.DelayBetweenRetries));
|
||||
}
|
||||
|
||||
/// Now the meter should be in the Test mode ... verify
|
||||
@@ -1635,28 +1635,28 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
switch (ihead.MeterType)
|
||||
{
|
||||
case MeterType.DN15:
|
||||
q2corrRL = cfg.DfltQ2c_15_rl;
|
||||
q2corrLR = cfg.DfltQ2c_15_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_15_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_15_lr;
|
||||
break;
|
||||
case MeterType.DN20:
|
||||
q2corrRL = cfg.DfltQ2c_20_rl;
|
||||
q2corrLR = cfg.DfltQ2c_20_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_20_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_20_lr;
|
||||
break;
|
||||
case MeterType.DN25:
|
||||
q2corrRL = cfg.DfltQ2c_25_63_rl;
|
||||
q2corrLR = cfg.DfltQ2c_25_63_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_25_63_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_25_63_lr;
|
||||
break;
|
||||
case MeterType.DN25_Q3_10:
|
||||
q2corrRL = cfg.DfltQ2c_25_10_rl;
|
||||
q2corrLR = cfg.DfltQ2c_25_10_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_25_10_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_25_10_lr;
|
||||
break;
|
||||
case MeterType.DN32:
|
||||
q2corrRL = cfg.DfltQ2c_32_rl;
|
||||
q2corrLR = cfg.DfltQ2c_32_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_32_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_32_lr;
|
||||
break;
|
||||
case MeterType.DN40:
|
||||
q2corrRL = cfg.DfltQ2c_40_rl;
|
||||
q2corrLR = cfg.DfltQ2c_40_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_40_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_40_lr;
|
||||
break;
|
||||
default:
|
||||
q2corrRL = 0;
|
||||
@@ -1739,28 +1739,28 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
switch (ihead.MeterType)
|
||||
{
|
||||
case MeterType.DN15:
|
||||
q2corrRL = cfg.DfltQ2c_15_rl;
|
||||
q2corrLR = cfg.DfltQ2c_15_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_15_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_15_lr;
|
||||
break;
|
||||
case MeterType.DN20:
|
||||
q2corrRL = cfg.DfltQ2c_20_rl;
|
||||
q2corrLR = cfg.DfltQ2c_20_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_20_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_20_lr;
|
||||
break;
|
||||
case MeterType.DN25:
|
||||
q2corrRL = cfg.DfltQ2c_25_63_rl;
|
||||
q2corrLR = cfg.DfltQ2c_25_63_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_25_63_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_25_63_lr;
|
||||
break;
|
||||
case MeterType.DN25_Q3_10:
|
||||
q2corrRL = cfg.DfltQ2c_25_10_rl;
|
||||
q2corrLR = cfg.DfltQ2c_25_10_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_25_10_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_25_10_lr;
|
||||
break;
|
||||
case MeterType.DN32:
|
||||
q2corrRL = cfg.DfltQ2c_32_rl;
|
||||
q2corrLR = cfg.DfltQ2c_32_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_32_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_32_lr;
|
||||
break;
|
||||
case MeterType.DN40:
|
||||
q2corrRL = cfg.DfltQ2c_40_rl;
|
||||
q2corrLR = cfg.DfltQ2c_40_lr;
|
||||
q2corrRL = CfgIPerl.DfltQ2c_40_rl;
|
||||
q2corrLR = CfgIPerl.DfltQ2c_40_lr;
|
||||
break;
|
||||
default:
|
||||
q2corrRL = 0;
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
///
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
partial class iPerlCommunicationForm
|
||||
partial class iPerlCommunicationFormTestMethod
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -32,7 +32,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(iPerlCommunicationForm));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(iPerlCommunicationFormTestMethod));
|
||||
this.wmTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.wmLabel2 = new System.Windows.Forms.Label();
|
||||
this.wmLabel1 = new System.Windows.Forms.Label();
|
||||
@@ -2585,7 +2585,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "iPerlCommunicationForm";
|
||||
this.Name = "iPerlCommunicationFormTestMethod";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "iPerl Communication";
|
||||
this.TopMost = true;
|
||||
@@ -10,17 +10,19 @@ using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
public class iPerlCommunicationParams : TestParamsBase, IParamsProvider, ITestParams
|
||||
public class iPerlCommunicationParams : TestParamsBase, ITestParams
|
||||
{
|
||||
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(iPerlCommunicationParams) })[0];
|
||||
public override XmlSerializer GetSerializer() { return Serializer; }
|
||||
|
||||
public string Activity; /// Communication activity
|
||||
public bool SimultWithPrevious;
|
||||
public bool SimultWithNext;
|
||||
|
||||
public string Activity { get; set; } /// Communication activity
|
||||
public bool SimultWithPrevious { get; set; }
|
||||
public bool SimultWithNext { get; set; }
|
||||
|
||||
public override void InitializeAll()
|
||||
{
|
||||
@@ -44,54 +46,54 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
if (i == 0)
|
||||
{
|
||||
var retVal = new List<string>();
|
||||
retVal.Add(iPerlCommunicationForm.ReadConfigurationStr);
|
||||
retVal.Add(string.Format("{0} A0", iPerlCommunicationForm.SetTestModeStr));
|
||||
retVal.Add(string.Format("{0} A4", iPerlCommunicationForm.SetTestModeStr));
|
||||
retVal.Add(iPerlCommunicationForm.ReadCalibrationStr);
|
||||
retVal.Add(iPerlCommunicationForm.ReadCalibrationV4Str);
|
||||
retVal.Add(iPerlCommunicationForm.NormalizeCalibrationFactorStr);
|
||||
retVal.Add(iPerlCommunicationForm.NormalizeCalibrationV4FactorsStr);
|
||||
retVal.Add(iPerlCommunicationForm.GetDefaultQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationForm.ReadQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.ResetQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteDefaultQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationForm.InitOrReadQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteCalibrationFactorStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteCalibrationV4FactorsStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionPlusAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionGreeceIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionRLIncl05Str);
|
||||
retVal.Add(iPerlCommunicationForm.WriteQ2CorrectionLRIncl05Str);
|
||||
retVal.Add(iPerlCommunicationSeq.Q2correctedFromCmd + "Qx");
|
||||
retVal.Add(iPerlCommunicationSeq.StrictQ2ErrorCheckStr + "Qx");
|
||||
retVal.Add(iPerlCommunicationSeq.Q2correctionCheckCmd);
|
||||
retVal.Add(iPerlCommunicationSeq.IperlCheckCmd);
|
||||
retVal.Add(iPerlCommunicationForm.UpdateBothQ2FactorsTestRLOnlyStr);
|
||||
retVal.Add(iPerlCommunicationForm.UpdateBothQ2FactorsTestLROnlyStr);
|
||||
retVal.Add(iPerlCommunicationForm.UpdateQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationForm.ConditnlUpdateQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationForm.ConditnlUpdateQ2CorrRLStr);
|
||||
retVal.Add(iPerlCommunicationForm.ConditnlUpdateQ2CorrLRStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ReadConfigurationStr);
|
||||
retVal.Add(string.Format("{0} A0", iPerlCommunicationConstants.SetTestModeStr));
|
||||
retVal.Add(string.Format("{0} A4", iPerlCommunicationConstants.SetTestModeStr));
|
||||
retVal.Add(iPerlCommunicationConstants.ReadCalibrationStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ReadCalibrationV4Str);
|
||||
retVal.Add(iPerlCommunicationConstants.NormalizeCalibrationFactorStr);
|
||||
retVal.Add(iPerlCommunicationConstants.NormalizeCalibrationV4FactorsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.GetDefaultQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ReadQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ResetQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteDefaultQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.InitOrReadQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteCalibrationFactorStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteCalibrationV4FactorsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionAltStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionGreeceStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionRLStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionLRStr);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionPlusIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionPlusAltIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionGreeceIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionRLIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.WriteQ2CorrectionLRIncl05Str);
|
||||
retVal.Add(iPerlCommunicationConstants.Q2correctedFromCmd + "Qx");
|
||||
retVal.Add(iPerlCommunicationConstants.StrictQ2ErrorCheckStr + "Qx");
|
||||
retVal.Add(iPerlCommunicationConstants.Q2correctionCheckCmd);
|
||||
retVal.Add(iPerlCommunicationConstants.IperlCheckCmd);
|
||||
retVal.Add(iPerlCommunicationConstants.UpdateBothQ2FactorsTestRLOnlyStr);
|
||||
retVal.Add(iPerlCommunicationConstants.UpdateBothQ2FactorsTestLROnlyStr);
|
||||
retVal.Add(iPerlCommunicationConstants.UpdateQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ConditnlUpdateQ2CorrectionsStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ConditnlUpdateQ2CorrRLStr);
|
||||
retVal.Add(iPerlCommunicationConstants.ConditnlUpdateQ2CorrLRStr);
|
||||
retVal.Add("Q2 corrected from Q2adj");
|
||||
retVal.Add("Q2 correction check Q2bc Q2ac");
|
||||
retVal.Add(iPerlCommunicationForm.SetActiveModeStr);
|
||||
retVal.Add(iPerlCommunicationConstants.SetActiveModeStr);
|
||||
retVal.Add("---");
|
||||
retVal.Add(iPerlCommunicationForm.Reset2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.Write2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkRLStr);
|
||||
retVal.Add(iPerlCommunicationForm.DewaReworkLRStr);
|
||||
retVal.Add(iPerlCommunicationForm.StartTestingSealedMetersStr);
|
||||
retVal.Add(iPerlCommunicationForm.EndTestingSealedMetersStr);
|
||||
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationForm.ReadConfigurationStr));
|
||||
retVal.Add(string.Format("{0} 80", iPerlCommunicationForm.SetTestModeStr));
|
||||
retVal.Add(iPerlCommunicationConstants.Reset2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationConstants.Write2HzCorrectionStr);
|
||||
retVal.Add(iPerlCommunicationConstants.DewaReworkRLStr);
|
||||
retVal.Add(iPerlCommunicationConstants.DewaReworkLRStr);
|
||||
retVal.Add(iPerlCommunicationConstants.StartTestingSealedMetersStr);
|
||||
retVal.Add(iPerlCommunicationConstants.EndTestingSealedMetersStr);
|
||||
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationConstants.ReadConfigurationStr));
|
||||
retVal.Add(string.Format("{0} 80", iPerlCommunicationConstants.SetTestModeStr));
|
||||
retVal.Add("iPerl_check prevWorkStep direction q2factors");
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.TestMethods.iPerlCommunication.iPerlHead;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
@@ -34,7 +35,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
///
|
||||
void OpenIPerlCommForm(iPerlCommunicationSeq myRef, TestMethod method, Test test, iPerlCommunicationParams testParams)
|
||||
{
|
||||
myRef.modelessDlg = new iPerlCommunicationForm(method, test, testParams);
|
||||
myRef.modelessDlg = new iPerlCommunicationFormTestMethod(method, test, testParams);
|
||||
myRef.modelessDlg.Show();
|
||||
}
|
||||
|
||||
@@ -56,9 +57,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// Event.OpArgumentError . Target flow is out of range
|
||||
/// Event.Error . . . . . . Unspecified error
|
||||
/// </returns>
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethod method, iPerlCommunicationParams testParams)
|
||||
public IList<Event> Execute(Test test, int repetitionNr, TestMethod method, ITestParams testParams)
|
||||
{
|
||||
TestMethodCfg cfg = method.Cfg as TestMethodCfg;
|
||||
TestMethodCfg_IPerl cfgIPerl = method.Cfg as TestMethodCfg_IPerl;
|
||||
|
||||
IList<Event> e; /// Events from currently running operations
|
||||
checkUiOp = new Operations.CheckUIOp(true); /// Runs in more then one state
|
||||
@@ -67,7 +68,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
processDataLoggingOp = new TBF.Rig.Operations.ProcessDataLoggingOp(processDataLogger, this, false);
|
||||
|
||||
string cmd;
|
||||
if (testParams.Activity.ToLower().Equals(cmd = iPerlCommunicationForm.GetDefaultQ2CorrectionsStr.ToLower()))
|
||||
if (testParams.Activity.ToLower().Equals(cmd = iPerlCommunicationFormTestMethod.GetDefaultQ2CorrectionsStr.ToLower()))
|
||||
{
|
||||
TestProgressEventArgs.SetEstimatedTimes(new int[] { 0, 0, 0, 30, 0, 30, 0, 0 });
|
||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, Progress.JustStarted));
|
||||
@@ -86,9 +87,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
}*/
|
||||
#endif
|
||||
|
||||
if (cfg.UseWebService)
|
||||
if (cfgIPerl.UseWebService)
|
||||
{
|
||||
IsQ2PreCorrectionCalculated = GetQ2PreCorrectionsOrBackups(cfg, wmType, out CalculatedQ2PreCorrectionLR, out CalculatedQ2PreCorrectionRL);
|
||||
IsQ2PreCorrectionCalculated = GetQ2PreCorrectionsOrBackups(cfgIPerl, wmType, out CalculatedQ2PreCorrectionLR, out CalculatedQ2PreCorrectionRL);
|
||||
}
|
||||
|
||||
/// Generate test results
|
||||
@@ -105,7 +106,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
{
|
||||
if (mtr.TestRslt == tstRslt)
|
||||
{
|
||||
mtr.Passed = !cfg.UseWebService || IsQ2PreCorrectionCalculated;
|
||||
mtr.Passed = !cfgIPerl.UseWebService || IsQ2PreCorrectionCalculated;
|
||||
mtr.TestDone = true;
|
||||
break;
|
||||
}
|
||||
@@ -270,7 +271,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
Bridge.OnTestCompleted(this, new TestCompletedEventArgs(test.Name, tstRslt));
|
||||
allResults.Info(TestResult2CsvLine(test.Name, 0)); /// Append the results to the CSV-file
|
||||
|
||||
if (wrongMetersCount >= cfg.IperlCheckErrorsToStop)
|
||||
if (wrongMetersCount >= cfgIPerl.IperlCheckErrorsToStop)
|
||||
{
|
||||
State.Create("iPerlCommunicationSeq : Show check result")
|
||||
.AddOperation(new Operations.LargeMessageBoxOp(message))
|
||||
@@ -408,12 +409,12 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <summary>
|
||||
/// Read default Q2 correction factors from a REST service (= Web service).
|
||||
/// </summary>
|
||||
/// <param name="cfg">iPerlCommunication component configuration</param>
|
||||
/// <param name="cfgIPerl">iPerlCommunication component configuration</param>
|
||||
/// <param name="wmType">Water meter type (WZ Typ)</param>
|
||||
/// <param name="q2PreCorrectionLR">Default Q2 correction LR</param>
|
||||
/// <param name="q2PreCorrectionRL">Default Q2 correction RL</param>
|
||||
/// <returns>true when successful</returns>
|
||||
static bool ReadCorrectionsFromWebService(TestMethodCfg cfg, int wmType, out int q2PreCorrectionLR, out int q2PreCorrectionRL)
|
||||
static bool ReadCorrectionsFromWebService(TestMethodCfg_IPerl cfgIPerl, int wmType, out int q2PreCorrectionLR, out int q2PreCorrectionRL)
|
||||
{
|
||||
if (wmType == 0)
|
||||
{
|
||||
@@ -425,9 +426,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
|
||||
try
|
||||
{
|
||||
GetQ2PreCorrectionClient client = new GetQ2PreCorrectionClient(cfg.BaseUrl);
|
||||
GetQ2PreCorrectionClient client = new GetQ2PreCorrectionClient(cfgIPerl.BaseUrl);
|
||||
client.GetToken("ReadUser", "sensus", "https://deluh1web03.world.fluidtechnology.net/SensusCore/api/v1/Locations/1/Login2").Wait();
|
||||
Q2PreCorrection response = client.GetQ2Correction(string.Format(cfg.RelativeUrl, wmType)).Result;
|
||||
Q2PreCorrection response = client.GetQ2Correction(string.Format(cfgIPerl.RelativeUrl, wmType)).Result;
|
||||
if (response != null && response.AreDataCalculated)
|
||||
{
|
||||
q2PreCorrectionLR = response.CorrLR;
|
||||
@@ -455,15 +456,15 @@ namespace TBF.Rig.TestMethods.iPerlCommunication
|
||||
/// <summary>
|
||||
/// Obtain Q2 correction factors from a REST service or from local settings (stored backup values)
|
||||
/// </summary>
|
||||
/// <param name="cfg">iPerlCommunication component configuration</param>
|
||||
/// <param name="cfgIPerl">iPerlCommunication component configuration</param>
|
||||
/// <param name="wmType">Water meter type (WZ Typ)</param>
|
||||
/// <param name="q2PreCorrectionLR">Default Q2 correction LR</param>
|
||||
/// <param name="q2PreCorrectionRL">Default Q2 correction RL</param>
|
||||
/// <returns>true when successful</returns>
|
||||
public static bool GetQ2PreCorrectionsOrBackups(TestMethodCfg cfg, int wmType, out int q2PreCorrectionLR, out int q2PreCorrectionRL)
|
||||
public static bool GetQ2PreCorrectionsOrBackups(TestMethodCfg_IPerl cfgIPerl, int wmType, out int q2PreCorrectionLR, out int q2PreCorrectionRL)
|
||||
{
|
||||
/// Get Q2 pre-correction values from REST service
|
||||
bool restOK = ReadCorrectionsFromWebService(cfg, wmType, out q2PreCorrectionLR, out q2PreCorrectionRL);
|
||||
bool restOK = ReadCorrectionsFromWebService(cfgIPerl, wmType, out q2PreCorrectionLR, out q2PreCorrectionRL);
|
||||
|
||||
/// Store / load Q2 pre-correction values
|
||||
Point storedValue;
|
||||
|
||||
@@ -17,13 +17,14 @@ using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq; // This line is correct and does not need to be changed.
|
||||
using System.Windows;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
/// <summary>
|
||||
/// This component = instance of this class is a placeholder for a combined main watermeter
|
||||
/// </summary>
|
||||
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation
|
||||
public class IperlHead : ComponentBase, IDevice,IRegReaderDatastream, ISessionDataMngmnt, IOperation, IntIPerlReader
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(IperlHead));
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
@@ -42,7 +43,10 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
|
||||
readonly IperlHeadCfg iperlHeadCfg;
|
||||
|
||||
RegisterReaders.CommonRR.CommunicationInterface IntIPerlReader.CommInterface => _commInterface;
|
||||
|
||||
public int RfidComPortNr { get { return iperlHeadCfg.RfidComPortNr; } }
|
||||
public bool CommFailed { get; set; }
|
||||
public int OptoComPortNr { get { return iperlHeadCfg.OptoComPortNr; } }
|
||||
public int MuxBoardNrOrGroup14 { get { return iperlHeadCfg.MuxBoardNr; } }
|
||||
public int Group { get { return iperlHeadCfg.Group; } }
|
||||
@@ -87,7 +91,6 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
|
||||
public bool Disabled;
|
||||
public bool CommFailed;
|
||||
public int ResultCode;
|
||||
|
||||
|
||||
@@ -930,6 +933,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
dataStreamState = DataStreamState.ProcessAndSave;
|
||||
}
|
||||
|
||||
public void SetCommunicationInterface(RegisterReaders.CommonRR.CommunicationInterface commInterface)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when processing and saving datastream data is in progress
|
||||
/// </summary>
|
||||
@@ -938,6 +946,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return dataStreamState == DataStreamState.ProcessAndSave;
|
||||
}
|
||||
|
||||
void IntIPerlReader.SetRfidInterface()
|
||||
{
|
||||
SetRfidInterface();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stop processing and saving datastream data
|
||||
/// </summary>
|
||||
@@ -953,8 +966,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
bool synchronized;
|
||||
bool synchronized2;
|
||||
string partOfTelegram;
|
||||
private RegisterReaders.CommonRR.CommunicationInterface _commInterface;
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Reads opto-datastream via serial port. Invoked from RunDeviceBefore()
|
||||
///
|
||||
/// Telegram description:
|
||||
@@ -1063,6 +1077,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
|
||||
void IntIPerlReader.ResetNfcInterface(bool? nfc_on)
|
||||
{
|
||||
ResetNfcInterface(nfc_on);
|
||||
}
|
||||
|
||||
public string ReadOptoData()
|
||||
{
|
||||
if (optoSerialPort is null) return "";
|
||||
@@ -1080,6 +1099,11 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return received;
|
||||
}
|
||||
|
||||
void IntIPerlReader.SetNfcInterface()
|
||||
{
|
||||
SetNfcInterface();
|
||||
}
|
||||
|
||||
|
||||
void OptoTelegramReceived(int currentIx, bool async, Int64 volumeRawExt, Int64 timestampRawExt)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Threading;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
using TBF.Rig.Sequences;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
@@ -21,7 +22,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
InitializeComponent();
|
||||
if (config == null) return;
|
||||
|
||||
iPerlCommunicationForm.cfg = new TestMethodCfg(null); // default values for iPerlCommunication
|
||||
SmartCommunicationForm.TestMethodCfg = new TestMethodCfg_IPerl(null); // default values for iPerlCommunication
|
||||
|
||||
foreach(var head in ProcessData.IperlHeads)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
internal class NfcServices
|
||||
{
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IperlHead iperlHead, MCI_Protocol.StructName structName, int offset, int length, out byte[] buffer)
|
||||
internal static int ReadRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MCI_Protocol.StructName structName, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
for (int i = 0; i < cfg.MaxCommRetries; i++)
|
||||
for (int i = 0; i < cfgIPerl.MaxCommRetries; i++)
|
||||
{
|
||||
|
||||
NfcDataHandler _nfcDataHandler = new NfcDataHandler();
|
||||
@@ -26,9 +26,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
try
|
||||
{
|
||||
rfidDataLogger.Info($"NFC COM{iperlHead.RfidComPortNr} ReadRequest : {structName}, {offset}, {length}");
|
||||
OpenConnection(_nfcDataHandler, cfg, iperlHead);
|
||||
OpenConnection(_nfcDataHandler, cfgIPerl, iperlHead);
|
||||
|
||||
buffer = MciRead(_nfcDataHandler, cfg, structName, (ushort)offset, length);
|
||||
buffer = MciRead(_nfcDataHandler, cfgIPerl, structName, (ushort)offset, length);
|
||||
_nfcDataHandler.RFProtocolOFF(); // turn off rf antenna due to possible interference
|
||||
|
||||
CloseComPort(_nfcDataHandler);
|
||||
@@ -44,7 +44,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
catch (RfidValidationException)
|
||||
{
|
||||
Thread.Sleep(cfg.WaitTimeAfterFailure);
|
||||
Thread.Sleep(cfgIPerl.WaitTimeAfterFailure);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return 3;
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IperlHead iperlHead, MCI_Protocol.StructName structName, int offset, int length, byte[] buffer)
|
||||
internal static int WriteRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MCI_Protocol.StructName structName, int offset, int length, byte[] buffer)
|
||||
{
|
||||
NfcDataHandler _nfcDataHandler = new NfcDataHandler();
|
||||
MessageEventHandlers(_nfcDataHandler);
|
||||
@@ -68,9 +68,9 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
try
|
||||
{
|
||||
rfidDataLogger.Info($"NFC COM{iperlHead.RfidComPortNr} WriteRequest : {structName}, {offset}, {length}, {ByteArrayToHexString(buffer)}");
|
||||
OpenConnection(_nfcDataHandler, cfg, iperlHead);
|
||||
OpenConnection(_nfcDataHandler, cfgIPerl, iperlHead);
|
||||
|
||||
MciWrite(_nfcDataHandler, cfg, structName, (ushort)offset, length, buffer);
|
||||
MciWrite(_nfcDataHandler, cfgIPerl, structName, (ushort)offset, length, buffer);
|
||||
_nfcDataHandler.RFProtocolOFF(); // turn off rf antenna due to possible interference
|
||||
|
||||
CloseComPort(_nfcDataHandler);
|
||||
@@ -83,14 +83,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
|
||||
private static void OpenConnection(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, IperlHead iperlHead)
|
||||
private static void OpenConnection(NfcDataHandler nfcDataHandler, TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead)
|
||||
{
|
||||
string comPort = $"COM{iperlHead.RfidComPortNr}";
|
||||
int retryCount = 0 ;
|
||||
Open:
|
||||
nfcDataHandler.Close();
|
||||
Thread.Sleep(100);
|
||||
if (nfcDataHandler.OpenConnection(comPort, cfg.BaudRate, cfg.DataBits, cfg.ParityBit, cfg.StopBits))
|
||||
if (nfcDataHandler.OpenConnection(comPort, cfgIPerl.BaudRate, cfgIPerl.DataBits, cfgIPerl.ParityBit, cfgIPerl.StopBits))
|
||||
{
|
||||
rfidDataLogger.Info($"NFC COM{iperlHead.RfidComPortNr} Port Open");
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
if (!nfcDataHandler.ConnectDevice())
|
||||
{
|
||||
rfidDataLogger.Error($"NFC COM{iperlHead.RfidComPortNr} Error connect device.");
|
||||
for (int i = 0; i < cfg.MaxCommRetries; i++)
|
||||
for (int i = 0; i < cfgIPerl.MaxCommRetries; i++)
|
||||
{
|
||||
if (nfcDataHandler.Echo()) break;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
retryCount++;
|
||||
rfidDataLogger.Error($"NFC COM{iperlHead.RfidComPortNr} Error connect reader. Reconnect comport {retryCount}");
|
||||
if (retryCount < cfg.MaxCommRetries)
|
||||
if (retryCount < cfgIPerl.MaxCommRetries)
|
||||
{
|
||||
nfcDataHandler.Close();
|
||||
iperlHead.ResetNfcInterface(); // reset NFC head via optoport - switch to RFID and back to NFC interface
|
||||
@@ -127,7 +127,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
nfcDataHandler.Close();
|
||||
}
|
||||
|
||||
private static byte[] MciRead(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, StructName structName, ushort offset, int length)
|
||||
private static byte[] MciRead(NfcDataHandler nfcDataHandler, TestMethodCfg_IPerl cfgIPerl, StructName structName, ushort offset, int length)
|
||||
{
|
||||
bool isReadValues = false;
|
||||
int retryCount = 0;
|
||||
@@ -153,14 +153,14 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
rfidDataLogger.Info($"MCI Error: Unidentified");
|
||||
retryCount++;
|
||||
if (retryCount < cfg.MaxCommRetries)
|
||||
if (retryCount < cfgIPerl.MaxCommRetries)
|
||||
goto Read;
|
||||
}
|
||||
else
|
||||
{
|
||||
rfidDataLogger.Info("Last error message: " + nfcDataHandler.LastErrorMessage);
|
||||
retryCount++;
|
||||
if (retryCount < cfg.MaxCommRetries)
|
||||
if (retryCount < cfgIPerl.MaxCommRetries)
|
||||
goto Read;
|
||||
}
|
||||
}
|
||||
@@ -168,13 +168,13 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
rfidDataLogger.Error("MciRead Last error message: " + ex.Message);
|
||||
retryCount++;
|
||||
if (retryCount < cfg.MaxCommRetries)
|
||||
if (retryCount < cfgIPerl.MaxCommRetries)
|
||||
goto Read;
|
||||
}
|
||||
return new byte[length];
|
||||
}
|
||||
|
||||
private static void MciWrite(NfcDataHandler nfcDataHandler, TestMethodCfg cfg, MCI_Protocol.StructName structName, ushort offset, int length, byte[] payload)
|
||||
private static void MciWrite(NfcDataHandler nfcDataHandler, TestMethodCfg_IPerl cfgIPerl, MCI_Protocol.StructName structName, ushort offset, int length, byte[] payload)
|
||||
{
|
||||
int retryCount = 0;
|
||||
Write:
|
||||
@@ -199,7 +199,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
rfidDataLogger.Error("MciWrite error message: " + ex.Message);
|
||||
retryCount++;
|
||||
if (retryCount < cfg.MaxCommRetries)
|
||||
if (retryCount < cfgIPerl.MaxCommRetries)
|
||||
goto Write;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,24 +5,25 @@ using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
internal class RfidServices
|
||||
{
|
||||
protected static readonly ILog rfidDataLogger = LogManager.GetLogger("RfidData");
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(iPerlCommunicationForm));
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(SmartCommunicationForm));
|
||||
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IperlHead iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
internal static int ReadRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
for (int i = 0; i < cfg.MaxCommRetries; i++)
|
||||
for (int i = 0; i < cfgIPerl.MaxCommRetries; i++)
|
||||
{
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} Start {i} reading: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},{offset}, {length}... timeout {cfg.CommTimeout})");
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} Start {i} reading: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},{offset}, {length}... timeout {cfgIPerl.CommTimeout})");
|
||||
using (RfidLogic writer = new RfidLogic($"COM{iperlHead.RfidComPortNr}"))
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] response = writer.ReadRequest((byte)messageID, offset, length, cfg.CommTimeout);
|
||||
byte[] response = writer.ReadRequest((byte)messageID, offset, length, cfgIPerl.CommTimeout);
|
||||
string hexString = RfidHelper.ConvertByteArrayToHexString(response);
|
||||
string swapHexString = RfidHelper.SwapHexcode(hexString);
|
||||
string decString = RfidHelper.HexLiteral2Unsigned(RfidHelper.SwapHexcode(hexString)).ToString();
|
||||
@@ -56,42 +57,42 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
if (/*RfidHelper.IsPassThrough(messageID)*/ messageID == MessageID.ASICRegisterReadTest || messageID == MessageID.RadioPassthrough)
|
||||
{
|
||||
rfidDataLogger.Info($"COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...) {(i > 0 ? "<- Error: Invalid Pass-Through data." : "<- Info: Wait for Pass-Through data.")}");
|
||||
Thread.Sleep(cfg.PassThroughWaitTime);
|
||||
Thread.Sleep(cfgIPerl.PassThroughWaitTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
Thread.Sleep(cfg.WaitTimeAfterFailure);
|
||||
Thread.Sleep(cfgIPerl.WaitTimeAfterFailure);
|
||||
}
|
||||
}
|
||||
catch (RfidValidationException)
|
||||
{
|
||||
Thread.Sleep(cfg.WaitTimeAfterFailure);
|
||||
Thread.Sleep(cfgIPerl.WaitTimeAfterFailure);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
rfidDataLogger.Error($"COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...) {ex.Message}");
|
||||
Thread.Sleep(cfg.WaitTimeAfterFailure);
|
||||
Thread.Sleep(cfgIPerl.WaitTimeAfterFailure);
|
||||
}
|
||||
}
|
||||
}
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} reading failed after {cfg.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...)");
|
||||
log.Error($"{iperlHead.CommInterface} reading failed after {cfg.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...)");
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} reading failed after {cfgIPerl.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...)");
|
||||
log.Error($"{iperlHead.CommInterface} reading failed after {cfgIPerl.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: ReadRequestPort ({messageID},...)");
|
||||
buffer = new byte[length];
|
||||
return 3;
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IperlHead iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
internal static int WriteRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
{
|
||||
RfidLogic writer = new RfidLogic($"COM{iperlHead.RfidComPortNr}");
|
||||
string payload = RfidHelper.ConvertByteArrayToHexString(buffer);
|
||||
|
||||
for (var i = 0; i < cfg.MaxCommRetries; i++)
|
||||
for (var i = 0; i < cfgIPerl.MaxCommRetries; i++)
|
||||
{
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} Start {i} writting: COM{iperlHead.RfidComPortNr}: WriteRequest ({messageID},{offset}, {length}, {payload}... timeout {cfg.CommTimeout})");
|
||||
rfidDataLogger.Error($"{iperlHead.CommInterface} Start {i} writting: COM{iperlHead.RfidComPortNr}: WriteRequest ({messageID},{offset}, {length}, {payload}... timeout {cfgIPerl.CommTimeout})");
|
||||
try
|
||||
{
|
||||
if (writer.ClosePort()) writer.OpenPort();
|
||||
writer.WriteRequest((byte)messageID, offset, length, buffer, cfg.CommTimeout, false);
|
||||
writer.WriteRequest((byte)messageID, offset, length, buffer, cfgIPerl.CommTimeout, false);
|
||||
writer.ClosePort();
|
||||
rfidDataLogger.InfoFormat($"{iperlHead.Name}({iperlHead.SerialNr},COM{iperlHead.RfidComPortNr}): WriteRequestPort({messageID}, {offset}, {length}, {payload})");
|
||||
return 0;
|
||||
@@ -105,7 +106,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
else
|
||||
{
|
||||
rfidDataLogger.Error($"COM{iperlHead.RfidComPortNr}: Error: {ex.Message}");
|
||||
Thread.Sleep(cfg.WaitTimeAfterFailure);
|
||||
Thread.Sleep(cfgIPerl.WaitTimeAfterFailure);
|
||||
if (i > 1)
|
||||
{
|
||||
rfidDataLogger.Error($"COM{iperlHead.RfidComPortNr}: Reopen the com port.");
|
||||
@@ -115,8 +116,8 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
}
|
||||
}
|
||||
writer.ClosePort();
|
||||
rfidDataLogger.Error($"RFID writing failed after {cfg.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: WriteRequestPort ({messageID},...) {System.Text.Encoding.UTF8.GetString(buffer)}");
|
||||
log.Error($"RFID writing failed after {cfg.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: WriteRequestPort ({messageID},...) {System.Text.Encoding.UTF8.GetString(buffer)}");
|
||||
rfidDataLogger.Error($"RFID writing failed after {cfgIPerl.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: WriteRequestPort ({messageID},...) {System.Text.Encoding.UTF8.GetString(buffer)}");
|
||||
log.Error($"RFID writing failed after {cfgIPerl.MaxCommRetries} retries: COM{iperlHead.RfidComPortNr}: WriteRequestPort ({messageID},...) {System.Text.Encoding.UTF8.GetString(buffer)}");
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
{
|
||||
const int Q2CorrFactorsAddr = 0x1878;
|
||||
|
||||
internal static int ReadRequest(TestMethodCfg cfg, IperlHead iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
internal static int ReadRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MessageID messageID, int offset, int length, out byte[] buffer)
|
||||
{
|
||||
byte[] configurationBuffer = new byte[ConfigStruct.Length] { 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
byte[] calibrationBuffer = new byte[CalibrationStructV4.Length] { 3, 0, 150, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 150, 10 };
|
||||
@@ -34,7 +34,7 @@ namespace TBF.Rig.TestMethods.iPerlCommunication.iPerlHead
|
||||
return iperlHead.Name.Equals("iPerl13") ? 2 : 0; /// Simulates an error on position 13
|
||||
}
|
||||
|
||||
internal static int WriteRequest(TestMethodCfg cfg, IperlHead iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
internal static int WriteRequest(TestMethodCfg_IPerl cfgIPerl, IperlHead iperlHead, MessageID messageID, int offset, int length, byte[] buffer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -36,12 +36,26 @@ namespace TBF.Rig
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> To be overridden </summary>
|
||||
public bool ValidateParam(int ix, string strValue, out string message)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public CfgUpdateFlags UpdateParam(int ix, string strValue)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary> To be overridden </summary>
|
||||
public virtual ICollection<string> ParamValues(int ix)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public string Activity { get; set; }
|
||||
public bool SimultWithPrevious { get; set; }
|
||||
public bool SimultWithNext { get; set; }
|
||||
|
||||
/// <summary> To be overridden </summary>
|
||||
public virtual void UpdateFromDbEntity(ComponentTest dbEntity)
|
||||
{
|
||||
@@ -93,6 +107,11 @@ namespace TBF.Rig
|
||||
return true;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public virtual string ParamName(int i) { return string.Empty; }
|
||||
|
||||
public virtual int ParamsCount() { return 0; }
|
||||
|
||||
+2
-1
@@ -2,9 +2,10 @@
|
||||
/// Copyright (c) 2015 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
|
||||
using System;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public class AllCompletedEventArgs : EventArgs
|
||||
{
|
||||
+2
-1
@@ -2,10 +2,11 @@
|
||||
/// Copyright (c) 2015-2019 Sensus Metering Systems
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
|
||||
using System;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public class CommCompletedEventArgs : EventArgs
|
||||
{
|
||||
+451
-1201
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,6 +1,6 @@
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public enum ConditionID
|
||||
public enum ConditionId
|
||||
{
|
||||
A,
|
||||
B,
|
||||
@@ -11,15 +11,15 @@ namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
public abstract class ISequenceConditionOp
|
||||
{
|
||||
const string ConditionNameFmt = "iPERL communication milestone {0}";
|
||||
public static string GetConditionNameFmt(ConditionID id)
|
||||
public static string GetConditionNameFmt(ConditionId id)
|
||||
{
|
||||
return string.Format(ConditionNameFmt, id);
|
||||
}
|
||||
|
||||
public ConditionID id;
|
||||
public ConditionId id;
|
||||
public ISmartTestMethod testMethodComponent;
|
||||
|
||||
public ISequenceConditionOp(ISmartTestMethod testMethodComponent, ConditionID id)
|
||||
public ISequenceConditionOp(ISmartTestMethod testMethodComponent, ConditionId id)
|
||||
{
|
||||
this.testMethodComponent = testMethodComponent;
|
||||
this.id = id;
|
||||
+1
-3
@@ -1,8 +1,6 @@
|
||||
|
||||
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public interface ISmartTestMethod
|
||||
{
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.RegisterReaders.iPerlReaderUNI;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public interface ISmartWrapper
|
||||
{
|
||||
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -5,9 +5,9 @@
|
||||
|
||||
using TBF.Boxes;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
partial class iPerlCommunicationForm
|
||||
partial class SmartCommunicationForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@@ -35,7 +35,7 @@ namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(iPerlCommunicationForm));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SmartCommunicationForm));
|
||||
this.wmTextBox2 = new System.Windows.Forms.TextBox();
|
||||
this.wmLabel2 = new System.Windows.Forms.Label();
|
||||
this.wmLabel1 = new System.Windows.Forms.Label();
|
||||
@@ -2588,11 +2588,11 @@ namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "iPerlCommunicationForm";
|
||||
this.Name = "SmartCommunicationForm";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Text = "iPerl Communication";
|
||||
this.TopMost = true;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.iPerlCommunicationForm_FormClosing);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SmartCommunicationForm_FormClosing);
|
||||
this.Load += new System.EventHandler(this.iPerlCommunicationForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox48)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox47)).EndInit();
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public abstract class SmartComponentBase : ComponentBase, ISmartTestMethod
|
||||
{
|
||||
@@ -0,0 +1,27 @@
|
||||
using Config.Entities;
|
||||
using Results.Entities;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common
|
||||
{
|
||||
public interface ICorrections
|
||||
{
|
||||
|
||||
|
||||
public bool WorkerActivity(string currentActivity, IntIPerlReader iHead, WaterMeter wm, Test currentTest,
|
||||
int wmNr0, ref CommErr error, ref string resultStr, bool[] ckbState, int threadID, int currentActivityStep);
|
||||
|
||||
public void ProcessResultOfWorkerActivity(
|
||||
int iMultiTestParamsItem,
|
||||
string currentActivity,
|
||||
int currentGroup,
|
||||
IntIPerlReader iHead,
|
||||
WaterMeter wm,
|
||||
int wmNr0,
|
||||
CommErr error,
|
||||
string resultStr,
|
||||
bool[] ckbState,
|
||||
int threadID
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
+3
-4
@@ -1,11 +1,8 @@
|
||||
using System.IO;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Rig.GenericDevices;
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication.common
|
||||
{
|
||||
public interface IntIPerlReader
|
||||
{
|
||||
@@ -17,6 +14,8 @@ namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication.common
|
||||
public CommunicationInterface CommInterface { get; }
|
||||
public int RfidComPortNr { get; }
|
||||
|
||||
public bool CommFailed { get; set; }
|
||||
|
||||
//Methods ...
|
||||
public void ResetNfcInterface(bool? nfc_on = null);
|
||||
public string ReadOptoData();
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public static class iPerlCommunicationConstants
|
||||
{
|
||||
+5
-6
@@ -1,17 +1,16 @@
|
||||
///
|
||||
/// Copyright (c) 2015-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.Generic;
|
||||
using TBF.Resources;
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public class iPerlCommunicationParams : TestParamsBase, IParamsProvider, ITestParams
|
||||
{
|
||||
@@ -93,7 +92,7 @@ namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
retVal.Add(string.Format("{0} if enabled", iPerlCommunicationConstants.ReadConfigurationStr));
|
||||
retVal.Add(string.Format("{0} 80", iPerlCommunicationConstants.SetTestModeStr));
|
||||
retVal.Add("iPerl_check prevWorkStep direction q2factors");
|
||||
for (ConditionID id = ConditionID.A; id < ConditionID.Count; id++)
|
||||
for (ConditionId id = ConditionId.A; id < ConditionId.Count; id++)
|
||||
{
|
||||
retVal.Add(ISequenceConditionOp.GetConditionNameFmt(id));
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
using TBF.Rig.RegisterReaders.CommonRR;
|
||||
using static Sensus.iPerl.NfcHandler.MCI_Protocol;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public class iPerlDataWrite
|
||||
{
|
||||
+1
-5
@@ -1,12 +1,8 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace TBF.Rig.Uni.SharedDialogs.iPerlCommunication
|
||||
namespace TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication
|
||||
{
|
||||
public enum Q2CorrType
|
||||
{
|
||||
+31
-23
@@ -1216,14 +1216,23 @@
|
||||
<DependentUpon>WriterCfgCtrl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\Enums.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IArg.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\CalibrationStruct.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\CalibrationStructV4.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\CommCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\ConfigStruct.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\IPerlCommunicationsTimeOut.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\NfcServices.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\OptoReceivedEventArgs.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\RfidServices.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\communication\SimulationServices.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\ICombiHeadParams.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\ICommunicationTimeOuts.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\IiPerlTestMethodCfg.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\ISerialPortData.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\ITestMethodCfg.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\IWebService.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\CommonRR\IPerl\SerialPortData.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\FrequencyMeterFromUniCB\FrequencyRegisterReader.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\FrequencyMeterFromUniCB\Factory.cs" />
|
||||
<Compile Include="Rig\RegisterReaders\FrequencyMeterFromUniCB\RRCfg.cs" />
|
||||
@@ -1502,10 +1511,10 @@
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\CommCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.cs">
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationFormTestMethod.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.designer.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationFormTestMethod.designer.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationParams.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationSeq.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\iPerlDataWrite.cs" />
|
||||
@@ -1535,7 +1544,7 @@
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\OpticalHeadTest.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\SequenceConditionOp.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethod.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfg.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfg_IPerl.cs" />
|
||||
<Compile Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
@@ -1990,23 +1999,25 @@
|
||||
<Compile Include="Rig\Uni\RegValve\Factory.cs" />
|
||||
<Compile Include="Rig\Uni\RegValve\SetFlowOp.cs" />
|
||||
<Compile Include="Rig\Uni\RegValve\SetRegValvePositionOp.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\AllCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\common\IntIPerlReader.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\SmartComponentBase.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\CommCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlCommunicationConstants.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlCommunicationForm.cs">
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\AllCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\common\ICorrections.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\common\IntIPerlReader.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\IPerlCorrections.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\SmartComponentBase.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\CommCompletedEventArgs.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\iPerlCommunicationConstants.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\SmartCommunicationForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlCommunicationForm.designer.cs">
|
||||
<DependentUpon>iPerlCommunicationForm.cs</DependentUpon>
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\SmartCommunicationForm.designer.cs">
|
||||
<DependentUpon>SmartCommunicationForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlCommunicationParams.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlDataWrite.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlEnums.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\ISequenceConditionOp.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\ISmartTestMethod.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\iPerlCommunication\ISmartWrapper.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\iPerlCommunicationParams.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\iPerlDataWrite.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\iPerlEnums.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\ISequenceConditionOp.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\ISmartTestMethod.cs" />
|
||||
<Compile Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\ISmartWrapper.cs" />
|
||||
<Compile Include="Rig\Various\CoverTest\CoverTest.cs" />
|
||||
<Compile Include="Rig\Various\CoverTest\CoverTestCfg.cs" />
|
||||
<Compile Include="Rig\Various\CoverTest\CoverTestForm.cs">
|
||||
@@ -3315,7 +3326,7 @@
|
||||
<EmbeddedResource Include="Rig\TestMethods\GrabImage\GrabImageCfgCtrl.resx">
|
||||
<DependentUpon>GrabImageCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationForm.resx" />
|
||||
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlCommunicationFormTestMethod.resx" />
|
||||
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadCfgCtrl.resx" />
|
||||
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\iPerlHead\IperlHeadTestCtrl.resx" />
|
||||
<EmbeddedResource Include="Rig\TestMethods\iPerlCommunication\TestMethodCfgCtrl.resx" />
|
||||
@@ -3406,8 +3417,8 @@
|
||||
<EmbeddedResource Include="Rig\Uni\RegValve\RegValveCfgCtrl.resx">
|
||||
<DependentUpon>RegValveCfgCtrl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Rig\Uni\SharedDialogs\iPerlCommunication\iPerlCommunicationForm.resx">
|
||||
<DependentUpon>iPerlCommunicationForm.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Rig\Uni\SharedDialogs\SmartMetersCommunication\SmartCommunicationForm.resx">
|
||||
<DependentUpon>SmartCommunicationForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Rig\Various\CoverTest\CoverTestForm.resx">
|
||||
<DependentUpon>CoverTestForm.cs</DependentUpon>
|
||||
@@ -3928,9 +3939,6 @@
|
||||
<Name>Results</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Rig\RegisterReaders\CommonRR\IPerl\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ using TBF.UI.Shared;
|
||||
using AppDiagnostic;
|
||||
using SharedComponents;
|
||||
using System.Diagnostics;
|
||||
using TBF.Rig.Uni.SharedDialogs.SmartMetersCommunication;
|
||||
|
||||
namespace TBF.UI
|
||||
{
|
||||
@@ -1194,7 +1195,7 @@ namespace TBF.UI
|
||||
|
||||
private void optoHeadsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
new Rig.TestMethods.iPerlCommunication.iPerlCommunicationForm(true).ShowDialog();
|
||||
new SmartCommunicationForm(true).ShowDialog();
|
||||
}
|
||||
|
||||
private void statusStrip1_DoubleClick(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user