From 6d73bf6e816570291865674bef8bce8972e4de3f Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 01 十二月 2021 16:32:57 +0800
Subject: [PATCH] 2021-12-01-01

---
 HDL_ON/Entity/Function/Scene.cs |  915 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 684 insertions(+), 231 deletions(-)

diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 500f47e..684aad0 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -1,45 +1,146 @@
 锘縰sing System;
 using System.Collections.Generic;
+using HDL_ON.Common;
+using HDL_ON.DAL.Server;
+using HDL_ON.UI;
+using Shared;
 
 namespace HDL_ON.Entity
 {
-    public class Scene : Function
+    public class SceneApiPack
+    {
+        static SceneApiPack _ScenePack;
+        public static SceneApiPack ScenePack
+        {
+            get
+            {
+                if(_ScenePack == null)
+                {
+                    _ScenePack = new SceneApiPack();
+                }
+                return _ScenePack;
+            }
+        }
+
+    }
+
+    public class Scene 
     {
         public Scene()
         {
+            sid = NewSid();
+            if (!DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
+            {
+                gatewayId = DB_ResidenceData.Instance.HomeGateway.gatewayId;
+            }
         }
+        /// <summary>
+        /// 浜戠鍞竴ID
+        /// </summary>
+        public string userSceneId = null;
+        /// <summary>
+        /// 鍦烘櫙sid
+        /// </summary>
+        public string sid = "";
+        /// <summary>
+        /// 鍦烘櫙鍚嶇О
+        /// </summary>
+        public string name = "";
+        /// <summary>
+        /// 缃戝叧ID
+        /// </summary>
+        public string gatewayId = "";
+        /// <summary>
+        /// 浜戠oss瀛樺偍鍥剧墖鐨勮矾寰�
+        /// </summary>
+        public string image = "";
+        /// <summary>
+        /// 鎵�灞炴埧闂村垪琛�
+        /// </summary>
+        public List<string> roomIds = new List<string>();
+        ///// <summary>
+        ///// 鎵�灞炴埧闂村垪琛�
+        ///// </summary>
+        //public List<string> uids = new List<string>();
+        /// <summary>
+        /// 寤舵椂
+        /// </summary>
+        public string delay = "0";
+        /// <summary>
+        /// 鍦烘櫙鐨勬渶鍚庝竴娆℃墽琛屾椂闂�
+        /// </summary>
+        public string LastExecutionTime = "";
 
+        /// <summary>
+        /// 鍦烘櫙鍒嗙粍
+        /// </summary>
+        public string group = "1";
         /// <summary>
         /// 鍦烘櫙绫诲瀷
+        /// 0:鏅��
+        /// 1:鐢靛奖
+        /// 2:璋冨厜
         /// </summary>
         public SceneType sceneType = SceneType.OrdinaryScenes;
+        /// <summary>
+        /// 鏀惰棌鏍囪
+        /// </summary>
+        public bool collect = false;
+        /// <summary>
+        /// 鏄惁鍏佽鍒犻櫎
+        /// </summary>
+        public bool can_delete = true;
 
         /// <summary>
-        /// 鍦烘櫙鑳屾櫙
+        /// 鍒涘缓璇ュ満鏅殑鐢ㄦ埛ID
         /// </summary>
-        public string ImagePath = "Intelligence/Gallery/scenebg1.png";//"FunctionIcon/Scene/s1.png";
+        public string userId = UserInfo.Current.ID;
+
+        ///// <summary>
+        ///// 鍦烘櫙鑳屾櫙
+        ///// </summary>
+        public string ImagePath
+        {
+            get
+            {
+                if (string.IsNullOrEmpty(image))
+                {
+                    return "Intelligence/Gallery/scenebg1.png";
+                }
+                else
+                {
+                    return image;
+                }
+            }
+            set
+            {
+                image = value;
+            }
+        }
+        
 
         /// <summary>
         /// 鍦烘櫙鍔熻兘鍒楄〃
         /// </summary>
-        public List<Function> sceneFunctionList = new List<Function>();
+        public List<SceneFunction> functions = new List<SceneFunction>();
+        /// <summary>
+        /// 鍦烘櫙鎺ㄩ�侀厤缃垪琛�
+        /// </summary>
+        public List<ScenePushConfig> pushConfigs = new List<ScenePushConfig>();
 
         /// <summary>
-        /// 鐢熸垚鍦烘櫙sid
+        /// 鐢熸垚閫昏緫sid鏂规硶
         /// </summary>
-        public void NewSid()
+        public string NewSid()
         {
-            string sSceneid = "";
+            string sceneId = "";
             try
             {
                 string sOidBeginsWith = "000101";//鍘傚晢 + 閫氳鏂瑰紡
                 DateTime dt = DateTime.Now;
-
-
                 DateTime startTime = TimeZoneInfo.ConvertTimeToUtc(new DateTime(2020, 1, 1));
                 long m = (long)((dt - startTime).TotalMilliseconds / 10);
                 string sTimeSpan = "00000000";
-
 
                 byte[] arry = new byte[4];
                 arry[0] = (byte)(m & 0xFF);
@@ -49,243 +150,595 @@
                 sTimeSpan = arry[0].ToString("X2") + arry[1].ToString("X2") + arry[2].ToString("X2") + arry[3].ToString("X2");
 
 
-                if (sTimeSpan.Length > 8)
+                if (sTimeSpan.Length >= 8)
                 {
                     sTimeSpan = sTimeSpan.Substring(0, 8);
                 }
-                else 
+                else
                 {
-                    sTimeSpan = "00000000";
+                    sTimeSpan = Guid.NewGuid().ToString().Substring(0, 8);
+                    //sTimeSpan = "00000000";
                 }
 
-                sSceneid = sOidBeginsWith + sTimeSpan;
+                sceneId = sOidBeginsWith + sTimeSpan;
 
-                sSceneid += "0A";
-                sSceneid += "0A01";
-                //0A01 鐗╂ā鍨嬩负鍦烘櫙锛� 0001 琛ㄧず 1 鍙峰満鏅姛鑳�
-                int iTopSceneId = 1;
+                sceneId += "0A";
+                sceneId += "0A01";
+                int maxId = 1;
 
-                Random random = new Random();
-                iTopSceneId = random.Next(0, 255);
-                iTopSceneId += random.Next(0, 255);
 
-                sSceneid += iTopSceneId.ToString("X4");//鍦烘櫙鍙� 涓や釜byte 
-                sSceneid += "1100";
-                sid = sSceneid;
+                for (int i = 0; i < FunctionList.List.scenes.Count; i++)
+                {
+                    string s = FunctionList.List.scenes[i].sid.Substring(20, 4);
+                    int iThisSceneId = Convert.ToInt16(s, 16);
+                    if (iThisSceneId > maxId)
+                        maxId = iThisSceneId;
+                }
+
+                sceneId += (maxId + 1).ToString("X4");
+                sceneId += "0000";
             }
             catch
             {
-                sid = sSceneid;
+                return sceneId;
+            }
+            return sceneId;
+        }
+
+        /// <summary>
+        /// 鑾峰彇璁惧娣诲姞鍒版埧闂寸殑鎴块棿鍚嶇О
+        /// </summary>
+        /// <returns></returns>
+        public string GetRoomListName()
+        {
+            string roomNameList = "";
+            foreach (var roomId in roomIds)
+            {
+                var findRoom = SpatialInfo.CurrentSpatial.RoomList.Find(obj => obj.roomId == roomId);
+                if (findRoom == null)
+                {
+                    continue;
+                }
+                if (roomNameList != "")
+                {
+                    roomNameList += ",";
+                }
+                roomNameList += findRoom.floorName + findRoom.roomName;
+            }
+            if (roomNameList == "" )
+            {
+                roomNameList = Shared.Language.StringByID(StringId.WholeZone);
+            }
+            return roomNameList;
+        }
+
+        /// <summary>
+        /// 鏁版嵁瀛樺偍鏂囦欢鍚�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public string savePath
+        {
+            get
+            {
+                return "SceneData_" + sid;
             }
         }
 
+        /// <summary>
+        /// 鎵ц鍊掕鏃�
+        /// </summary>
+        int countdownTime = 0;
+        /// <summary>
+        /// 閲嶇疆鎵ц鍊掕鏃�
+        /// </summary>
+        public void ResetCountdownTime()
+        {
+            countdownTime = 0;
+        }
+        /// <summary>
+        /// 鍦烘櫙鎵ц\鍊掕鏃�
+        /// </summary>
+        /// <param name="btnShowDelay"></param>
+        public void SceneCountDown(Button btnShowDelay)
+        {
+            //鍦烘櫙姝e湪鍊掕鏃舵墽琛屼腑
+            if (LastExecutionTime != "" && Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) > Convert.ToDouble(Utlis.GetTimestamp(false)))
+            {
+                int.TryParse(Convert.ToInt32(
+                    Convert.ToDouble(LastExecutionTime) + Convert.ToDouble(delay) - Convert.ToDouble(Utlis.GetTimestamp(false))
+                    ).ToString(), out countdownTime);
+                if (countdownTime > 0)
+                {
+                    new System.Threading.Thread(() =>
+                    {
+                        if (countdownTime > 0)
+                        {
+                            while (countdownTime > 0)
+                            {
+                                Application.RunOnMainThread(() =>
+                                {
+                                    if (countdownTime > 60)
+                                    {
+                                        btnShowDelay.Text = (countdownTime / 60).ToString() + "min" + countdownTime % 60 + "s";
+                                    }
+                                    else
+                                    {
+                                        btnShowDelay.Text = countdownTime.ToString() + "s";
+                                    }
+                                });
+                                System.Threading.Thread.Sleep(1000);
+                                countdownTime--;
+                            }
+                            Application.RunOnMainThread(() =>
+                            {
+                                btnShowDelay.Text = "";
+                            });
+                        }
+                    })
+                    { IsBackground = true, Priority = System.Threading.ThreadPriority.BelowNormal }.Start();
+                }
+            }
+        }
+        /// <summary>
+        /// 淇濆瓨鍦烘櫙鏁版嵁鏂囦欢
+        /// </summary>
+        public void SaveSceneFile()
+        {
+            var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
+            FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+            MainPage.Log($"Save Scene Data : {savePath}");
+        }
+
+        /// <summary>
+        /// 鏀惰棌鍦烘櫙
+        /// </summary>
+        /// <returns></returns>
+        public void CollectScene()
+        {
+            var result = StateCode.SUCCESS;
+            new System.Threading.Thread(() =>
+            {
+                if (collect)
+                {
+                    result = ApiUtlis.Ins.HttpRequest.CollectScene(userSceneId);
+                }
+                else
+                {
+                    result = ApiUtlis.Ins.HttpRequest.CancelCollectScene(userSceneId);
+                }
+                //鎻愮ず閿欒
+                if (result != StateCode.SUCCESS)
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        collect = !collect;
+                        IMessageCommon.Current.ShowErrorInfoAlter(result);
+                    });
+                }
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// 缂栬緫鍦烘櫙
+        /// </summary>
+        public string EditScene()
+        {
+            var pm = new HttpServerRequest();
+            var revPack = pm.EditScene(this);
+            if (revPack.Code == StateCode.SUCCESS)
+            {
+                //閲嶇疆鎵ц鍊掕鏃�
+                this.countdownTime = 0;
+                if(MainPage.NoLoginMode)
+                {
+                    var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
+                    Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+                }
+                var scenes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
+                var tempScene = scenes.Find((obj) => obj.sid == sid);
+                if (tempScene != null)
+                {
+                    var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene));
+                    Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+                }
+            }
+            return revPack.Code;
+        }
+
+        /// <summary>
+        /// 淇敼鍦烘櫙
+        /// </summary>
+        public string UpdateScene()
+        {
+            if(MainPage.NoLoginMode)
+            {
+                var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
+                Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+
+                return "0";
+            }
+            var pm = new HttpServerRequest();
+            var revPack = pm.EditScene(this);
+            if (revPack.Code == StateCode.SUCCESS)
+            {
+                this.countdownTime = 0;
+                var scenes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
+                var tempScene = scenes.Find((obj) => obj.sid == sid);
+                if (tempScene != null)
+                {
+                    var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(tempScene));
+                    Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+                }
+            }
+            return revPack.Code;
+        }
+
+        /// <summary>
+        /// 寤舵椂鏄剧ず鐨勬枃鏈�
+        /// </summary>
+        public string GetDelayText()
+        {
+            var delayInt = 0;
+            int.TryParse(delay,out delayInt);
+            if(delayInt == 0)
+            {
+                return Language.StringByID(StringId.NoDelay);
+            }
+            string text = "";
+            if (delayInt > 60)
+            {
+                text = (delayInt / 60) + Language.StringByID(StringId.m) + (delayInt % 60) + Language.StringByID(StringId.s);
+            }else
+            {
+                text = delayInt + Language.StringByID(StringId.s);
+            }
+            return text;
+            switch (delay)
+            {
+                case "0":
+                    text = Language.StringByID(StringId.NoDelay);
+                    break;
+                case "30":
+                    text = "30s";
+                    break;
+                case "60":
+                    text = "1min";
+                    break;
+                case "120":
+                    text = "2min";
+                    break;
+                case "300":
+                    text = "5min";
+                    break;
+            }
+            return text;
+        }
+        /// <summary>
+        /// 浜戠鏁版嵁鍒涘缓鐨勬椂闂�
+        /// </summary>
+        public string createTime = "";
+        /// <summary>
+        /// 浜戠鏁版嵁淇敼鐨勬渶鍚庢椂闂�
+        /// </summary>
+        public string modifyTime = "";
+
+
+    }
+    /// <summary>
+    /// 鍦烘櫙鍔熻兘瀵硅薄
+    /// </summary>
+    public class SceneFunction
+    {
+        public string sid = "";
+
+        public List<SceneFunctionStatus> status = new List<SceneFunctionStatus>();
+        /// <summary>
+        /// 鍔熻兘寤舵椂
+        /// </summary>
+        public string delay = "0";
+
+
+        Function _localFunction;
+        /// <summary>
+        /// 鏈湴瀵瑰簲鐨勫姛鑳�
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public Function localFunction
+        {
+            get
+            {
+                if (_localFunction == null)
+                {
+                    _localFunction = ConvertFunctionObject();
+                }
+                return _localFunction;
+            }
+        }
+
+        /// <summary>
+        /// 杞崲鎴愬姛鑳藉璞�
+        /// </summary>
+        /// <returns></returns>
+        private Function ConvertFunctionObject()
+        {
+            var localFunction = FunctionList.List.GetDeviceFunctionList().Find((obj) => obj.sid == sid);
+            return localFunction;
+        }
+
+
+        /// <summary>
+        /// 瑙f瀽鍦烘櫙鍔熻兘鏁版嵁
+        /// </summary>
+        /// <param name="sceneFunction"></param>
+        public string GetFunctionScnenInfo()
+        {
+            var sceneFunctionInfo = "";
+            foreach (var sfs in status)
+            {
+                if (sfs.key == FunctionAttributeKey.OnOff)
+                {
+                    if (sfs.value == "off")
+                    {
+                        return Language.StringByID(StringId.Close);
+                    }
+                }
+            }
+            sceneFunctionInfo += Language.StringByID(StringId.Open) + " ";
+
+            var modeState = status.Find((obj) => obj.key == FunctionAttributeKey.Mode);
+            var tempState = status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp);
+            var fanState = status.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed);
+            if (modeState != null)
+            {
+                sceneFunctionInfo += modeState.GetValueText() + " ";
+            }
+            if (tempState != null)
+            {
+                sceneFunctionInfo += tempState.GetValueText() + " ";
+                sceneFunctionInfo += tempState.GetUintString();
+            }
+            if (fanState != null)
+            {
+                sceneFunctionInfo += fanState.GetValueText() + " ";
+            }
+            var briState = status.Find((obj) => obj.key == FunctionAttributeKey.Brightness);
+            if (briState != null)
+            {
+                sceneFunctionInfo += briState.value + "%" + " ";
+            }
+            var perState = status.Find((obj) => obj.key == FunctionAttributeKey.Percent);
+            if (perState != null)
+            {
+                sceneFunctionInfo += perState.value + "%" + " ";
+            }
+            var cctState = status.Find((obj) => obj.key == FunctionAttributeKey.CCT);
+            if(cctState != null)
+            {
+                sceneFunctionInfo += cctState.value + "%" + " ";
+            }
+            var rgbState = status.Find((obj) => obj.key == FunctionAttributeKey.RGB);
+            if(rgbState!=null)
+            {
+                //sceneFunctionInfo += new  cctState.value + "%" + " ";
+            }
+            return sceneFunctionInfo;
+        }
+
+
     }
 
