增加打印测试软件连接信息

master
lhiven 12 months ago
parent 731bbe0998
commit bcd3b391f4

@ -36,10 +36,10 @@ namespace Rs.MotionPlat.Commom
SysConfigParam.Init();
int errNum = 0;
TestFixtureManager.Instance.StartLister();
//if (GlobalVar.IsSimTest)
//{
// SimulateTesterManager.Instance.Init();
//}
if (GlobalVar.IsSimTest)
{
SimulateTesterManager.Instance.Init();
}
//Task.Run(() => {
if (!GlobalVar.VirtualAxis)
{

@ -98,6 +98,8 @@ namespace Rs.MotionPlat.Entitys
{
this.PassCount = 0;
this.TotalCount = 0;
this.LastCT = 0;
this.Yield = 0;
}
private int _Index;
@ -848,6 +850,7 @@ namespace Rs.MotionPlat.Entitys
ThreadPool.QueueUserWorkItem((obj) => {
List<byte> registData=new List<byte>();
Socket soct=(Socket)obj;
IPEndPoint ep = ((IPEndPoint)soct.RemoteEndPoint);
byte[] buffer = new byte[1024 * 10];
bool stop = false;
while (!stop)
@ -863,10 +866,13 @@ namespace Rs.MotionPlat.Entitys
}
else
{
string content=Encoding.ASCII.GetString(registData.ToArray());
MessageQueue.Instance.Insert($">>> ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{content}");
string[] items = content.TrimEnd(new char[] { '$' }).Split('#');
string reg = "Register#1$";
int sendLen = clientSocket.Send(Encoding.ASCII.GetBytes(reg));
MessageQueue.Instance.Insert($"<<< ip:{ep.Address.ToString()},port:{ep.Port.ToString()},{reg}");
TestFixture tf = GetTestFixture(int.Parse(items[2]));
tf.SetSocket(soct);
tf.AddLog(" <<< " + content);
@ -885,6 +891,7 @@ namespace Rs.MotionPlat.Entitys
}
}, clientSocket);
Thread.Sleep(10);
}
});
}

Loading…
Cancel
Save