From d978b68da978982b35dd7d7da27217925cf8d788 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 29 四月 2020 09:34:28 +0800
Subject: [PATCH] 完整版的虚拟设备功能
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs | 25 +++++++------------------
1 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
index 716b00b..d6e9dea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs
@@ -9,7 +9,7 @@
/// <summary>
/// 缃戝叧鐨勫崌绾ч�昏緫
/// </summary>
- public class HdlGatewayUpdateLogic
+ public class HdlGatewayUpdateLogic : HdlDeviceUpdateCommonLogic
{
#region 鈻� 鍙橀噺澹版槑___________________________
@@ -38,14 +38,6 @@
/// 缃戝叧鏂扮増鏈殑鍥轰欢淇℃伅
/// </summary>
public FirmwareVersionInfo gatewayFirmware = null;
- /// <summary>
- /// 褰撳墠鎵ц鐘舵��(鍑虹幇閿欒鏃�,瀹冧篃浼氬彉鎴恡rue)
- /// </summary>
- public UpdateStatuMode UpdateStatu = UpdateStatuMode.None;
- /// <summary>
- /// 鍗囩骇鏄惁瀹屾垚
- /// </summary>
- public bool IsFinishUpdate = true;
/// <summary>
/// 鍓嶄竴娆$殑鏈�缁堢姸鎬�
@@ -71,6 +63,7 @@
public HdlGatewayUpdateLogic(ZbGateway zbGateway, FirmwareVersionInfo i_virtualFirmware,
FirmwareVersionInfo i_coordinatorFirmware, FirmwareVersionInfo i_gatewayFirmware)
{
+ this.ClassDiv = 1;
this.upDatezbGateway = zbGateway;
this.virtualFirmware = i_virtualFirmware;
this.coordinatorFirmware = i_coordinatorFirmware;
@@ -90,9 +83,9 @@
{
//濡傛灉鏄瓑寰呮ā寮忥紝鍐嶆鐐瑰嚮鏃讹紝绉婚櫎鍒楄〃
string gwId = HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway);
- if (FirmwareUpdateResourse.dicGatewayUpdateList.ContainsKey(gwId) == true)
+ if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true)
{
- FirmwareUpdateResourse.dicGatewayUpdateList.Remove(gwId);
+ FirmwareUpdateResourse.dicUpdateList.Remove(gwId);
}
this.UpdateStatu = UpdateStatuMode.None;
//鍙栨秷
@@ -109,7 +102,7 @@
//杩涘叆绛夊緟妯″紡
this.UpdateStatu = UpdateStatuMode.Wait;
string gwId2 = HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway);
- FirmwareUpdateResourse.dicGatewayUpdateList[gwId2] = this;
+ FirmwareUpdateResourse.dicUpdateList[gwId2] = this;
//绛夊緟涓��
this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uWaitting));
@@ -120,7 +113,7 @@
/// <summary>
/// 寮�濮嬫墽琛屾洿鏂版搷浣�(FirmwareUpdateLogic璋冪敤)
/// </summary>
- public void DoStartUpdate()
+ public override void DoStartUpdate()
{
//鐘舵�佸彉鏇�
this.IsFinishUpdate = false;
@@ -986,10 +979,6 @@
{
HdlThreadLogic.Current.RunThread(async () =>
{
- //褰撳墠缃戝叧鐨勭増鏈�
- var oldVersion = HdlGatewayLogic.Current.GetGwInfoAttribute(this.upDatezbGateway, "LinuxFWVersion");
- int oldLinuxVersion = Convert.ToInt32(oldVersion);
-
//鍏堢瓑涓�120绉掑惂锛岀綉鍏冲崌绾у拰缃戝叧瀹屽叏閲嶅惎闇�瑕佸緢闀挎椂闂�
int count = 12;
for (int i = 0; i < count; i++)
@@ -1029,7 +1018,7 @@
/// <summary>
/// 閲婃斁缂撳瓨
/// </summary>
- public void Dispose()
+ public override void Dispose()
{
this.ProgressEvent = null;
this.UpdateStatuChangedEvent = null;
--
Gitblit v1.8.0