From 7167334c0e89dd84827d59e726123d14776e3a09 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 16 六月 2020 11:14:13 +0800 Subject: [PATCH] 2020-06-16-1 --- HDL_ON/DriverLayer/Target.cs | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/HDL_ON/DriverLayer/Target.cs b/HDL_ON/DriverLayer/Target.cs index 5f2c41f..f374e38 100644 --- a/HDL_ON/DriverLayer/Target.cs +++ b/HDL_ON/DriverLayer/Target.cs @@ -14,6 +14,10 @@ /// 发送的目标 /// </summary> public System.Net.IPEndPoint IPEndPoint; + /// <summary> + /// 设备类型 + /// </summary> + int deviceType = 58037; public Target() { } @@ -72,8 +76,8 @@ bytes [17] = 252; //源子网地址 0-254 bytes [18] = 252;//源设备地址 0-254 //源设备类型2位 - bytes [19] = (byte)(0xFF); - bytes [20] = (byte)(0xFC); + bytes [19] = (byte)(deviceType/256); + bytes [20] = (byte)(deviceType%256); //操作码 bytes [21] = (byte)((int)this.Command / 256); bytes [22] = (byte)((int)this.Command % 256); @@ -120,8 +124,8 @@ bytes [17] = 252; //源子网地址 0-254 bytes [18] = 252;//源设备地址 0-254 //源设备类型2位 - bytes [19] = (byte)(0xFF); - bytes [20] = (byte)(0xFC); + bytes [19] = (byte)(deviceType/256); + bytes [20] = (byte)(deviceType%256); //操作码 bytes [21] = (byte)((int)this.Command / 256); bytes [22] = (byte)((int)this.Command % 256); -- Gitblit v1.8.0