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/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index 1e792df..0cd272f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -106,10 +106,10 @@
house.IsVirtually = true;
house.Save(false);
Config.Instance.HomeId = house.Id;
- Config.Instance.Home = House.GetHouseByHouseId(house.Id);
+ Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(house.Id);
//棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
- UserCenterLogic.CreatAllUserCenterDirectory();
+ HdlFileLogic.Current.CreatAllUserCenterDirectory();
}
#endregion
@@ -168,8 +168,6 @@
var listFloorKey = this.GetAllFloorKeys();
var dicRoomName = this.GetRoomSampleList();
- //璁剧疆鍒濆妤煎眰
- Config.Instance.Home.CurrentFloorId = listFloorKey[0];
foreach (string floorKey in listFloorKey)
{
foreach (string roomId in dicRoomName.Keys)
@@ -224,6 +222,7 @@
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 2 });
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌鸿皟缃戝叧, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+ //list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
//闃冲彴
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A220pir浼犳劅鍣�, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
@@ -716,8 +715,8 @@
this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
}
- //1涓户鐢靛櫒
- var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
+ //1涓皟鍏夊櫒
+ var device2 = new DimmableLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
device2.DfunctionType = DeviceFunctionType.A鐏厜;
//璁剧疆璁惧鐨勫熀鏈俊鎭�
this.SetBaseDataToDevice(device2, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
@@ -730,6 +729,11 @@
public void Zigbee绌鸿皟缃戝叧(int i_DeviceCount, string i_RoomId)
{
+ var device2 = new OTADevice() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 200 };
+ //璁剧疆璁惧鐨勫熀鏈俊鎭�
+ this.SetBaseDataToDevice(device2, 3600, 3600, "MAC/GW-ZB.10", i_RoomId);
+ this.DeviceNumber++;
+ return;
for (int i = 0; i < i_DeviceCount; i++)
{
//10涓┖璋冨簲璇ュ彲浠ヤ簡
@@ -896,6 +900,31 @@
}
}
+ public void Zigbee鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡(int i_DeviceCount, string i_RoomId)
+ {
+ for (int i = 0; i < i_DeviceCount; i++)
+ {
+ //4涓共鎺ョ偣
+ for (int j = 1; j <= 4; j++)
+ {
+ var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+ //璁剧疆璁惧鐨勫熀鏈俊鎭�
+ this.SetBaseDataToDevice(device, 2000, 2000, "MLR0310-ZB.20", i_RoomId);
+ }
+ //3涓户鐢靛櫒
+ for (int j = 5; j <= 7; j++)
+ {
+ var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+ device.DfunctionType = DeviceFunctionType.A鐏厜;
+ //璁剧疆璁惧鐨勫熀鏈俊鎭�
+ this.SetBaseDataToDevice(device, 2000, 2000, "MLR0310-ZB.20", i_RoomId);
+ device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+ }
+
+ this.DeviceNumber++;
+ }
+ }
+
/// <summary>
/// 璁剧疆璁惧鐨勫熀鏈俊鎭�
/// </summary>
@@ -914,10 +943,24 @@
device.ModelIdentifier = ModelIdentifier;
device.CurrentGateWayId = string.Empty;
- //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�
+ //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�,鎷ユ湁寮�鍏冲姛鑳�
device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 3 });
device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 3 });
-
+ if (device.Type == DeviceType.AirSwitch || device.Type == DeviceType.OnOffOutput
+ || device.Type == DeviceType.DimmableLight || device.Type == DeviceType.ColorDimmableLight)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 6 });
+ device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 6 });
+ }
+ if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.DimmableLight
+ || device.Type == DeviceType.ColorDimmableLight)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 8 });
+ }
+ if (device.Type == DeviceType.WindowCoveringDevice)
+ {
+ device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 258 });
+ }
//娣诲姞铏氭嫙璁惧
LocalDevice.Current.AddVirtualDeviceToMemory(device);
@@ -964,6 +1007,7 @@
A鏂规偊鏂伴闈㈡澘 = 25,
A鏂规偊鏂伴灏忔ā鍧� = 26,
A鍚搁《鐕冩皵浼犳劅鍣� = 27,
+ A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 = 28,
}
#endregion
--
Gitblit v1.8.0