From bcd3b391f470e178465ba1011002cc7cb19673eb Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Sun, 23 Jun 2024 18:33:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=BD=AF=E4=BB=B6=E8=BF=9E=E6=8E=A5=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Commom/Ops.cs | 8 ++++---- Rs.DeweyTester/Entitys/TestFixtureManager.cs | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Rs.DeweyTester/Commom/Ops.cs b/Rs.DeweyTester/Commom/Ops.cs index 3f312fb..3c14164 100644 --- a/Rs.DeweyTester/Commom/Ops.cs +++ b/Rs.DeweyTester/Commom/Ops.cs @@ -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) { diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs index f9cf515..f323816 100644 --- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs +++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs @@ -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 registData=new List(); 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); } }); }