This commit is contained in:
sc committed 2024-12-09 23:37:40 +08:00
commit 915aedd87b
5 files changed
+35 -25

No files matched your search

+10 -6
View File
@@ -163,12 +163,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
{
for (int i = 0; i < Machinesdata_Count; i++)
{
MachiensTcpClient[i] = new TcpClient();
DataRow dt = machinesdata[i];
Updata_Machines(Machines, "State", Convert.ToInt16(dt["ID"]), "800");
_ = AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
, Selet_Machines(Machines, "IP", Convert.ToInt16(dt["ID"])).ToString()
, Selet_Machines(Machines, "PORT", Convert.ToInt16(dt["ID"])).ToString());
if (Selet_Machines(Machines, "State", i).ToString() == "800")
{
MachiensTcpClient[i] = new TcpClient();
DataRow dt = machinesdata[i];
_ = AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
, Selet_Machines(Machines, "IP", Convert.ToInt16(dt["ID"])).ToString()
, Selet_Machines(Machines, "PORT", Convert.ToInt16(dt["ID"])).ToString());
}
}
}
@@ -447,6 +449,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
return lst;
}
//通讯队列
public static UInt32 RX=0;
public static UInt32 TX=0;
public class QueueString
{
public int ID { get; set; }