Merge branch 'master' of http://114.55.171.231:3000/lxd/DockTool
This commit is contained in:
commit
30d083e1ab
@ -3026,12 +3026,8 @@ namespace FlyDockTool
|
|||||||
IPAddress ipAddress = IPAddress.Parse(tcp_ip);
|
IPAddress ipAddress = IPAddress.Parse(tcp_ip);
|
||||||
// IPAddress ipAddress = IPAddress.Any;
|
// IPAddress ipAddress = IPAddress.Any;
|
||||||
//// 创建一个监听Socket
|
//// 创建一个监听Socket
|
||||||
if (listener == null)
|
clientSocket = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||||
{
|
clientSocket.Connect(ipAddress, int.Parse(tcp_port));
|
||||||
listener = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
|
||||||
listener.Bind(new IPEndPoint(ipAddress, int.Parse(tcp_port)));
|
|
||||||
listener.Listen(10000);
|
|
||||||
}
|
|
||||||
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
|
_tcpResult.Change(0, 10);//开始tcp数据接收,10毫秒频率
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3261,7 +3257,16 @@ namespace FlyDockTool
|
|||||||
}
|
}
|
||||||
if (apiOptions.CurrentDevice == "BC-5120")//BC-5120
|
if (apiOptions.CurrentDevice == "BC-5120")//BC-5120
|
||||||
{
|
{
|
||||||
_tResult.Change(5000, 5000);// 数据处理:延迟5秒开始 5秒计时
|
if (tempData.Contains(@"OBR|1||Background|"))
|
||||||
|
{
|
||||||
|
tempData = string.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string tempData_temp = tempData;
|
||||||
|
tempData = string.Empty;
|
||||||
|
deviceAnalysisOption(tempData_temp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
|
if (apiOptions.CurrentDevice == "BS-460")//生化BS-460
|
||||||
{
|
{
|
||||||
@ -3324,7 +3329,9 @@ namespace FlyDockTool
|
|||||||
void tcpResultTick()
|
void tcpResultTick()
|
||||||
{
|
{
|
||||||
byte[] data = new byte[40048];
|
byte[] data = new byte[40048];
|
||||||
if (apiOptions.CurrentDevice != "BC-5130")//如果设备是 apiOptions.CurrentDevice=== "BC-5130" 这个设备在 启动时就已经主动连上了 "BC-5130" 设备,这里就无需初始化连接 直接跳过
|
//如果设备是BC-5130这类的,则表示这个设备在启动时就已经主动连上了。BC-5130设备,这里就无需初始化连接直接跳过
|
||||||
|
List<string> ConnectDevices = new List<string>(new string[] { "BC-5130", "BC-5120" });
|
||||||
|
if (!ConnectDevices.Contains(apiOptions.CurrentDevice))
|
||||||
{
|
{
|
||||||
if (clientSocket == null)
|
if (clientSocket == null)
|
||||||
clientSocket = listener.Accept(); //一旦接受连接,创建一个客户端
|
clientSocket = listener.Accept(); //一旦接受连接,创建一个客户端
|
||||||
|
Loading…
Reference in New Issue
Block a user