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