+    /// <summary>
+    /// 鍦烘櫙鍔熻兘灞炴��
+    /// </summary>
+    public class SceneFunctionStatus
+    {
+        public string key = "";
+        public string value = "";
+
+        public int max = 0;
+        public int min = 0;
+
+        /// <summary>
+        /// 灞炴�у悕绉版樉绀烘枃鏈�
+        /// 涓嫳鏂囨樉绀�
+        /// </summary>
+        public string GetNameText()
+        {
+            string text = "";
+            switch (key)
+            {
+                case FunctionAttributeKey.OnOff:
+                    text = Language.StringByID(StringId.OnOff);
+                    break;
+                case FunctionAttributeKey.Brightness:
+                    text = Language.StringByID(StringId.Brightness);
+                    break;
+                case FunctionAttributeKey.RGB:
+                    text = Language.StringByID(StringId.ColorValue);
+                    break;
+                case FunctionAttributeKey.Mode:
+                    text = Language.StringByID(StringId.Mode);
+                    break;
+                case FunctionAttributeKey.FanSpeed:
+                    text = Language.StringByID(StringId.FanSpeed);
+                    break;
+                case FunctionAttributeKey.SetTemp:
+                    text = Language.StringByID(StringId.Temp);
+                    break;
+                case FunctionAttributeKey.RoomTemp:
+                    text = Language.StringByID(StringId.IndoorTemp);
+                    break;
+                case FunctionAttributeKey.Delay:
+                    text = Language.StringByID(StringId.Delay);
+                    break;
+                case FunctionAttributeKey.CCT:
+                    text = "CCT";
+                    break;
+                case FunctionAttributeKey.Percent:
+                    text = Language.StringByID(StringId.PercentAdjustment);
+                    break;
+                case FunctionAttributeKey.FadeTime:
+                    text = Language.StringByID(StringId.FadeSpeed);
+                    break;
+            }
+            return text;
+        }
+
+
+        /// <summary>
+        /// 灞炴�у�煎崟浣�
+        /// </summary>
+        public string GetUintString(string inputKey = "")
+        {
+            var us = "";
+            var swithchString = key;
+            if(!string.IsNullOrEmpty(inputKey))
+            {
+                swithchString = inputKey;
+            }
+            switch (swithchString)
+            {
+                case FunctionAttributeKey.SetTemp:
+                case FunctionAttributeKey.RoomTemp:
+                    us = "掳C";
+                    break;
+                case FunctionAttributeKey.Percent:
+                case FunctionAttributeKey.Brightness:
+                    us = "%";
+                    break;
+                case FunctionAttributeKey.CCT:
+                    us = "K";
+                    break;
+            }
+            return us;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鎸囧畾灞炴�х殑鏄剧ず鏂囨湰
+        /// 涓嫳鏂囨樉绀�
+        /// </summary>
+        public string GetValueText(string temp = "")
+        {
+            string catchString = value;
+            if(temp!= "")
+            {
+                catchString = temp;
+            }
+            string text = "";
+            switch (key)
+            {
+                case FunctionAttributeKey.OnOff:
+                    text = catchString == "on" ? Language.StringByID(StringId.On) : Language.StringByID(StringId.OFF);
+                    break;
+                case FunctionAttributeKey.SetTemp:
+                case FunctionAttributeKey.RoomTemp:
+                case FunctionAttributeKey.Brightness:
+                case FunctionAttributeKey.Percent:
+                    int outT = 0;
+                    int.TryParse(catchString,out outT);
+                    if (outT < 0)
+                        catchString = "0";
+                    if (catchString == "")
+                    {
+                        catchString = "0";
+                    }
+                    text = catchString;
+                    break;
+                case FunctionAttributeKey.Mode:
+                    switch (catchString)
+                    {
+                        //----绌鸿皟
+                        case "auto":
+                            text = Language.StringByID(StringId.Auto);
+                            break;
+                        case "cool":
+                            text = Language.StringByID(StringId.Cool);
+                            break;
+                        case "heat":
+                            text = Language.StringByID(StringId.Heat);
+                            break;
+                        case "dry":
+                            text = Language.StringByID(StringId.Dry);
+                            break;
+                        case "fan":
+                            text = Language.StringByID(StringId.AirSupply);
+                            break;
+                        //-----鍦扮儹
+                        // 1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿
+                        case "day":
+                            text = Language.StringByID(StringId.Day);
+                            break;
+                        case "night":
+                            text = Language.StringByID(StringId.Night);
+                            break;
+                        case "away":
+                            text = Language.StringByID(StringId.Away);
+                            break;
+                        case "normal":
+                            text = Language.StringByID(StringId.Normal);
+                            break;
+                        case "timer":
+                            text = Language.StringByID(StringId.Timer);
+                            break;
+                    }
+                    break;
+                case FunctionAttributeKey.FanSpeed:
+                    switch (catchString)
+                    {
+                        case "high":
+                            text = Language.StringByID(StringId.HighWindSpeed);
+                            break;
+                        case "medium":
+                            text = Language.StringByID(StringId.MiddleWindSpeed);
+                            break;
+                        case "low":
+                            text = Language.StringByID(StringId.LowWindSpeed);
+                            break;
+                        case "auto":
+                            text = Language.StringByID(StringId.Auto);
+                            break;
+                        default:
+                            text = "low";
+                            break;
+                    }
+                    break;
+                case "high":
+                    text = Language.StringByID(StringId.HighWindSpeed);
+                    break;
+                case "medium":
+                    text = Language.StringByID(StringId.MiddleWindSpeed);
+                    break;
+                case "low":
+                    text = Language.StringByID(StringId.LowWindSpeed);
+                    break;
+                case "auto":
+                    text = Language.StringByID(StringId.Auto);
+                    break;
+            }
+            return text;
+        }
+
+
+    }
+    /// <summary>
+    /// 鍦烘櫙鎺ㄩ�侀厤缃�
+    /// </summary>
+    public class ScenePushConfig
+    {
+        /// <summary>
+        /// 鎺ㄩ�佹柟寮�
+        /// </summary>
+        public string pushMethod = "";
+        /// <summary>
+        /// 鎺ㄩ�佸唴瀹�
+        /// </summary>
+        public string pushContent = "";
+        /// <summary>
+        /// 鎺ㄩ�佺洰鏍囬泦鍚�
+        /// </summary>
+        public List<string> pushTarget = new List<string>();
+    }
 
 }
