黄学彪
2020-05-11 2e7e5f9af5b32cfe1fc3c6ba40bf7eb984bbd0a4
ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs
@@ -35,7 +35,8 @@
                if (mainGateway == null)
                {
                    return 3000;
                }else if (mainGateway.IsVirtual)
                }
                else if (mainGateway.IsVirtual)
                {
                    return 6000;
                }
@@ -44,29 +45,6 @@
                    return 3000;
                }
            }
        }
        /// <summary>
        /// 网关信息错误反馈
        /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
        /// </summary>
        ErrorResponData errResponData;
        /// <summary>
        /// 网关信息错误反馈
        /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
        /// </summary>
        [System.Serializable]
        public class ErrorResponData
        {
            /// <summary>
            /// Error参数含义
            ///<para>1:网关无法解析命令数据。</para>
            ///<para>2:协调器正在升级或备份/恢复数据
            ///<para>3:操作设备/组/场景不存在</para>
            ///<para>4:其他错误</para>
            ///<para>5:数据传输错误(在某次客户端向网关发送数据的过程中,网关在合理时间范围内接收客户端数据不完整导致该错误发生。如客户端向网关一次发送100个字节的数据,但网关等待接收了一秒只接收了80个字节。发生该错误,网关将主动关闭客户端连接)</para>
            /// </summary>
            public int Error;
        }
        /// <summary>
