From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 2103 +++++++++++++++++++++++++++++----------------------------
 1 files changed, 1,065 insertions(+), 1,038 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
old mode 100755
new mode 100644
index 0cd272f..7381751
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -1,1038 +1,1065 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-using Shared.Common;
-using ZigBee.Device;
-
-namespace Shared.Phone.UserCenter
-{
-    /// <summary>
-    /// App浣撻獙璐﹀彿鐨勯�昏緫
-    /// </summary>
-    public class HdlExperienceAccountLogic
-    {
-        #region 鈻� 鍙橀噺澹版槑___________________________
-
-        /// <summary>
-        /// App浣撻獙璐﹀彿鐨勯�昏緫
-        /// </summary>
-        private static HdlExperienceAccountLogic m_Current = null;
-        /// <summary>
-        /// App浣撻獙璐﹀彿鐨勯�昏緫
-        /// </summary>
-        public static HdlExperienceAccountLogic Current
-        {
-            get
-            {
-                if (m_Current == null)
-                {
-                    m_Current = new HdlExperienceAccountLogic();
-                }
-                return m_Current;
-            }
-        }
-
-        /// <summary>
-        /// 鐢ㄦ潵閫掑鐢熸垚Mac鐢ㄧ殑
-        /// </summary>
-        private int DeviceNumber = 0;
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖朹____________________________
-
-        /// <summary>
-        /// 鍒濆鍖栧叏閮ㄤ綋楠屾暟鎹�
-        /// </summary>
-        public void InitAllExperienceData()
-        {
-            //鍒濆鍖栫敤鎴�
-            this.InitUserInfoData();
-            //鍒濆鍖栦綇瀹�
-            this.InitHomeData();
-            //鍒濆鍖栨ゼ灞�
-            this.InitFloorData();
-            //鍒濆鍖栨埧闂�
-            this.InitRoomData();
-            //鍒濆鍖栬澶�
-            this.InitDeviceData();
-            //鍒濆鍖栧満鏅�
-            this.InitSceneData();
-            //鍒锋柊宸﹁竟鍒锋柊鎴块棿瑙嗗浘鍒楄〃
-            HdlRoomLogic.Current.RefreshRoomListView();
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栫敤鎴穇________________________
-
-        /// <summary>
-        /// 鍒濆鍖栫敤鎴�
-        /// </summary>
-        private void InitUserInfoData()
-        {
-            UserCenterResourse.UserInfo = new UserInformation();
-            UserCenterResourse.UserInfo.AuthorityNo = 1;//缁欎粬绠$悊鍛樼О鍙�
-            UserCenterResourse.UserInfo.AuthorityText = Language.StringByID(R.MyInternationalizationString.Administrator);
-            //铏氭嫙璐﹀彿
-            UserCenterResourse.UserInfo.UserName = Language.StringByID(R.MyInternationalizationString.uVirtualAccount);
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栦綇瀹卂________________________
-
-        /// <summary>
-        /// 鍒濆鍖栦綇瀹�
-        /// </summary>
-        private void InitHomeData()
-        {
-            //鍒濆鍖栦綇瀹匢D
-            string homeId = "abcdefghijklmn";
-            //鍒濆Guid
-            Config.Instance.Guid = "chushiGuid";
-            var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, homeId);
-            if (System.IO.Directory.Exists(path) == true)
-            {
-                //鍐嶆鍚姩鐨勬椂鍊欙紝閲嶆柊寮�濮�
-                System.IO.Directory.Delete(path, true);
-            }
-            System.IO.Directory.CreateDirectory(path);
-
-            //娉ㄦ剰,杩欓噷涓嶆竻绌哄綋鍓嶄綇瀹呭垪琛�,淇濈暀瀹冧箣鍓嶇殑浣忓畢鍒楄〃
-
-            //鍒涘缓涓存椂浣忓畢
-            var house = new House() { Id = homeId, Name = Language.StringByID(R.MyInternationalizationString.uMyHome) };
-            house.IsVirtually = true;
-            house.Save(false);
-            Config.Instance.HomeId = house.Id;
-            Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(house.Id);
-
-            //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
-            HdlFileLogic.Current.CreatAllUserCenterDirectory();
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨ゼ灞俖________________________
-
-        /// <summary>
-        /// 鍒濆鍖栨ゼ灞�
-        /// </summary>
-        private void InitFloorData()
-        {
-            Config.Instance.Home.FloorDics = new Dictionary<string, string>();
-            //Config.Instance.Home.FloorDics["floorKey1"] = "1F";
-            //Config.Instance.Home.FloorDics["floorKey2"] = "2F";
-            //Config.Instance.Home.FloorDics["floorKey3"] = "3F";
-            //Config.Instance.Home.FloorDics["floorKey4"] = "4F";
-            //Config.Instance.Home.FloorDics["floorKey5"] = "5F";
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栨埧闂確________________________
-
-        /// <summary>
-        /// 鑾峰彇鎴块棿鏍锋澘鍒楄〃
-        /// </summary>
-        /// <returns></returns>
-        private Dictionary<string, string> GetRoomSampleList()
-        {
-            var dicRoomName = new Dictionary<string, string>();
-            //瀹㈠巺
-            dicRoomName["KeTing"] = Language.StringByID(R.MyInternationalizationString.uLivingRoom);
-            //闃冲彴
-            dicRoomName["YangTai"] = Language.StringByID(R.MyInternationalizationString.uBalcony);
-            //鍗у
-            dicRoomName["WoShi"] = Language.StringByID(R.MyInternationalizationString.uBedroom);
-            //鐜勫叧
-            dicRoomName["XuanGuan"] = Language.StringByID(R.MyInternationalizationString.uVestibule);
-            //鍘ㄦ埧
-            dicRoomName["ChuFang"] = Language.StringByID(R.MyInternationalizationString.uKitchen);
-            //璧板粖
-            dicRoomName["ZouLang"] = Language.StringByID(R.MyInternationalizationString.uCorridor);
-
-            return dicRoomName;
-        }
-
-        /// <summary>
-        /// 鍒濆鍖栨埧闂�
-        /// </summary>
-        private void InitRoomData()
-        {
-            //鍏堝埛鏂板鍣�
-            HdlRoomLogic.Current.InitAllRoom();
-
-            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
-            var listFloorKey = this.GetAllFloorKeys();
-            var dicRoomName = this.GetRoomSampleList();
-
-            foreach (string floorKey in listFloorKey)
-            {
-                foreach (string roomId in dicRoomName.Keys)
-                {
-                    //鍒涘缓鏂版埧闂�
-                    var newRoom = new Room();
-                    newRoom.Id = floorKey + "_" + roomId;
-                    newRoom.Name = dicRoomName[roomId];
-                    newRoom.BackgroundImage = "RoomIcon/0.jpg";
-                    newRoom.FloorId = floorKey;
-                    HdlRoomLogic.Current.AddRoom(newRoom, false);
-                }
-            }
-        }
-
-        /// <summary>
-        /// 鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
-        /// </summary>
-        /// <returns></returns>
-        private List<string> GetAllFloorKeys()
-        {
-            var listKey = new List<string>();
-            foreach (var strKey in Config.Instance.Home.FloorDics.Keys)
-            {
-                listKey.Add(strKey);
-            }
-            if (listKey.Count == 0)
-            {
-                listKey.Add("");
-            }
-            return listKey;
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栬澶嘷________________________
-
-        /// <summary>
-        /// 璁剧疆闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
-        /// </summary>
-        /// <returns></returns>
-        private List<AddDevicePra> GetVirtualDeviceList()
-        {
-            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
-            var list = new List<AddDevicePra>();
-            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
-            var listFloorKey = this.GetAllFloorKeys();
-            foreach (var floorKey in listFloorKey)
-            {
-                //瀹㈠巺
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
-                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 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍗峰笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A寮�鍚堝笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
-
-                //鍗у
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3璺户鐢靛櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
-
-                //鐜勫叧
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A闂ㄧ獥纾佷紶鎰熷櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
-
-                //鍘ㄦ埧
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A姘存蹈浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐑熼浘浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍚搁《鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
-
-                //璧板粖
-                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
-            }
-            return list;
-        }
-
-        /// <summary>
-        /// 鍒濆鍖栬澶�
-        /// </summary>
-        private void InitDeviceData()
-        {
-            //鍏堝埛鏂板鍣�
-            LocalDevice.Current.ReFreshByLocal();
-            //椤轰究涔熸暣涓�涓嬬綉鍏�(鏈夊彲鑳藉畠鏄粠瀹炰綋璐﹀彿杞负铏氭嫙鏃�,娌℃湁娓呯┖)
-            HdlGatewayLogic.Current.ReFreshByLocal();
-            HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
-
-            Type thisType = m_Current.GetType();
-            //鑾峰彇闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
-            var list = this.GetVirtualDeviceList();
-            foreach (var data in list)
-            {
-                string methordName = "Zigbee" + data.DeviceType.ToString().Substring(1);
-                //鍙嶅皠鎸囧畾鐨勫嚱鏁�
-                var myMethod = thisType.GetMethod(methordName);
-                myMethod.Invoke(this, new object[] { data.DeviceCount, data.RoomId });
-            }
-        }
-
-        #endregion
-
-        #region 鈻� 鍒濆鍖栧満鏅痏________________________
-
-        /// <summary>
-        /// 鍒濆鍖栧満鏅�
-        /// </summary>
-        private void InitSceneData()
-        {
-            //鍒锋柊瀹瑰櫒
-            HdlSceneLogic.Current.ReFreshByLocal();
-
-            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
-            var listFloorKey = this.GetAllFloorKeys();
-            //鑾峰彇鍏ㄩ儴鐨勬埧闂存ā鏉垮垪琛�
-            var dicRoom = this.GetRoomSampleList();
-
-            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
-            int sceneIdNo = 1;
-            //瀵规瘡涓�涓ゼ灞�
-            foreach (var floorKey in listFloorKey)
-            {
-                //瀵规瘡涓�涓埧闂�
-                foreach (var strKey in dicRoom.Keys)
-                {
-                    var room = HdlRoomLogic.Current.GetRoomById(floorKey + "_" + strKey);
-                    if (room == null)
-                    {
-                        continue;
-                    }
-                    //鐏叏寮�
-                    var listAdjust1 = this.InitVirtualSceneAdjustList(room, 1);
-                    var sceneName = Language.StringByID(R.MyInternationalizationString.uAllLightOpen);
-                    var scene = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName, listAdjust1);
-                    sceneIdNo++;
-                    HdlSceneLogic.Current.AddSceneToRoom(room, scene);
-
-                    //鐏叏鍏�
-                    var listAdjust2 = this.InitVirtualSceneAdjustList(room, 0);
-                    var sceneName2 = Language.StringByID(R.MyInternationalizationString.uAllLightClose);
-                    var scene2 = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName2, listAdjust2);
-                    sceneIdNo++;
-                    HdlSceneLogic.Current.AddSceneToRoom(room, scene2);
-                }
-            }
-        }
-
-        /// <summary>
-        /// 鍒濆鍖栬櫄鎷熷満鏅殑鎵ц鐩爣(statu 0:鍏� 1:寮�)
-        /// </summary>
-        /// <param name="i_room"></param>
-        /// <param name="statu"></param>
-        /// <returns></returns>
-        private List<Scene.DeviceListData> InitVirtualSceneAdjustList(Room i_room, int statu)
-        {
-            var listBind = new List<Scene.DeviceListData>();
-            foreach (var mainKey in i_room.ListDevice)
-            {
-                var device = LocalDevice.Current.GetDevice(mainKey);
-                if (device == null) { continue; }
-                //鍙缁х數鍣ㄥ拰鐏�
-                if (device.Type == DeviceType.OnOffOutput
-                    || device.Type == DeviceType.DimmableLight)
-                {
-                    var data = new Scene.DeviceListData();
-                    data.Type = 0;
-                    data.DeviceAddr = device.DeviceAddr;
-                    data.Epoint = device.DeviceEpoint;
-                    data.TaskList.Add(new Safeguard.TaskListInfo() { TaskType = 1, Data1 = statu });
-                    listBind.Add(data);
-                }
-            }
-            return listBind;
-        }
-
-        #endregion
-
-        #region 鈻� 鍒涘缓铏氭嫙璁惧鍒楄〃___________________
-
-        public void Zigbee寮�鍚堝笜鐢垫満(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.WcdType = 4;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 100, 100, "MWM65B-ZB.20", i_RoomId);
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鍗峰笜鐢垫満(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.WcdType = 0;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 101, 101, "MVSM35B-ZB.20", i_RoomId);
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee4鎸夐敭闈㈡澘(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, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
-                }
-                //4涓户鐢靛櫒
-                for (int j = 5; j <= 8; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //3涓共鎺ョ偣
-                for (int j = 1; j <= 3; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
-                }
-                //3涓户鐢靛櫒
-                for (int j = 4; j <= 6; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //2涓共鎺ョ偣
-                for (int j = 1; j <= 2; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
-                }
-                //2涓户鐢靛櫒
-                for (int j = 3; j <= 4; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绠�绾�4鎸夐敭闈㈡澘(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, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
-                }
-                //4涓户鐢靛櫒
-                for (int j = 5; j <= 8; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绠�绾�3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //3涓共鎺ョ偣
-                for (int j = 1; j <= 3; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
-                }
-                //3涓户鐢靛櫒
-                for (int j = 4; j <= 6; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绠�绾�2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //2涓共鎺ョ偣
-                for (int j = 1; j <= 2; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
-                }
-                //2涓户鐢靛櫒
-                for (int j = 3; j <= 4; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee220pir浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //1涓紶鎰熷櫒
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 13;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
-
-                //1涓户鐢靛櫒
-                var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
-                device2.DfunctionType = DeviceFunctionType.A鐏厜;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
-                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 43;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鍚搁《鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 43;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1300, 1300, "MGCD01/ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee闂ㄧ獥纾佷紶鎰熷櫒(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 21;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1301, 1301, "MSDC01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鐑熼浘浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 40;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1301, 1301, "MSS01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绾㈠浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 13;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1303, 1303, "MSPIR01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee姘存蹈浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 42;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1304, 1304, "MSW01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绱ф�ユ寜閿�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                device.IasDeviceType = 44;
-                device.DeviceID = 1026;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 1305, 1305, "MBU01/M-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee3璺户鐢靛櫒(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //3涓户鐢靛櫒
-                for (int j = 1; j <= 3; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + j;
-                }
-                //7涓共鎺ョ偣
-                for (int j = 4; j <= 10; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
-                }
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee1璺皟鍏夊櫒(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //7涓共鎺ョ偣
-                for (int j = 1; j <= 7; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
-                }
-
-                //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);
-                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
-
-
-                this.DeviceNumber++;
-            }
-        }
-
-        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涓┖璋冨簲璇ュ彲浠ヤ簡
-                for (int j = 1; j <= 10; j++)
-                {
-                    var device = new AC() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //瀹ゆ俯榛樿26鈩�
-                    device.currentLocalTemperature = 26;
-                    device.currentCoolingSetpoint = 26;
-                    device.currentHeatingSetpoint = 26;
-                    device.currentAutoSetpoint = 26;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 3600, 3600, "MAC/GW-ZB.10", i_RoomId);
-                }
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee绌烘皵寮�鍏�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new AirSwitch() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 4100, 4100, "MBCI01-ZB.10", i_RoomId);
-                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏅鸿兘闂ㄩ攣(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                var device = new ZigBee.Device.DoorLock() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 2800, 2800, "S-one", i_RoomId);
-                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏂规偊鍗曞紑鍙屾帶闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //2涓共鎺ョ偣
-                for (int j = 1; j <= 2; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
-                }
-                //1涓户鐢靛櫒
-                for (int j = 3; j <= 3; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 4 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏂规偊鍙屽紑鍥涙帶闈㈡澘(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, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
-                }
-                //2涓户鐢靛櫒
-                for (int j = 5; j <= 6; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏂规偊鍥涘紑鍏帶闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //8涓共鎺ョ偣
-                for (int j = 1; j <= 8; j++)
-                {
-                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
-                }
-                //4涓户鐢靛櫒
-                for (int j = 9; j <= 12; j++)
-                {
-                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
-                    device.DfunctionType = DeviceFunctionType.A鐏厜;
-                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
-                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 8);
-                }
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 13 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏂规偊鏂伴闈㈡澘(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //1鏂伴
-                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
-
-                //1娓╁害鎺㈠ご
-                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
-                device2.SensorDiv = 1;
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device2, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        public void Zigbee鏂规偊鏂伴灏忔ā鍧�(int i_DeviceCount, string i_RoomId)
-        {
-            for (int i = 0; i < i_DeviceCount; i++)
-            {
-                //1鏂伴
-                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
-                //璁剧疆璁惧鐨勫熀鏈俊鎭�
-                this.SetBaseDataToDevice(device, 2310, 2310, "MFA01-ZB.10", i_RoomId);
-
-                this.DeviceNumber++;
-            }
-        }
-
-        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>
-        /// <param name="device"></param>
-        private void SetBaseDataToDevice(CommonDevice device, int HwVersion, int ImgTypeId,
-            string ModelIdentifier, string roomId)
-        {
-            device.DeviceEpointName = string.Empty;
-            device.HadReadDeviceStatu = true;
-            device.DeviceName = string.Empty;
-            device.IsOnline = 1;
-            device.HwVersion = HwVersion;
-            device.ImgTypeId = ImgTypeId;
-            device.DriveCode = 0;
-            device.ManufacturerName = "HDL";
-            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);
-
-            var room = HdlRoomLogic.Current.GetRoomById(roomId);
-            if (room != null)
-            {
-                //娣诲姞鎴块棿
-                HdlRoomLogic.Current.AddDevice(room, device, true);
-            }
-        }
-
-        #endregion
-
-        #region 鈻� 璁惧鏋氫妇___________________________
-
-        /// <summary>
-        /// 铏氭嫙璁惧鏋氫妇
-        /// </summary>
-        private enum VirtualDeviceEnum
-        {
-            A寮�鍚堝笜鐢垫満 = 1,
-            A鍗峰笜鐢垫満 = 2,
-            A4鎸夐敭闈㈡澘 = 3,
-            A3鎸夐敭闈㈡澘 = 4,
-            A2鎸夐敭闈㈡澘 = 5,
-            A绠�绾�4鎸夐敭闈㈡澘 = 7,
-            A绠�绾�3鎸夐敭闈㈡澘 = 8,
-            A绠�绾�2鎸夐敭闈㈡澘 = 9,
-            A220pir浼犳劅鍣� = 10,
-            A鐕冩皵浼犳劅鍣� = 11,
-            A闂ㄧ獥纾佷紶鎰熷櫒 = 12,
-            A鐑熼浘浼犳劅鍣� = 13,
-            A绾㈠浼犳劅鍣� = 14,
-            A姘存蹈浼犳劅鍣� = 15,
-            A绱ф�ユ寜閿� = 16,
-            A3璺户鐢靛櫒 = 17,
-            A1璺皟鍏夊櫒 = 18,
-            A绌鸿皟缃戝叧 = 19,
-            A绌烘皵寮�鍏� = 20,
-            A鏅鸿兘闂ㄩ攣 = 21,
-            A鏂规偊鍗曞紑鍙屾帶闈㈡澘 = 22,
-            A鏂规偊鍙屽紑鍥涙帶闈㈡澘 = 23,
-            A鏂规偊鍥涘紑鍏帶闈㈡澘 = 24,
-            A鏂规偊鏂伴闈㈡澘 = 25,
-            A鏂规偊鏂伴灏忔ā鍧� = 26,
-            A鍚搁《鐕冩皵浼犳劅鍣� = 27,
-            A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 = 28,
-        }
-
-        #endregion
-
-        #region 鈻� 缁撴瀯浣揰____________________________
-
-        /// <summary>
-        /// 娣诲姞璁惧鐨勫弬鏁�
-        /// </summary>
-        private class AddDevicePra
-        {
-            /// <summary>
-            /// 璁惧绫诲瀷
-            /// </summary>
-            public VirtualDeviceEnum DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�;
-            /// <summary>
-            /// 娣诲姞鐨勮澶囦釜鏁�(涓嶆槸鍥炶矾鏁�)
-            /// </summary>
-            public int DeviceCount = 1;
-            /// <summary>
-            /// 灏嗚澶囨坊鍔犲埌鐨勬埧闂�(涓嶈缃〃绀轰笉娣诲姞鍒版埧闂�)
-            /// </summary>
-            public string RoomId = string.Empty;
-        }
-
-        #endregion
-    }
-}
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using Shared.Common;
+using ZigBee.Device;
+
+namespace Shared.Phone.UserCenter
+{
+    /// <summary>
+    /// App浣撻獙璐﹀彿鐨勯�昏緫
+    /// </summary>
+    public class HdlExperienceAccountLogic
+    {
+        #region 鈻� 鍙橀噺澹版槑___________________________
+
+        /// <summary>
+        /// App浣撻獙璐﹀彿鐨勯�昏緫
+        /// </summary>
+        private static HdlExperienceAccountLogic m_Current = null;
+        /// <summary>
+        /// App浣撻獙璐﹀彿鐨勯�昏緫
+        /// </summary>
+        public static HdlExperienceAccountLogic Current
+        {
+            get
+            {
+                if (m_Current == null)
+                {
+                    m_Current = new HdlExperienceAccountLogic();
+                }
+                return m_Current;
+            }
+        }
+
+        /// <summary>
+        /// 鐢ㄦ潵閫掑鐢熸垚Mac鐢ㄧ殑
+        /// </summary>
+        private int DeviceNumber = 0;
+        /// <summary>
+        /// 鏄惁鏄父瀹綋楠�
+        /// </summary>
+        public bool IsExperience
+        {
+            get { return Config.Instance.Guid == "chushiGuid"; }
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖朹____________________________
+
+        /// <summary>
+        /// 鍒濆鍖栧叏閮ㄤ綋楠屾暟鎹�
+        /// </summary>
+        public void InitAllExperienceData()
+        {
+            //鍒濆鍖栫敤鎴�
+            this.InitUserInfoData();
+            //鍒濆鍖栦綇瀹�
+            this.InitHomeData();
+            //鍒濆鍖栨ゼ灞�
+            this.InitFloorData();
+            //鍒濆鍖栨埧闂�
+            this.InitRoomData();
+            //鍒濆鍖栬澶�
+            this.InitDeviceData();
+            //鍒濆鍖栧満鏅�
+            this.InitSceneData();
+            //鍒锋柊宸﹁竟鍒锋柊鎴块棿瑙嗗浘鍒楄〃
+            HdlRoomLogic.Current.RefreshRoomListView();
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栫敤鎴穇________________________
+
+        /// <summary>
+        /// 鍒濆鍖栫敤鎴�
+        /// </summary>
+        private void InitUserInfoData()
+        {
+            UserCenterResourse.UserInfo = new UserInformation();
+            UserCenterResourse.UserInfo.AuthorityNo = 1;//缁欎粬绠$悊鍛樼О鍙�
+            UserCenterResourse.UserInfo.AuthorityText = Language.StringByID(R.MyInternationalizationString.Administrator);
+            //铏氭嫙璐﹀彿
+            UserCenterResourse.UserInfo.UserName = Language.StringByID(R.MyInternationalizationString.uVirtualAccount);
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栦綇瀹卂________________________
+
+        /// <summary>
+        /// 鍒濆鍖栦綇瀹�
+        /// </summary>
+        private void InitHomeData()
+        {
+            //鍒濆鍖栦綇瀹匢D
+            string homeId = "abcdefghijklmn";
+            //鍒濆Guid
+            Config.Instance.Guid = "chushiGuid";
+            var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, homeId);
+            if (System.IO.Directory.Exists(path) == true)
+            {
+                //鍐嶆鍚姩鐨勬椂鍊欙紝閲嶆柊寮�濮�
+                System.IO.Directory.Delete(path, true);
+            }
+            System.IO.Directory.CreateDirectory(path);
+
+            //娉ㄦ剰,杩欓噷涓嶆竻绌哄綋鍓嶄綇瀹呭垪琛�,淇濈暀瀹冧箣鍓嶇殑浣忓畢鍒楄〃
+
+            //鍒涘缓涓存椂浣忓畢
+            var house = new House() { Id = homeId, Name = Language.StringByID(R.MyInternationalizationString.uMyHome) };
+            house.IsVirtually = true;
+            house.Save(false);
+            Config.Instance.HomeId = house.Id;
+            Config.Instance.Home = HdlResidenceLogic.Current.GetHouseByHouseId(house.Id);
+
+            //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶�
+            HdlFileLogic.Current.CreatAllUserCenterDirectory();
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栨ゼ灞俖________________________
+
+        /// <summary>
+        /// 鍒濆鍖栨ゼ灞�
+        /// </summary>
+        private void InitFloorData()
+        {
+            Config.Instance.Home.FloorDics = new Dictionary<string, string>();
+            //Config.Instance.Home.FloorDics["floorKey1"] = "1F";
+            //Config.Instance.Home.FloorDics["floorKey2"] = "2F";
+            //Config.Instance.Home.FloorDics["floorKey3"] = "3F";
+            //Config.Instance.Home.FloorDics["floorKey4"] = "4F";
+            //Config.Instance.Home.FloorDics["floorKey5"] = "5F";
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栨埧闂確________________________
+
+        /// <summary>
+        /// 鑾峰彇鎴块棿鏍锋澘鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        private Dictionary<string, string> GetRoomSampleList()
+        {
+            var dicRoomName = new Dictionary<string, string>();
+            //瀹㈠巺
+            dicRoomName["KeTing"] = Language.StringByID(R.MyInternationalizationString.uLivingRoom);
+            //闃冲彴
+            dicRoomName["YangTai"] = Language.StringByID(R.MyInternationalizationString.uBalcony);
+            //鍗у
+            dicRoomName["WoShi"] = Language.StringByID(R.MyInternationalizationString.uBedroom);
+            //鐜勫叧
+            dicRoomName["XuanGuan"] = Language.StringByID(R.MyInternationalizationString.uVestibule);
+            //鍘ㄦ埧
+            dicRoomName["ChuFang"] = Language.StringByID(R.MyInternationalizationString.uKitchen);
+            //璧板粖
+            dicRoomName["ZouLang"] = Language.StringByID(R.MyInternationalizationString.uCorridor);
+
+            return dicRoomName;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栨埧闂�
+        /// </summary>
+        private void InitRoomData()
+        {
+            //鍏堝埛鏂板鍣�
+            HdlRoomLogic.Current.InitAllRoom();
+
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            var dicRoomName = this.GetRoomSampleList();
+
+            foreach (string floorKey in listFloorKey)
+            {
+                foreach (string roomId in dicRoomName.Keys)
+                {
+                    //鍒涘缓鏂版埧闂�
+                    var newRoom = new Room();
+                    newRoom.Id = floorKey + "_" + roomId;
+                    newRoom.Name = dicRoomName[roomId];
+                    newRoom.BackgroundImage = "RoomIcon/0.jpg";
+                    newRoom.FloorId = floorKey;
+                    HdlRoomLogic.Current.AddRoom(newRoom, false);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+        /// </summary>
+        /// <returns></returns>
+        private List<string> GetAllFloorKeys()
+        {
+            var listKey = new List<string>();
+            foreach (var strKey in Config.Instance.Home.FloorDics.Keys)
+            {
+                listKey.Add(strKey);
+            }
+            if (listKey.Count == 0)
+            {
+                listKey.Add("");
+            }
+            return listKey;
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栬澶嘷________________________
+
+        /// <summary>
+        /// 璁剧疆闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        private List<AddDevicePra> GetVirtualDeviceList()
+        {
+            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
+            var list = new List<AddDevicePra>();
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            foreach (var floorKey in listFloorKey)
+            {
+                //瀹㈠巺
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_KeTing", DeviceCount = 1 });
+                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 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍗峰笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A寮�鍚堝笜鐢垫満, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A2鎸夐敭闈㈡澘, RoomId = floorKey + "_YangTai", DeviceCount = 1 });
+
+                //鍗у
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A3璺户鐢靛櫒, RoomId = floorKey + "_WoShi", DeviceCount = 1 });
+
+                //鐜勫叧
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A1璺皟鍏夊櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A闂ㄧ獥纾佷紶鎰熷櫒, RoomId = floorKey + "_XuanGuan", DeviceCount = 1 });
+
+                //鍘ㄦ埧
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A姘存蹈浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐑熼浘浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍚搁《鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+
+                //璧板粖
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
+                list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A娓╂箍搴︿紶鎰熷櫒, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
+            }
+            return list;
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栬澶�
+        /// </summary>
+        private void InitDeviceData()
+        {
+            //鍏堝埛鏂板鍣�
+            LocalDevice.Current.ReFreshByLocal();
+            //椤轰究涔熸暣涓�涓嬬綉鍏�(鏈夊彲鑳藉畠鏄粠瀹炰綋璐﹀彿杞负铏氭嫙鏃�,娌℃湁娓呯┖)
+            HdlGatewayLogic.Current.ReFreshByLocal();
+            HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
+
+            Type thisType = m_Current.GetType();
+            //鑾峰彇闇�瑕佸垱寤虹殑铏氭嫙璁惧鍒楄〃
+            var list = this.GetVirtualDeviceList();
+            foreach (var data in list)
+            {
+                string methordName = "Zigbee" + data.DeviceType.ToString().Substring(1);
+                //鍙嶅皠鎸囧畾鐨勫嚱鏁�
+                var myMethod = thisType.GetMethod(methordName);
+                myMethod.Invoke(this, new object[] { data.DeviceCount, data.RoomId });
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 鍒濆鍖栧満鏅痏________________________
+
+        /// <summary>
+        /// 鍒濆鍖栧満鏅�
+        /// </summary>
+        private void InitSceneData()
+        {
+            //鍒锋柊瀹瑰櫒
+            HdlSceneLogic.Current.ReFreshByLocal();
+
+            //鑾峰彇鍏ㄩ儴鐨勬ゼ灞備富閿�
+            var listFloorKey = this.GetAllFloorKeys();
+            //鑾峰彇鍏ㄩ儴鐨勬埧闂存ā鏉垮垪琛�
+            var dicRoom = this.GetRoomSampleList();
+
+            //floorKey1   _   KeTing  YangTai  WoShi  XuanGuan  ChuFang  ZouLang
+            int sceneIdNo = 1;
+            //瀵规瘡涓�涓ゼ灞�
+            foreach (var floorKey in listFloorKey)
+            {
+                //瀵规瘡涓�涓埧闂�
+                foreach (var strKey in dicRoom.Keys)
+                {
+                    var room = HdlRoomLogic.Current.GetRoomById(floorKey + "_" + strKey);
+                    if (room == null)
+                    {
+                        continue;
+                    }
+                    //鐏叏寮�
+                    var listAdjust1 = this.InitVirtualSceneAdjustList(room, 1);
+                    var sceneName = Language.StringByID(R.MyInternationalizationString.uAllLightOpen);
+                    var scene = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName, listAdjust1);
+                    sceneIdNo++;
+                    HdlSceneLogic.Current.AddSceneToRoom(room, scene);
+
+                    //鐏叏鍏�
+                    var listAdjust2 = this.InitVirtualSceneAdjustList(room, 0);
+                    var sceneName2 = Language.StringByID(R.MyInternationalizationString.uAllLightClose);
+                    var scene2 = HdlSceneLogic.Current.AddVirtualScene(sceneIdNo, sceneName2, listAdjust2);
+                    sceneIdNo++;
+                    HdlSceneLogic.Current.AddSceneToRoom(room, scene2);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鍒濆鍖栬櫄鎷熷満鏅殑鎵ц鐩爣(statu 0:鍏� 1:寮�)
+        /// </summary>
+        /// <param name="i_room"></param>
+        /// <param name="statu"></param>
+        /// <returns></returns>
+        private List<Scene.DeviceListData> InitVirtualSceneAdjustList(Room i_room, int statu)
+        {
+            var listBind = new List<Scene.DeviceListData>();
+            foreach (var mainKey in i_room.ListDevice)
+            {
+                var device = LocalDevice.Current.GetDevice(mainKey);
+                if (device == null) { continue; }
+                //鍙缁х數鍣ㄥ拰鐏�
+                if (device.Type == DeviceType.OnOffOutput
+                    || device.Type == DeviceType.DimmableLight)
+                {
+                    var data = new Scene.DeviceListData();
+                    data.Type = 0;
+                    data.DeviceAddr = device.DeviceAddr;
+                    data.Epoint = device.DeviceEpoint;
+                    data.TaskList.Add(new Safeguard.TaskListInfo() { TaskType = 1, Data1 = statu });
+                    listBind.Add(data);
+                }
+            }
+            return listBind;
+        }
+
+        #endregion
+
+        #region 鈻� 鍒涘缓铏氭嫙璁惧鍒楄〃___________________
+
+        public void Zigbee寮�鍚堝笜鐢垫満(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.WcdType = 4;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 100, 100, "MWM65B-ZB.20", i_RoomId);
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鍗峰笜鐢垫満(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new Rollershade() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.WcdType = 0;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 101, 101, "MVSM35B-ZB.20", i_RoomId);
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee4鎸夐敭闈㈡澘(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, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 5; j <= 8; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 200, 200, "MPT4/R4-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓共鎺ョ偣
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+                }
+                //3涓户鐢靛櫒
+                for (int j = 4; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 201, 201, "MPT3/R3-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 3; j <= 4; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 202, 202, "MPT2/R2-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�4鎸夐敭闈㈡澘(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, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 5; j <= 8; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 9 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 220, 220, "MPT4R4L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�3鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓共鎺ョ偣
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+                }
+                //3涓户鐢靛櫒
+                for (int j = 4; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 3);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 221, 221, "MPT3R3L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绠�绾�2鎸夐敭闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 3; j <= 4; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 5 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 222, 222, "MPT2R2L/S-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee220pir浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1涓紶鎰熷櫒
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 13;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
+
+                //1涓户鐢靛櫒
+                var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
+                device2.DfunctionType = DeviceFunctionType.A鐏厜;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 1200, 1200, "MSPIR01-ZB.10", i_RoomId);
+                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 43;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鍚搁《鐕冩皵浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 43;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1300, 1300, "MGCD01/ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee闂ㄧ獥纾佷紶鎰熷櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 21;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1301, 1301, "MSDC01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鐑熼浘浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 40;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1301, 1301, "MSS01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绾㈠浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 13;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1303, 1303, "MSPIR01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee姘存蹈浼犳劅鍣�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 42;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1304, 1304, "MSW01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绱ф�ユ寜閿�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                device.IasDeviceType = 44;
+                device.DeviceID = 1026;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 1305, 1305, "MBU01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee3璺户鐢靛櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //3涓户鐢靛櫒
+                for (int j = 1; j <= 3; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + j;
+                }
+                //7涓共鎺ョ偣
+                for (int j = 4; j <= 10; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPR0310-ZB.10", i_RoomId);
+                }
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee1璺皟鍏夊櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //7涓共鎺ョ偣
+                for (int j = 1; j <= 7; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
+                }
+
+                //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);
+                device2.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + 1;
+
+
+                this.DeviceNumber++;
+            }
+        }
+
+        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涓┖璋冨簲璇ュ彲浠ヤ簡
+                for (int j = 1; j <= 10; j++)
+                {
+                    var device = new AC() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //瀹ゆ俯榛樿26鈩�
+                    device.currentLocalTemperature = 26;
+                    device.currentCoolingSetpoint = 26;
+                    device.currentHeatingSetpoint = 26;
+                    device.currentAutoSetpoint = 26;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 3600, 3600, "MAC/GW-ZB.10", i_RoomId);
+                }
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee绌烘皵寮�鍏�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new AirSwitch() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 4100, 4100, "MBCI01-ZB.10", i_RoomId);
+                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏅鸿兘闂ㄩ攣(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                var device = new ZigBee.Device.DoorLock() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 2800, 2800, "S-one", i_RoomId);
+                device.DfunctionType = DeviceFunctionType.A寮�鍏�;
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍗曞紑鍙屾帶闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //2涓共鎺ョ偣
+                for (int j = 1; j <= 2; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+                }
+                //1涓户鐢靛櫒
+                for (int j = 3; j <= 3; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 2);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 4 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 240, 240, "MP2B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍙屽紑鍥涙帶闈㈡澘(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, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+                }
+                //2涓户鐢靛櫒
+                for (int j = 5; j <= 6; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 4);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 7 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 241, 241, "MP4B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鍥涘紑鍏帶闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //8涓共鎺ョ偣
+                for (int j = 1; j <= 8; j++)
+                {
+                    var device = new Panel() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+                }
+                //4涓户鐢靛櫒
+                for (int j = 9; j <= 12; j++)
+                {
+                    var device = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = j };
+                    device.DfunctionType = DeviceFunctionType.A鐏厜;
+                    //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                    this.SetBaseDataToDevice(device, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+                    device.DeviceEpointName = Language.StringByID(R.MyInternationalizationString.uLight) + (j - 8);
+                }
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 13 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 242, 242, "MP8B/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鏂伴闈㈡澘(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1鏂伴
+                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
+
+                //1娓╁害鎺㈠ご
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2 };
+                device2.SensorDiv = 1;
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 250, 250, "MPFA/TILE-ZB.18", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        public void Zigbee鏂规偊鏂伴灏忔ā鍧�(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //1鏂伴
+                var device = new FreshAir() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device, 2310, 2310, "MFA01-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        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++;
+            }
+        }
+
+        public void Zigbee娓╂箍搴︿紶鎰熷櫒(int i_DeviceCount, string i_RoomId)
+        {
+            for (int i = 0; i < i_DeviceCount; i++)
+            {
+                //婀垮害
+                var device1 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1, SensorDiv = 2 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device1, 1308, 1308, "MTH01/M-ZB.10", i_RoomId);
+                //娓╁害
+                var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2, SensorDiv = 1 };
+                //璁剧疆璁惧鐨勫熀鏈俊鎭�
+                this.SetBaseDataToDevice(device2, 1308, 1308, "MTH01/M-ZB.10", i_RoomId);
+
+                this.DeviceNumber++;
+            }
+        }
+
+        /// <summary>
+        /// 璁剧疆璁惧鐨勫熀鏈俊鎭�
+        /// </summary>
+        /// <param name="device"></param>
+        private void SetBaseDataToDevice(CommonDevice device, int HwVersion, int ImgTypeId,
+            string ModelIdentifier, string roomId)
+        {
+            device.DeviceEpointName = string.Empty;
+            device.HadReadDeviceStatu = true;
+            device.DeviceName = string.Empty;
+            device.IsOnline = 1;
+            device.HwVersion = HwVersion;
+            device.ImgTypeId = ImgTypeId;
+            device.DriveCode = 0;
+            device.ManufacturerName = "HDL";
+            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);
+
+            var room = HdlRoomLogic.Current.GetRoomById(roomId);
+            if (room != null)
+            {
+                //娣诲姞鎴块棿
+                HdlRoomLogic.Current.AddDevice(room, device, true);
+            }
+        }
+
+        #endregion
+
+        #region 鈻� 璁惧鏋氫妇___________________________
+
+        /// <summary>
+        /// 铏氭嫙璁惧鏋氫妇
+        /// </summary>
+        private enum VirtualDeviceEnum
+        {
+            A寮�鍚堝笜鐢垫満 = 1,
+            A鍗峰笜鐢垫満 = 2,
+            A4鎸夐敭闈㈡澘 = 3,
+            A3鎸夐敭闈㈡澘 = 4,
+            A2鎸夐敭闈㈡澘 = 5,
+            A绠�绾�4鎸夐敭闈㈡澘 = 7,
+            A绠�绾�3鎸夐敭闈㈡澘 = 8,
+            A绠�绾�2鎸夐敭闈㈡澘 = 9,
+            A220pir浼犳劅鍣� = 10,
+            A鐕冩皵浼犳劅鍣� = 11,
+            A闂ㄧ獥纾佷紶鎰熷櫒 = 12,
+            A鐑熼浘浼犳劅鍣� = 13,
+            A绾㈠浼犳劅鍣� = 14,
+            A姘存蹈浼犳劅鍣� = 15,
+            A绱ф�ユ寜閿� = 16,
+            A3璺户鐢靛櫒 = 17,
+            A1璺皟鍏夊櫒 = 18,
+            A绌鸿皟缃戝叧 = 19,
+            A绌烘皵寮�鍏� = 20,
+            A鏅鸿兘闂ㄩ攣 = 21,
+            A鏂规偊鍗曞紑鍙屾帶闈㈡澘 = 22,
+            A鏂规偊鍙屽紑鍥涙帶闈㈡澘 = 23,
+            A鏂规偊鍥涘紑鍏帶闈㈡澘 = 24,
+            A鏂规偊鏂伴闈㈡澘 = 25,
+            A鏂规偊鏂伴灏忔ā鍧� = 26,
+            A鍚搁《鐕冩皵浼犳劅鍣� = 27,
+            A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 = 28,
+            A娓╂箍搴︿紶鎰熷櫒 = 29,
+        }
+
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
+        /// <summary>
+        /// 娣诲姞璁惧鐨勫弬鏁�
+        /// </summary>
+        private class AddDevicePra
+        {
+            /// <summary>
+            /// 璁惧绫诲瀷
+            /// </summary>
+            public VirtualDeviceEnum DeviceType = VirtualDeviceEnum.A绌烘皵寮�鍏�;
+            /// <summary>
+            /// 娣诲姞鐨勮澶囦釜鏁�(涓嶆槸鍥炶矾鏁�)
+            /// </summary>
+            public int DeviceCount = 1;
+            /// <summary>
+            /// 灏嗚澶囨坊鍔犲埌鐨勬埧闂�(涓嶈缃〃绀轰笉娣诲姞鍒版埧闂�)
+            /// </summary>
+            public string RoomId = string.Empty;
+        }
+
+        #endregion
+    }
+}

--
Gitblit v1.8.0