Check done on startup whether all RFID serial ports are free, version 1.5.105
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
/// Author: Milan Hanajík
|
||||
///
|
||||
using System;
|
||||
using System.IO.Ports;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using TBF.BenchControl;
|
||||
@@ -35,6 +36,27 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (DebugLevel == Entities.DebugMode.Normal)
|
||||
{
|
||||
/// Check whether RFID serial ports are free
|
||||
SerialPort rfidPort;
|
||||
rfidPort = new SerialPort(string.Format("COM{0}", testMethodCfg.RfidPortNrBoard1), 9600, Parity.None, 8, StopBits.One);
|
||||
rfidPort.Open();
|
||||
rfidPort.Close();
|
||||
|
||||
rfidPort = new SerialPort(string.Format("COM{0}", testMethodCfg.RfidPortNrBoard2), 9600, Parity.None, 8, StopBits.One);
|
||||
rfidPort.Open();
|
||||
rfidPort.Close();
|
||||
|
||||
rfidPort = new SerialPort(string.Format("COM{0}", testMethodCfg.RfidPortNrBoard3), 9600, Parity.None, 8, StopBits.One);
|
||||
rfidPort.Open();
|
||||
rfidPort.Close();
|
||||
|
||||
rfidPort = new SerialPort(string.Format("COM{0}", testMethodCfg.RfidPortNrBoard4), 9600, Parity.None, 8, StopBits.One);
|
||||
rfidPort.Open();
|
||||
rfidPort.Close();
|
||||
}
|
||||
|
||||
Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
rfidDataLogger.Fatal("------------------------------------------------------------------------");
|
||||
rfidDataLogger.FatalFormat("Test Bench Framework ver. {0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
|
||||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.5.103.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.103.1")]
|
||||
[assembly: AssemblyVersion("1.5.105.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.105.1")]
|
||||
|
||||
Reference in New Issue
Block a user