|
@@ -7,6 +7,7 @@ using NewLife;
|
|
using NewLife.Data;
|
|
using NewLife.Data;
|
|
using NewLife.Log;
|
|
using NewLife.Log;
|
|
using NewLife.Net;
|
|
using NewLife.Net;
|
|
|
|
+using NewLife.Reflection;
|
|
using NewLife.Serialization;
|
|
using NewLife.Serialization;
|
|
using OPC_Client;
|
|
using OPC_Client;
|
|
|
|
|
|
@@ -29,6 +30,7 @@ namespace ScadaTcpService
|
|
};
|
|
};
|
|
_tcpServer.Start();
|
|
_tcpServer.Start();
|
|
CreateScada();
|
|
CreateScada();
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -67,7 +69,7 @@ namespace ScadaTcpService
|
|
.ToList();
|
|
.ToList();
|
|
var sendData = new
|
|
var sendData = new
|
|
{
|
|
{
|
|
- cmd = "getAllData",
|
|
|
|
|
|
+ cmd = "sendData",
|
|
data = dataList
|
|
data = dataList
|
|
};
|
|
};
|
|
if (_tcpServer.SessionCount >= 1)
|
|
if (_tcpServer.SessionCount >= 1)
|
|
@@ -116,7 +118,7 @@ namespace ScadaTcpService
|
|
c.id,
|
|
c.id,
|
|
c.quality,
|
|
c.quality,
|
|
c.DateTime1
|
|
c.DateTime1
|
|
- })
|
|
|
|
|
|
+ }).ToList()
|
|
};
|
|
};
|
|
Send(new Packet(data.ToJson().GetBytes()));
|
|
Send(new Packet(data.ToJson().GetBytes()));
|
|
base.OnConnected();
|
|
base.OnConnected();
|