HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-05-11 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4
ZigbeeApp/Shared/Phone/ZigBee/Device/BindObj.cs
@@ -28,8 +28,7 @@
                    var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -43,7 +42,6 @@
                    }
                    else if (topic == gatewayID + "/" + "Bind/SetBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.getGatewayBaseInfo.gwID };
                        var tempResult = Newtonsoft.Json.JsonConvert.DeserializeObject<AddedDeviceBindResponseData>(jobject["Data"].ToString());
                        if (tempResult == null)
                        {
@@ -117,22 +115,9 @@
            });
        }
        /// <summary>
        /// 绑定设备信息,网关反馈信息
        /// </summary>
        public AddedDeviceBindResponseAllData addedDeviceBindResponseAllData;
        [System.Serializable]
        public class AddedDeviceBindResponseAllData
        public class AddedDeviceBindResponseAllData : ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 网关直接反馈绑定设备信息
            /// </summary>
@@ -143,10 +128,6 @@
            public AddBindResultResponseData addBindResultResponseData;
        }
        /// <summary>
        /// 绑定设备信息
        /// </summary>
        public AddedDeviceBindResponseData addedDeviceBindResponseData;
        [System.Serializable]
        public class AddedDeviceBindResponseData
        {
@@ -218,7 +199,6 @@
        /// <summary>
        /// 绑定设备的数据
        /// </summary>
        public AddBindData addBindData;
        [System.Serializable]
        public class AddBindData
        {
@@ -294,8 +274,7 @@
        //            if (topic == gatewayID + "/" + "Error_Respon")
        //            {
        //                var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
        //                if (temp == null)
        //                {
@@ -309,7 +288,6 @@
        //            //场景移除
        //            if (topic == gatewayID + "/" + "Bind/RemoveBind_Respon")
        //            {
        //                var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
        //                var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelDeviceBindResponseData>(jobject["Data"].ToString());
        //                if (tempData == null)
@@ -325,7 +303,6 @@
        //            //设备移除
        //            if (topic == gatewayID + "/" + "Bind/RemoveBindResult")
        //            {
        //                var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
        //                var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveBindResultResponseData>(jobject["Data"].ToString());
        //                if (tempData != null)
@@ -413,8 +390,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -429,7 +405,6 @@
                    if (topic == gatewayID + "/" + "Bind/RemoveBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelDeviceBindResponseData>(jobject["Data"].ToString());
                        if (tempData == null)
@@ -446,7 +421,6 @@
                    if (topic == gatewayID + "/" + "Bind/RemoveBindResult")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveBindResultResponseData>(jobject["Data"].ToString());
                        if (tempData != null)
@@ -543,22 +517,9 @@
        /// <summary>
        ///解除绑定数据,网关反馈信息
        /// </summary>
        public DelDeviceBindResponseAllData delDeviceBindResponseAllData;
        /// <summary>
        ///解除绑定数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class DelDeviceBindResponseAllData
        public class DelDeviceBindResponseAllData : ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 解除绑定数据信息
            /// </summary>
@@ -570,10 +531,6 @@
            public RemoveBindResultResponseData removeBindResultResponseData;
        }
        /// <summary>
        /// 解除绑定数据
        /// </summary>
        public DelDeviceBindResponseData delDeviceBindResponseData;
        /// <summary>
        /// 解除绑定数据
        /// </summary>
@@ -634,10 +591,6 @@
            public string DeviceName;
        }
        /// <summary>
        /// 解除绑定数据
        /// </summary>
        public DelDeviceBindData delDeviceBindData;
        /// <summary>
        /// 解除绑定数据
        /// </summary>
@@ -713,8 +666,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -728,7 +680,6 @@
                    if (topic == gatewayID + "/" + "Bind/GetDeviceBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetDeviceBindResponseData>(jobject["Data"].ToString());
                        //var tempBindList = Newtonsoft.Json.Linq.JArray.Parse(jobject["Data"]["BindList"].ToString());
                        if (tempData == null)
@@ -775,19 +726,9 @@
        /// <summary>
        ///获取所有绑定数据,网关反馈信息
        /// </summary>
        public GetDeviceBindResponseAllData getAllBindResponseAllData;
        [System.Serializable]
        public class GetDeviceBindResponseAllData
        public class GetDeviceBindResponseAllData : ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 控制设备绑定的设备列表回复数据
            /// </summary>
@@ -797,7 +738,6 @@
        /// <summary>
        /// 获取所有绑定回复的数据
        /// </summary>
        public GetDeviceBindResponseData getAllBindResponseData;
        [System.Serializable]
        public class GetDeviceBindResponseData
        {
@@ -870,8 +810,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -885,7 +824,6 @@
                    if (topic == gatewayID + "/" + "Bind/GetDeviceLocalBind_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetDeviceLocalBindResponseData>(jobject["Data"].ToString());
                        if (tempData == null)
                        {
@@ -932,19 +870,9 @@
        /// <summary>
        ///从节点设备本地记录读取绑定列表信息回复的数据,网关反馈信息
        /// </summary>
        public GetDeviceLocalBindResponseAllData getDeviceLocalBindResponseAllData;
        [System.Serializable]
        public class GetDeviceLocalBindResponseAllData
        public class GetDeviceLocalBindResponseAllData : ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 从节点设备本地记录读取绑定列表信息回复的数据
            /// </summary>
@@ -954,7 +882,6 @@
        /// <summary>
        /// 从节点设备本地记录读取绑定列表信息回复的数据
        /// </summary>
        public GetDeviceLocalBindResponseData getDeviceLocalBindResponseData;
        [System.Serializable]
        public class GetDeviceLocalBindResponseData
        {
@@ -1035,8 +962,7 @@
                    if (topic == gatewayID + "/" + "Error_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZbGateway.ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -1050,7 +976,6 @@
                    if (topic == gatewayID + "/" + "Bind/ClearBindInfo_Respon")
                    {
                        var gatewayTemp = new ZbGateway() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = Gateway.getGatewayBaseInfo.gwID };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<ClearBindInfoResponseData>(jobject["Data"].ToString());
                        if (tempData == null)
                        {
@@ -1097,19 +1022,9 @@
        /// <summary>
        ///删除一个控制设备所有绑定数据,网关反馈信息
        /// </summary>
        public ClearBindInfoResponseAllData clearBindInfoResponseAllData;
        [System.Serializable]
        public class ClearBindInfoResponseAllData
        public class ClearBindInfoResponseAllData : ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 控制设备绑定的设备列表回复数据
            /// </summary>
@@ -1119,7 +1034,6 @@
        /// <summary>
        /// 删除一个控制设备所有绑定信息回复的数据
        /// </summary>
        public ClearBindInfoResponseData clearBindInfoResponseData;
        [System.Serializable]
        public class ClearBindInfoResponseData
        {