From 4f0ab0ad21ce450b7856d50f98322a7899361386 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 22 九月 2020 10:30:01 +0800
Subject: [PATCH] 不要下载这个备份
---
ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs | 1723 +++++++++++++++++++++++++----------------------------------
1 files changed, 733 insertions(+), 990 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs
index 5068bba..af40ff4 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Safeguard.cs
@@ -23,7 +23,7 @@
/// </summary>
public int Time;
- /// <summary>
+ /// <summary>
/// 绛夊緟浠庣綉鍏虫帴鏀舵暟鎹殑鏃堕棿
/// </summary>
/// <value>The wait receive data time.</value>
@@ -35,7 +35,8 @@
if (mainGateway == null)
{
return 3000;
- }else if (mainGateway.IsVirtual)
+ }
+ else if (mainGateway.IsVirtual)
{
return 6000;
}
@@ -47,31 +48,8 @@
}
/// <summary>
- /// 缃戝叧淇℃伅閿欒鍙嶉
- /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
- /// </summary>
- ErrorResponData errResponData;
- /// <summary>
- /// 缃戝叧淇℃伅閿欒鍙嶉
- /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
- /// </summary>
- [System.Serializable]
- public class ErrorResponData
- {
- /// <summary>
- /// Error鍙傛暟鍚箟
- ///<para>1锛氱綉鍏虫棤娉曡В鏋愬懡浠ゆ暟鎹��</para>
- ///<para>2锛氬崗璋冨櫒姝e湪鍗囩骇鎴栧浠�/鎭㈠鏁版嵁
- ///<para>3锛氭搷浣滆澶�/缁�/鍦烘櫙涓嶅瓨鍦�</para>
- ///<para>4锛氬叾浠栭敊璇�</para>
- ///<para>5锛氭暟鎹紶杈撻敊璇紙鍦ㄦ煇娆″鎴风鍚戠綉鍏冲彂閫佹暟鎹殑杩囩▼涓紝缃戝叧鍦ㄥ悎鐞嗘椂闂磋寖鍥村唴鎺ユ敹瀹㈡埛绔暟鎹笉瀹屾暣瀵艰嚧璇ラ敊璇彂鐢熴�傚瀹㈡埛绔悜缃戝叧涓�娆″彂閫�100涓瓧鑺傜殑鏁版嵁锛屼絾缃戝叧绛夊緟鎺ユ敹浜嗕竴绉掑彧鎺ユ敹浜�80涓瓧鑺傘�傚彂鐢熻閿欒锛岀綉鍏冲皢涓诲姩鍏抽棴瀹㈡埛绔繛鎺ワ級</para>
- /// </summary>
- public int Error;
- }
-
- /// <summary>
/// 缃戝叧淇℃伅閿欒鍙嶉鍐呭
- /// </summary>
+ /// </summary>
static string ErrorMess(int err)
{
string message = "";
@@ -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)
{
@@ -135,28 +112,27 @@
}
else
{
- d = new AdminLoginResponAllData { errorResponData = temp , errorMessageBase = ErrorMess(temp.Error) };
+ d = new AdminLoginResponAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
}
}
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)
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
- d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��" ;
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
}
@@ -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)
{
@@ -182,10 +157,10 @@
try
{
- var bytes = new byte[32];
- var reamarkGwBytes = System.Text.Encoding.UTF8.GetBytes(password);
- System.Array.Copy(reamarkGwBytes, 0, bytes, 0, 32 < reamarkGwBytes.Length ? 32 : reamarkGwBytes.Length);
- password = System.Text.Encoding.UTF8.GetString(bytes);
+ var bytes = new byte[32];
+ var reamarkGwBytes = System.Text.Encoding.UTF8.GetBytes(password);
+ System.Array.Copy(reamarkGwBytes, 0, bytes, 0, 32 < reamarkGwBytes.Length ? 32 : reamarkGwBytes.Length);
+ password = System.Text.Encoding.UTF8.GetString(bytes);
var jObject = new Newtonsoft.Json.Linq.JObject() {
{ "Cluster_ID", 0 },
@@ -195,12 +170,12 @@
jObject.Add("Data", data);
mainGateway.Send("Security/AdminLogin", jObject.ToString());
}
- catch{}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
await System.Threading.Tasks.Task.Delay(10);
- if (d!= null)
+ if (d != null)
{
break;
}
@@ -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,12 +243,11 @@
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)
{
- d = new ChangeAdminPasswordResponseAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
+ d = new ChangeAdminPasswordResponseAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
}
else
{
@@ -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}
@@ -338,7 +303,7 @@
mainGateway.Send("Security/ChangeAdminPassword", jObject.ToString());
}
catch { }
-
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -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,29 +405,29 @@
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}
};
mainGateway.Send("Security/CatDelayTime", jObject.ToString());
}
- catch{}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -501,24 +456,15 @@
/// 鏌ョ湅寤舵椂鏃堕棿杩斿洖鐨勬暟鎹�,缃戝叧鍙嶉淇℃伅
/// </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>
public CatDelayTimeResponseData catDelayTimeResponseData;
}
-
+
/// <summary>
/// 鏌ョ湅寤舵椂鏃堕棿杩斿洖鐨勬暟鎹�
/// </summary>
@@ -548,7 +494,7 @@
/// <para>goOutDelayTime:澶栧嚭寤舵椂鏃堕棿锛屽崟浣嶇鑼冨洿锛�0-65535</para>
/// <para>loginToken:鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆傚鏋滅櫥闄嗘垚鍔燂紝缃戝叧灏嗚褰曡鏍囪瘑锛宎pp闇�瑕佺鐞嗗憳鏉冮檺鐨勬寚浠ら兘搴旇甯︽湁璇ユ爣璇嗭紝缃戝叧浼氭牴鎹鏍囪瘑鏉ュ垽鏂槸鍚︿负绠$悊鍛樻搷浣滐紝濡傛灉鏍囪瘑閿欒锛屽皢杩斿洖鈥淪ecurity/Error_Respon鈥濅富棰樻暟鎹�� 銆�</para>
/// </summary>
- public static async System.Threading.Tasks.Task<SetDelayTimeResponseAllData> SetDelayTimeAsync(int entranceDelayTime,int goOutDelayTime,string loginToken)
+ public static async System.Threading.Tasks.Task<SetDelayTimeResponseAllData> SetDelayTimeAsync(int entranceDelayTime, int goOutDelayTime, string loginToken)
{
return await System.Threading.Tasks.Task.Run(async () =>
{
@@ -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)
{
@@ -582,16 +527,16 @@
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 securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
d = new SetDelayTimeResponseAllData { };
if (temp == null)
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
if (temp.Error == 1)
{
d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
@@ -601,41 +546,42 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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{
- var jObject = new Newtonsoft.Json.Linq.JObject() {
+ try
+ {
+ var jObject = new Newtonsoft.Json.Linq.JObject() {
{ "Cluster_ID", 0 },
{ "Command", 4020}
};
- var data = new JObject
+ var data = new JObject
{
{ "EntranceDelayTime", entranceDelayTime},
{ "GoOutDelayTime", goOutDelayTime},
{ "LoginToken", loginToken}
};
- jObject.Add("Data", data);
- mainGateway.Send("Security/SetDelayTime", jObject.ToString());
- }catch { }
+ jObject.Add("Data", data);
+ mainGateway.Send("Security/SetDelayTime", jObject.ToString());
+ }
+ 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>
@@ -714,7 +651,7 @@
{
return await System.Threading.Tasks.Task.Run(async () =>
{
- CatUserPasswordResponseAllData d =null;
+ CatUserPasswordResponseAllData d = null;
var mainGateway = ZbGateway.MainGateWay;
if (mainGateway == null)
{
@@ -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,17 +680,16 @@
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)
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
- if (temp.Error == 1)
+ if (temp.Error == 1)
{
d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
@@ -763,41 +698,42 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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}
- };
+ };
var data = new JObject
{
{ "LoginToken", loginToken}
};
jObject.Add("Data", data);
- mainGateway.Send("Security/CatUserPassword", jObject.ToString());
- }
- catch {
- }
+ mainGateway.Send("Security/CatUserPassword", jObject.ToString());
+ }
+ 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>
@@ -877,7 +804,10 @@
/// 鏈�灏�4涓瓧绗︼紝鏈�澶�32涓瓧绗�
/// </summary>
public string Password;
-
+ /// <summary>
+ /// 鐢ㄦ埛瀵嗙爜鎻愮ず璇�
+ /// </summary>
+ public string PassWordTips = string.Empty;
}
#endregion
@@ -886,10 +816,11 @@
/// *鏂板鎴栭噸璁剧敤鎴峰瘑鐮侊紙闇�瑕佺鐞嗗憳鏉冮檺锛�
/// <para>userId:鐢ㄦ埛id 濡傛灉鐢ㄦ埛id瀛樺湪锛屽垯淇敼瀵嗙爜銆傚鏋滅敤鎴穒d涓嶅瓨鍦紝鍒欎负璇d鏂板瀵嗙爜
/// 涓�0鏃讹紝鑷姩鍒嗛厤鏂扮殑鐢ㄦ埛id銆備负5鏃讹紝鍒欎慨鏀硅儊杩瘑鐮併�傚彇鍊艰寖鍥�0-5銆�</para>
- /// <para>password:鏂扮鐞嗗憳瀵嗙爜</para>
+ /// <para>password:鏂扮鐞嗗憳瀵嗙爜</para>
+ /// <para>passWordTips:瀵嗙爜鎻愮ず</para>
/// <para>loginToken:鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��</para>
/// </summary>
- public static async System.Threading.Tasks.Task<SetUserPasswordResponseAllData> SetUserPasswordAsync(int userId, string password,string loginToken)
+ public static async System.Threading.Tasks.Task<SetUserPasswordResponseAllData> SetUserPasswordAsync(int userId, string password, string passWordTips, string loginToken)
{
return await System.Threading.Tasks.Task.Run(async () =>
{
@@ -908,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)
{
@@ -923,12 +853,12 @@
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 securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
d = new SetUserPasswordResponseAllData { };
if (temp == null)
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
@@ -941,20 +871,19 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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}");
}
@@ -971,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}
@@ -980,13 +910,15 @@
{
{ "UserId", userId },
{ "Password", password},
+ { "PassWordTips", passWordTips},
{ "LoginToken", loginToken}
};
jObject.Add("Data", data);
mainGateway.Send("Security/SetUserPassword", jObject.ToString());
}
- catch{
- }
+ catch
+ {
+ }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -1005,6 +937,127 @@
return d;
});
+ }
+
+ /// <summary>
+ /// *鏂板鎴栭噸璁剧敤鎴峰瘑鐮侊紙闇�瑕佺鐞嗗憳鏉冮檺锛�
+ /// <para>userId:鐢ㄦ埛id 濡傛灉鐢ㄦ埛id瀛樺湪锛屽垯淇敼瀵嗙爜銆傚鏋滅敤鎴穒d涓嶅瓨鍦紝鍒欎负璇d鏂板瀵嗙爜
+ /// 涓�0鏃讹紝鑷姩鍒嗛厤鏂扮殑鐢ㄦ埛id銆備负5鏃讹紝鍒欎慨鏀硅儊杩瘑鐮併�傚彇鍊艰寖鍥�0-5銆�</para>
+ /// <para>password:鏂扮鐞嗗憳瀵嗙爜</para>
+ /// <para>passWordTips:瀵嗙爜鎻愮ず</para>
+ /// <para>loginToken:鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��</para>
+ /// </summary>
+ public static async System.Threading.Tasks.Task<SetUserPasswordResponseAllData> SetPassWordTipsAsync(int userId, string password, string passWordTips, string loginToken)
+ {
+ return await System.Threading.Tasks.Task.Run(async () =>
+ {
+ SetUserPasswordResponseAllData d = null;
+ var mainGateway = ZbGateway.MainGateWay;
+ if (mainGateway == null)
+ {
+ d = new SetUserPasswordResponseAllData { 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 temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
+
+ if (temp == null)
+ {
+ d = new SetUserPasswordResponseAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
+ }
+ else
+ {
+ d = new SetUserPasswordResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
+ }
+ }
+
+ if (topic == gatewayID + "/" + "Security/Error_Respon")
+ {
+ var securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
+ d = new SetUserPasswordResponseAllData { };
+ if (temp == null)
+ {
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
+ }
+ else
+ {
+ if (temp.Error == 1)
+ {
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
+ }
+ else if (temp.Error == 2)
+ {
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
+ }
+ d.errorResponData = temp;
+ }
+ }
+
+ if (topic == gatewayID + "/" + "Security/AddPassWordTips_Respon")
+ {
+ var result = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
+ if (result == 0)
+ {
+ var setUserPasswordResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<SetUserPasswordResponseData>(jobject["Data"].ToString());
+ if (setUserPasswordResponseData != null)
+ {
+ d = new SetUserPasswordResponseAllData { setUserPasswordResponseData = setUserPasswordResponseData };
+ }
+ }
+ else
+ {
+ d = new SetUserPasswordResponseAllData { };
+ var r = new SetUserPasswordResponseData();
+ r.Result = result;
+ d.setUserPasswordResponseData = r;
+ }
+ }
+ };
+ mainGateway.Actions += action;
+ try
+ {
+ var jObject = new Newtonsoft.Json.Linq.JObject() {
+ { "Cluster_ID", 0 },
+ { "Command", 4037}
+ };
+ var data = new JObject
+ {
+ { "UserId", userId },
+ { "Password", password},
+ { "PassWordTips", passWordTips},
+ { "LoginToken", loginToken}
+ };
+ jObject.Add("Data", data);
+ mainGateway.Send("Security/AddPassWordTips", jObject.ToString());
+ }
+ catch
+ {
+ }
+ var dateTime = DateTime.Now;
+ while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
+ {
+ await System.Threading.Tasks.Task.Delay(10);
+ if (d != null)
+ {
+ break;
+ }
+ }
+ if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
+ {
+ d = new SetUserPasswordResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ }
+ mainGateway.Actions -= action;
+
+ return d;
+ });
}
/// <summary>
@@ -1015,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>
@@ -1070,7 +1114,7 @@
/// 涓�0鏃讹紝鑷姩鍒嗛厤鏂扮殑鐢ㄦ埛id銆備负5鏃讹紝鍒欎慨鏀硅儊杩瘑鐮併�傚彇鍊艰寖鍥�0-5銆�</para>
/// <para>loginToken:鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��</para>
/// </summary>
- public static async System.Threading.Tasks.Task<DelUserPasswordResponseAllData> DelUserPasswordAsync(int userId,string loginToken)
+ public static async System.Threading.Tasks.Task<DelUserPasswordResponseAllData> DelUserPasswordAsync(int userId, string loginToken)
{
return await System.Threading.Tasks.Task.Run(async () =>
{
@@ -1089,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)
{
@@ -1103,16 +1146,15 @@
}
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)
{
- d .errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
- {
+ {
if (temp.Error == 1)
{
d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
@@ -1127,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}");
}
@@ -1145,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}
@@ -1158,7 +1200,7 @@
jObject.Add("Data", data);
mainGateway.Send("Security/DelUserPassword", jObject.ToString());
}
- catch{}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -1187,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>
@@ -1252,8 +1285,8 @@
// 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 gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.GwId };
+ // var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
// if (temp == null)
// {
@@ -1479,67 +1512,67 @@
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)
{
d = new AddDeviceToZoneResponseAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
- }
+ }
else
{
d = new AddDeviceToZoneResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
-
+
}
}
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 securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
d = new AddDeviceToZoneResponseAllData { };
if (temp == null)
{
- d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
- d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��" ;
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp ;
+ d.errorResponData = temp;
}
}
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 };
- }
- System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+ var addDeviceToZoneResponseData = Newtonsoft.Json.JsonConvert.DeserializeObject<AddDeviceToZoneResponseData>(jobject["Data"].ToString());
+ if (addDeviceToZoneResponseData != null)
+ {
+ d = new AddDeviceToZoneResponseAllData { addDeviceToPartResponseData = addDeviceToZoneResponseData };
+ }
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
}
else
{
d = new AddDeviceToZoneResponseAllData { errorMessageBase = "娣诲姞澶辫触" };
- }
+ }
}
};
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 } };
@@ -1564,7 +1597,8 @@
mainGateway.Send(("Security/AddEqToZone_Actions 鍚姩"), jObject.ToString());
}
}
- catch {
+ catch
+ {
}
var dateTime = DateTime.Now;
@@ -1596,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>
@@ -1763,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)
{
@@ -1778,8 +1802,8 @@
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 securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
d = new AddNewModeResponseAllData { };
if (temp == null)
@@ -1804,17 +1828,16 @@
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}");
- }
+ }
}
else
{
@@ -1824,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 } };
@@ -1839,7 +1863,7 @@
mainGateway.Send(("Security/AddNewMode"), jObject.ToString());
}
}
- catch {}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -1849,9 +1873,9 @@
break;
}
}
- if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime )
+ if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new AddNewModeResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new AddNewModeResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
@@ -1869,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>
@@ -1912,14 +1927,14 @@
/// <summary>
/// 甯冮槻妯″紡鍚嶇О 锛屾渶澶�32涓瓧绗︺��
/// </summary>
- public string ModeName;
+ public string ModeName;
/// <summary>
/// 鍏佽澶辫兘銆�
///<para>0锛氫笉鍏佽澶辫兘銆�</para>
///<para>1锛氬厑璁稿け鑳�</para>
/// </summary>
- public int AllowDisable;
+ public int AllowDisable;
}
/// <summary>
@@ -1943,7 +1958,7 @@
/// 甯冮槻妯″紡鍚嶇О 锛屾渶澶�32涓瓧绗︺��
///<para>涓嶉渶瑕佷慨鏀瑰彲蹇界暐璇ュ瓧娈点��</para>
/// </summary>
- public string ModeName;
+ public string ModeName;
/// <summary>
/// 鍏佽澶辫兘銆�
@@ -1983,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)
{
@@ -1993,13 +2007,12 @@
else
{
d = new ZoneJoinModeResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
- }
+ }
}
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)
@@ -2024,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}");
}
}
@@ -2049,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 } };
@@ -2071,8 +2084,8 @@
mainGateway.Send(("Security/ZoneJoinMode"), jObject.ToString());
}
}
- catch{}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -2102,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>
@@ -2160,7 +2164,7 @@
///<para>2锛氬け璐ワ紝闃插尯宸插湪妯″紡涓瓨鍦�</para>
///<para>3锛氬け璐ワ紝闃插尯涓�24灏忔椂锛堥潤闊筹級闃插尯绫诲瀷銆�</para>
/// </summary>
- public int Status=999;
+ public int Status = 999;
/// <summary>
/// 闃插尯ID
/// </summary>
@@ -2187,7 +2191,10 @@
/// <para>涓嶅寘鎷�24灏忔椂闃插尯銆佸拰24灏忔椂闈欓煶闃插尯銆�24灏忔椂闃插尯鍜�24灏忔椂闈欓煶闃插尯鏄劚绂诲竷闃叉ā寮忎笉鍙楀竷鎾ら槻褰卞搷鐨勮繍琛岋紝涓嶅姞鍏ヤ换浣曚竴绉嶆ā寮忋��</para>
/// </summary>
public List<ZoneListObj> ZoneList = new List<ZoneListObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
@@ -2229,8 +2236,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)
{
@@ -2244,8 +2250,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)
@@ -2270,16 +2275,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}");
}
}
@@ -2295,7 +2299,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 } };
@@ -2348,17 +2353,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>
@@ -2432,7 +2428,10 @@
/// <para>涓嶅寘鎷�24灏忔椂闃插尯銆佸拰24灏忔椂闈欓煶闃插尯銆�24灏忔椂闃插尯鍜�24灏忔椂闈欓煶闃插尯鏄劚绂诲竷闃叉ā寮忎笉鍙楀竷鎾ら槻褰卞搷鐨勮繍琛岋紝涓嶅姞鍏ヤ换浣曚竴绉嶆ā寮忋��</para>
/// </summary>
public List<ZoneListObj> ZoneList = new List<ZoneListObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
#endregion
@@ -2461,8 +2460,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)
{
@@ -2476,8 +2474,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)
@@ -2503,23 +2500,22 @@
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}");
}
}
else
{
- d = new AddModeActonResponAllData {};
+ d = new AddModeActonResponAllData { };
var r = new AddModeActonResponData();
r.Result = result;
r.ModeId = modeId;
@@ -2530,53 +2526,54 @@
};
mainGateway.Actions += action;
System.Console.WriteLine("Security/AddModeActon_Actions 鍚姩" + System.DateTime.Now.ToString());
- try{
- if (addModeActonData != null)
+ try
{
- var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4007 } };
- var acList = new JArray { };
- foreach (var act in addModeActonData.Actions)
+ if (addModeActonData != null)
{
- if (act.Type == 0)
+ var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4007 } };
+ var acList = new JArray { };
+ foreach (var act in addModeActonData.Actions)
{
- var taskList = new JArray { };
- foreach (var taskInfo in act.TaskList)
+ if (act.Type == 0)
{
- var tInfo = new JObject{
+ var taskList = new JArray { };
+ foreach (var taskInfo in act.TaskList)
+ {
+ var tInfo = new JObject{
{ "TaskType", taskInfo.TaskType},
{ "Data1", taskInfo.Data1},
{ "Data2",taskInfo.Data2}
};
- taskList.Add(tInfo);
- }
+ taskList.Add(tInfo);
+ }
- var a = new JObject {
+ var a = new JObject {
{ "Type",act.Type},
{ "DeviceAddr", act.DeviceAddr} ,
{ "Epoint",act.Epoint} ,
{ "TaskList", taskList}
};
- acList.Add(a);
- }
- else if (act.Type == 1)
- {
- var b = new JObject {
+ acList.Add(a);
+ }
+ else if (act.Type == 1)
+ {
+ var b = new JObject {
{ "Type",act.Type},
{ "ScenesId", act.ScenesId}
};
- acList.Add(b);
+ acList.Add(b);
+ }
}
- }
- var data = new JObject {
+ var data = new JObject {
{ "ModeId",addModeActonData.ModeId},
{ "ActionType", addModeActonData.ActionType} ,
{ "Actions", acList},
{ "LoginToken", addModeActonData.LoginToken}
};
- jObject.Add("Data", data);
- mainGateway.Send(("Security/AddModeActon"), jObject.ToString());
- }
+ jObject.Add("Data", data);
+ mainGateway.Send(("Security/AddModeActon"), jObject.ToString());
+ }
}
catch { }
@@ -2599,17 +2596,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>
@@ -2630,7 +2618,7 @@
/// 0锛氶粯璁�
///<para>1锛氬け璐ワ紝妯″紡涓嶅瓨鍦ㄣ��</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 瑕佷慨鏀圭殑甯冮槻妯″紡ID銆�
@@ -2663,7 +2651,7 @@
///<para>0锛氭垚鍔�</para>
///<para>1锛氬け璐ワ紝璁惧鎴栧満鏅笉瀛樺湪</para>
/// </summary>
- public int Status=999;
+ public int Status = 999;
/// <summary>
/// 鍔ㄤ綔绫诲瀷
@@ -2720,7 +2708,7 @@
///<para>2锛氬竷闃插け璐ユ寚绀哄姩浣�</para>
///<para>3锛氭挙闃叉垚鍔熸寚绀哄姩浣�</para>
///<para>4锛氭挙闃插け璐ユ寚绀哄姩浣�</para>
- /// </summary>
+ /// </summary>
public int ActionType;
/// <summary>
@@ -2728,7 +2716,10 @@
///<para>濡傛灉涓嶉渶瑕佷慨鏀规垨鏂板鏃跺�欏彲蹇界暐璇ュ瓧娈点��</para>
/// </summary>
public List<ActionsData> Actions = new List<ActionsData>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
/// <summary>
/// 甯冮槻鎴愬姛鎸囩ず鍔ㄤ綔鏁版嵁
@@ -2844,8 +2835,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)
{
@@ -2859,10 +2849,9 @@
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 {};
+ d = new RemoveActionFromModeAllData { };
if (temp == null)
{
d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
@@ -2878,32 +2867,32 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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 };
- System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+ d = new RemoveActionFromModeAllData { removeActonFromModeResponData = removeActonFromModeResponData };
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
}
}
else
{
- d = new RemoveActionFromModeAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
+ d = new RemoveActionFromModeAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
}
}
};
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 } };
@@ -2938,7 +2927,8 @@
mainGateway.Send(("Security/RemoveActonFromMode"), jObject.ToString());
}
}
- catch{
+ catch
+ {
}
@@ -2970,17 +2960,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>
@@ -3030,7 +3011,7 @@
///<para>0锛氭垚鍔�</para>
///<para>1锛氬け璐ワ紝璁惧鎴栧満鏅笉瀛樺湪</para>
/// </summary>
- public int Status=999;
+ public int Status = 999;
/// <summary>
/// 鍔ㄤ綔绫诲瀷
@@ -3077,14 +3058,17 @@
///<para>2锛氬竷闃插け璐ユ寚绀哄姩浣�</para>
///<para>3锛氭挙闃叉垚鍔熸寚绀哄姩浣�</para>
///<para>4锛氭挙闃插け璐ユ寚绀哄姩浣�</para>
- /// </summary>
+ /// </summary>
public int ActionType;
/// <summary>
/// 鍔ㄤ綔鍒楄〃
/// </summary>
public List<RemoveActionsData> Actions = new List<RemoveActionsData>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
/// <summary>
/// 鍔ㄤ綔鍒楄〃鐨勬暟鎹�
@@ -3142,8 +3126,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)
{
@@ -3157,29 +3140,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)
@@ -3209,17 +3193,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>
@@ -3261,14 +3236,14 @@
/// 甯冮槻妯″紡鍚嶇О 锛屾渶澶�32涓瓧绗�
/// </summary>
public string ModeName;
-
+
/// <summary>
/// 鍏佽澶辫兘銆�
///<para>0锛氫笉鍏佽澶辫兘銆�</para>
///<para>1锛氬厑璁稿け鑳�</para>
/// </summary>
public string AllowDisable;
-
+
/// <summary>
/// 妯″紡褰撳墠甯冩挙闃茬姸鎬�
///<para>0锛氭挙闃�</para>
@@ -3289,7 +3264,7 @@
{
return await System.Threading.Tasks.Task.Run(async () =>
{
- GetModeInfoByIdResponAllData d =null;
+ GetModeInfoByIdResponAllData d = null;
var mainGateway = ZbGateway.MainGateWay;
if (mainGateway == null)
{
@@ -3304,8 +3279,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)
{
@@ -3318,7 +3292,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)
{
@@ -3328,7 +3301,7 @@
d = new GetModeInfoByIdResponAllData { getModeInfoByIdResponData = getModeInfoByIdResponData };
}
System.Console.WriteLine("宸叉敹鍒伴�氱煡杩斿洖");
- }
+ }
else
{
d = new GetModeInfoByIdResponAllData { };
@@ -3341,7 +3314,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 }
@@ -3350,8 +3324,8 @@
jObject.Add("Data", data);
mainGateway.Send("Security/GetModeInfoById", jObject.ToString());
}
- catch {}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -3363,7 +3337,7 @@
}
if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new GetModeInfoByIdResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new GetModeInfoByIdResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
System.Console.WriteLine("Security/GetModeInfoById_Actions 閫�鍑�" + System.DateTime.Now.ToString());
@@ -3380,17 +3354,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>
@@ -3411,7 +3376,7 @@
/// 0锛氶粯璁�
///<para>1锛氬け璐ワ紝甯冮槻妯″紡涓嶅瓨鍦�</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 甯冮槻妯″紡ID
@@ -3422,7 +3387,7 @@
/// 甯冮槻妯″紡鍚嶇О 锛屾渶澶�32涓瓧绗�
///<para> (Result=0鏃跺�兼湁鏁�)</para>
/// </summary>
- public string ModeName;
+ public string ModeName;
/// <summary>
/// 鍏佽澶辫兘銆�
@@ -3430,7 +3395,7 @@
///<para>1锛氬厑璁稿け鑳�</para>
///<para> (Result=0鏃跺�兼湁鏁�)</para>
/// </summary>
- public int AllowDisable = 100;
+ public int AllowDisable = 100;
/// <summary>
/// 妯″紡褰撳墠甯冩挙闃茬姸鎬�
@@ -3475,8 +3440,8 @@
///<para> (Result=0鏃跺�兼湁鏁�)</para>
/// </summary>
public List<ActionsInfo> WithdrawFailActions = new List<ActionsInfo>();
-
- }
+
+ }
/// <summary>
/// 鍔犲叆鎴愬姛鐨勯槻鍖哄垪琛ㄧ殑鏁版嵁
@@ -3560,8 +3525,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)
{
@@ -3575,7 +3539,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)
{
@@ -3588,7 +3551,7 @@
}
else
{
- d = new GetModeUsingResponseAllData {};
+ d = new GetModeUsingResponseAllData { };
var r = new GetModeUsingResponseData();
r.Result = result;
d.getModeUsingResponseData = r;
@@ -3598,15 +3561,16 @@
};
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}
};
mainGateway.Send("Security/GetModeUsing", jObject.ToString());
}
- catch {}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -3618,7 +3582,7 @@
}
if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new GetModeUsingResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new GetModeUsingResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
System.Console.WriteLine("Security/GetModeUsing_Actions 閫�鍑�" + System.DateTime.Now.ToString());
@@ -3635,17 +3599,8 @@
/// 鏌ョ湅褰撳墠姝e湪浣跨敤鐨勫竷闃叉ā寮忚繑鍥炵殑鏁版嵁,缃戝叧鍙嶉淇℃伅
/// </summary>
[System.Serializable]
- public class GetModeUsingResponseAllData
+ public class GetModeUsingResponseAllData : CommonDevice.ErrorResponCommon
{
- /// <summary>
- /// 閿欒淇℃伅
- /// </summary>
- public string errorMessageBase;
- /// <summary>
- /// 缃戝叧淇℃伅閿欒鍙嶉
- /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
- /// </summary>
- public ErrorResponData errorResponData;
/// <summary>
/// 鏌ョ湅褰撳墠姝e湪浣跨敤鐨勫竷闃叉ā寮忚繑鍥炵殑鏁版嵁
/// </summary>
@@ -3668,7 +3623,7 @@
/// 0锛氶粯璁�
/// <para>1锛氱郴缁熷綋鍓嶆病鏈夎繘琛屽竷闃�</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 鍚敤鐨勫竷闃叉ā寮廼d
@@ -3685,7 +3640,7 @@
/// <para>3锛氬け鑳戒竴娆★紝绗竴娆¤婵�娲讳笉璀﹀憡涓嶈Е鍙戝姩浣溿��</para>
/// </summary>
public int Setting;
-
+
}
#endregion
@@ -3700,7 +3655,7 @@
{
EnableModeResponAllData d = null;
var mainGateway = ZbGateway.MainGateWay;
- if (mainGateway == null)
+ if (mainGateway == null)
{
d = new EnableModeResponAllData { errorMessageBase = "褰撳墠娌℃湁涓荤綉鍏�" };
return d;
@@ -3713,8 +3668,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)
{
@@ -3727,17 +3681,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}");
}
}
@@ -3745,7 +3698,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() {
@@ -3764,7 +3718,7 @@
mainGateway.Send("Security/EnableMode", jObject.ToString());
}
}
- catch{}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -3794,17 +3748,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>
@@ -3829,7 +3774,7 @@
///<para>4锛氬竷闃插け璐ワ紝鏈夊叾浠栧竷闃叉ā寮忔鍦ㄥ惎鐢紙鍙兘浣跨敤涓�绉嶅竷闃叉ā寮忥紝闇�灏嗘鍦ㄥ惎鐢ㄧ殑甯冮槻妯″紡鎾ら槻鎵嶈兘甯冮槻鏂版ā寮忥級銆�</para>
///<para>5锛氬け璐ワ紝妯″紡灞炴�т笉鍏佽澶辫兘锛堝鏋滄柊寤哄竷闃叉ā寮忔椂锛孉llowDisable璁剧疆涓�0锛屽垯甯冮槻Setting鍊间笉鑳戒负2鎴�3锛屽惁鍒欏皢鎶ュ憡璇ラ敊璇級</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 鍚敤鐨勫竷闃叉ā寮廼d
@@ -3846,7 +3791,7 @@
/// <para>3锛氬け鑳戒竴娆★紝绗竴娆¤婵�娲讳笉璀﹀憡涓嶈Е鍙戝姩浣溿��</para>
/// </summary>
public int Setting;
-
+
/// <summary>
///褰撳墠姝e湪鍚敤鐨勫竷闃叉ā寮廔D锛堝綋Result = 4鏃跺瓨鍦ㄣ�傦級
/// </summary>
@@ -3909,7 +3854,7 @@
///<para>1锛氭鏌�</para>
/// </summary>
public int CheckIASStatus;
-
+
/// <summary>
///鐢ㄦ埛瀵嗙爜锛屾渶澶�32涓瓧绗�
/// </summary>
@@ -3941,8 +3886,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)
{
@@ -3956,15 +3900,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}");
}
}
@@ -3972,7 +3915,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}
@@ -3985,8 +3929,8 @@
mainGateway.Send("Security/WithdrawMode", jObject.ToString());
}
- catch {}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -4015,23 +3959,14 @@
/// 鎾ら槻杩斿洖鐨勬暟鎹�,缃戝叧鍙嶉淇℃伅
/// </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>
public WithdrawModeResponseData withdrawModeResponseData;
- }
+ }
/// <summary>
/// 鎾ら槻杩斿洖鐨勬暟鎹�
@@ -4049,7 +3984,7 @@
///<para>2锛氭挙闃插け璐ワ紝瀵嗙爜閿欒銆�</para>
///<para>3锛氭挙闃插け璐ワ紝妯″紡涓嶅彲鎾ら槻銆傦紙鏂板缓妯″紡鏃讹紝妯″紡灞炴�ц涓轰笉鍙挙闃插垯甯冮槻鍚庡皢涓嶈兘鎾ら槻锛�</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 琚挙闃茬殑妯″紡
@@ -4079,7 +4014,7 @@
{
RemoveModeResponseAllData d = null;
var mainGateway = ZbGateway.MainGateWay;
- if (mainGateway == null)
+ if (mainGateway == null)
{
d = new RemoveModeResponseAllData { errorMessageBase = "褰撳墠娌℃湁涓荤綉鍏�" };
return d;
@@ -4092,8 +4027,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)
{
@@ -4107,8 +4041,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)
{
@@ -4125,29 +4058,29 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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 };
- System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+ d = new RemoveModeResponseAllData { removeModeResponseData = removeModeResponseData };
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
}
}
};
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}
@@ -4160,8 +4093,8 @@
mainGateway.Send("Security/RemoveMode", jObject.ToString());
}
- catch {}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -4190,17 +4123,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>
@@ -4224,7 +4148,7 @@
///<para>1锛氬け璐ワ紝涓嶅瓨鍦ㄨ甯冮槻妯″紡銆�</para>
///<para>2锛氬垹闄ゅけ璐ワ紝涓嶅厑璁稿垹闄ゃ�傦紙褰揗odeId涓�1鎴�2鏃讹紝绂诲甯冮槻鍜屽湪瀹跺竷闃叉ā寮忎笉鍏佽鍒犻櫎锛�</para>
/// </summary>
- public int Result=999;
+ public int Result = 999;
/// <summary>
/// 妯″紡id
@@ -4234,155 +4158,13 @@
/// 妯″紡鍚� (褰揜esult=0鏃跺瓨鍦�)銆�
/// </summary>
public string ModeName;
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;鈥�
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
+
}
#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>
@@ -4408,8 +4190,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)
{
@@ -4423,8 +4204,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)
@@ -4442,20 +4222,19 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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}");
}
}
@@ -4472,7 +4251,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 } };
@@ -4495,7 +4275,7 @@
mainGateway.Send(("Security/RemoveEqToZone_Actions 鍚姩"), jObject.ToString());
}
}
- catch{}
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -4506,9 +4286,9 @@
break;
}
}
- if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime )
+ if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new RemoveDeviceToZoneAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new RemoveDeviceToZoneAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
@@ -4525,17 +4305,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>
@@ -4558,7 +4329,7 @@
/// <para>1锛氭坊鍔犲け璐ャ�傦紙灞�閮ㄥ竷闃插垪琛╥d涓嶅瓨鍦級</para>
/// </summary>
public int Result = 999;
-
+
/// <summary>
/// 瀹夐槻璁惧鍒楄〃(Result=0鏃跺瓨鍦�)
/// </summary>
@@ -4605,7 +4376,10 @@
/// 瀹夐槻璁惧鍒楄〃
/// </summary>
public List<RemoveDeviceListObj> RemoveDeviceList = new List<RemoveDeviceListObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
/// <summary>
@@ -4647,8 +4421,8 @@
// 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 gatewayTemp = new ZbGateway() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = ZbGateway.MainGateWay.GwId };
+ // var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
// if (temp == null)
// {
@@ -4820,8 +4594,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)
{
@@ -4834,14 +4607,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}");
}
@@ -4867,7 +4639,7 @@
jObject.Add("Data", data);
mainGateway.Send("Security/GetZoneDeviceListById", jObject.ToString());
}
- catch { }
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -4880,7 +4652,7 @@
}
if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new GetZoneDeviceListByIdResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new GetZoneDeviceListByIdResponAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
System.Console.WriteLine("Security/GetZoneDeviceListById_Actions 閫�鍑�" + System.DateTime.Now.ToString());
@@ -4897,17 +4669,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>
@@ -4943,7 +4706,15 @@
/// <summary>
/// 闃插尯鍚嶇О 锛屾渶澶�32涓瓧绗�
/// </summary>
- public string ZoneName;
+ public string ZoneName;
+
+ /// <summary>
+ /// 鏄惁绂佺敤淇℃伅鎺ㄩ�侊細
+ ///<para>0锛氫笉绂佺敤</para>
+ ///<para>1锛氱鐢�</para>
+ ///<para>褰撻槻鍖虹殑淇℃伅鎺ㄩ�佽绂佺敤鏃讹紝闃插尯琚Е鍙戞椂涓嶄細鍙戦��18灏忚妭鐨勨�濋槻鍖鸿瑙﹀彂鏄姤鍛娾�濈殑涓婚淇℃伅銆�</para>
+ /// </summary>
+ public int IsDisablePushMessage = 0;
/// <summary>
/// 瀹夐槻璁惧鍒楄〃
@@ -4988,7 +4759,7 @@
///<para>0锛氫笉鏃佽矾</para>
///<para>1锛氭梺璺�</para>
/// </summary>
- public int IsBypass=999;
+ public int IsBypass = 999;
}
#endregion
@@ -5004,7 +4775,7 @@
///<para>4锛氭挙闃插け璐ユ寚绀哄姩浣�</para>
///<para>loginToken:鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��</para>
///</summary>
- public static async System.Threading.Tasks.Task<ActionTestResponseAllData> ActionTestAsync(int modeId, int actionType,string loginToken)
+ public static async System.Threading.Tasks.Task<ActionTestResponseAllData> ActionTestAsync(int modeId, int actionType, string loginToken)
{
return await System.Threading.Tasks.Task.Run(async () =>
{
@@ -5023,8 +4794,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)
{
@@ -5033,13 +4803,13 @@
else
{
d = new ActionTestResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
- }
+ }
}
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 securityTemp = new Safeguard() { Time = jobject.Value<int>("Time"), DataID = jobject.Value<int>("Data_ID"), GateWayId = mainGateway.GwId };
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
d = new ActionTestResponseAllData { };
if (temp == null)
{
@@ -5056,17 +4826,16 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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}");
}
@@ -5080,7 +4849,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}
@@ -5094,8 +4864,8 @@
jObject.Add("Data", data);
mainGateway.Send("Security/ActionTest", jObject.ToString());
}
- catch {}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -5124,17 +4894,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>
@@ -5273,7 +5034,7 @@
/// 鎶ヨ鏃舵渶鍚庤婵�娲荤殑闃插尯
/// </summary>
public int ZoneId;
-
+
/// <summary>
/// 鏄惁涓哄己杩瘑鐮佹挙闃茶Е鍙戦潤闊抽槻鍖�
///<para>0锛氫笉鏄�</para>
@@ -5301,8 +5062,8 @@
/// <summary>
/// 淇℃伅鎺ㄩ�佺洰鏍�
/// </summary>
- public List<PushTargetInfo> PushTarget=new List<PushTargetInfo>();
-
+ public List<PushTargetInfo> PushTarget = new List<PushTargetInfo>();
+
}
#endregion
@@ -5362,23 +5123,21 @@
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)
- {
+ {
d = new EqByPassAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
- }
+ }
else
- {
- d = new EqByPassAllData { errorMessageBase = ErrorMess(temp.Error) , errorResponData = temp };
- }
+ {
+ d = new EqByPassAllData { errorMessageBase = ErrorMess(temp.Error), errorResponData = temp };
+ }
}
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)
{
@@ -5395,21 +5154,20 @@
d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp;
+ d.errorResponData = temp;
}
}
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 };
- System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+ d = new EqByPassAllData { eqByPassResponseData = eqByPassResponseData };
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
}
}
else
@@ -5417,7 +5175,7 @@
var r = new EqByPassResponseData();
r.Result = result;
d = new EqByPassAllData { eqByPassResponseData = r };
-
+
System.Console.WriteLine("宸叉敹鍒伴�氱煡杩斿洖");
}
}
@@ -5425,7 +5183,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 } };
@@ -5442,8 +5201,8 @@
mainGateway.Send(("Security/EqByPass"), jObject.ToString());
}
}
- catch{}
-
+ catch { }
+
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -5455,7 +5214,7 @@
}
if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
- d = new EqByPassAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ d = new EqByPassAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
mainGateway.Actions -= action;
@@ -5472,17 +5231,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>
@@ -5531,7 +5281,7 @@
/// </summary>
public int IsByPass;
- }
+ }
/// <summary>
/// 瀵归槻鍖哄畨闃茶澶囪繘琛屾梺璺垨鎾ら攢鏃佽矾鐨勬暟鎹�
@@ -5565,8 +5315,11 @@
/// 0锛氫笉鏃佽矾
///<para>1锛氭梺璺澶�</para>
/// </summary>
- public int IsByPass=999;
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ public int IsByPass = 999;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
#endregion
@@ -5582,9 +5335,9 @@
var mainGateway = ZbGateway.MainGateWay;
if (mainGateway == null)
- {
+ {
d = new AddZoneActionAllData { errorMessageBase = "褰撳墠娌℃湁涓荤綉鍏�" };
- return d;
+ return d;
}
Action<string, string> action = (topic, message) =>
{
@@ -5593,8 +5346,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)
{
@@ -5608,41 +5360,41 @@
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)
{
- d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
- d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��" ;
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp ;
+ d.errorResponData = temp;
}
}
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 };
- System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- }else{
+ d = new AddZoneActionAllData { addZoneActionResponseData = addZoneActionResponseData };
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
+ }
+ else
+ {
d = new AddZoneActionAllData { errorMessageBase = "缃戝叧鍥炲鏁版嵁鏄┖" };
- }
- }
+ }
+ }
};
mainGateway.Actions += action;
System.Console.WriteLine($"Security/AddZoneAction_Actions鍚姩_{System.DateTime.Now.ToString()}");
@@ -5694,7 +5446,8 @@
jObject.Add("Data", data);
mainGateway.Send(("Security/AddZoneAction"), jObject.ToString());
}
- }catch{}
+ }
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
{
@@ -5707,7 +5460,7 @@
if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
{
d = new AddZoneActionAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
-
+
}
mainGateway.Actions -= action;
@@ -5724,17 +5477,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>
@@ -5813,8 +5557,8 @@
/// <summary>
/// 璁惧鎴栧満鏅悕绉帮紝Status = 0鏃跺瓨鍦�
/// </summary>
- public string ESName;
- }
+ public string ESName;
+ }
/// <summary>
/// 娣诲姞闃插尯鎶ヨ鐩爣鐨勬暟鎹�
@@ -5837,7 +5581,10 @@
/// 鎶ヨ鐩爣鍒楄〃
/// </summary>
public List<AlarmActionObj> Actions = new List<AlarmActionObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
@@ -5873,8 +5620,8 @@
/// <summary>
/// 鍦烘櫙ID 銆傚綋Type=1鏃跺瓨鍦�
/// </summary>
- public int ScenesId;
- }
+ public int ScenesId;
+ }
#endregion
@@ -5900,8 +5647,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)
{
@@ -5915,18 +5661,17 @@
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)
{
- d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d .errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
@@ -5940,11 +5685,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
@@ -5991,7 +5735,8 @@
jObject.Add("Data", data);
mainGateway.Send(("Security/DelZoneAction"), jObject.ToString());
}
- }catch{}
+ }
+ catch { }
var dateTime = DateTime.Now;
while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
@@ -6021,17 +5766,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>
@@ -6083,7 +5819,7 @@
/// 鍔ㄤ綔绫诲瀷
///<para>0锛氳妭鐐硅澶囧姩浣�</para>
///<para>1锛氭墦寮�鍦烘櫙</para>
- /// </summary>
+ /// </summary>
public string Type;
/// <summary>
/// 璁惧mac鍦板潃 锛�
@@ -6095,13 +5831,13 @@
/// 璁惧绔彛鍙�
///<para>璁惧绔彛鍙� 鍜宮ac鍦板潃鍏卞悓鏍囪瘑鍞竴鐨剒igbee璁惧 鏁板�艰寖鍥�0-255銆� 褰揟ype=0鏃跺瓨鍦ㄣ��</para>
/// </summary>
- public int Epoint;
+ public int Epoint;
/// <summary>
/// 鍦烘櫙ID 銆傚綋Type=1鏃跺瓨鍦�
/// </summary>
- public int ScenesId;
- }
+ public int ScenesId;
+ }
/// <summary>
/// 鍒犻櫎闃插尯鎶ヨ鐩爣鐨勬暟鎹�
@@ -6124,7 +5860,10 @@
/// 鎶ヨ鐩爣鍒楄〃
/// </summary>
public List<DelAlarmActionObj> Actions = new List<DelAlarmActionObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
/// <summary>
@@ -6149,13 +5888,13 @@
/// 璁惧绔彛鍙�
///<para>璁惧绔彛鍙� 鍜宮ac鍦板潃鍏卞悓鏍囪瘑鍞竴鐨剒igbee璁惧 鏁板�艰寖鍥�0-255銆� 褰揟ype=0鏃跺瓨鍦ㄣ��</para>
/// </summary>
- public int Epoint;
+ public int Epoint;
/// <summary>
/// 鍦烘櫙ID 銆傚綋Type=1鏃跺瓨鍦�
/// </summary>
- public int ScenesId;
- }
+ public int ScenesId;
+ }
#endregion
#region 29鏌ョ湅闃插尯鎶ヨ鐩爣;
@@ -6183,8 +5922,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)
{
@@ -6198,11 +5936,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
@@ -6213,17 +5950,18 @@
};
mainGateWay.Actions += action;
System.Console.WriteLine($"Security/CatZoneAction_Actions鍚姩_{System.DateTime.Now.ToString()}");
- try{
- var jObject = new Newtonsoft.Json.Linq.JObject() {
+ try
+ {
+ var jObject = new Newtonsoft.Json.Linq.JObject() {
{ "Cluster_ID", 0 },
{ "Command", 4032 }
};
- var data = new JObject
+ var data = new JObject
{
{ "ActionType", actionType }
};
- jObject.Add("Data", data);
- mainGateWay.Send("Security/CatZoneAction", jObject.ToString());
+ jObject.Add("Data", data);
+ mainGateWay.Send("Security/CatZoneAction", jObject.ToString());
}
catch { }
@@ -6255,17 +5993,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>
@@ -6321,7 +6050,7 @@
/// 鍔ㄤ綔绫诲瀷
///<para>0锛氳妭鐐硅澶囧姩浣�</para>
///<para>1锛氭墦寮�鍦烘櫙</para>
- /// </summary>
+ /// </summary>
public int Type;
/// <summary>
/// 璁惧mac鍦板潃 锛�
@@ -6350,7 +6079,7 @@
/// 璁惧鎴栧満鏅悕绉�(褰揟ype=0 鎴朤ype=1鏃跺瓨鍦ㄣ��)
/// </summary>
public string ESName;
- }
+ }
#endregion
@@ -6376,8 +6105,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)
{
@@ -6391,36 +6119,34 @@
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)
{
- d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
- d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��" ;
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp ;
+ d.errorResponData = temp;
}
}
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
@@ -6431,39 +6157,40 @@
};
mainGateway.Actions += action;
System.Console.WriteLine($"Security/AddZoneAction(璁剧疆鑳佽揩鐘舵�佷笅鐨勭數璇濆彿鐮侊級_Actions鍚姩_{System.DateTime.Now.ToString()}");
- try{
- if (setCoercePhoneNumberData != null)
+ try
{
- var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4030 } };
- var actionsList = new JArray { };
- foreach (var act in setCoercePhoneNumberData.Actions)
- {
- if (act.Type == 2)
+ if (setCoercePhoneNumberData != null)
+ {
+ var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4030 } };
+ var actionsList = new JArray { };
+ foreach (var act in setCoercePhoneNumberData.Actions)
{
- var pushTargetList = new JArray { };
- foreach (var pushInfo in act.PushTarget)
+ if (act.Type == 2)
{
- var pInfo = new JObject{
+ var pushTargetList = new JArray { };
+ foreach (var pushInfo in act.PushTarget)
+ {
+ var pInfo = new JObject{
{ "PushNumber", pushInfo.PushNumber}
};
- pushTargetList.Add(pInfo);
- }
- var c = new JObject {
+ pushTargetList.Add(pInfo);
+ }
+ var c = new JObject {
{ "Type",act.Type},
{ "PushTarget", pushTargetList}
};
- actionsList.Add(c);
+ actionsList.Add(c);
+ }
}
- }
- var data = new JObject
+ var data = new JObject
{
{ "ActionType", 253},
{ "Actions", actionsList},
{ "LoginToken", setCoercePhoneNumberData.LoginToken}
};
- jObject.Add("Data", data);
- mainGateway.Send(("Security/AddZoneAction"), jObject.ToString());
- }
+ jObject.Add("Data", data);
+ mainGateway.Send(("Security/AddZoneAction"), jObject.ToString());
+ }
}
catch { }
var dateTime = DateTime.Now;
@@ -6485,7 +6212,65 @@
System.Console.WriteLine($"Security/AddZoneAction(璁剧疆鑳佽揩鐘舵�佷笅鐨勭數璇濆彿鐮侊級_Actions 閫�鍑篲{System.DateTime.Now.ToString()}");
return d;
});
+ }
+
+ /// <summary>
+ /// *璁剧疆鑳佽揩鐘舵�佷笅琚�氱煡鐨勮仈绯诲彿鐮佺殑澶囨敞锛堥渶瑕佺鐞嗗憳鏉冮檺锛�. -2:涓荤綉鍏充涪澶�
+ /// </summary>
+ /// <param name="strPhone">鍦板尯鐮�-鑱旂郴鏂瑰紡</param>
+ /// <param name="strNote">澶囨敞,鏈�澶�63byte</param>
+ /// <returns></returns>
+ public static async System.Threading.Tasks.Task<SetCoercePhoneNumberResponseData> SetCoercePhoneNumberNoteAsync(string strPhone, string strNote)
+ {
+ SetCoercePhoneNumberResponseData d = null;
+ var mainGateway = ZbGateway.MainGateWay;
+ if (mainGateway == null)
+ {
+ d = new SetCoercePhoneNumberResponseData();
+ d.Result = -2;
+ return d;
+ }
+ Action<string, string> action = (topic, message) =>
+ {
+ var gatewayID = topic.Split('/')[0];
+ if (topic == gatewayID + "/" + "Security/AddPushNumberNote_Respon")
+ {
+ var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+ d = Newtonsoft.Json.JsonConvert.DeserializeObject<SetCoercePhoneNumberResponseData>(jobject["Data"].ToString());
+ }
+ };
+
+ mainGateway.Actions += action;
+ try
+ {
+ var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4038 } };
+ var data = new JObject
+ {
+ { "ActionType", 253},
+ { "LoginToken", Shared.Phone.UserCenter.HdlSafeguardLogic.Current.GetLoginToken()},
+ { "PushNumber", strPhone},
+ { "PushNumberNote", strNote}
+ };
+ jObject.Add("Data", data);
+ mainGateway.Send("Security/AddPushNumberNote", jObject.ToString());
+ }
+ catch { }
+
+ int timeOut = 0;
+ while (timeOut <= 60)
+ {
+ await System.Threading.Tasks.Task.Delay(50);
+ if (d != null)
+ {
+ break;
+ }
+ timeOut++;
+ }
+
+ mainGateway.Actions -= action;
+ return d;
}
+
/// <summary>
/// 璁剧疆鑳佽揩鐘舵�佷笅琚�氱煡鐨勮仈绯诲彿鐮佺殑杩斿洖鏁版嵁 ,缃戝叧鍙嶉淇℃伅
@@ -6495,17 +6280,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>
@@ -6525,7 +6301,7 @@
/// <summary>
/// 杩斿洖缁撴灉
/// <para>0锛氶粯璁�</para>
- /// </summary>
+ /// </summary>
public int Result = 999;
/// <summary>
@@ -6544,13 +6320,13 @@
/// </summary>
[System.Serializable]
public class PushTargetActionResponseObj
- {
+ {
/// <summary>
/// 鍔ㄤ綔绫诲瀷
///<para>2锛氫俊鎭帹閫�</para>
/// </summary>
public string Type;
-
+
/// <summary>
/// 淇℃伅鎺ㄩ�佺洰鏍�,褰揟ype=2鏃跺瓨鍦ㄣ��
/// </summary>
@@ -6567,7 +6343,10 @@
/// 鎺ㄩ�佷俊鎭殑鐩爣鎵嬫満鍙风爜
///</summary>
public string PushNumber;
-
+ /// <summary>
+ /// 澶囨敞淇℃伅
+ /// </summary>
+ public string PushNumberNote;
}
/// <summary>
@@ -6591,7 +6370,10 @@
/// </summary>
public List<PushTargetActionObj> Actions = new List<PushTargetActionObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
@@ -6606,7 +6388,7 @@
///<para>2锛氫俊鎭帹閫�</para>
/// </summary>
public int Type;
-
+
/// <summary>
/// 淇℃伅鎺ㄩ�佺洰鏍�,褰揟ype=2鏃跺瓨鍦ㄣ��
/// </summary>
@@ -6636,8 +6418,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)
{
@@ -6651,36 +6432,34 @@
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)
{
- d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" ;
+ d.errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖";
}
else
{
if (temp.Error == 1)
{
- d .errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��" ;
+ d.errorMessageBase = "缃戝叧涓嶆槸涓荤綉鍏筹紝鏃犳硶杩涜璇ユ搷浣溿��";
}
else if (temp.Error == 2)
{
- d. errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��" ;
+ d.errorMessageBase = "璇ユ搷浣滈渶瑕佸畨闃茬鐞嗗憳鏉冮檺锛岄渶鍏堜互绠$悊鍛樿韩浠借繘琛岀櫥闄嗐��";
}
System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{topic}");
- d.errorResponData = temp ;
+ d.errorResponData = temp;
}
}
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
@@ -6691,39 +6470,40 @@
};
mainGateway.Actions += action;
System.Console.WriteLine($"Security/AddZoneAction(鍒犻櫎鑳佽揩鐘舵�佷笅鐨勭數璇濆彿鐮侊級_Actions鍚姩_{System.DateTime.Now.ToString()}");
- try{
- if (delCoercePhoneNumberData != null)
+ try
{
- var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4031 } };
- var actionsList = new JArray { };
- foreach (var act in delCoercePhoneNumberData.Actions)
+ if (delCoercePhoneNumberData != null)
{
- if (act.Type == 2)
+ var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4031 } };
+ var actionsList = new JArray { };
+ foreach (var act in delCoercePhoneNumberData.Actions)
{
- var pushTargetList = new JArray { };
- foreach (var pushInfo in act.PushTarget)
+ if (act.Type == 2)
{
- var pInfo = new JObject{
+ var pushTargetList = new JArray { };
+ foreach (var pushInfo in act.PushTarget)
+ {
+ var pInfo = new JObject{
{ "PushNumber", pushInfo.PushNumber}
};
- pushTargetList.Add(pInfo);
- }
- var c = new JObject {
+ pushTargetList.Add(pInfo);
+ }
+ var c = new JObject {
{ "Type",act.Type},
{ "PushTarget", pushTargetList}
};
- actionsList.Add(c);
+ actionsList.Add(c);
+ }
}
- }
- var data = new JObject
+ var data = new JObject
{
{ "ActionType", 253},
{ "Actions", actionsList},
{ "LoginToken", delCoercePhoneNumberData.LoginToken}
};
- jObject.Add("Data", data);
- mainGateway.Send(("Security/DelZoneAction"), jObject.ToString());
- }
+ jObject.Add("Data", data);
+ mainGateway.Send(("Security/DelZoneAction"), jObject.ToString());
+ }
}
catch { }
var dateTime = DateTime.Now;
@@ -6755,17 +6535,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>
@@ -6797,7 +6568,7 @@
/// </summary>
public List<PushTargetActionResponseObj> Actions = new List<PushTargetActionResponseObj>();
- }
+ }
/// <summary>
/// 鍒犻櫎鑳佽揩鐘舵�佷笅琚�氱煡鐨勮仈绯诲彿鐮佺殑鏁版嵁
/// </summary>
@@ -6818,7 +6589,10 @@
/// </summary>
public List<PushTargetActionObj> Actions = new List<PushTargetActionObj>();
- /// <summary>鈥� /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇�傗�� /// </summary>鈥� public string LoginToken;
+ /// <summary>
+ /// 鐧婚檰鏍囪瘑锛屾渶澶�32涓瓧绗︺�傜敱app鑷姩鐢熸垚鐨勫敮涓�鏍囪瘑銆備笌绠$悊鍛樼櫥闄嗘寚浠ょ殑鈥淟oginToken鈥濅竴鑷达紝鍚﹀垯灏嗚繑鍥炩�淪ecurity/Error_Respon鈥濋敊璇��
+ /// </summary>
+ public string LoginToken;
}
#endregion
@@ -6845,8 +6619,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)
{
@@ -6860,11 +6633,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
@@ -6875,15 +6647,16 @@
};
mainGateway.Actions += action;
System.Console.WriteLine($"Security/CatZoneAction(鏌ョ湅鑳佽揩鐘舵�佷笅鐨勭數璇濆彿鐮侊級_Actions鍚姩_{System.DateTime.Now.ToString()}");
- try{
- var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4032 } };
- var actionsList = new JArray { };
- var data = new JObject
+ try
+ {
+ var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 4032 } };
+ var actionsList = new JArray { };
+ var data = new JObject
{
{ "ActionType", actionType }
};
- jObject.Add("Data", data);
- mainGateway.Send(("Security/CatZoneAction"), jObject.ToString());
+ jObject.Add("Data", data);
+ mainGateway.Send(("Security/CatZoneAction"), jObject.ToString());
}
catch { }
@@ -6916,17 +6689,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>
@@ -7018,8 +6782,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)
{
@@ -7033,11 +6796,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
@@ -7048,18 +6810,19 @@
};
mainGateway.Actions += action;
System.Console.WriteLine($"Security/DisablePushMessage_Actions鍚姩_{System.DateTime.Now.ToString()}");
- try{
- var jObject = new Newtonsoft.Json.Linq.JObject() {
+ try
+ {
+ var jObject = new Newtonsoft.Json.Linq.JObject() {
{ "Cluster_ID", 0 },
{ "Command", 4034 }
};
- var data = new JObject
+ var data = new JObject
{
{ "ZoneType", zoneType },
{ "IsDisablePushMessage", isDisablePushMessage }
};
- jObject.Add("Data", data);
- mainGateway.Send(("Security/DisablePushMessage"), jObject.ToString());
+ jObject.Add("Data", data);
+ mainGateway.Send(("Security/DisablePushMessage"), jObject.ToString());
}
catch { }
@@ -7091,17 +6854,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>
@@ -7165,8 +6919,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)
{
@@ -7180,11 +6933,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
@@ -7238,17 +6990,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>
--
Gitblit v1.8.0