wei
2021-08-21 ec1d7cb35b99f01be0151c5b6f0c0fc2fa30ab95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
using System;
using System.Text;
 
namespace HDL_ON.DriverLayer
{
    public class A_Protocal_Common
    {
 
 
 
    }
 
    /// <summary>
    /// 本地通讯数据
    /// </summary>
    public class LocalCommunicationData
    {
        public string Topic;
        public int Length;
 
        public string BodyDataString;
 
    }
 
    /// <summary>
    /// 通讯回复有效数据
    /// </summary>
    public class ResponsePack
    {
        public string id;
        public string code;
        public string time_stamp;
        public object objects;
    }
 
    /// <summary>
    /// 通讯主题
    /// </summary>
    public class CommunicationTopic
    {
        static CommunicationTopic _ct;
        public static CommunicationTopic ct
        {
            get
            {
                if (_ct == null)
                {
                    _ct = new CommunicationTopic();
                }
                return _ct;
            }
        }
        /// <summary>
        /// 搜索本地网关
        /// </summary>
        public const string SearchLoaclGateway = "/user/all/custom/gateway/search";
        /// <summary>
        /// 搜索网关回复
        /// </summary>
        public const string SearchLoaclGatewayReply = "/user/all/custom/gateway/search_reply";
        /// <summary>
        /// 网关广播数据
        /// </summary>
        public const string GatewayBroadcast = "/user/all/custom/gateway/broadcast";
        /// <summary>
        /// 调试软件上传oid列表
        /// </summary>
        public const string AddDeviceOids = "/user/onpro/custom/device/add";
        /// <summary>
        /// 调试软件上传功能列表
        /// </summary>
        public const string AddFunctions = "/user/onpro/custom/function/attribute/add";
        /// <summary>
        /// 调试软件获取appOid列表
        /// </summary>
        public const string BusPcGetAppOids = "/user/onpro/custom/device/list/get";
        /// <summary>
        /// 调试软件获取appSid列表
        /// </summary>
        public const string BusPcGetAppSids = "/user/onpro/custom/function/list/get";
 
        /// <summary>
        /// 本地控制功能状态主题
        /// </summary>
        public string ControlFunctionTopic
        {
            get
            {
                return $"/base/{Control.Ins.GatewayId}/thing/property/down";
            }
        }
        /// <summary>
        /// 本地控制红外设备功能主题
        /// </summary>
        public string ControlIrFunctionTopic
        {
            get
            {
                return $"/base/${Control.Ins.GatewayId}/thing/property/down";
            }
        }
 
        /// <summary>
        /// 读取功能状态
        /// </summary>
        public string ReadStatus
        {
            get
            {
                return $"/base/{Control.Ins.GatewayId}/thing/property/read";
            }
        }
        /// <summary>
        /// 网关上报设备状态
        /// </summary>
        public string GatewayUpStatus
        {
            get
            {
                return $"/base/{Control.Ins.GatewayId}/thing/property/up";
            }
        }
        /// <summary>
        /// 场景执行
        /// </summary>
        public string ControlScene
        {
            get
            {
                return $"/user/{Control.Ins.GatewayId}/custom/scene/execute";
            }
        }
 
        /// <summary>
        /// 安防控制
        /// </summary>
        public string ControlSeurity
        {
            get
            {
                return $"/user/{Control.Ins.GatewayId}/custom/security/status/set";
            }
        }
        /// <summary>
        /// 安防状态更新
        /// </summary>
        public string SecurityStatusUp
        {
            get
            {
                return $"/user/{Control.Ins.GatewayId}/custom/security/status/up";
            }///user/1413055228417130497/custom/security/status/up
        }
        /// <summary>
        /// 读取安防状态信息
        /// </summary>
        public string ReadSecurityStatus
        {
            get
            {
                return $"/user/{Control.Ins.GatewayId}/custom/security/list/get";
            }
        }
    }
}