From f16fd06aa226e9f97a27858624d4ea7cf8975d25 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 07 五月 2024 17:24:38 +0800
Subject: [PATCH] 增加了萤石摄像头

---
 HDL_ON/Entity/Function/Function.cs |  109 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 83 insertions(+), 26 deletions(-)

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index e8a5b40..78fb775 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -76,7 +76,8 @@
                 DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯
                 return startTime.AddMilliseconds(Convert.ToDouble(time_stamp)).ToString("s");
             }
-            catch {
+            catch
+            {
                 return DateTime.MinValue.ToString("s");
             }
         }
@@ -455,10 +456,11 @@
         public bool collect = false;
 
         private bool _online;
-        public bool online {
+        public bool online
+        {
             get
             {
-                if (spk == SPK.AirSwitchP3|| spk == SPK.ElectricalTvHisense)
+                if (spk == SPK.AirSwitchP3 || spk == SPK.ElectricalTvHisense)
                 {
                     return _online;
                 }
@@ -556,7 +558,7 @@
                     }
 
                     break;
-                    
+
             }
             return text;
         }
@@ -642,7 +644,8 @@
 
             new System.Threading.Thread(() =>
             {
-                if (spk == SPK.GroupControl) {
+                if (spk == SPK.GroupControl)
+                {
                     var groupControl = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
                     if (collect)
                     {
@@ -672,7 +675,8 @@
                         collect = !collect;
                         IMessageCommon.Current.ShowErrorInfoAlter(result);
                     });
-                } else
+                }
+                else
                 {
                     Application.RunOnMainThread(() =>
                     {
@@ -773,7 +777,7 @@
         /// </summary>
         public async void UpdataRoomIds()
         {
-            new System.Threading.Thread( () =>
+            new System.Threading.Thread(() =>
             {
                 var pack = ApiUtlis.Ins.HttpRequest.UpdataDevcieBindRoomInfo(this);
                 //鐩存帴淇濆瓨鏈湴锛�
@@ -913,12 +917,12 @@
 
             foreach (var attr in list)
             {
-                if(attr.key == FunctionAttributeKey.ColorfulBegin || attr.key == FunctionAttributeKey.ColorfulEnd || attr.key == FunctionAttributeKey.ColorfulTime)
+                if (attr.key == FunctionAttributeKey.ColorfulBegin || attr.key == FunctionAttributeKey.ColorfulEnd || attr.key == FunctionAttributeKey.ColorfulTime)
                 {
                     continue;
                 }
                 //绐楀笜鍚屾椂鍙戦�佸紑鍏宠窡鐧惧垎姣斾細鏈夐棶棰橈紝
-                if(spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex || spk == SPK.CurtainDream)
+                if (spk == SPK.CurtainRoller || spk == SPK.CurtainTrietex || spk == SPK.CurtainDream)
                 {
                     if (attr.key == FunctionAttributeKey.OnOff)
                     {
@@ -927,7 +931,8 @@
                             continue;
                         }
                     }
-                }else if (spk == SPK.GroupControl)
+                }
+                else if (spk == SPK.GroupControl)
                 {
                     sFunc.type = "5";
                 }
@@ -1029,7 +1034,7 @@
                                     }
                                 }
                             }
-                            else if(attr.key == "security")
+                            else if (attr.key == "security")
                             {
                                 attr.curValue = "false";
                             }
@@ -1046,15 +1051,25 @@
                             {
                                 vv = 26;
                             }
-                            sFunc.status.Add(new SceneFunctionStatus() {
+                            sFunc.status.Add(new SceneFunctionStatus()
+                            {
                                 UintString = attr.unit,
-                                key = attr.key, value = Convert.ToInt32(vv).ToString(), max = attr.max, min = attr.min }) ;
+                                key = attr.key,
+                                value = Convert.ToInt32(vv).ToString(),
+                                max = attr.max,
+                                min = attr.min
+                            });
                         }
                         else
                         {
-                            sFunc.status.Add(new SceneFunctionStatus() {
+                            sFunc.status.Add(new SceneFunctionStatus()
+                            {
                                 UintString = attr.unit,
-                                key = attr.key, value = attr.curValue.ToString(), max = attr.max, min = attr.min });
+                                key = attr.key,
+                                value = attr.curValue.ToString(),
+                                max = attr.max,
+                                min = attr.min
+                            });
                         }
                         break;
                 }
@@ -1272,7 +1287,7 @@
         /// <summary>
         /// 灞炴�у崟浣�
         /// </summary>
-        public string unit=string.Empty;
+        public string unit = string.Empty;
     }
 
     /// <summary>
@@ -1707,7 +1722,8 @@
                 try
                 {
                     return Convert.ToByte(loopId, 16);
-                } catch
+                }
+                catch
                 {
                     return 0;
                 }