-//5.1.14鑾峰彇鍦烘櫙鍒楄〃
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"type": "scene",
-//	"command": "get_list"
-//}
-//杩斿洖鍊� json鏍煎紡 鎵�鏈夊満鏅痠d鍙婂満鏅噷鎵ц鐨勭洰鏍囨暟鎹�
-//杩斿洖渚嬪瓙
-//{
-//	"namespace": "HDL",
-//	"command": "get_list_respond",
-//	"type": "scene",
-//	"number": [{
-//		"scene_id": "0001",
-//		"scene_name": "dinner",
-//		"objects": [{
-//			   "sid": "00010019101209000025670100010001",
-//"data_type": "string ",
-//			"value": "on"
-//		  }]
-//	}]
-//}
-//璇存槑 鑾峰彇鍦烘櫙鍒楄〃鍜屽睘鎬э紝鍙紑锛屽彧鍏筹紝鏃㈠紑鍙堝叧
-	
-//5.1.15鍒涘缓鍦烘櫙
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"command": "create",
-//	"type": "scene",
-//	"objects": [{
-//		"scene_name": "Away ",
-//		"status": "single_off"
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "create_respond",
-//	"type": "scene",
-//	"objects": [{
-//		"scene_id": "0004",
-//		"name": "Away",
-//		"status": "single_off"
-//	}]
-//}
-//璇存槑 鍒涘缓鍦烘櫙
-	
-//5.1.16娣诲姞鐩爣鍒板満鏅�
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"command": "add_member",
-//	"type": "scene",
-//	"number": [{
-//		"scene_id": "0001",
-//		"objects": [{
-//			"sid": "00010019101209000025670100010001",
-//			"function": [{
-//				"attri": "switch",
-//"data_type": "string ",
-//				"value": "on"
-//			}]
-
-//		}]
-//	}, {
-//		"scene_id": "0002",
-//		"objects": [{
-//			"sid": "00010019101209000025670200010001",
-//			"function": [{
-//				"attri": "brightness",
-//"data_type": "int",
-//				"value": 50
-//			}]
-//		}]
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "add_member_respond",
-//	"type": "scene",
-//	"scene_id": "0001",
-//	"value": "success"
-//}
-//璇存槑 鎴愬姛娣诲姞鐩爣鐨勫満鏅垪琛�
-	
-//5.1.17鍒犻櫎鍦烘櫙鍛戒护
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"command": "delete",
-//	"type": "scene",
-//	"objects": [{
-//		"scene_id": "0001"
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "delete_respond",
-//	"type": "scene",
-//	"scene_id": "0001",
-//	"value": "success"
-//}
-//璇存槑 鍒犻櫎鍦烘櫙
-	
-//5.1.18鍒犻櫎鍦烘櫙閲岀殑鐩爣
-//璇锋眰鍙傛暟
-//{
-//	"Namespace": "HDL",
-//	"Command": "delete_member",
-//	"type": "scene",
-//	"number": [{
-//		"scene_id": "0001",
-//		"objects": [{
-//			"sid": "00010019101209000025670100010001"
-//		}, {
-//			"sid": "00010019101209000025670100010002"
-//		}]
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "delete_member_respond",
-//	"type": "scene",
-//	"scenesid": "0001",
-//	"sid": "00010019101209000025670100010001",
-//	"value": "success"
-//}
-//璇存槑 鍒犻櫎鍦烘櫙鍐呰澶�
-	
-//5.1.19閰嶇疆鍦烘櫙鍒嗙粍锛堣冻鍐呭満鏅姸鎬佽嚜鍔ㄨ褰曟渶鍚庝竴娆¤褰曪級
-//璇锋眰鍙傛暟	{
-//	"namespace": "HDL",
-//	"command": "group",
-//	"type": "scene",
-//	"objects": [{
-//		"group_id": 1,
-//		"scene_ids": [{
-//			"scene_id": "0001"
-//		}, {
-//			"scene_id": "0002"
-//		}]
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "group_respond",
-//	"type": "scene",
-//	"group_id": "0001",
-//	"value": "success"
-//}
-//璇存槑 鎺у埗鍦烘櫙
-	
-
-//5.1.20璇诲彇鍦烘櫙鍒嗙粍
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"command": "read_group",
-//	"type": "scene",
-//	"objects": [{
-//		"group_id": 1
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "read_group_respond",
-//	"type": "scene",
-//	"objects": [{
-//		"group_id": 1,
-//		"scene_ids": [{
-//			"scene_id": "0001"
-//		}, {
-//			"scene_id": "0002"
-//		}]
-//	}]
-//}
-//璇存槑 鎺у埗鍦烘櫙
-	
-
-//5.1.21鎺у埗鍦烘櫙
-//璇锋眰鍙傛暟
-//{
-//	"namespace": "HDL",
-//	"command": "contrl",
-//	"type": "scene",
-//	"objects": [{
-//		"scene_id": "0001",
-//		"value": 鈥渙n鈥�
-//	}]
-//}
-//杩斿洖鍊� json鏍煎紡
-//杩斿洖渚嬪瓙	{
-//	"namespace": "HDL",
-//	"command": "contrl_respond",
-//	"type": "scene",
-//		"scene_id": "0001",
-//		"value": "success"
-//}
-//璇存槑 鎺у埗鍦烘櫙
\ No newline at end of file

--
Gitblit v1.8.0