From 171bf03f3664226eeff2b20ee9bd2e914b63a17d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 13 三月 2020 09:18:50 +0800
Subject: [PATCH] 20200313
---
HDL_ON/Entity/Scene.cs | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 214 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/Entity/Scene.cs b/HDL_ON/Entity/Scene.cs
index 6937458..08e032a 100644
--- a/HDL_ON/Entity/Scene.cs
+++ b/HDL_ON/Entity/Scene.cs
@@ -3,33 +3,228 @@
namespace HDL_ON.Entity
{
- public class Scene
+ public class Scene : Function
{
public Scene()
{
}
- /// <summary>
- /// 鍦烘櫙鍚嶇О
- /// </summary>
- public string Name;
- /// <summary>
- /// 鍦烘櫙ID
- /// </summary>
- public Guid Id;
- /// <summary>
- /// 鍦烘櫙閰嶇疆鐨勫姛鑳�
- /// </summary>
- public List<SceneFunction> functions;
- }
+ public string scene_id = "0001";
- public class SceneFunction
- {
/// <summary>
- /// 鍔熻兘ID
+ /// 鍦烘櫙绫诲瀷
/// </summary>
- public string sid;
+ public SceneType sceneType = SceneType.OrdinaryScenes;
-
+ /// <summary>
+ /// 鍦烘櫙鑳屾櫙
+ /// </summary>
+ public string ImagePath = "FunctionIcon/Scene/s1.png";
}
}
+//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