Tange Cloud for Device
 Rev.333
载入中...
搜索中...
未找到
TgCloudCmdEx.h
浏览该文件的文档.
1/**
2 * @file TgCloudCmdEx.h
3 * @brief P2p Commands and Structures
4 */
5#ifndef __TgCloudCmdExt_h__
6#define __TgCloudCmdExt_h__
7//#include <stdio.h>
8#include "basedef.h"
9
10/** @addtogroup p2pcmds
11 * @{*/
12
13/** @name 设备重启
14 @{*/
15#define TCI_CMD_DEV_REBOOT_REQ 0x8010 ///< 重启请求命令 see @ref Tcis_DevRebootReq
16#define TCI_CMD_DEV_REBOOT_RESP 0x8011 ///< 重启应答 see @ref Tcis_DevRebootResp
17/**@}*/
18
19/** @name 白光灯
20 @{*/
21#define TCI_CMD_GET_WHITELIGHT_REQ 0x8012 ///< 获取设备双光状态请求 see @ref Tcis_GetWhiteLightReq
22#define TCI_CMD_GET_WHITELIGHT_RESP 0x8013 ///< 双光状态应答 see @ref Tcis_GetWhiteLightResp
23#define TCI_CMD_SET_WHITELIGHT_REQ 0x8014 ///< 设置双光状态请求 see @ref Tcis_SetWhiteLightReq
24#define TCI_CMD_SET_WHITELIGHT_RESP 0x8015 ///< 设置双光状态应答 see @ref Tcis_SetWhiteLightResp
25#define TCI_CMD_GET_DOUBLELIGHT_REQ TCI_CMD_GET_WHITELIGHT_REQ ///< 重命名
26#define TCI_CMD_GET_DOUBLELIGHT_RESP TCI_CMD_GET_WHITELIGHT_RESP ///< 重命名
27#define TCI_CMD_SET_DOUBLELIGHT_REQ TCI_CMD_SET_WHITELIGHT_REQ ///< 重命名
28#define TCI_CMD_SET_DOUBLELIGHT_RESP TCI_CMD_SET_WHITELIGHT_RESP ///< 重命名
29/**@}*/
30
31/** @name 设备夜视
32 @{*/
33#define TCI_CMD_GET_DAYNIGHT_REQ 0x8016 ///<查询夜视状态命令 see @ref Tcis_GetDayNightReq
34#define TCI_CMD_GET_DAYNIGHT_RESP 0x8017 ///< 夜视状态应答命令 see @ref Tcis_GetDayNightResp
35#define TCI_CMD_SET_DAYNIGHT_REQ 0x8018 ///< 设置夜视状态命令 see @ref Tcis_SetDayNightReq
36#define TCI_CMD_SET_DAYNIGHT_RESP 0x8019 ///< 夜视状态设置应答命令 see @ref Tcis_SetDayNightResp
37/**@}*/
38
39/** @name 设备移动追踪
40 @{*/
41#define TCI_CMD_GET_MOTION_TRACKER_REQ 0x8020 ///< 获取设备移动追踪开关状态请求 see @ref Tcis_GetMotionTrackerReq
42#define TCI_CMD_GET_MOTION_TRACKER_RESP 0x8021 ///< 设备移动追踪开关状态应答 see @ref Tcis_GetMotionTrackerResp
43#define TCI_CMD_SET_MOTION_TRACKER_REQ 0x8022 ///< 设置移动追踪开关状态请求 see @ref Tcis_SetMotionTrackerReq
44#define TCI_CMD_SET_MOTION_TRACKER_RESP 0x8023 ///< 设置移动追踪开关状态应答 see @ref Tcis_SetMotionTrackerResp
45/**@}*/
46
47/** @name 云录像视频清晰度
48 @{*/
49#define TCI_CMD_GET_CLOUD_VIDEO_QUALITY_REQ 0x8026 ///< 获取云录像清晰度请求 see @ref Tcis_GetCloudVideoQualityReq
50#define TCI_CMD_GET_CLOUD_VIDEO_QUALITY_RESP 0x8027 ///< 获取云录像清晰度的应答 see @ref Tcis_GetCloudVideoQualityResp
51/**@}*/
52
53/**@name 设置/查询麦克风开关
54 @{*/
55#define TCI_CMD_GET_MICROPHONE_REQ 0x8032 ///< 查询麦克风开关状态请求 see @ref Tcis_GetMicroPhoneReq -- sdk sdk内部处理此命令
56#define TCI_CMD_GET_MICROPHONE_RESP 0x8033 ///< 设备麦克风开关状态的应答 see @ref Tcis_GetMicroPhoneResp
57#define TCI_CMD_SET_MICROPHONE_REQ 0x8034 ///< 设置设备麦克风开关请求 see @ref Tcis_SetMicroPhoneReq
58#define TCI_CMD_SET_MICROPHONE_RESP 0x8035 ///< 设置设备麦克风开关的应答
59/**@}*/
60
61/** @name 设置/查询蜂鸣器开关
62 @{*/
63#define TCI_CMD_GET_BUZZER_REQ 0x8036 ///< 查询蜂鸣器状态请求 see @ref Tcis_GetBuzzerReq
64#define TCI_CMD_GET_BUZZER_RESP 0x8037 ///< 查询蜂鸣器状态应答 see @ref Tcis_GetBuzzerResp
65#define TCI_CMD_SET_BUZZER_REQ 0x8038 ///< 设置蜂鸣器状态请求 see @ref Tcis_SetBuzzerReq
66#define TCI_CMD_SET_BUZZER_RESP 0x8039 ///< 设置蜂鸣器状态应答 see @ref Tcis_SetBuzzerResp
67/**@}*/
68
69/** @name 温湿度控制
70 * @{*/
71#define TCI_CMD_SET_TEMPERATURE_THRESHOLD 0x0464 ///< 设置温度报警阈值 req: @ref Tcis_SetTemperatureThresholdReq; resp: generic
72#define TCI_CMD_GET_TEMPERATURE_SETTING 0x0466 ///< 获取温度设置. req: @ref Tcis_GetTemperatureSettingReq; resp: @ref Tcis_GetTemperatureSettingResp
73#define TCI_CMD_SET_HUMIDITY_THRESHOLD 0x0468 ///< 设置湿度报警阈值 req: @ref Tcis_SetHumidityThresholdReq; resp: generic
74#define TCI_CMD_GET_HUMIDITY_SETTING 0x046A ///< 获取湿度设置 req: @ref Tcis_GetHumiditySettingReq; resp: @ref Tcis_GetHumiditySettingResp
75/**@}*/
76
77/**@}*/ //end of: addtogroup p2pcmds
78
79__BEGIN_PACKED__
80
81/**\brief 重启请求*/
82/**@ref TCI_CMD_DEV_REBOOT_REQ
83 * */
84typedef struct Tcis_DevRebootReq
85{
86 unsigned int channel; ///< Camera Index
87 unsigned char reserved[4]; ///< 0
88} __PACKED__ Tcis_DevRebootReq;
89
90
91/** \brief 重启请求应答.*/
92/** 设备端应在发送答后延时2秒,以使APP可以收到应答
93 * @ref TCI_CMD_DEV_REBOOT_RESP
94 * */
95typedef struct Tcis_DevRebootResp
96{
97 unsigned int result; ///< 1 ok , !1 no ok
98 unsigned char reserved[4];
99} __PACKED__ Tcis_DevRebootResp;
100
101
102
103/** \brief 白光状态请求 */
104/** @ref TCI_CMD_GET_WHITELIGHT_REQ
105 * */
107{
108 unsigned int channel; ///< Camera Index
109 unsigned char reserved[4];
110} __PACKED__ Tcis_GetWhiteLightReq;
111#define Tcis_GetDoubleLightReq Tcis_GetWhiteLightReq
112
113
114/** \brief 白光灯设置结构体 */
115/** @ref TCI_CMD_GET_WHITELIGHT_RESP
116 * */
118{
119 unsigned int channel; ///< Camera Index
120 unsigned int support; ///< 0:不支持,2:支持两种模式,3:支持三种模式; --- ???
121 /** 当前模式:
122 * - \c 0 - 关闭(白光不工作)
123 * - \c 1 - 打开(全彩色)
124 * - \c 2 - 智能模式(事件触发白光)
125 * - <span style="text-decoration:line-through"> \c 3 - 定时开关(@ref Feature_DoubleLight 能力要有 "Timer" 属性)</span>
126 * <em>在定时范围内按定时规定(开), 定时范围之外按模式设定执行. 不需要一个单独的"定时开关"模式(2014/1/5)</em>
127 */
128 unsigned char mode;
129 unsigned char reserved[3];
130} __PACKED__ Tcis_GetWhiteLightResp;
131#define Tcis_GetDoubleLightResp Tcis_GetWhiteLightResp
132
133
134/** \brief 设置白光请求结构体 */
135/** @ref TCI_CMD_SET_WHITELIGHT_REQ
136 * */
137typedef struct Tcis_SetWhiteLightReq {
138 unsigned int channel; ///< Camera Index
139 unsigned int mode; ///< 当前模式,0-关闭(白光不工作);1-打开(全彩色);2-智能模式(移动侦测触发自动白光)
140 unsigned char reserved[4];
141} __PACKED__ Tcis_SetWhiteLightReq;
142#define Tcis_SetDoubleLightReq Tcis_SetWhiteLightReq
143
144
145/** \brief 设置白光状态应答结构体*/
146/** @ref TCI_CMD_SET_WHITELIGHT_RESP
147 * */
149 unsigned int result; ///< 1 ok , !1 no ok
150 unsigned char reserved[4];
151} __PACKED__ Tcis_SetWhiteLightResp;
152#define Tcis_SetDoubleLightResp Tcis_SetWhiteLightResp
153
154
155
156/** \brief 查询夜视状态 */
157/** @ref TCI_CMD_GET_DAYNIGHT_REQ
158 * */
159typedef struct Tcis_GetDayNightReq{
160 unsigned int channel; ///< Camera Index
161 unsigned char reserved[4];
162} __PACKED__ Tcis_GetDayNightReq;
163
164
165/** \brief 返回夜视状态 */
166/** @ref TCI_CMD_GET_DAYNIGHT_RESP
167 * */
168typedef struct Tcis_GetDayNightResp {
169 unsigned int channel; ///< Camera Index
170 unsigned int support; ///< 0不支持,2支持两种模式,3支持三种模式; --- ???
171 unsigned char mode; ///< 当前模式,mode: 0- auto 1- day,2- night
172 unsigned char reserved[3];
173} __PACKED__ Tcis_GetDayNightResp;
174
175
176/** \brief 设置夜视状态 */
177/** @ref TCI_CMD_SET_DAYNIGHT_REQ
178 * */
179typedef struct Tcis_SetDayNightReq {
180 unsigned int channel; ///< Camera Index
181 unsigned int mode; ///< 当前模式,mode: 0- auto 1- day,2- night
182 unsigned char reserved[4];
183} __PACKED__ Tcis_SetDayNightReq;
184
185
186/** \brief 设置夜视状态应答结构体 */
187/** @ref TCI_CMD_SET_DAYNIGHT_RESP
188 * */
189typedef struct Tcis_SetDayNightResp {
190 unsigned int result; ///< 1 ok , !1 no ok
191 unsigned char reserved[4];
192} __PACKED__ Tcis_SetDayNightResp;
193
194
195/** \brief 获取设备移动追踪开关状态请求 */
196/** @ref TCI_CMD_GET_MOTION_TRACKER_REQ
197 * */
199 unsigned int channel; ///< Camera Index
200 unsigned char reserved[4];
201} __PACKED__ Tcis_GetMotionTrackerReq;
202
203
204/** \brief 设备移动追踪开关状态应答结构体 */
205/** @ref TCI_CMD_GET_MOTION_TRACKER_RESP
206 * */
208 unsigned int channel; ///< Camera Index
209 unsigned int support; ///< 0不支持,非0支持 --- ??? not used in get_setting
210 unsigned char mode; ///< 当前模式,mode: 1- on, 0- off
211 unsigned char reserved[3];
212} __PACKED__ Tcis_GetMotionTrackerResp;
213
214
215/** \brief 设置移动追踪开关状态请求结构体 */
216/** @ref TCI_CMD_SET_MOTION_TRACKER_REQ
217 * */
219 unsigned int channel; ///< Camera Index
220 unsigned int mode; ///< 需要设置的模式,1 - on, 0 - off
221 unsigned char reserved[4]; ///< 保留字段,未使用
222} __PACKED__ Tcis_SetMotionTrackerReq;
223
224
225/** \brief 设置移动追踪应答开关状态应答结构体 */
226/** @ref TCI_CMD_SET_MOTION_TRACKER_RESP
227 * */
229 unsigned int result; ///< 1 ok , !1 no ok
230 unsigned char reserved[4];
231} __PACKED__ Tcis_SetMotionTrackerResp;
232
233
234/** \brief 获取云录像清晰度请求结构体 */
235/** @ref TCI_CMD_GET_CLOUD_VIDEO_QUALITY_REQ
236 * */
238 unsigned int channel; ///< Camera Index
239 unsigned char reserved[4];
241
242
243/** \brief 获取云录像清晰度应答结构体 */
244/** @ref TCI_CMD_GET_CLOUD_VIDEO_QUALITY_RESP
245 * */
247 unsigned int channel; ///< Camera Index
248 unsigned char quality; ///< 当前清晰度,mode: 0- 高清, 1- 标清
249 unsigned char reserved[3]; ///< 保留字段,未使用
251
252/** @name 麦克风
253 * @{*/
254/** \brief 查询麦克风状态请求结构体. sdk内部处理 */
255/** @ref TCI_CMD_GET_MICROPHONE_REQ
256 * */
257typedef struct Tcis_GetMicroPhoneReq {
258 unsigned int channel; ///< Camera Index: 0
259 unsigned char reserved[4];
260} __PACKED__ Tcis_GetMicroPhoneReq;
261
262
263/** \brief 麦克风开关状态应答结构体 */
264/** @ref TCI_CMD_GET_MICROPHONE_RESP
265 * */
267 unsigned int channel; ///< Camera Index
268 unsigned char status; ///< 当前当前麦克风状态,status: 0- 关, 1- 开
269 unsigned char reserved[3];
270} __PACKED__ Tcis_GetMicroPhoneResp;
271
272
273/** \brief 设置麦克风开关状态请求 */
274/** @ref TCI_CMD_SET_MICROPHONE_REQ
275 * */
276typedef struct Tcis_SetMicroPhoneReq {
277 unsigned int channel; ///< Camera Index
278 unsigned int status; ///< 设置麦克风状态,status: 0- 关, 1- 开
279} __PACKED__ Tcis_SetMicroPhoneReq;
280
281/**@}*/
282
283/** @name 蜂鸣器
284 * @{*/
285/** \brief 查询蜂鸣器状态请求结构体 */
286/** @ref TCI_CMD_GET_BUZZER_REQ
287 * */
288typedef struct Tcis_GetBuzzerReq {
289 unsigned int channel; ///< Camera Index
290 unsigned char reserved[4];
291} __PACKED__ Tcis_GetBuzzerReq;
292
293
294/** \brief 蜂鸣器状态应答结构体 */
295/** @ref TCI_CMD_GET_BUZZER_RESP
296 * */
297typedef struct Tcis_GetBuzzerResp {
298 unsigned int channel; ///< Camera Index
299 unsigned char status; ///< 当前蜂鸣器状态,status: 0- 关; 1- 开; 2- 按定时器设定
300 unsigned char reserved[3];
301} __PACKED__ Tcis_GetBuzzerResp;
302
303
304/** \brief 设置蜂鸣器状态请求结构体 */
305/** @ref TCI_CMD_SET_BUZZER_REQ
306 * */
307typedef struct Tcis_SetBuzzerReq {
308 unsigned int channel; ///< Camera Index
309 unsigned char status; ///< 当前蜂鸣器状态,status: 0- 关; 1- 开; 2- 按定时器设定
310 unsigned char reserved[3];
311} __PACKED__ Tcis_SetBuzzerReq;
312
313
314/** \brief 设置蜂鸣器状态应答参数结构体*/
315/** @ref TCI_CMD_GET_BUZZER_RESP
316 * */
317typedef struct Tcis_SetBuzzerResp {
318 unsigned int result; ///< 0失败,1成功
319 unsigned char reserved[4];
320} __PACKED__ Tcis_SetBuzzerResp;
321/**@}*/
322
323/** @name 温湿度控制
324 * @{*/
325/** 获取温度设置.
326 * @ref TCI_CMD_GET_TEMPERATURE_SETTING = 0x0466
327 */
329 int sensor_id; ///< 温度传感器标识 0~N-1
331
332/** 传感值温度报警设置
333 * 温度单位为 0.001摄氏度。例如:
334 * - -40050 表示 -40.050 摄像度
335 * - 100123 表示 100.123 摄氏度
336 */
338 int sensor_id; ///< 温度传感器标识 0~N-1
339 int lo_limit; ///< 感温能力下限。
340 int hi_limit; ///< 感温能力上限。
341 int lo_en; ///< 低温报警使能标志. 1:enable; 0:disable
342 int hi_en; ///< 高温报警使能标志
343 int lo_threshold; ///< 低温报警阈值
344 int hi_threshold; ///< 高温报警阈值
346
347
348/** 设置温度传感器的报警阈值.
349 * @ref TCI_CMD_SET_TEMPERATURE_THRESHOLD = 0x0464 \n
350 * 温度单位为 0.001摄氏度。例如:
351 * - -40050 表示 -40.050 摄像度
352 * - 100123 表示 100.123 摄氏度
353 */
355 int sensor_id; ///< 温度传感器标识 0~N-1
356 int lo_en; ///< 低温报警使能标志. 1:enable; 0:disable
357 int hi_en; ///< 高温报警使能标志
358 int lo_threshold; ///< 低温报警阈值
359 int hi_threshold; ///< 高温报警阈值
361
362/** 获取湿度传感器设置
363 * @ref TCI_CMD_GET_HUMIDITY_SETTING = 0x046A \n
364 */
366 int sensor_id; ///< 湿度传感器标识 0~N-1
367} __PACKED__ Tcis_GetHumiditySettingReq;
368
369/** 湿度传感器设置
370 * 湿度单位为 0.1%. 即 281 示湿度为 28.1%
371 */
373 int sensor_id; ///< 湿度传感器标识 0~N-1
374 int lo_limit; ///< 传感器检测下限
375 int hi_limit; ///< 传感器检测上限
376 int lo_en; ///< 湿度低值报警使能标志。1:enable; 0:disabled
377 int hi_en; ///< 湿度高值报警使能标志。1:enable; 0:disabled
378 int lo_threshold; ///< 低湿度报警阈值
379 int hi_threshold; ///< 高湿度报警阈值
380} __PACKED__ Tcis_GetHumiditySettingResp;
381
382/** 设置湿度传感器报警阈值.
383 * @ref TCI_CMD_SET_HUMIDITY_THRESHOLD = 0x0468 \n
384 * 湿度单位为 0.1%. 即 281 示湿度为 28.1%
385 */
387 int sensor_id; ///< 湿度传感器标识 0~N-1
388 int lo_en; ///< 湿度低值报警使能标志。1:enable; 0:disabled
389 int hi_en; ///< 湿度高值报警使能标志。1:enable; 0:disabled
390 int lo_threshold; ///< 低湿度报警阈值
391 int hi_threshold; ///< 高湿度报警阈值
393/**@}*/
394
395__END_PACKED__
396
397//内部处理的命令。会告知应用层,应用层不要应答。
398//参数为 channel (整数)
399#define TCI_CMD_VIDEOSTART 0x01FF
400#define TCI_CMD_VIDEOSTOP 0x02FF
401#define TCI_CMD_AUDIOSTART 0x0300
402#define TCI_CMD_AUDIOSTOP 0x0301
403
404#endif
unsigned int channel
Camera Index
int lo_threshold
低湿度报警阈值
int hi_threshold
高湿度报警阈值
unsigned int channel
Camera Index
unsigned int result
1 ok , !1 no ok
unsigned int status
设置麦克风状态,status: 0- 关, 1- 开
unsigned char reserved[3]
保留字段,未使用
int lo_limit
传感器检测下限
int lo_en
湿度低值报警使能标志。1:enable; 0:disabled
int sensor_id
温度传感器标识 0~N-1
int hi_en
高温报警使能标志
unsigned int support
0:不支持,2:支持两种模式,3:支持三种模式; — ???
unsigned int channel
Camera Index
unsigned int channel
Camera Index
unsigned int channel
Camera Index
unsigned int mode
当前模式,mode: 0- auto 1- day,2- night
unsigned int result
1 ok , !1 no ok
int sensor_id
湿度传感器标识 0~N-1
int lo_threshold
低湿度报警阈值
int hi_limit
感温能力上限。
unsigned int mode
当前模式,0-关闭(白光不工作);1-打开(全彩色);2-智能模式(移动侦测触发自动白光)
int lo_en
低温报警使能标志. 1:enable; 0:disable
unsigned int support
0不支持,非0支持 — ??? not used in get_setting
unsigned int channel
Camera Index
unsigned int support
0不支持,2支持两种模式,3支持三种模式; — ???
int lo_en
湿度低值报警使能标志。1:enable; 0:disabled
unsigned int channel
Camera Index
unsigned int channel
Camera Index
int hi_threshold
高湿度报警阈值
unsigned int mode
需要设置的模式,1 - on, 0 - off
unsigned char status
当前蜂鸣器状态,status: 0- 关; 1- 开; 2- 按定时器设定
unsigned int channel
Camera Index: 0
unsigned char status
当前当前麦克风状态,status: 0- 关, 1- 开
unsigned int channel
Camera Index
int hi_limit
传感器检测上限
int lo_en
低温报警使能标志. 1:enable; 0:disable
unsigned int channel
Camera Index
unsigned char quality
当前清晰度,mode: 0- 高清, 1- 标清
int sensor_id
温度传感器标识 0~N-1
unsigned int result
1 ok , !1 no ok
unsigned int channel
Camera Index
unsigned char reserved[4]
保留字段,未使用
int lo_limit
感温能力下限。
unsigned int result
1 ok , !1 no ok
unsigned int channel
Camera Index
unsigned int channel
Camera Index
int sensor_id
湿度传感器标识 0~N-1
unsigned int channel
Camera Index
unsigned char mode
当前模式,mode: 0- auto 1- day,2- night
unsigned char mode
当前模式,mode: 1- on, 0- off
unsigned int channel
Camera Index
unsigned int result
0失败,1成功
int hi_en
高温报警使能标志
unsigned char status
当前蜂鸣器状态,status: 0- 关; 1- 开; 2- 按定时器设定
unsigned int channel
Camera Index
unsigned char reserved[4]
0
int hi_en
湿度高值报警使能标志。1:enable; 0:disabled
unsigned char mode
当前模式:
int sensor_id
湿度传感器标识 0~N-1
int hi_en
湿度高值报警使能标志。1:enable; 0:disabled
unsigned int channel
Camera Index
int sensor_id
温度传感器标识 0~N-1
重启请求应答.
查询蜂鸣器状态请求结构体
蜂鸣器状态应答结构体
获取云录像清晰度请求结构体
获取云录像清晰度应答结构体
查询夜视状态
获取湿度传感器设置 TCI_CMD_GET_HUMIDITY_SETTING = 0x046A
湿度传感器设置 湿度单位为 0.1%.
查询麦克风状态请求结构体.
麦克风开关状态应答结构体
获取设备移动追踪开关状态请求
设备移动追踪开关状态应答结构体
传感值温度报警设置 温度单位为 0.001摄氏度。例如:
白光灯设置结构体
设置蜂鸣器状态请求结构体
设置蜂鸣器状态应答参数结构体
设置夜视状态
设置夜视状态应答结构体
设置湿度传感器报警阈值.
设置麦克风开关状态请求
设置移动追踪开关状态请求结构体
设置移动追踪应答开关状态应答结构体
设置温度传感器的报警阈值.
设置白光请求结构体
设置白光状态应答结构体