@@ -126,8 +104,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -141,8 +118,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new AdminLoginResponAllData { };
                        if (temp == null)
                        {
@@ -164,7 +140,6 @@
                    if (topic == gatewayID + "/" + "Security/AdminLogin_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (tempData == null)
                        {
@@ -224,17 +199,8 @@
        /// 管理员密码登陆返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AdminLoginResponAllData
        public class AdminLoginResponAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 返回结果Result
            /// <para>0:登陆成功</para>
@@ -277,8 +243,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -292,14 +257,13 @@
                    if (topic == gatewayID + "/" + "Security/ChangeAdminPassword_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.changeAdminPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ChangeAdminPasswordResponseData>(jobject["Data"].ToString());
                            if (security.changeAdminPasswordResponseData != null)
                            var changeAdminPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ChangeAdminPasswordResponseData>(jobject["Data"].ToString());
                            if (changeAdminPasswordResponseData != null)
                            {
                                d = new ChangeAdminPasswordResponseAllData { changeAdminPasswordResponseData = security.changeAdminPasswordResponseData };
                                d = new ChangeAdminPasswordResponseAllData { changeAdminPasswordResponseData = changeAdminPasswordResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
                        }
@@ -324,7 +288,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/ChangeAdminPassword_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4023}
@@ -367,17 +332,8 @@
        /// 修改管理员密码返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class ChangeAdminPasswordResponseAllData
        public class ChangeAdminPasswordResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 修改管理员密码返回的数据
            /// </summary>
@@ -435,8 +391,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -450,22 +405,22 @@
                    if (topic == gatewayID + "/" + "Security/CatDelayTime_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.catDelayTimeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatDelayTimeResponseData>(jobject["Data"].ToString());
                        if (security.catDelayTimeResponseData == null)
                        var catDelayTimeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatDelayTimeResponseData>(jobject["Data"].ToString());
                        if (catDelayTimeResponseData == null)
                        {
                            d = new CatDelayTimeResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new CatDelayTimeResponseAllData { catDelayTimeResponseData = security.catDelayTimeResponseData };
                            d = new CatDelayTimeResponseAllData { catDelayTimeResponseData = catDelayTimeResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/CatDelayTime_Actions 启动" + System.DateTime.Now.ToString());
                 try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4019}
@@ -501,17 +456,8 @@
        /// 查看延时时间返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class CatDelayTimeResponseAllData
        public class CatDelayTimeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看延时时间返回的数据
            /// </summary>
@@ -567,8 +513,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -583,7 +528,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new SetDelayTimeResponseAllData { };
                        if (temp == null)
                        {
@@ -607,22 +552,22 @@
                    if (topic == gatewayID + "/" + "Security/SetDelayTime_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.setDelayTimeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetDelayTimeResponseData>(jobject["Data"].ToString());
                        if (security.setDelayTimeResponseData == null)
                        var setDelayTimeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetDelayTimeResponseData>(jobject["Data"].ToString());
                        if (setDelayTimeResponseData == null)
                        {
                            d = new SetDelayTimeResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new SetDelayTimeResponseAllData { setDelayTimeResponseData = security.setDelayTimeResponseData };
                            d = new SetDelayTimeResponseAllData { setDelayTimeResponseData = setDelayTimeResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/SetDelayTime_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4020}
@@ -635,7 +580,8 @@
                };
                jObject.Add("Data", data);
                mainGateway.Send("Security/SetDelayTime", jObject.ToString());
                }catch { }
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
                {
@@ -664,17 +610,8 @@
        /// 设置延时时间返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class SetDelayTimeResponseAllData
        public class SetDelayTimeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 设置延时时间返回的数据
            /// </summary>
@@ -729,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -744,8 +680,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new CatUserPasswordResponseAllData { };
                        if (temp == null)
@@ -769,22 +704,22 @@
                    if (topic == gatewayID + "/" + "Security/CatUserPassword_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.catUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatUserPasswordResponseData>(jobject["Data"].ToString());
                        if (security.catUserPasswordResponseData == null)
                        var catUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatUserPasswordResponseData>(jobject["Data"].ToString());
                        if (catUserPasswordResponseData == null)
                        {
                            d = new CatUserPasswordResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new CatUserPasswordResponseAllData { catUserPasswordResponseData = security.catUserPasswordResponseData };
                            d = new CatUserPasswordResponseAllData { catUserPasswordResponseData = catUserPasswordResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/CatUserPassword_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4024}
@@ -796,7 +731,8 @@
                    jObject.Add("Data", data);
                    mainGateway.Send("Security/CatUserPassword", jObject.ToString()); 
                 }
                catch {
                catch
                {
                 } 
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -826,17 +762,8 @@
        /// 查看用户密码和胁迫密码返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class CatUserPasswordResponseAllData
        public class CatUserPasswordResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看用户密码和胁迫密码返回的数据
            /// </summary>
@@ -912,8 +839,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -928,7 +854,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new SetUserPasswordResponseAllData { };
                        if (temp == null)
                        {
@@ -951,14 +877,13 @@
                    if (topic == gatewayID + "/" + "Security/SetUserPassword_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.setUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetUserPasswordResponseData>(jobject["Data"].ToString());
                            if (security.setUserPasswordResponseData != null)
                            var setUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetUserPasswordResponseData>(jobject["Data"].ToString());
                            if (setUserPasswordResponseData != null)
                            {
                                d = new SetUserPasswordResponseAllData { setUserPasswordResponseData = security.setUserPasswordResponseData };
                                d = new SetUserPasswordResponseAllData { setUserPasswordResponseData = setUserPasswordResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
@@ -975,7 +900,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/SetUserPassword_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4025}
@@ -990,7 +916,8 @@
                    jObject.Add("Data", data);
                    mainGateway.Send("Security/SetUserPassword", jObject.ToString());
                }
                catch{
                catch
                {
                } 
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -1039,8 +966,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -1055,7 +981,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new SetUserPasswordResponseAllData { };
                        if (temp == null)
                        {
@@ -1077,14 +1003,13 @@
                    if (topic == gatewayID + "/" + "Security/AddPassWordTips_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.setUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetUserPasswordResponseData>(jobject["Data"].ToString());
                            if (security.setUserPasswordResponseData != null)
                            var setUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetUserPasswordResponseData>(jobject["Data"].ToString());
                            if (setUserPasswordResponseData != null)
                            {
                                d = new SetUserPasswordResponseAllData { setUserPasswordResponseData = security.setUserPasswordResponseData };
                                d = new SetUserPasswordResponseAllData { setUserPasswordResponseData = setUserPasswordResponseData };
                            }
                        }
                        else
@@ -1143,17 +1068,8 @@
        /// 新增或重设用户密码返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class SetUserPasswordResponseAllData
        public class SetUserPasswordResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 修改管理员密码返回的数据
            /// </summary>
@@ -1217,8 +1133,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -1231,8 +1146,7 @@
                    }
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new DelUserPasswordResponseAllData { };
                        if (temp == null)
@@ -1255,11 +1169,10 @@
                    }
                    if (topic == gatewayID + "/" + "Security/DelUserPassword_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.delUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelUserPasswordResponseData>(jobject["Data"].ToString());
                        if (security.delUserPasswordResponseData != null)
                        var delUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelUserPasswordResponseData>(jobject["Data"].ToString());
                        if (delUserPasswordResponseData != null)
                        {
                            d = new DelUserPasswordResponseAllData { delUserPasswordResponseData = security.delUserPasswordResponseData };
                            d = new DelUserPasswordResponseAllData { delUserPasswordResponseData = delUserPasswordResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
@@ -1273,7 +1186,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/DelUserPassword_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4026}
@@ -1315,17 +1229,8 @@
        /// 删除用户密码返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class DelUserPasswordResponseAllData
        public class DelUserPasswordResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 删除用户密码返回的数据
            /// </summary>
@@ -1381,7 +1286,7 @@
        //            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<ErrorResponData>(jobject["Data"].ToString());
        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
        //                if (temp == null)
        //                {
@@ -1607,8 +1512,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -1624,7 +1528,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new AddDeviceToZoneResponseAllData { };
                        if (temp == null)
                        {
@@ -1648,14 +1552,14 @@
                    if (topic == gatewayID + "/" + "Security/AddEqToZone_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
 
                        if (result == 0)
                        {
                            security.addDeviceToZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddDeviceToZoneResponseData>(jobject["Data"].ToString());
                            if(security.addDeviceToZoneResponseData!=null){
                                d = new AddDeviceToZoneResponseAllData { addDeviceToPartResponseData = security.addDeviceToZoneResponseData };
                            var addDeviceToZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddDeviceToZoneResponseData>(jobject["Data"].ToString());
                            if (addDeviceToZoneResponseData != null)
                            {
                                d = new AddDeviceToZoneResponseAllData { addDeviceToPartResponseData = addDeviceToZoneResponseData };
                              }
                             System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
@@ -1667,7 +1571,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/AddEqToZone_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                    if (addDeviceToZoneData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4003 } };
@@ -1692,7 +1597,8 @@
                        mainGateway.Send(("Security/AddEqToZone_Actions 启动"), jObject.ToString());
                    }
                }
                catch {
                catch
                {
                }
                var dateTime = DateTime.Now;
@@ -1724,17 +1630,8 @@
        /// 设备加入防区的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AddDeviceToZoneResponseAllData
        public class AddDeviceToZoneResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 设备加入防区的返回数据
            /// </summary>
@@ -1891,8 +1788,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -1907,7 +1803,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new AddNewModeResponseAllData { };
                        if (temp == null)
@@ -1932,15 +1828,14 @@
                    if (topic == gatewayID + "/" + "Security/AddNewMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.addNewModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddNewModeResponseData>(jobject["Data"].ToString());
                            if (security.addNewModeResponseData != null)
                            var addNewModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddNewModeResponseData>(jobject["Data"].ToString());
                            if (addNewModeResponseData != null)
                            {
                                d = new AddNewModeResponseAllData { addNewModeResponseData = security.addNewModeResponseData };
                                d = new AddNewModeResponseAllData { addNewModeResponseData = addNewModeResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{ topic}");
                             }
                        }
@@ -1952,7 +1847,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/AddNewMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    if (addNewModeData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4004 } };
@@ -1997,17 +1893,8 @@
        /// 新建或修改布防模式返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AddNewModeResponseAllData
        public class AddNewModeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            ///新建或修改布防模式返回的数据
            /// </summary>
@@ -2111,8 +1998,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -2126,8 +2012,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new ZoneJoinModeResponseAllData { };
                        if (temp == null)
@@ -2152,15 +2037,14 @@
                    if (topic == gatewayID + "/" + "Security/ZoneJoinMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        var modeId = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["ModeId"].ToString());
                        if (result == 0)
                        {
                            security.zoneJoinModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZoneJoinModeResponseData>(jobject["Data"].ToString());
                            if (security.zoneJoinModeResponseData != null)
                            var zoneJoinModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZoneJoinModeResponseData>(jobject["Data"].ToString());
                            if (zoneJoinModeResponseData != null)
                            {
                                d = new ZoneJoinModeResponseAllData { zoneJoinModeResponseData = security.zoneJoinModeResponseData };
                                d = new ZoneJoinModeResponseAllData { zoneJoinModeResponseData = zoneJoinModeResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{ topic}");
                            }
                        }
@@ -2177,7 +2061,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/ZoneJoinMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    if (zoneJoinModeData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4005 } };
@@ -2230,17 +2115,8 @@
        /// 防区加入布防模式返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class ZoneJoinModeResponseAllData
        public class ZoneJoinModeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            ///防区加入布防模式返回的数据
            /// </summary>
@@ -2357,8 +2233,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -2372,8 +2247,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new RemoveZoneFromModeResponseAllData { };
                        if (temp == null)
@@ -2398,16 +2272,15 @@
                    if (topic == gatewayID + "/" + "Security/RemoveZoneFromMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        var modeId = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["ModeId"].ToString());
                        if (result == 0)
                        {
                            security.removeZoneFromModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveZoneFromModeResponseData>(jobject["Data"].ToString());
                            if (security.removeZoneFromModeResponseData != null)
                            var removeZoneFromModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveZoneFromModeResponseData>(jobject["Data"].ToString());
                            if (removeZoneFromModeResponseData != null)
                            {
                                d = new RemoveZoneFromModeResponseAllData { removeZoneFromModeResponseData = security.removeZoneFromModeResponseData };
                                d = new RemoveZoneFromModeResponseAllData { removeZoneFromModeResponseData = removeZoneFromModeResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{ topic}");
                            }
                        }
@@ -2423,7 +2296,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/RemoveZoneFromMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    if (removeZoneFromModeData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4006 } };
@@ -2476,17 +2350,8 @@
        /// 从布防模式中移除防区返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class RemoveZoneFromModeResponseAllData
        public class RemoveZoneFromModeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            ///从布防模式中移除防区返回的数据
            /// </summary>
@@ -2589,8 +2454,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -2604,8 +2468,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new AddModeActonResponAllData { };
                        if (temp == null)
@@ -2631,17 +2494,16 @@
                    if (topic == gatewayID + "/" + "Security/AddModeActon_Respon")
                    {
                        dateTime = DateTime.Now;
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        var modeId = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["ModeId"].ToString());
                        var actionType = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["ActionType"].ToString());
                        if (result == 0)
                        {
                            security.addModeActonResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddModeActonResponData>(jobject["Data"].ToString());
                            if (security.addModeActonResponData != null)
                            var addModeActonResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddModeActonResponData>(jobject["Data"].ToString());
                            if (addModeActonResponData != null)
                            {
                                d = new AddModeActonResponAllData { addModeActonResponData = security.addModeActonResponData };
                                d = new AddModeActonResponAllData { addModeActonResponData = addModeActonResponData };
                                System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
                        }
@@ -2658,7 +2520,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/AddModeActon_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                if (addModeActonData != null)
                {
                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4007 } };
@@ -2727,17 +2590,8 @@
        /// 安防模式触发动作添加的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AddModeActonResponAllData
        public class AddModeActonResponAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 安防模式触发动作添加的数据
            /// </summary>
@@ -2972,8 +2826,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -2987,8 +2840,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new RemoveActionFromModeAllData {};
                        if (temp == null)
@@ -3012,14 +2864,13 @@
                    if (topic == gatewayID + "/" + "Security/RemoveActonFromMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.removeActonFromModeResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveActionFromModeResponData>(jobject["Data"].ToString());
                            if (security.removeActonFromModeResponData != null)
                            var removeActonFromModeResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveActionFromModeResponData>(jobject["Data"].ToString());
                            if (removeActonFromModeResponData != null)
                            {
                                d = new RemoveActionFromModeAllData { removeActonFromModeResponData = security.removeActonFromModeResponData };
                                d = new RemoveActionFromModeAllData { removeActonFromModeResponData = removeActonFromModeResponData };
                                 System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
                        }
@@ -3031,7 +2882,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/RemoveActonFromMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    if (removeActonFromModeData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4008 } };
@@ -3066,7 +2918,8 @@
                        mainGateway.Send(("Security/RemoveActonFromMode"), jObject.ToString());
                    }
                }
                catch{
                catch
                {
                }
@@ -3098,17 +2951,8 @@
        /// 将动作从布防模式中移除的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class RemoveActionFromModeAllData
        public class RemoveActionFromModeAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 将动作从布防模式中移除的回复数据
            /// </summary>
@@ -3270,8 +3114,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -3285,29 +3128,30 @@
                    if (topic == gatewayID + "/" + "Security/GetModeList_Repon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.getModeListData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetModeListData>(jobject["Data"].ToString());
                        if (security.getModeListData == null)
                        var getModeListData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetModeListData>(jobject["Data"].ToString());
                        if (getModeListData == null)
                        {
                            d = new GetModeListAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new GetModeListAllData { getModeListData = security.getModeListData };
                            d = new GetModeListAllData { getModeListData = getModeListData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/GetModeList_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4009 }
                                };
                    mainGateway.Send("Security/GetModeList", jObject.ToString());
                }catch{ }
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -3337,17 +3181,8 @@
        /// 获取布防模式列表返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class GetModeListAllData
        public class GetModeListAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 获取布防模式列表返回的数据
            /// </summary>
@@ -3432,8 +3267,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -3446,7 +3280,6 @@
                    }
                    if (topic == gatewayID + "/" + "Security/GetModeInfoById_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
@@ -3469,7 +3302,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/GetModeInfoById_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4010 }
@@ -3508,17 +3342,8 @@
        /// 通过布防模式ID查看模式信息的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class GetModeInfoByIdResponAllData
        public class GetModeInfoByIdResponAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 通过布防模式ID查看模式信息返回的数据
            /// </summary>
@@ -3688,8 +3513,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -3703,7 +3527,6 @@
                    if (topic == gatewayID + "/" + "Security/GetModeUsing_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
@@ -3726,7 +3549,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/GetModeUsing_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4011}
@@ -3763,17 +3587,8 @@
        /// 查看当前正在使用的布防模式返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class GetModeUsingResponseAllData
        public class GetModeUsingResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看当前正在使用的布防模式返回的数据
            /// </summary>
@@ -3841,8 +3656,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -3855,17 +3669,16 @@
                    }
                    if (topic == gatewayID + "/" + "Security/EnableMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        var modeId = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["ModeId"].ToString());
                        security.enableModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<EnableModeResponseData>(jobject["Data"].ToString());
                        if (security.enableModeResponseData == null)
                        var enableModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<EnableModeResponseData>(jobject["Data"].ToString());
                        if (enableModeResponseData == null)
                        {
                            d = new EnableModeResponAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new EnableModeResponAllData { enableModeResponseData = security.enableModeResponseData };
                            d = new EnableModeResponAllData { enableModeResponseData = enableModeResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
@@ -3873,7 +3686,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/EnableMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    if (enableModeData != null)
                    {
                        var jObject = new Newtonsoft.Json.Linq.JObject() {
@@ -3922,17 +3736,8 @@
        /// 布防返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class EnableModeResponAllData
        public class EnableModeResponAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 布防返回的数据
            /// </summary>
@@ -4069,8 +3874,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -4084,15 +3888,14 @@
                    if (topic == gatewayID + "/" + "Security/WithdrawMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.withdrawModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<WithdrawModeResponseData>(jobject["Data"].ToString());
                        if (security.withdrawModeResponseData == null)
                        var withdrawModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<WithdrawModeResponseData>(jobject["Data"].ToString());
                        if (withdrawModeResponseData == null)
                        {
                            d = new WithdrawModeResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new WithdrawModeResponseAllData { withdrawModeResponseData = security.withdrawModeResponseData };
                            d = new WithdrawModeResponseAllData { withdrawModeResponseData = withdrawModeResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
@@ -4100,7 +3903,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/WithdrawMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4013}
@@ -4143,17 +3947,8 @@
        /// 撤防返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class WithdrawModeResponseAllData
        public class WithdrawModeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 撤防返回的数据
            /// </summary>
@@ -4220,8 +4015,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -4235,8 +4029,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new RemoveModeResponseAllData { };
                        if (temp == null)
                        {
@@ -4259,15 +4052,14 @@
                    if (topic == gatewayID + "/" + "Security/RemoveMode_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.removeModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveModeResponseData>(jobject["Data"].ToString());
                        if (security.removeModeResponseData == null)
                        var removeModeResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveModeResponseData>(jobject["Data"].ToString());
                        if (removeModeResponseData == null)
                        {
                            d = new RemoveModeResponseAllData { errorMessageBase = "网关返回的数据为空" };
                        }
                        else
                        {
                            d = new RemoveModeResponseAllData { removeModeResponseData = security.removeModeResponseData };
                            d = new RemoveModeResponseAllData { removeModeResponseData = removeModeResponseData };
                             System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                    }
@@ -4275,7 +4067,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/RemoveMode_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4014}
@@ -4318,17 +4111,8 @@
        /// 删除布防模式返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class RemoveModeResponseAllData
        public class RemoveModeResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 删除布防模式返回的数据
            /// </summary>
@@ -4366,152 +4150,6 @@
        }
        #endregion
        //#region 删除防区.
        /////<summary >
        ///// 删除防区.(仅用于主网关接口).
        ///// </summary>
        //public static async System.Threading.Tasks.Task<RemoveZoneResponseAllData> RemoveZoneAsync(int zoneId)
        //{
        //    return await System.Threading.Tasks.Task.Run(async () =>
        //    {
        //        var d = new RemoveZoneResponseAllData { };
        //        if (ZbGateway.MainGateWay == null)
        //        {
        //            d.errorMessageBase = "当前没有主网关";
        //            return d;
        //        }
        //        Action<string, string> action = (topic, message) =>
        //        {
        //            var gatewayID = topic.Split('/')[0];
        //            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<ErrorResponData>(jobject["Data"].ToString());
        //                if (temp == null)
        //                {
        //                    d.errorMessageBase = "网关错误回复,且数据是空";
        //                }
        //                else
        //                {
        //                    d.errorResponData = temp;
        //                    d.errorMessageBase = ErrorMess(temp.Error);
        //                }
        //            }
        //            if (topic == gatewayID + "/" + "Security/RemoveZone_Respon")
        //            {
        //                var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = ZbGateway.MainGateWay.CurrentGateWayId };
        //                var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
        //                if (result == 0)
        //                {
        //                    security.removeZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveZoneResponseData>(jobject["Data"].ToString());
        //                    if (security.removeZoneResponseData != null)
        //                    {
        //                        d.removeZoneResponseData = security.removeZoneResponseData;
        //                        System.Console.WriteLine($"收到通知后的主题_{topic}");
        //                    }
        //                }
        //                else
        //                {
        //                    var r = new RemoveZoneResponseData();
        //                    r.Result = result;
        //                    d.removeZoneResponseData = r;
        //                    System.Console.WriteLine($"收到通知后的主题_{topic}");
        //                }
        //            }
        //        };
        //        ZbGateway.MainGateWay.Actions += action;
        //        System.Console.WriteLine("Security/RemoveZone_Actions 启动" + System.DateTime.Now.ToString());
        //        var jObject = new Newtonsoft.Json.Linq.JObject() {
        //                            { "Cluster_ID", 0 },
        //                            { "Command", 4015}
        //                        };
        //        var data = new JObject
        //        {
        //            { "ZoneId", zoneId}
        //         };
        //        jObject.Add("Data", data);
        //        ZbGateway.MainGateWay?.Send("Security/RemoveZone", jObject.ToString());
        //        var dateTime = DateTime.Now;
        //        while ((DateTime.Now - dateTime).TotalMilliseconds < 1000)
        //        {
        //            await System.Threading.Tasks.Task.Delay(10);
        //            if (d.removeZoneResponseData != null)
        //            {
        //                break;
        //            }
        //        }
        //        if ((DateTime.Now - dateTime).TotalMilliseconds > 10000)
        //        {
        //            d.errorMessageBase = " 回复超时,请重新操作";
        //        }
        //        ZbGateway.MainGateWay.Actions -= action;
        //        System.Console.WriteLine("Security/RemoveZone_Actions 退出" + System.DateTime.Now.ToString());
        //        return d;
        //    });
        //}
        ///// <summary>
        ///// 删除防区,网关反馈信息
        ///// </summary>
        //public RemoveZoneResponseAllData removeZoneResponseAllData;
        ///// <summary>
        ///// 删除防区,网关反馈信息
        ///// </summary>
        //[System.Serializable]
        //public class RemoveZoneResponseAllData
        //{
        //    /// <summary>
        //    /// 错误信息
        //    /// </summary>
        //    public string errorMessageBase;
        //    /// <summary>
        //    /// 网关信息错误反馈
        //    /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
        //    /// </summary>
        //    public ErrorResponData errorResponData;
        //    /// <summary>
        //    /// 删除防区返回的数据
        //    /// </summary>
        //    public RemoveZoneResponseData removeZoneResponseData;
        //}
        ///// <summary>
        ///// 删除防区返回的数据
        ///// </summary>
        //public RemoveZoneResponseData removeZoneResponseData;
        ///// <summary>
        ///// 删除防区返回的数据
        ///// </summary>
        //[System.Serializable]
        //public class RemoveZoneResponseData
        //{
        //    /// <summary>
        //    /// 0:删除成功。
        //    ///<para>1:失败,防区不存在。</para>
        //    /// </summary>
        //    public int Result = 999;
        //    /// <summary>
        //    /// 防区id
        //    /// </summary>
        //    public int ZoneId;
        //    /// <summary>
        //    /// 防区名称,当Result=0时存在。
        //    /// </summary>
        //    public string ZoneName;
        //}
        //#endregion
        #region *14将设备从防区中移除.
        /// <summary>
        /// *将设备从防区中移除(需要管理员权限).
@@ -4536,8 +4174,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -4551,8 +4188,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new RemoveDeviceToZoneAllData { };
                        if (temp == null)
@@ -4576,14 +4212,13 @@
                    if (topic == gatewayID + "/" + "Security/RemoveEqToZone_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.removeDeviceToZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveDeviceToZoneResponseData>(jobject["Data"].ToString());
                            if (security.removeDeviceToZoneResponseData != null)
                            var removeDeviceToZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<RemoveDeviceToZoneResponseData>(jobject["Data"].ToString());
                            if (removeDeviceToZoneResponseData != null)
                            {
                                d = new RemoveDeviceToZoneAllData { removeDeviceToZoneResponseData = security.removeDeviceToZoneResponseData };
                                d = new RemoveDeviceToZoneAllData { removeDeviceToZoneResponseData = removeDeviceToZoneResponseData };
                                System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
                        }
@@ -4600,7 +4235,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/RemoveEqToZone_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                    if (removeEqToZoneData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4016 } };
@@ -4653,17 +4289,8 @@
        /// 将设备从防区中移除的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class RemoveDeviceToZoneAllData
        public class RemoveDeviceToZoneAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 将设备从防区中移除的返回数据
            /// </summary>
@@ -4776,7 +4403,7 @@
        //            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<ErrorResponData>(jobject["Data"].ToString());
        //                var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
        //                if (temp == null)
        //                {
@@ -4948,8 +4575,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -4962,14 +4588,13 @@
                    }
                    if (topic == gatewayID + "/" + "Security/GetZoneDeviceListById_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.getZoneDeviceListByIdResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetZoneDeviceListByIdResponData>(jobject["Data"].ToString());
                            if (security.getZoneDeviceListByIdResponData != null)
                            var getZoneDeviceListByIdResponData = Newtonsoft.Json.JsonConvert.DeserializeObject<GetZoneDeviceListByIdResponData>(jobject["Data"].ToString());
                            if (getZoneDeviceListByIdResponData != null)
                            {
                                d = new GetZoneDeviceListByIdResponAllData { getZoneDeviceListByIdResponData = security.getZoneDeviceListByIdResponData };
                                d = new GetZoneDeviceListByIdResponAllData { getZoneDeviceListByIdResponData = getZoneDeviceListByIdResponData };
                            }
                            System.Console.WriteLine($"UI已收到通知的主题_{topic}");
                        }
@@ -5025,17 +4650,8 @@
        /// 通过布防模式ID查看模式信息的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class GetZoneDeviceListByIdResponAllData
        public class GetZoneDeviceListByIdResponAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 通过布防模式ID查看模式信息返回的数据
            /// </summary>
@@ -5151,8 +4767,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -5167,7 +4782,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new ActionTestResponseAllData { };
                        if (temp == null)
                        {
@@ -5190,11 +4805,10 @@
                    if (topic == gatewayID + "/" + "Security/ActionTest_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.actionTestResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ActionTestResponseData>(jobject["Data"].ToString());
                        if (security.actionTestResponseData != null)
                        var actionTestResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<ActionTestResponseData>(jobject["Data"].ToString());
                        if (actionTestResponseData != null)
                        {
                            d = new ActionTestResponseAllData { actionTestResponseData = security.actionTestResponseData };
                            d = new ActionTestResponseAllData { actionTestResponseData = actionTestResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
@@ -5208,7 +4822,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine("Security/ActionTest_Actions 启动" + System.DateTime.Now.ToString());
                try{
                try
                {
                    var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4027}
@@ -5252,17 +4867,8 @@
        /// 执行安防模式动作返回的数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class ActionTestResponseAllData
        public class ActionTestResponseAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 执行安防模式动作返回的数据
            /// </summary>
@@ -5490,8 +5096,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        { 
@@ -5505,8 +5110,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new EqByPassAllData { };
                        if (temp == null)
                        {
@@ -5529,14 +5133,13 @@
                    if (topic == gatewayID + "/" + "Security/EqByPass_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
                        if (result == 0)
                        {
                            security.eqByPassResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<EqByPassResponseData>(jobject["Data"].ToString());
                            if (security.eqByPassResponseData != null)
                            var eqByPassResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<EqByPassResponseData>(jobject["Data"].ToString());
                            if (eqByPassResponseData != null)
                            {
                                d = new EqByPassAllData { eqByPassResponseData = security.eqByPassResponseData };
                                d = new EqByPassAllData { eqByPassResponseData = eqByPassResponseData };
                                 System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                            }
                        }
@@ -5553,7 +5156,8 @@
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/EqByPass_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                    if (eqByPassData != null)
                    {
                        var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4029 } };
@@ -5600,17 +5204,8 @@
        /// 对防区安防设备进行旁路或撤销旁路的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class EqByPassAllData
        public class EqByPassAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 对防区安防设备进行旁路或撤销旁路的返回数据
            /// </summary>
@@ -5721,8 +5316,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -5736,8 +5330,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new AddZoneActionAllData { };
                        if (temp == null)
                        {
@@ -5761,13 +5354,14 @@
                    if (topic == gatewayID + "/" + "Security/AddZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.addZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddZoneActionResponseData>(jobject["Data"].ToString());
                        if (security.addZoneActionResponseData != null)
                        var addZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddZoneActionResponseData>(jobject["Data"].ToString());
                        if (addZoneActionResponseData != null)
                        {
                            d = new AddZoneActionAllData { addZoneActionResponseData = security.addZoneActionResponseData };
                            d = new AddZoneActionAllData { addZoneActionResponseData = addZoneActionResponseData };
                             System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }else{
                        }
                        else
                        {
                            d = new AddZoneActionAllData { errorMessageBase = "网关回复数据是空" };
                         }
                     }
@@ -5822,7 +5416,8 @@
                        jObject.Add("Data", data);
                        mainGateway.Send(("Security/AddZoneAction"), jObject.ToString());
                    }
                }catch{}
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
                {
@@ -5852,17 +5447,8 @@
        /// 添加防区报警目标的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AddZoneActionAllData
        public class AddZoneActionAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 添加防区报警目标的返回数据
            /// </summary>
@@ -6028,8 +5614,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -6043,8 +5628,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new DelZoneActionResposeAllData { };
                        if (temp == null)
                        {
@@ -6068,11 +5652,10 @@
                    if (topic == gatewayID + "/" + "Security/DelZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.delZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelZoneActionResponseData>(jobject["Data"].ToString());
                        if (security.delZoneActionResponseData != null)
                        var delZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelZoneActionResponseData>(jobject["Data"].ToString());
                        if (delZoneActionResponseData != null)
                        {
                            d = new DelZoneActionResposeAllData { delZoneActionResponseData = security.delZoneActionResponseData };
                            d = new DelZoneActionResposeAllData { delZoneActionResponseData = delZoneActionResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -6119,7 +5702,8 @@
                        jObject.Add("Data", data);
                        mainGateway.Send(("Security/DelZoneAction"), jObject.ToString());
                    }
                }catch{}
                }
                catch { }
                var dateTime = DateTime.Now;
                while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -6149,17 +5733,8 @@
        /// 删除防区报警目标的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class DelZoneActionResposeAllData
        public class DelZoneActionResposeAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 删除防区报警目标的返回数据
            /// </summary>
@@ -6311,8 +5886,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -6326,11 +5900,10 @@
                    if (topic == gatewayID + "/" + "Security/CatZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateWay.CurrentGateWayId };
                        security.catZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatZoneActionResponseData>(jobject["Data"].ToString());
                        if (security.catZoneActionResponseData != null)
                        var catZoneActionResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CatZoneActionResponseData>(jobject["Data"].ToString());
                        if (catZoneActionResponseData != null)
                        {
                            d = new CatZoneActionResposeAllData { catZoneActionResponseData = security.catZoneActionResponseData };
                            d = new CatZoneActionResposeAllData { catZoneActionResponseData = catZoneActionResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -6341,7 +5914,8 @@
                };
                mainGateWay.Actions += action;
                System.Console.WriteLine($"Security/CatZoneAction_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4032 }
@@ -6383,17 +5957,8 @@
        /// 查看防区报警目标的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class CatZoneActionResposeAllData
        public class CatZoneActionResposeAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看防区报警目标的返回数据
            /// </summary>
@@ -6504,8 +6069,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -6519,8 +6083,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new SetCoercePhoneNumberAllResponseData { };
                        if (temp == null)
                        {
@@ -6544,11 +6107,10 @@
                    if (topic == gatewayID + "/" + "Security/AddZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.setCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (security.setCoercePhoneNumberResponseData != null)
                        var setCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (setCoercePhoneNumberResponseData != null)
                        {
                            d = new SetCoercePhoneNumberAllResponseData { setCoercePhoneNumberResponseData = security.setCoercePhoneNumberResponseData };
                            d = new SetCoercePhoneNumberAllResponseData { setCoercePhoneNumberResponseData = setCoercePhoneNumberResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -6559,7 +6121,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/AddZoneAction(设置胁迫状态下的电话号码)_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                if (setCoercePhoneNumberData != null)
                {
                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4030 } };
@@ -6681,17 +6244,8 @@
        /// 设置胁迫状态下被通知的联系号码的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class SetCoercePhoneNumberAllResponseData
        public class SetCoercePhoneNumberAllResponseData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 设置胁迫状态下被通知的联系号码的返回数据
            /// </summary>
@@ -6825,8 +6379,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -6840,8 +6393,7 @@
                    if (topic == gatewayID + "/" + "Security/Error_Respon")
                    {
                        var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.getGatewayBaseInfo.gwID };
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        d = new DelCoercePhoneNumberAllResponseData { };
                        if (temp == null)
                        {
@@ -6865,11 +6417,10 @@
                    if (topic == gatewayID + "/" + "Security/DelZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.delCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (security.delCoercePhoneNumberResponseData != null)
                        var delCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DelCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (delCoercePhoneNumberResponseData != null)
                        {
                            d = new DelCoercePhoneNumberAllResponseData { delCoercePhoneNumberResponseData = security.delCoercePhoneNumberResponseData };
                            d = new DelCoercePhoneNumberAllResponseData { delCoercePhoneNumberResponseData = delCoercePhoneNumberResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -6880,7 +6431,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/AddZoneAction(删除胁迫状态下的电话号码)_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                if (delCoercePhoneNumberData != null)
                {
                    var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4031 } };
@@ -6944,17 +6496,8 @@
        /// 删除胁迫状态下被通知的联系号码的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class DelCoercePhoneNumberAllResponseData
        public class DelCoercePhoneNumberAllResponseData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 删除胁迫状态下被通知的联系号码的返回数据
            /// </summary>
@@ -7034,8 +6577,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -7049,11 +6591,10 @@
                    if (topic == gatewayID + "/" + "Security/CatZoneAction_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.checkCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CheckCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (security.checkCoercePhoneNumberResponseData != null)
                        var checkCoercePhoneNumberResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<CheckCoercePhoneNumberResponseData>(jobject["Data"].ToString());
                        if (checkCoercePhoneNumberResponseData != null)
                        {
                            d = new CheckCoercePhoneNumberAllResponseData { checkCoercePhoneNumberResponseData = security.checkCoercePhoneNumberResponseData };
                            d = new CheckCoercePhoneNumberAllResponseData { checkCoercePhoneNumberResponseData = checkCoercePhoneNumberResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -7064,7 +6605,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/CatZoneAction(查看胁迫状态下的电话号码)_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4032 } };
                var actionsList = new JArray { };
                var data = new JObject
@@ -7105,17 +6647,8 @@
        /// 查看胁迫状态下被通知的联系号码的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class CheckCoercePhoneNumberAllResponseData
        public class CheckCoercePhoneNumberAllResponseData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看胁迫状态下被通知的联系号码的返回数据
            /// </summary>
@@ -7207,8 +6740,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -7222,11 +6754,10 @@
                    if (topic == gatewayID + "/" + "Security/DisablePushMessage_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.disablePushMessageResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DisablePushMessageResponseData>(jobject["Data"].ToString());
                        if (security.disablePushMessageResponseData != null)
                        var disablePushMessageResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<DisablePushMessageResponseData>(jobject["Data"].ToString());
                        if (disablePushMessageResponseData != null)
                        {
                            d = new DisablePushMessageResposeAllData { disablePushMessageResponseData = security.disablePushMessageResponseData };
                            d = new DisablePushMessageResposeAllData { disablePushMessageResponseData = disablePushMessageResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -7237,7 +6768,8 @@
                };
                mainGateway.Actions += action;
                System.Console.WriteLine($"Security/DisablePushMessage_Actions启动_{System.DateTime.Now.ToString()}");
                try{
                try
                {
                var jObject = new Newtonsoft.Json.Linq.JObject() {
                                    { "Cluster_ID", 0 },
                                    { "Command", 4034 }
@@ -7280,17 +6812,8 @@
        /// 查看防区报警目标的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class DisablePushMessageResposeAllData
        public class DisablePushMessageResposeAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 查看防区报警目标的返回数据
            /// </summary>
@@ -7354,8 +6877,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<ErrorResponData>(jobject["Data"].ToString());
                        var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                        if (temp == null)
                        {
@@ -7369,11 +6891,10 @@
                    if (topic == gatewayID + "/" + "Security/AdminLogOut_Respon")
                    {
                        var security = new Safeguard() { DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.CurrentGateWayId };
                        security.adminLogOutResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AdminLogOutResponseData>(jobject["Data"].ToString());
                        if (security.adminLogOutResponseData != null)
                        var adminLogOutResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AdminLogOutResponseData>(jobject["Data"].ToString());
                        if (adminLogOutResponseData != null)
                        {
                            d = new AdminLogOutResposeAllData {adminLogOutResponseData  = security.adminLogOutResponseData };
                            d = new AdminLogOutResposeAllData { adminLogOutResponseData = adminLogOutResponseData };
                            System.Console.WriteLine($"UI收到通知后的主题_{topic}");
                        }
                        else
@@ -7427,17 +6948,8 @@
        /// 退出管理员登陆的返回数据,网关反馈信息
        /// </summary>
        [System.Serializable]
        public class AdminLogOutResposeAllData
        public class AdminLogOutResposeAllData : CommonDevice.ErrorResponCommon
        {
            /// <summary>
            /// 错误信息
            /// </summary>
            public string errorMessageBase;
            /// <summary>
            /// 网关信息错误反馈
            /// <para>当网关接收到客户端信息后,出现以下异常情况将反馈错误。</para>
            /// </summary>
            public ErrorResponData errorResponData;
            /// <summary>
            /// 退出管理员登陆的返回数据
            /// </summary>