通讯逻辑修改
This commit is contained in:
commit
e4e7853624
3 files changed
+10
-8
No files matched your search
@@ -10,6 +10,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@@ -53,6 +54,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
|||||||
drEmployee["State"] = "801";
|
drEmployee["State"] = "801";
|
||||||
drEmployee.EndEdit();
|
drEmployee.EndEdit();
|
||||||
drEmployee.AcceptChanges();
|
drEmployee.AcceptChanges();
|
||||||
|
|
||||||
LogGing.LogGingDATA("[IP='" + client.IP + "' AND port='" + client.Port + "']=Link_OK");
|
LogGing.LogGingDATA("[IP='" + client.IP + "' AND port='" + client.Port + "']=Link_OK");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -386,13 +388,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
|||||||
.SetRemoteIPHost(ip + ":" + port)
|
.SetRemoteIPHost(ip + ":" + port)
|
||||||
.ConfigurePlugins(a =>
|
.ConfigurePlugins(a =>
|
||||||
{
|
{
|
||||||
a.UseCheckClear()
|
|
||||||
.SetCheckClearType(CheckClearType.All)
|
|
||||||
.SetTick(TimeSpan.FromSeconds(5))
|
|
||||||
.SetOnClose((c, t) =>
|
|
||||||
{
|
|
||||||
c.TryShutdown();
|
|
||||||
});
|
|
||||||
// a.UseTcpReconnection();//触发型重连
|
// a.UseTcpReconnection();//触发型重连
|
||||||
})
|
})
|
||||||
.ConfigureContainer(a =>
|
.ConfigureContainer(a =>
|
||||||
|
|||||||
@@ -376,6 +376,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
dat_821.Add("P4", P4);
|
dat_821.Add("P4", P4);
|
||||||
dat_821.Add("P5", P5);
|
dat_821.Add("P5", P5);
|
||||||
|
|
||||||
|
DataRow row = MainWindowViewModel.dt_TP.Select("Step='" + ID + "'").First();
|
||||||
|
row.BeginEdit();
|
||||||
|
row["RUN"] = 2;
|
||||||
|
row.EndEdit();
|
||||||
|
row.AcceptChanges();
|
||||||
|
|
||||||
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
DataRow drEmployee = MainWindowViewModel.Machines.Select("NAME='" + machine + "'").First();
|
||||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
|
|||||||
@@ -329,7 +329,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
|||||||
stringQueue.Enqueue(new QueueString
|
stringQueue.Enqueue(new QueueString
|
||||||
{
|
{
|
||||||
ID = i,
|
ID = i,
|
||||||
DAT = "SC800:SCCM[" + MachiensTcpClient[i].IP + ";" + MachiensTcpClient[i].Port + "]"
|
DAT = "SC800:SCCM[" + Selet_Machines(Machines, "IP", "ID='" + i + "'") + ";" +
|
||||||
|
Selet_Machines(Machines, "Prot", "ID='" + i + "'") + "]"
|
||||||
});//信息插入队列
|
});//信息插入队列
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user