@@ -1736,7 +1752,7 @@
         /// <summary>
         /// 澶у崕鎽勫儚澶�
         /// </summary>
-        //public const string IpCam_Imou = "security.ipcam.imou";
+        public const string IpCam_Imou = "security.ipcam.imou";
         /// <summary>
         /// 鏈烘鎵�
         /// </summary>
@@ -1756,7 +1772,7 @@
         /// 闂ㄩ攣
         /// </summary>
         public const string DoorLock = "security.door";
-        
+
         /// <summary>
         /// 闂ㄩ攣spk鍒楄〃
         /// </summary>
@@ -1767,19 +1783,42 @@
             list.Add(DoorLock);
             return list;
         }
-        
+
+
+        /// <summary>
+        /// 鐚溂(鏃pk)
+        /// </summary>
+        public const string Peephole = "peephole";
 
         /// <summary>
         /// 鐚溂(鏂皊pk 鏆傛椂娌$敤)
         /// </summary>
         //public const string PeepholeEz = "security.peephole.ez";
         /// <summary>
+        /// 钀ょ煶瑙嗛闂ㄩ攣
+        /// </summary>
+        public const string VideoDoorLock = "security.door.ezviz";
+        /// <summary>
+        /// 钀ょ煶鎽勫儚澶�
+        /// </summary>
+        public const string Ev_Ipcam = "security.ipcam.ez";
+        /// <summary>
         /// 褰遍煶涓帶
         /// </summary>
         public const string AvZkAiks = "av.zk.aiks";
-       
-      
-      
+
+        /// <summary>
+        /// 钀ょ煶瑙嗛闂ㄩ攣spk鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public static List<string> GetVideoDoorLockSPKList()
+        {
+            var list = new List<string>();
+            list.Add(VideoDoorLock);
+            return list;
+        }
+
+
         /// <summary>
         /// 褰遍煶涓帶spk鍒楄〃
         /// </summary>
@@ -1793,7 +1832,17 @@
             return list;
         }
 
-     
+        /// <summary>
+        /// 钀ょ煶鎽勫儚澶磗pk鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public static List<string> GetEvIpcamSPKList()
+        {
+            var list = new List<string>();
+            list.Add(Ev_Ipcam);
+            return list;
+        }
+
         #region 鐏厜
         /// <summary>
         /// 锛堝紑鍏崇伅锛�
@@ -1960,6 +2009,14 @@
         #endregion
 
         #region 鑳芥簮
+        /// <summary>
+        /// 閫嗗彉鍣�
+        /// </summary>
+        public const string Inverter = "energy.inverter";
+        /// <summary>
+        /// 涓夌浉閫嗗彉鍣�
+        /// </summary>
+        public const string InverterRst = "energy.inverter_rst";
         /// <summary>
         /// 鑳芥簮妯″潡
         /// </summary>
@@ -2201,7 +2258,7 @@
             spkList.Add(SensorEnvironment); spkList.Add(SensorEnvironmentHailin);
             spkList.Add(SensorEnvironment2);
             spkList.Add(SensorEnvironment3);
-         
+
             return spkList;
         }
 
@@ -2360,7 +2417,7 @@
         /// <summary>
         /// HDL鍙瀵硅
         /// </summary>
-        public const string doorgate="door.gate";
+        public const string doorgate = "door.gate";
         #endregion
 
         #region 绗笁鏂箂pk鍒楄〃

--
Gitblit v1.8.0