Tange Cloud for Device
 Rev.355
载入中...
搜索中...
未找到
TgCloudCmd.h
浏览该文件的文档.
1/** \file TgCloudCmd.h
2 * \brief P2p Commands and Structures
3 */
4
5#ifndef __TgCloudCmd_h__
6#define __TgCloudCmd_h__
7
8#include "basedef.h"
9/////////////////////////////////////////////////////////////////////////////////
10/////////////////// Message Type Define//////////////////////////////////////////
11/////////////////////////////////////////////////////////////////////////////////
12
13/** @defgroup p2pcmds P2P命令及其数据结构
14 * 命令标注约定:
15 * - `Req: none` 表示命令请求没有数据
16 * - `Resp: none` 表示命令没有应答
17 * - `Resp: generic` 命令响应为状态码
18 * @{*/
19
20/** @name 录像和回放
21 @{*/
22#define TCI_CMD_SETRECORD_REQ 0x0310 ///< 设置SD卡录像模式命令 @ref Tcis_SetRecordReq. \n能力 @ref Feature_RecordConf
23#define TCI_CMD_SETRECORD_RESP 0x0311 ///< 设置SD卡录像模式应答命令 @ref Tcis_SetRecordResp
24#define TCI_CMD_GETRECORD_REQ 0x0312 ///< 获取SD卡录像模式. 能力 @ref Feature_RecordConf
25#define TCI_CMD_GETRECORD_RESP 0x0313 ///< 获取SD卡录像模式应答 @ref Tcis_GetRecordResp
26
27#define TCI_CMD_SET_TIMELAPSE_RECORD 0x0314 ///< 设置延时摄像录像模式.
28 ///< Req: @ref Tcis_SetTimelapseRecordModeReq \n
29 ///< Resp: generic. \n
30 ///< Require: 能力 @ref Feature_RecordConf 包含 time-lapse
31#define TCI_CMD_GET_TIMELAPSE_RECORD 0x0316 ///< 获取延时摄像设置.
32 ///< Req: @ref Tcis_GetTimelapseRecordModeReq; \n
33 ///< Resp: @ref Tcis_GetTimelapseRecordModeResp. \n
34 ///< Require: 能力 @ref Feature_RecordConf 包含 time-lapse
35
36
37#define TCI_CMD_LISTEVENT_REQ 0x8000 ///< 查询SD卡录像 Req: @ref Tcis_ExListEventReq
38#define TCI_CMD_LISTEVENT_RESP 0x8001 ///< SD卡录像查询应答命令 see @ref Tcis_ExListEventResp
39
40#define TCI_CMD_LIST_RECORDDAYS 0x800A ///< 返回SD卡上有录像的日期. req: none; resp: @ref Tcis_DaysList
41
42#define TCI_CMD_RECORD_PLAYCONTROL 0x031A ///< 回放控制命令 @ref Tcis_PlayRecord
43#define TCI_CMD_RECORD_PLAYCONTROL_RESP 0x031B ///< 回放控制应答命令 @ref Tcis_PlayRecordResp
44/**@}*/
45
46
47/** @name 移动侦测
48 * @{*/
49#define TCI_CMD_SETMOTIONDETECT_REQ 0x0324 ///< 设置移动侦测. see @ref Tcis_SetMotionDetect. \n@ref Feature_MD-Capabilities
50#define TCI_CMD_SETMOTIONDETECT_RESP 0x0325 ///< 设置移动侦测应答 @ref Tcis_SetMotionDetectResp
51#define TCI_CMD_GETMOTIONDETECT_REQ 0x0326 ///< 获取移动侦测配置请求 @ref Tcis_GetMotionDetectReq
52#define TCI_CMD_GETMOTIONDETECT_RESP 0x0327 ///< 获取移动侦测配置应答 @ref Tcis_SetMotionDetect
53#define TCI_CMD_SET_MDAREA_STATE 0x033A ///< 设置侦测区域状态(显示|隐藏)Req: @ref Tcis_MdAreaState, Resp: generic
54#define TCI_CMD_GET_MDAREA_STATE 0x033C ///< 获取侦测区域状态 Req: @ref Tcis_GetMdAreaStateReq, Resp: Tcis_MdAreaState
55/**@}*/
56
57/** @name 布防
58 @{*/
59#define TCI_CMD_SET_DEFENCE_REQ 0x0328 ///< 布防设置 参数:@ref Tcis_SetDefenceReq
60#define TCI_CMD_GET_DEFENCE_REQ 0x032A ///< 获取布防设置 请求: @ref Tcis_GetDefenceReq, 应答:@ref Tcis_SetDefence
61#define TCI_CMD_SET_EVENT_STATE 0x031C ///< 禁用或使能报警事件 请求: @ref Tcis_SetEventStateReq, 应答: generic
62#define TCI_CMD_GET_EVENT_STATE 0x031E ///< 获取事件使能状态 请求: @ref Tcis_GetEventStateReq, 应答: @ref Tcis_GetEventStateResp
63/**@}*/
64
65/** @name WiFi 相关操作
66 @{*/
67#define TCI_CMD_LISTWIFIAP_REQ 0x0340 ///< WiFi列表请求 see @ref Tcis_ListWifiApReq
68#define TCI_CMD_LISTWIFIAP_RESP 0x0341 ///< WiFi 列表应答 see @ref Tcis_ListWifiApResp
69#define TCI_CMD_SETWIFI_REQ 0x0342 ///< 设置WiFi. password 32bytes see @ref Tcis_SetWifiReq
70#define TCI_CMD_SETWIFI_RESP 0x0343 ///< 设置WiFi应答. password 32bytes see @ref Tcis_SetWifiResp
71/** 获取WiFi配置 see @ref Tcis_GetWifiReq.
72 * App 通过 0x8006 命令(token为空) 修改wifi,应用层收到的是 set_wifi() 回调, \n
73 * 所以没有给应用的设置命令
74 */
75#define TCI_CMD_GETWIFI_REQ 0x0344
76#define TCI_CMD_GETWIFI_RESP 0x0345 ///< WiFi配置 see @ref Tcis_GetWifiResp
77#define TCI_CMD_SETWIFI_REQ_2 0x0346 ///< password 64字节. 未使用 see @ref Tcis_SetWifiReq2
78#define TCI_CMD_GETWIFI_RESP_2 0x0347 ///< Not used
79/**@}*/
80
81/** @name 50/60Hz选择
82 *@{ */
83#define TCI_CMD_SET_ENVIRONMENT_REQ 0x0360 ///< 设置电源频率 see @ref Tcis_SetEnvironmentReq
84#define TCI_CMD_SET_ENVIRONMENT_RESP 0x0361 ///< 设置电源频率应答命令 see @ref Tcis_SetEnvironmentReq
85#define TCI_CMD_GET_ENVIRONMENT_REQ 0x0362 ///< 获取电源频率 see @ref Tcis_GetEnvironmentReq
86#define TCI_CMD_GET_ENVIRONMENT_RESP 0x0363 ///< 获取电源频率应答 see @ref Tcis_GetEnvironmentResp
87/**@}*/
88
89/** @name 图像翻转
90 * @{*/
91#define TCI_CMD_SET_VIDEOMODE_REQ 0x0370 ///< Set Video Flip Mode see @ref Tcis_SetVideoModeReq
92#define TCI_CMD_SET_VIDEOMODE_RESP 0x0371 ///< 设置图像翻转模式应答 see @ref Tcis_SetVideoModeResp
93#define TCI_CMD_GET_VIDEOMODE_REQ 0x0372 ///< Get Video Flip Mode see @ref Tcis_GetVideoModeReq
94#define TCI_CMD_GET_VIDEOMODE_RESP 0x0373 ///< 获取图像翻转模式应答 see @ref Tcis_GetVideoModeResp
95/**@}*/
96
97/** @name OSD
98 * @{*/
99#define TCI_CMD_SET_OSD_REQ 0x0374 ///< 设置OSD。 参数: @ref Tcis_SetOsdReq
100#define TCI_CMD_SET_OSD_RESP 0x0375 ///< 设置OSD 应答: generic
101#define TCI_CMD_GET_OSD_REQ 0x0376 ///< 获取OSD 设置. 参数: @ref Tcis_GetOsdReq
102#define TCI_CMD_GET_OSD_RESP 0x0377 ///< 获取OSD 应答. 参数: @ref Tcis_GetOsdResp
103/**@}*/
104
105/** @name 其它
106 * @{*/
107#define TCI_CMD_SESSION_CLOSE 0x0386 ///< 关闭连接
108#define TCI_CMD_GET_RUNTIME_STATE 0x0388 ///< 获取设备端运行状态. 参数: @ref Tcis_GetRuntimeStateReq . 应答: @ref Tcis_RuntimeStateResp
109/**@}*/
110
111/** @name SD卡状态和格式化
112 * @{*/
113#define TCI_CMD_FORMATEXTSTORAGE_REQ 0x0380 ///< Format external storage see @ref Tcis_FormatExtStorageReq
114#define TCI_CMD_FORMATEXTSTORAGE_RESP 0x0381 ///< SD卡格式化应答 see @ref Tcis_FormatExtStorageResp
115#define TCI_CMD_GET_EXTERNAL_STORAGE_REQ 0x8030 ///< SD卡状态查询命令
116#define TCI_CMD_GET_EXTERNAL_STORAGE_RESP 0x8031 ///< SD卡状态应答命令 see @ref Tcis_SDCapResp
117/**@}*/
118
119/** @name 带屏IPC
120 * @{*/
121#define TCI_CMD_SET_SCREEN_DISPLAY 0x0382 ///< 设置屏幕显示。 req: @ref Tcis_ScreenDisplay; resp: generic
122#define TCI_CMD_GET_SCREEN_DISPLAY 0x0384 ///< 获取屏幕显示设置。 req: none; resp: @ref Tcis_ScreenDisplay
123/**@}*/
124
125/** @name AI功能
126 * @{*/
127#define TCI_CMD_SET_AI 0x032C ///< 设置AI功能开关的通用命令。可代替 TCI_CMD_SET_ENABLE_BT. 参数 @ref Tcis_AiStatus
128#define TCI_CMD_GET_AI 0x032E ///< 获取AI功能开关状态的通用命令. 可代替 TCI_CMD_GET_ENABLE_BT. 返回 @ref Tcis_AiStatus
129
130#define TCI_CMD_SET_SHOW_BOX 0x0348 ///< 显示人形/人脸边框. req: @ref Tcis_SetShowBoxReq; resp: generic. @see Feature_Cap-AI
131#define TCI_CMD_GET_SHOW_BOX 0x034A ///< 获取人形/人脸边框设置状态. req: @ref Tcis_GetShowBoxReq; resp: @ref Tcis_GetShowBoxResp. @see Feature_Cap-AI
132
133#define TCI_CMD_SET_ENABLE_BT 0x0410 ///< 设置人形跟踪开关 see @ref Tcis_SetEnableBtReq
134#define TCI_CMD_GET_ENABLE_BT 0x0412 ///< 获取人形跟踪开关状态 see @ref Tcis_GetEnableBtResp
135
136#define TCI_CMD_SET_ENABLE_CLOSEUP 0x033E ///< 跟踪功能开启特写 req: @ref Tcis_EnableCloseup; resp: generic. @see Feature_Cap-AI
137#define TCI_CMD_GET_ENABLE_CLOSEUP 0x034C ///< 获取跟踪功能特写设置. req: none; resp @ref Tcis_EnableCloseup. \see Feature_Cap-AI
138
139#define TCI_CMD_SET_SITPOSE_SENS 0x0478 ///< 设置坐姿检测灵敏度 req: @ref Tcis_SitPoseSens; resp: generic
140#define TCI_CMD_GET_SITPOSE_SENS 0x047A ///< 获取从姿检测灵敏度 req: none; resp @ref Tcis_SitPoseSens
141/**@}*/
142
143/** @name 设备开关
144 * @{*/
145#define TCI_CMD_SET_DEVICE_STATUS 0x0414 ///< 设置设备开关 see @ref Tcis_SetDeviceStatusReq
146#define TCI_CMD_GET_DEVICE_STATUS 0x0416 ///< 获取设备开关状态 see @ref Tcis_GetDeviceStatusResp
147/**@}*/
148
149/** @name 报警音(Buzzer功能的扩展)
150 * @{*/
151#define TCI_CMD_SET_ALARM_BELL 0x0418 ///< 警铃开关 see @ref Tcis_SetAlarmBell
152#define TCI_CMD_GET_ALARM_BELL 0x041A ///< 取警铃开关状态 see @ref Tcis_SetAlarmBell
153
154#define TCI_CMD_GET_ALARMTONE_CAP 0x041C ///< 获取报警音频文件格式信息 see @ref Tcis_GetAlarmToneCap_Resp
155#define TCI_CMD_SET_ALARMTONE 0x041E ///< 设置报警音频 see @ref Tcis_SetAlarmTone_Req
156#define TCI_CMD_PLAY_ALARMTONE 0x0420 ///< 播放报警音
157/**@}*/
158
159/** @name 状态灯和语音提示
160 * @{*/
161#define TCI_CMD_SET_LED_STATUS 0x0422 ///< 设置状态灯的模式 req: @ref Tcis_SetLedStatusReq; resp: generic. 能力: ExtInstructions包含status-led
162#define TCI_CMD_GET_LED_STATUS 0x0424 ///< 获取状态灯的模式 req: none; resp: @ref Tcis_GetLedStatusResp
163#define TCI_CMD_SET_VOICE_PROMPT_STATUS 0x0358 ///< 设置提示音开关 req: @ref Tcis_VoicePromptStatus; resp: generic. 能力: ExtInstructions包含voice-prompt
164#define TCI_CMD_GET_VOICE_PROMPT_STATUS 0x035A ///< 获取提示音开关 req: none; resp: @ref Tcis_VoicePromptStatus
165/**@}*/
166
167/** @name 电池电量和信号强度
168 * @{*/
169#define TCI_CMD_GET_BATTERY_STATUS 0x0426 ///< 获取电池电量 see @ref Tcis_GetBatteryStatusResp
170#define TCI_CMD_GET_WIFI_SIGNALLEVEL 0x0428 ///< 获取WiFi/4G信号强度 see @ref Tcis_GetWifiLevelResp
171/**@}*/
172
173/** @name 低功耗相关
174 * @{*/
175/** @deprecated
176 * 设置被动唤醒后无操作最大工作时长 @ref Tcis_SetMaxAwakeTimeReq.
177 * 用 TCI_CMD_SET_POWER_STRATEGY 代替
178 */
179#define TCI_CMD_SET_MAX_AWAKE_TIME 0x042A
180/** @deprecated
181 * 返回被动唤醒后无操作最大工作时长 @ref Tcis_GetMaxAwakeTimeResp.
182 * 用 TCI_CMD_GET_POWER_STRATEGY 代替
183 */
184#define TCI_CMD_GET_MAX_AWAKE_TIME 0x042C
185#define TCI_CMD_SET_ENABLE_DORMANCY 0x044A ///< 设置允许或禁止休眠. 参数 @ref Tcis_DormancyState
186#define TCI_CMD_GET_ENABLE_DORMANCY 0x044C ///< 获取当前休眠开关, 返回 @ref Tcis_DormancyState
187#define TCI_CMD_SET_AWAKE_TIME 0x0470 ///< 设置主动唤醒时间。参数 @ref Tcis_SetAwakeTimeReq, 应答: general
188#define TCI_CMD_GET_AWAKE_TIME 0x0472 ///< 获取设备的主动唤醒时间设置。参数 @ref Tcis_GetAwakeTimeReq, 应答 @ref Tcis_GetAwakeTimeResp
189
190/** 设置电池电源策略, 本指令代替 @ref TCI_CMD_SET_MAX_AWAKE_TIME. req: @ref Tcis_PowerStrategy. resp: generic */
191#define TCI_CMD_SET_POWER_STRATEGY 0x048C
192/** 获取电池电源策略, 本指令代替 @ref TCI_CMD_GET_MAX_AWAKE_TIME. req: none. resp: @ref Tcis_PowerStrategy */
193#define TCI_CMD_GET_POWER_STRATEGY 0x048E
194/**@}*/
195
196/** @name 设备关闭计划
197 * @{*/
198#define TCI_CMD_SET_CLOSE_PLAN 0x042E ///< 设置设备关闭计划 see @ref Tcis_SetClosePlanReq
199#define TCI_CMD_GET_CLOSE_PLAN 0x0430 ///< 获取设备关闭计划 see @ref Tcis_GetClosePlanResp
200/**@}*/
201
202/** @name 云台操作
203 * @{*/
204#define TCI_CMD_SET_PTZ_POS 0x0408 ///< 设置云台位置 req: @ref Tcis_SetPtzPosReq;
205#define TCI_CMD_GET_PTZ_POS 0x040A ///< 获取云台位置 req: @ref Tcis_GetPtzPosReq; resp: @ref Tcis_GetPtzPosResp
206#define TCI_CMD_PTZ_SHORT_COMMAND 0x1000 ///< 云台短按命令 see @ref Tcis_PtzShortCmd
207#define TCI_CMD_PTZ_LONG_COMMAND 0x1001 ///< 云台长按命令 see @ref Tcis_PtzCmd . 本命令除control=TCIC_MORTOR_RESET_POSITION 外都无应答.
208 ///< WARNING: 这个命令为奇数,要特别处理
209
210#define TCI_CMD_LOCATE_IN_PIC 0x1002 ///< 图像内云台定位. req: Tcis_LocateInPic. resp: none
211
212//#define TCI_CMD_PTZ_RESET 0x1004 ///< 云台复位 req: 空; resp: 要求在复位完成后给一个通过结构的应
213#define TCI_CMD_GET_PSP 0x0452 ///< 获取设备端的预置点或预置点能力. 请求:Tcis_GetPresetPointsReq; 应答: @ref Tcis_GetPresetPointsResp
214#define TCI_CMD_SET_PSP 0x0454 ///< 设置预置位。 请求: Tcis_SetPresetPointsReq; 应答: generic
215#define TCI_CMD_SET_WATCHPOS 0x0456 ///< 设置守望位. req: Tcis_SetWatchPosReq; resp: generic
216#define TCI_CMD_GET_WATCHPOS 0x0458 ///< 获取守望位. req: Tcis_GetWatchPosReq; resp: @ref Tcis_GetWatchPosResp
217#define TCI_CMD_SET_PTZ_TRACK 0x0474 ///< 巡航设置. req: Tcis_SetPtzTrackReq; resp: generic
218#define TCI_CMD_GET_PTZ_TRACK 0x0476 ///< 获取巡航设置. req: Tcis_GetPtzTrackReq; resp: Tcis_GetPtzTrackResp
219/**@}*/
220
221/** @name G-sensor
222 * @{*/
223#define TCI_CMD_SET_GSENSOR 0x0432 ///< 设置g-sensor配置.
224 ///< req: @ref Tcis_SetGsensorReq; Resp: generic \n
225 ///< Require: @ref Feature_G-Sensor
226#define TCI_CMD_GET_GSENSOR 0x0434 ///< 获取g-sensor配置.
227 ///< 请求: Tcis_GetGsensorReq, 应答:@ref Tcis_GetGsensorResp
228 ///< Require: @ref Feature_G-Sensor
229
230#define TCI_CMD_SET_PARKING_DET 0x0364 ///< 停车监控设置. \n Req: Tcis_ParkingDet \n Resp: generic
231#define TCI_CMD_GET_PARKING_DET 0x0366 ///< 获取停车监控设置. \n Req: Tcis_GetParkingDetReq\n Resp: Tcis_ParkingDet
232/**@}*/
233
234/** @name 音量
235 * @{*/
236#define TCI_CMD_SET_VOLUME 0x0436 ///< 设置设备喇叭音量 see @ref Tcis_SetVolume
237#define TCI_CMD_GET_VOLUME 0x0438 ///< 获取设备当前喇叭音量 see @ref Tcis_SetVolume
238#define TCI_CMD_SET_MIC_LEVEL 0x043A ///< 设置拾音器灵敏度 param: @ref Tcis_SetMicLevel
239#define TCI_CMD_GET_MIC_LEVEL 0x043C ///< 获取当前设置的拾音器灵敏度 return: @ref Tcis_SetMicLevel
240/**@}*/
241
242/** @name 画中画
243 * @{*/
244#define TCI_CMD_SET_PRIMARY_VIEW 0x043E ///< 设置画中画主面面通道 @ref Tcis_SetPrimaryViewReq
245#define TCI_CMD_GET_PRIMARY_VIEW 0x0440 ///< 获取画中画主面面通道 @ref Tcis_GetPrimaryViewReq, @ref Tcis_GetPrimaryViewResp
246/**@}*/
247
248/** @name 报警灯
249 * @{*/
250#define TCI_CMD_SET_ALARMLIGHT 0x0442 ///< 设置报警灯状态. 请求@ref Tcis_AlarmLightState
251#define TCI_CMD_GET_ALARMLIGHT 0x0444 ///< 获取报警灯状态. 应答@ref Tcis_AlarmLightState
252/**@}*/
253
254/** @name PIR
255 * @{*/
256#define TCI_CMD_SET_PIR 0x0446 ///< 设置Pir灵敏度 @ref Tcis_SetPirSensReq
257#define TCI_CMD_GET_PIR 0x0448 ///< 获取Pir灵敏度 @ref Tcis_GetPirSensResp
258/**@}*/
259
260/** @name 门铃/门锁
261 * @{*/
262#define TCI_CMD_ANSWERTOCALL 0x0450 ///< 呼叫应答 @ref Tcis_AnswerToCall; resp: 见请求。应用层不用处理
263#define TCI_CMD_UNLOCK 0x045A ///< 开门 Req: @ref Tcis_UnlockReq; resp: Tcis_UnlockResp
264#define TCI_CMD_GET_LOCK_STATE 0x045C ///< 获取门(锁状态) req: empty. resp: @ref Tcis_LockState;
265/**@}*/
266
267/** @name 网络IP配置
268 * @{*/
269#define TCI_CMD_SET_IPCONFIG 0x0460 ///< 设置当前活动网络IP配置。 请求:IPCONFIG. 应答:空
270#define TCI_CMD_GET_IPCONFIG 0x0462 ///< 获取当前活动网络IP配置。 请求:空。 应答:IPCONFIG
271/**@}*/
272
273/** @name 台灯
274 * @{*/
275#define TCI_CMD_SET_LIGHT 0x0352 ///< 设置灯光 req: @ref Tcis_LightState, resp: generic
276#define TCI_CMD_GET_LIGHT 0x0354 ///< 获取灯状态 req: @ref Tcis_GetLightReq; resp: Tcis_LightState
277#define TCI_CMD_PLAY_AUDIO 0x0356 ///< 播放语音 req: Tcis_SetAlarmTone_Req, resp: generic
278#define TCI_CMD_SET_HINTTONE 0x0480 ///< 设置提示音 req: Tcis_SetHintToneReq; resp: generic. @ref Feature_ExtInstructions
279#define TCI_CMD_GET_HINTTONE 0x0482 ///< 获取提示音 req: Tcis_GetHintToneReq; resp: Tcis_GetHintToneResp
280/**@}*/
281
282/** @name 行车记录仪
283 * @{*/
284#define TCI_CMD_SET_PARKING_MONITOR 0x0484 ///< 设置停车监控总开关. req: @ref Tcis_ParkingMonitorSwitch; resp: generic
285#define TCI_CMD_GET_PARKING_MONITOR 0x0486 ///< 获取停车监控总开关. req: none; resp: @ref Tcis_ParkingMonitorSwitch
286/**@}*/
287
288/** @name 定时任务
289 * @{*/
290#define TCI_CMD_SET_TIMER_TASK 0x0488 ///< 设置定时任务. req: @ref Tcis_TimerTask; resp: generic
291#define TCI_CMD_GET_TIMER_TASK 0x048A ///< 获取定时任务. req: @ref Tcis_GetTimerTask; resp: @ref Tcis_TimerTask
292/**@}*/
293
294/**@} end of group*/
295
296/** doxygen 里匿名变量的占位符。定义为空,仅为了生成文档用 */
297//#define __NONAME__
298
299/////////////////////////////////////////////////////////////////////////////////
300/////////////////// Type ENUM Define ////////////////////////////////////////////
301/////////////////////////////////////////////////////////////////////////////////
302
303
304/** Wifi 工作模式 */
305typedef enum ENUM_AP_MODE
306{
307 TCIC_WIFIAPMODE_NULL = 0x00,
308 TCIC_WIFIAPMODE_MANAGED = 0x01,
309 TCIC_WIFIAPMODE_ADHOC = 0x02,
311
312/** AP热点的加密方式 */
313typedef enum ENUM_AP_ENCTYPE
314{
315 TCIC_WIFIAPENC_INVALID = 0x00,
316 TCIC_WIFIAPENC_NONE = 0x01, //
317 TCIC_WIFIAPENC_WEP = 0x02, ///< WEP, for no password
318 TCIC_WIFIAPENC_WPA_TKIP = 0x03,
319 TCIC_WIFIAPENC_WPA_AES = 0x04,
320 TCIC_WIFIAPENC_WPA2_TKIP = 0x05,
321 TCIC_WIFIAPENC_WPA2_AES = 0x06,
322
323 TCIC_WIFIAPENC_WPA_PSK_TKIP = 0x07,
324 TCIC_WIFIAPENC_WPA_PSK_AES = 0x08,
325 TCIC_WIFIAPENC_WPA2_PSK_TKIP = 0x09,
326 TCIC_WIFIAPENC_WPA2_PSK_AES = 0x0A,
327
329
330/** \brief 录像模式 */
332{
333 TCIC_RECORDTYPE_OFF = 0x00, ///< 不录像
334 TCIC_RECORDTYPE_ALARM = 0x01, ///< 报警录像
335 TCIC_RECORDTYPE_FULLTIME = 0x02, ///< 全天录像
336 TCIC_RECORDTYPE_AUTO = 0x03, ///< 自动录像
338
339/** \brief SD卡回放控制指令 */
341{
342 TCIC_RECORD_PLAY_PAUSE = 0x00, ///< 暂停
344 /**< 结束回放或停止某路视频.
345 * - Tcis_PlayRecord::channel = 0
346 * 结束回放session. 结束后倍速/模式等设置消失, 下次回放要重新设置
347 *
348 * - Tcis_PlayRecord::channel > 0
349 * 仅停止发送某路通道(通道号 = channel-1)
350 */
351
352 TCIC_RECORD_PLAY_STEPFORWARD = 0x02,
353 //TCIC_RECORD_PLAY_STEPBACKWARD = 0x03,
354 TCIC_RECORD_PLAY_FORWARD = 0x04,
355 /*< 快进。 Tcis_PlayRecord::Param 是回放速度:
356 * - \c 0: 1倍速
357 * - \c 1: 2倍速
358 * - \c 2: 4倍速
359 * - \c >2: 只发送关键帧
360 */
361
362 //TCIC_RECORD_PLAY_BACKWARD = 0x05,
363 //TCIC_RECORD_PLAY_SEEKTIME = 0x06,
364 //TCIC_RECORD_PLAY_END = 0x07,
365 TCIC_RECORD_PLAY_CONTINUE = 0x08, ///< 继续
366
367 /** 开始回放session。这是回放过程收到的第一个命令.
368 * - \c Tcis_PlayRecord::Param:
369 * * bit0: 发送通道选择。这个标志在sdk内部处理
370 * * 0(默认) - 独立通道(aIndex=vIndex+1).
371 * * 1 - 声音和视频在同一个通道上发送
372 *
373 * * bit1: 播放模式
374 * * 0 - 连续播放模式. 文件播放完成后自动播放下一个文件.(默认)
375 * * 1 - 事件播放模式. 当前事件播放完后暂停发送(可以接收新的PLAY_START请求)
376 *
377 * - \c Tcis_PlayRecord::channel:
378 * * 0: 回放全部通道
379 * * >0: 选择回放指定通道(通道号=channel-1). 当 Tcis_PlayRecord::stTimeDay 为全0时, 只添加回放通道, 不跳转
380 *
381 * 回放中可以多次发送本命令实现回放跳转, 但 Tcis_PlayRecord::avIndex 只在第一次发送时起作用.
382 *
383 * @note
384 * * NVR设备必须支持选择回放.
385 * * 其它设备默认支持同时回放所有通道, 如果要支持选择回放, 需要在能力集@ref Feature_ExtInstructions 里表述.
386 *
387 */
390
391/** 防闪烁参数 */
393{
394 TCIC_ENVIRONMENT_INDOOR_50HZ = 0x00, ///< 50Hz 电源
395 TCIC_ENVIRONMENT_INDOOR_60HZ = 0x01, ///< 60Hz 电源
396 TCIC_ENVIRONMENT_OUTDOOR = 0x02,
397 TCIC_ENVIRONMENT_NIGHT = 0x03,
399
400/** Video Flip Mode */
401typedef enum ENUM_VIDEO_MODE
402{
403 TCIC_VIDEOMODE_NORMAL = 0x00, ///< 正常
404 TCIC_VIDEOMODE_FLIP = 0x01, ///< 上下翻转
405 TCIC_VIDEOMODE_MIRROR = 0x02, ///< 左右镜像
406 TCIC_VIDEOMODE_FLIP_MIRROR = 0x03, ///< 旋转180度
408
409/** PTZ Command Value */
410typedef enum ENUM_PTZCMD
411{
412 TCIC_PTZ_STOP = 0, ///< 停止
413 TCIC_PTZ_UP = 1, ///< 向上
414 TCIC_PTZ_DOWN = 2, ///< 向下
415 TCIC_PTZ_LEFT = 3, ///< 向左
416 TCIC_PTZ_LEFT_UP = 4, ///< 左上
417 TCIC_PTZ_LEFT_DOWN = 5, ///< 左下
418 TCIC_PTZ_RIGHT = 6, ///< 向右
419 TCIC_PTZ_RIGHT_UP = 7, ///< 右上
420 TCIC_PTZ_RIGHT_DOWN = 8, ///< 右下
421
422 TCIC_PTZ_AUTO_SCAN = 9, ///< 自动线扫
423 TCIC_PTZ_CALL_TRACK = 10, ///< 调用巡航. Tcis_PtzCmd::point 为巡航轨迹号. 0为默认轨迹
424 //TCIC_PTZ_SET_POINT = 10,
425 //TCIC_PTZ_CLEAR_POINT = 11,
426 TCIC_PTZ_GOTO_POINT = 12, ///< 调用预置位. Tcis_PtzCmd::point 为预置位编号
427#if 0
428 TCIC_PTZ_SET_MODE_START = 13,
429 TCIC_PTZ_SET_MODE_STOP = 14,
430 TCIC_PTZ_MODE_RUN = 15,
431
432 TCIC_PTZ_MENU_OPEN = 16,
433 TCIC_PTZ_MENU_EXIT = 17,
434 TCIC_PTZ_MENU_ENTER = 18,
435#endif
436 TCIC_PTZ_FLIP = 19,
437 TCIC_PTZ_START = 20,
438
439 TCIC_LENS_APERTURE_OPEN = 21,
440 TCIC_LENS_APERTURE_CLOSE = 22,
441
442 TCIC_LENS_ZOOM_IN = 23, ///< Zoom In
443 TCIC_LENS_ZOOM_OUT = 24, ///< Zoom Out
444
445 TCIC_LENS_FOCAL_NEAR = 25, ///< Focus Near. @ref Feature_Cap-Zoom 带 'mfocus' 属性
446 TCIC_LENS_FOCAL_FAR = 26, ///< Focus Far. @ref Feature_Cap-Zoom 带 'mfocus' 属性
447#if 0
448 TCIC_AUTO_PAN_SPEED = 27,
449 TCIC_AUTO_PAN_LIMIT = 28,
450 TCIC_AUTO_PAN_START = 29,
451
452 TCIC_PATTERN_START = 30,
453 TCIC_PATTERN_STOP = 31,
454 TCIC_PATTERN_RUN = 32,
455
456 TCIC_SET_AUX = 33,
457 TCIC_CLEAR_AUX = 34,
458#endif
459 TCIC_MOTOR_RESET_POSITION = 35, ///< 云台复位. 本指令要求在复位完成后给一个通用结构的应答
460
462
463
464
465/////////////////////////////////////////////////////////////////////////////
466///////////////////////// Message Body Define ///////////////////////////////
467/////////////////////////////////////////////////////////////////////////////
468/** @anchor generic_err_code */
469/** @name 通用错误码
470 Tcis_ErrorResp::err 取值, 用于 TciSendCmdRespStatus() 的 status 参数
471 @{*/
472#define TCI_OK 0 ///< 命令成功执行
473#define TCI_E_INPROCESSING 1 ///< 操作进行中
474#define TCI_E_CMDHDR 2 ///< 错误命令头
475#define TCI_E_UNSUPPORTED_CMD 3 ///< 不支持的命令
476#define TCI_E_INVALID_PARAM 4 ///< 无效参数
477#define TCI_E_LACKOF_RESOURCE 5 ///< 资源(内存)不足
478#define TCI_E_INTERNEL 6 ///< 设备内部错误
479#define TCI_E_NOT_ALLOWED 7 ///< 操作不允许
480#define TCI_E_NOTREADY 8 ///< 操作对象(例如SD卡)还未准备好,可以稍后重试
481#define TCI_E_BUSY 9 ///< 例如呼叫占线
482#define TCI_E_REJECT 10 ///< 用户拒绝
483
484#define __TCI_E_MAX__ 0xFFFF
485/**@}*/
486
487__BEGIN_PACKED__
488
489/** @name 通用状态应答命令
490 @{*/
491#define TCI_CMD_ERROR_RESP 1 ///< 通用错误应答命令字
492/** 通用错误返回结构 */
493typedef struct Tcis_ErrorResp {
494 unsigned int cmd; ///< 请求命令字
495 unsigned int err; ///< 通用错误码 @ref TCI_OK ...
496} __PACKED__ Tcis_ErrorResp;
497/**@}*/
498
499/** @name 设备消息通知
500 * @{*/
501#define TCI_CMD_RTMSG 2 ///< 设备实时事件通知. 消息头 RTMSG_t
502/** 实时事件通知 */
503typedef struct RTMSG_t
504{
505 unsigned int type; ///< 消息类型。 @ref RTMTYPE
506
507 unsigned int data1; ///< 消息类型相关数据1
508 unsigned int data2; ///< 消息类型相关数据2
509} __PACKED__ RTMSG_t;
510
511/**@}*/
512
513/** @name 移动侦测
514 * 设置开关/区域/灵敏度...
515 @{*/
516/** 获取移动侦测区域请求结构
517 * @ref TCI_CMD_GETMOTIONDETECT_REQ 0x0326 ///< 获取移动侦测配置
518 */
520 unsigned int channel; ///< Camera Index: 0~N-1
521 unsigned char reserved[4];
522} __PACKED__ Tcis_GetMotionDetectReq;
523
524/** \brief 移动侦测区域的表示方式
525
526 left/width: 区域的左上角坐标/宽度转成浮点数据,除以图片宽,再乘10000后取整.\n
527 top/height: 区域的右上角坐标/高度转成浮点数据,除以图片高,再乘10001后取整.\n
528 图片的左上解为坐标原点. \n
529 例如 { 5000,5000,5000,5000 } 表示右下角1/4矩形.
530 */
531typedef struct MdZone {
532 int left;
533 int top;
534 int width;
535 int height;
536} __PACKED__ MdZone;
537
538/** 坐标点 */
539typedef struct TgPOINT {
540 int x; ///< x
541 int y; ///< y
542} TgPOINT;
543
544/** @anchor md_area_type
545 * @name 侦测区域表示方式
546 *
547 * Tcis_SetMotionDetect::flags 低2位为设备支持的区域表示方式
548 * @{*/
549#define MD_AT_RECTS 0 ///< 区域用多个矩形表示
550#define MD_AT_POLYGON 1 ///< 区域用多边形表示
551#define MD_AT_RECTSWITHPOLYGON 2 ///< 区域用多个矩形逼近多边形,同时后面有多边形坐标
552
553/** 最高为1时,表示支持区域排除. 仅用于从设备返回 */
554#define MD_F_SUPPORT_EXCLUDE_ZONE 0x8000
555/**@}*/
556
557/** 移动侦测多边形区域的顶点坐标. */
558typedef struct MdPolygon {
559 int nPoints;
560 /** 点的坐标为相对位置: \n
561 * \c x: X坐标 转成浮点数据,除以图片宽,再乘10000后取整.
562 * \c y: Y坐标 转成浮点数据,除以图片高,再乘10000后取整.
563 */
565} __PACKED__ MdPolygon;
566
567
568/** \brief 设置移动侦测区域请求和获取移动侦测区域应答的结构(伪).
569 * 注意这个结构是变长的. \n
570 * @ref TCI_CMD_SETMOTIONDETECT_REQ = 0x0324 ///< 设置移动侦测
571 *
572 * @note 如果结构中 enabled=1, hasZone=0,则默认为检测全部区域
573 */
574typedef struct Tcis_SetMotionDetect
575{
576 unsigned int channel; ///< Camera Index: 0~N-1
577 unsigned short enabled; ///< 1:enabled; 0:disabled
578 unsigned short flags; ///< 低字节为 @ref md_area_type "移动侦测区域表示标志"; 最高位为是否支持[区域排除]的标志位
579
580 //** 下面的域根据设备能力设置。如果设备本身不支持,其值会被忽略 */
581 unsigned int sensitivity; ///< 1~5
582 unsigned char hasZone; ///< 1: nZones/zones has valid setting; 0: ignore zones
583 unsigned char excludeZone; ///< 0: 检测区域内;1: 检测区域外
584
585 /** @union unionMdArea
586 * 区域 */
588 /** 检测移动的变长矩形数组.
589 * (flags&0x03)== @ref MD_AT_RECTS */
591 unsigned short nZones; ///< 矩形个数
592 MdZone zones[1]; ///< 矩形数组
593 } __PACKED__ mz;
594
595 /** 检测移动的变长多边形数组.
596 * (flags&0x03)== @ref MD_AT_POLYGON */
598 unsigned short nPolygons; ///< 多边形个数
599 MdPolygon polygons[1]; ///< 多边形数组
600 } __PACKED__ mp;
601
602 /** (flags&0x03)== @ref MD_AT_RECTSWITHPOLYGON 的伪数据结构. */
604 struct Fake_MdZoneVLA mz; ///< 矩形变长数组
605 struct Fake_MdPolygonVLA mp; ///< 多边形变长数组
606 } __PACKED__ zp;
607 } u;
608} __PACKED__ Tcis_SetMotionDetectReq;
609/** \see Tcis_SetMotionDetect*/
611
612
613/** 设置移动侦测区域应答结构体.
614 * @ref TCI_CMD_SETMOTIONDETECT_RESP = 0x0325
615 */
617 int result; ///< 0: success; otherwise: failed.
618 unsigned char reserved[4];
619} __PACKED__ Tcis_SetMotionDetectResp;
620
621/** 设置移动侦测区域状态
622 * @ref TCI_CMD_SET_MDAREA_STATE = 0x033A
623 * 设置侦测区域状态(显示|隐藏)
624 */
625typedef struct Tcis_MdAreaState {
626 int channel; ///< 视频通道(Camera Index) 0~N-1
627 int state; ///< 0x00:隐藏;0x01: 显示
628} __PACKED__ Tcis_MdAreaState;
629
630/** 获取移动侦测区域状态
631 * @ref TCI_CMD_GET_MDAREA_STATE = 0x033C
632 */
634 int channel; ///< 视频通道(Camera Index) 0~N-1
635 int reserved; ///< 0
637
638/** \see Tcis_MdAreaState */
640/**@}*/ //end of: name 移动侦测
641
642/** @name WiFi 相关操作
643 @{*/
644/** \brief 获取WiFi列表请求命名参数结构体.
645 @ref TCI_CMD_LISTWIFIAP_REQ = 0x0340
646 */
647typedef struct Tcis_ListWifiApReq {
648 unsigned char reserved[4];
649} __PACKED__ Tcis_ListWifiApReq;
650/**\struct SWifiAp
651 WiFi信息结构体.
652 */
653typedef struct SWifiAp {
654 char ssid[32]; ///< WiFi ssid
655 char mode; ///< refer to @ref ENUM_AP_MODE
656 char enctype; ///< refer to @ref ENUM_AP_ENCTYPE
657 char signal; ///< signal intensity 0--100%
658
659 /** - 0 : invalid ssid or disconnected
660 - 1 : connected with default gateway
661 - 2 : unmatched password
662 - 3 : weak signal and connected
663 */
664 char status;
665} __PACKED__ SWifiAp;
666
667/** 获取WiFi列表应答参数结构体.
668 @ref TCI_CMD_LISTWIFIAP_RESP = 0x0341
669 */
670typedef struct Tcis_ListWifiApResp {
671 unsigned int number; ///< MAX number: 1024(IOCtrl packet size) / 36(bytes) = 28
672 SWifiAp stWifiAp[1]; ///< wifi信息 @ref SWifiAp
673} __PACKED__ Tcis_ListWifiApResp;
674
675#if 1
676/** 设置设备WiFi请求命令参数结构体.
677 @ref TCI_CMD_SETWIFI_REQ = 0x0342
678 */
679typedef struct Tcis_SetWifiReq {
680 unsigned char ssid[32]; ///< WiFi ssid
681 unsigned char password[32]; ///< if exist, WiFi password
682 unsigned char mode; ///< refer to @ref ENUM_AP_MODE
683 unsigned char enctype; ///< refer to @ref ENUM_AP_ENCTYPE
684 unsigned char reserved[10]; ///< 保留字段,未使用
685} __PACKED__ Tcis_SetWifiReq;
686
687/** 设置WiFi请求2.
688 * 当请求为TCI_CMD_SETWIFI_REQ_2时的命令参数结构体 \n
689 @ref TCI_CMD_SETWIFI_REQ_2 = 0x0346
690 */
691typedef struct Tcis_SetWifiReq2 {
692 unsigned char ssid[32]; ///< WiFi ssid
693 unsigned char password[64]; ///< if exist, WiFi password
694 unsigned char mode; ///< refer to @ref ENUM_AP_MODE
695 unsigned char enctype; ///< refer to @ref ENUM_AP_ENCTYPE
696 unsigned char reserved[10];
697} __PACKED__ Tcis_SetWifiReq2;
698
699/** 设置WiFi应答命令的参数结构体.
700 @ref TCI_CMD_SETWIFI_RESP = 0x0343,
701 */
702typedef struct Tcis_SetWifiResp {
703 int result; ///< 0: wifi connected; 1: failed to connect
704 unsigned char reserved[4];
705} __PACKED__ Tcis_SetWifiResp;
706#endif
707
708/** 获取当前连接的WiFi信息请求命的求参数结构.
709 @ref TCI_CMD_GETWIFI_REQ = 0x0344
710 */
711typedef struct Tcis_GetWifiReq {
712 unsigned char reserved[4];
713} __PACKED__ Tcis_GetWifiReq;
714
715/** @struct Tcis_GetWifiResp
716 获取设备当前连接WiFi信息结构体.
717 @ref TCI_CMD_GETWIFI_RESP = 0x0345 \n
718 if no wifi connected, members of Tcis_GetWifiResp are all 0
719 */
720typedef struct Tcis_GetWifiResp {
721 unsigned char ssid[32]; ///< WiFi ssid
722 unsigned char password[32]; ///< WiFi password if not empty
723 unsigned char mode; ///< refer to @ref ENUM_AP_MODE
724 unsigned char enctype; ///< refer to @ref ENUM_AP_ENCTYPE
725 unsigned char signal; ///< signal intensity 0--100%
726 unsigned char status; ///< refer to SWifiAp::status
727} __PACKED__ Tcis_GetWifiResp;
728
729/** 获取当前连接WiFi应答命令的参数结构体.
730changed: WI-FI Password 32bit Change to 64bit \n
731@ref TCI_CMD_GETWIFI_RESP_2 = 0x0347
732*/
733typedef struct Tcis_GetWifiResp2 {
734 unsigned char ssid[32]; ///< WiFi ssid
735 unsigned char password[64]; ///< WiFi password if not empty
736 unsigned char mode; ///< refer to @ref ENUM_AP_MODE
737 unsigned char enctype; ///< refer to @ref ENUM_AP_ENCTYPE
738 unsigned char signal; ///< signal intensity 0--100%
739 unsigned char status; ///< refer to @ref SWifiAp::status
740} __PACKED__ Tcis_GetWifiResp2;
741/**@}*/
742
743/** @name 录像和回放
744 @{*/
745/** @struct Tcis_SetRecord
746 SD卡录像模式结构体.
747 @ref TCI_CMD_SETRECORD_REQ \n
748 @ref TCI_CMD_GETRECORD_RESP
749 */
750typedef struct Tcis_SetRecord {
751 unsigned int channel; ///< Camera Index:0~N-1
752 unsigned int recordType; ///< Refer to @ref ENUM_RECORD_TYPE
753 unsigned char recordStream; ///< SD卡录像清晰度:0-高清,1-标清. 要求 @ref Feature_RecordConf = "res"
754 unsigned char flags; ///< not used (2021-9-18)
755 unsigned char reserved[2]; ///< 0
756} __PACKED__ Tcis_SetRecord;
757/** \see Tcis_SetRecord */
759/** \see Tcis_SetRecord */
761
762/** @struct Tcis_SetRecordResp
763 设置SD卡录像模式应答结构体
764 @ref TCI_CMD_SETRECORD_RESP = 0x0311,
765*/
766typedef struct Tcis_SetRecordResp
767{
768 int result; ///< 0: success; otherwise: failed.
769 unsigned char reserved[4];
770} __PACKED__ Tcis_SetRecordResp;
771
772/** @struct Tcis_SetTimelapseRecordModeReq
773 * 设置延时摄像设置.
774 TCI_CMD_SET_TIMELAPSE_RECORD = 0x0314 \n
775 */
777 int channel; ///< Camera Index: 0~N-1
778 int when; ///< 1:目前固定取值1, 表示停车状态
779 int status; ///< 延时摄影状态: 0-disable; 1-enable。
780 int interval; ///< 录像间隔.单位:秒
782
783/** @struct Tcis_GetTimelapseRecordModeReq
784 * 获取延时摄像设置.
785 TCI_CMD_GET_TIMELAPSE_RECORD = 0x0316
786 */
788 int channel; ///< Camera Index: 0-N-1
789 int when; ///< 1:目前固定取值1, 表示停车状态
791
792/** \see Tcis_SetTimelapseRecordModeReq */
793typedef struct Tcis_SetTimelapseRecordModeReq Tcis_GetTimelapseRecordModeResp;
794
795/** 日期表示 */
796typedef struct SDay {
797 unsigned short year; ///< Year
798 unsigned char month; ///< Month: 1~12
799 unsigned char day; ///< Day: 1~31
800} __PACKED__ SDay;
801
802/** 时间的表示方法 */
803typedef struct STimeDay {
804 unsigned short year; ///< The number of year.
805 unsigned char month; ///< The number of months since January, in the range 1 to 12.
806 unsigned char day; ///< The day of the month, in the range 1 to 31.
807 unsigned char wday; ///< The number of days since Sunday, in the range 0 to 6. (Sunday = 0, Monday = 1, ...)
808 unsigned char hour; ///< The number of hours past midnight, in the range 0 to 23.
809 unsigned char minute; ///< The number of minutes after the hour, in the range 0 to 59.
810 unsigned char second; ///< The number of seconds after the minute, in the range 0 to 59.
811} __PACKED__ STimeDay;
812
813#ifdef __cplusplus
814extern "C" {
815#endif
816time_t TcuTimeDay2T(const STimeDay *pTd);
817void TcuT2TimeDay(time_t t, STimeDay *pTd);
818#ifdef __cplusplus
819}
820#endif
821
822/** \brief 录像查询请求结构*/
823/** @ref TCI_CMD_LISTEVENT_REQ */
825{
826 STimeDay stStartTime; ///< Search event from
827 STimeDay stEndTime; ///< Search event to
828 unsigned int channel; ///< 视频通道(Camera Index) (polluted with value 3 ?)
829 unsigned char event; ///< 事件类型, 参考 @ref ECEVENT
830 unsigned char reserved[3]; ///< 0
831} __PACKED__ Tcis_ExListEventReq;
832
833
834
835/** \brief 录像条目 */
836typedef struct SAvExEvent {
837 STimeDay start_time; ///< 录像开始时间
838 unsigned int file_len; ///< time length: in second
839 unsigned char event; ///< 事件类型 @ref ECEVENT
840#define AVE_F_TIMELAPSE 0x01 ///< 缩时录像标志
841 unsigned char flags; ///< 录像条目其它标志. 0x01:缩时录像
842 unsigned char reserved[2]; ///< 0
843} __PACKED__ SAvExEvent;
844
845/** \brief 录像条目, 带事件的时间戳 */
846typedef struct SAvEvent2 {
847 STimeDay start_time; ///< 录像开始时间
848 unsigned int file_len; ///< time length: in second
849 unsigned char event; ///< 事件类型 @ref ECEVENT
850#define AVE_F_TIMELAPSE 0x01 ///< 缩时录像标志
851 unsigned char flags; ///< 录像条目其它标志. 0x01:缩时录像
852 unsigned char reserved[2]; ///< =0
853 unsigned int t_event; ///< 本段录像对应的事件的时间(要与上报给云端的事件时间一致). 没有事件时传0
854} __PACKED__ SAvEvent2;
855
856/** \brief SD卡录像查询返回结构 */
857/** @ref TCI_CMD_LISTEVENT_RESP
858 * */
859typedef struct Tcis_ExListEventResp {
860 unsigned int channel; ///< Camera Index: 0~
861 unsigned int num; ///< 录像条目总数
862 unsigned char index; ///< ignored
863 unsigned char endflag; ///< 为1是表示是最后一个包
864 unsigned char count; ///< 本包包含中的事件数
865 unsigned char estype; ///< 0:录像记录为SAvExEvent数组; 1:录像记录为SAvEvent2数组
866 union {
867 SAvExEvent stExEvent[1]; ///< 录像条目数组 see @ref SAvExEvent. 一次发送最多 50 条记录
868 SAvEvent2 stEvent2[1]; ///< 带事件时间戳的录像条目数组 see @ref SAvEvent2. 一次发送最多 50 条记录
869 };
870} __PACKED__ Tcis_ExListEventResp;
871
872
873#if 0
874#define MAX_LIST_EVENT_NUM 50 ///< 一次发送最多包含的事件记录数。超过此值需要多次发送。
875//send data max len is 1024
876struct _lsEvtExParam{
877 Tcis_ExListEventResp stListEventResp;
878 SAvExEvent events[MAX_LIST_EVENT_NUM - 1];
879};
880#endif
881
882/** @struct Tcis_DaysList
883 * 日期列表.
884 * @ref TCI_CMD_LIST_RECORDDAYS = 0x800A
885 */
886typedef struct Tcis_DaysList {
887 int n_day; ///< 日期数组大小
888 SDay days[1]; ///< 日期数组
889} __PACKED__ Tcis_DaysList;
890
891/** @struct Tcis_PlayRecord
892 * SD卡回放控制请求结构体 .
893 *@ref TCI_CMD_RECORD_PLAYCONTROL
894 * */
895typedef struct Tcis_PlayRecord {
896 unsigned int avIndex; ///< avIndex
897 unsigned int command; ///< play record command. refer to @ref ENUM_PLAYCONTROL
898 unsigned int Param; ///< command param. Depend on \c command
899 STimeDay stTimeDay; ///< Event time from ListEventi @ref STimeDay
900 unsigned int channel;
901 /**< 在 ENUM_PLAYCONTROL::TCIC_RECORD_PLAY_START/ENUM_PLAYCONTROL::TCIC_RECORD_PLAY_STOP 里用于选择视频通道
902 * - 0 所有通道
903 * - >0 通道号+1. 例如为1时选择通道0
904 */
905} __PACKED__ Tcis_PlayRecord;
906
907/** SD卡回放控制应答结构体.
908 * only for play record start command
909 * @ref TCI_CMD_RECORD_PLAYCONTROL_RESP
910 * */
912{
913 unsigned int command; ///< 来自请求中的命令码. 参见 @ref ENUM_PLAYCONTROL
915 /**< 同command相关.
916 - 当command为 is ENUM_PLAYCONTROL::TCIC_RECORD_PLAY_START
917 * >=0 同请求里的channel一致. 如果不一致, 表示不支持通道选择(如果=0, 实际执行全部回放)
918 * <0 错误
919
920 - 其它命令, 成功时为0, 出错是为-1
921 */
922
923 unsigned char reserved[4];
924} __PACKED__ Tcis_PlayRecordResp;
925/**@}*/ //name 录像和回放
926
927/** @anchor AI_type*/
928/** @name AI类型及掩码
929 * 掩码为: (1 << AI类型值)
930 * @{*/
931#define AIT_BODY_DET 0 ///< 人形检测
932#define AIT_BODY_TRACE 1 ///< 人形追踪
933#define AIT_FACE_DET 2 ///< 人脸检测
934#define AIT_FACE_RECO 3 ///< 人脸识别
935#define AIT_SITPOSTURE 4 ///< 坐姿
936
937#define AITM_BODY_DET (1<<AIT_BODY_DET) ///< 人形检测mask
938#define AITM_BODY_TRACE (1<<AIT_BODY_TRACE) ///< 人形追踪mask
939#define AITM_FACE_DET (1<<AIT_FACE_DET) ///< 人脸检测mask
940#define AITM_FACE_RECO (1<<AIT_FACE_RECO) ///< 人脸识别mask
941#define AITM_SITPOSTURE (1<<AIT_SITPOSTURE) ///< 坐姿检测mask
942/**@}*/
943
944/** @name AI功能
945 * @{*/
946/** @struct Tcis_SetEnableBT
947 * 人形追踪开关状态结构体.
948 * @ref TCI_CMD_SET_ENABLE_BT = 0x0410 \n
949 * @ref TCI_CMD_GET_ENABLE_BT = 0x0412
950 */
951typedef struct Tcis_SetEnableBT {
952 int enable; ///< 1-打开; 0-关闭
953 char resvered[4];
954} __PACKED__ Tcis_SetEnableBT;
955/** \see Tcis_SetEnableBT*/
957/** \see Tcis_SetEnableBT*/
959
960/** \struct Tcis_AiStatus
961 * 设置/获取 AI功能开关状态.
962 @ref TCI_CMD_SET_AI = 0x032C \n
963 @ref TCI_CMD_GET_AI = 0x032E \n
964 设置AI模式请求和获取AI模式应答结构体 \n
965*/
966typedef struct Tcis_AiStatus {
967 unsigned int ait_mask; ///< <a href="#AI_type">AI类型掩码</a> 的组合。 获取时为当前支持的AI功能; 设置时为要修改状态的AI功能
968 unsigned int ai_flags; ///< 对应位为1表示使能
969 unsigned char reserved[8];
970} __PACKED__ Tcis_AiStatus;
971
972/** \struct Tcis_SetShowBoxReq
973 * 设置AI对象边框显示状态\n
974 TCI_CMD_SET_SHOW_BOX = 0x0348
975 */
976typedef
977struct Tcis_SetShowBoxReq {
978 int ai_type; ///< <a href="#AI_type">AI类型</a>
979 int show_box; ///< 1:显示边框; 0:不显示边框
981
982/** \struct Tcis_GetShowBoxReq
983 * 获取人形/人脸边框设置状态.
984 * @ref TCI_CMD_GET_SHOW_BOX = 0x034A
985 */
986typedef
987struct Tcis_GetShowBoxReq {
988 int ai_type; ///< <a href="#AI_type">AI类型/</a>
989 int reserved; ///< 0
991
992/** \struct Tcis_EnableCloseup
993 * 跟踪特写功能设置
994 * @ref TCI_CMD_SET_ENABLE_CLOSEUP = 0x033E
995 * @ref TCI_CMD_GET_ENABLE_CLOSEUP = 0x034C
996 */
997typedef struct Tcis_EnableCloseup {
998 int channel; ///< Camera Index: 0~N-1
999 int enabled; ///< 1: enable closeup; 0: disable closeup
1001
1002/** \see Tcis_GetShowBoxReq */
1004
1005/** \struct Tcis_SitPoseSens
1006 * 坐姿检测灵敏度.
1007 * TCI_CMD_SET_SITPOSE_SENS = 0x0478
1008 * TCI_CMD_GET_SITPOSE_SENS = 0x047A
1009 */
1010typedef struct Tcis_SitPoseSens {
1011 int mode; ///< 灵敏度. 0:高(灵敏); 1:中(正常); 2:低(精准)
1012} __PACKED__ Tcis_SitPoseSens;
1013
1014/**@}*/
1015
1016/** 设备开关状态结构体.
1017 * @ref TCI_CMD_GET_DEVICE_STATUS = 0x0416 \n
1018 * @ref TCI_CMD_SET_DEVICE_STATUS = 0x0414
1019 */
1021 int status; ///< 1-打开; 0-关闭
1022 char resvered[4];
1023} __PACKED__ Tcis_SetDeviceStatus;
1024/** \see Tcis_SetDeviceStatus */
1026/** \see Tcis_SetDeviceStatus */
1028
1029
1030/** 设置设备警铃命令和获取设备警铃设置命令的参数结构体.
1031 * 报警音是 Buzzer功能的扩展。要支持这些功能首先要支持 @ref Feature_AlertSound 能力
1032 @ref TCI_CMD_SET_ALARM_BELL = 0x0418, \n
1033 @ref TCI_CMD_GET_ALARM_BELL = 0x041A,
1034 */
1035typedef struct Tcis_SetAlarmBell {
1036 uint8_t version; ///< 0. *** 接收者要检查version的值。当前为0对应本结构定义 *** !!!!
1037 uint8_t reserved[3]; ///< all 0
1038
1039 /** 事件类型掩码. bit0:所有事件; bit1:移动侦测; bit2:人体检测; ...[参看 ECEVENT 定义].
1040 * 如果bitN为1, 表示相应事件将触发警铃 */
1041 uint32_t event_mask;
1042 uint32_t event_mask2; ///< 0. 用作值大于31的事件掩码
1043} __PACKED__ Tcis_SetAlarmBellReq;
1044/** \see Tcis_SetAlarmBell*/
1046
1047//--------------------------------------------------------------
1048/** @name 云台操作
1049 * @{*/
1050
1051/** 云台位置结构体.
1052 * @ref TCI_CMD_GET_PTZ_POS = 0x040A
1053 */
1054typedef struct PtzPos {
1055 /** x,y,z: 取值0.0~1.0, 分别表示云台水平、垂直、纵深方向的位置点各自方向最大范围的比率。
1056 例如x=0.5表示去云台水平居中;z=0.0表示纵深处在x1的位置
1057 x,y 小于0.0或大于1.0时无意义(程序忽略)。
1058 z值仅在变焦倍数可知时有意义。z小于0.0或大于1.0时另行定义
1059 */
1060 float x, y, z;
1061} __PACKED__ PtzPos;
1062
1063
1064/** \struct Tcis_SetPtzPosReq
1065 * 设置云台位置
1066 * @ref TCI_CMD_SET_PTZ_POS = 0x0408 \n
1067 */
1068typedef struct Tcis_SetPtzPosReq {
1069 PtzPos pos; ///< 位置
1070 int channel; ///< Camera Index
1071 int psp_num; ///< 如果是要转到预置位,此为预置位编号,否则为0 [2021.11.2]
1072} __PACKED__ Tcis_SetPtzPosReq;
1073
1074/** \struct Tcis_GetPtzPosReq
1075 * 获取云台位置. \n
1076 * @ref TCI_CMD_GET_PTZ_POS = 0x040A
1077 */
1078typedef struct Tcis_GetPtzPosReq {
1079 int channel; ///< Camera Index
1081
1082/** \see Tcis_SetPtzPosReq */
1084
1085/** 云台长按的参数结构体.
1086 @ref TCI_CMD_PTZ_LONG_COMMAND = 0x1001, // P2P Ptz Command Msg
1087 */
1088typedef struct Tcis_PtzCmd {
1089 unsigned char control; ///< PTZ control command, refer to @ref ENUM_PTZCMD
1090 unsigned char speed; ///< PTZ control speed
1091 unsigned char point; ///< 预置位(control=TCIC_PTZ_GOTO_POINT)或巡航轨迹号(control=TCIC_PTZ_CALL_TRACK)
1092 unsigned char limit; ///< 0
1093 unsigned char aux; ///< 0
1094 unsigned char channel; ///< camera index
1095 unsigned char reserve[2];
1096} __PACKED__ Tcis_PtzCmd;
1097
1098/** 云台图片内定位
1099 TCI_CMD_LOCATE_IN_PIC = 0x1002
1100 */
1101typedef struct Tcis_LocateInPic {
1102 int channel; ///< 定位参照通道(Refered camera-index)
1103 PtzPos pos; ///< 位置。 x,y为位置坐标相对图像(高,宽)的比例. 图片左上角为原点;z忽略
1105
1106/** 云台位置 */
1107typedef struct PtzSpace_t {
1108 int x; ///< >0: right; <0: left ?
1109 int y; ///< >0: up; <0:down ?
1110 int zoom; ///< >0: zoom-in; <0: zoom-out
1111} __PACKED__ PtzSpace_t;
1112
1113/** 云台短按的参数结构体.
1114 @ref TCI_CMD_PTZ_SHORT_COMMAND = 0x1001
1115 */
1116typedef struct Tcis_PtzShortCmd {
1117 PtzSpace_t space; ///< see @ref PtzSpace_t
1118 int channel; ///< 视频通道号(camera index)(2021.10.22)
1119 int focus; ///< >0:far; <0:near (2022.10.30)
1120} __PACKED__ Tcis_PtzShortCmd;
1121
1122
1123/** 获取设备端的预置点.
1124 * TCI_CMD_GET_PSP = 0x0452
1125 */
1127 /** - \c 0: 返回全部预置位
1128 * - \c 1: 返回能力
1129 */
1130 uint16_t flags;
1131 uint16_t channel; ///< 视频通道号(camera index)(2022.12.15)
1132 uint32_t reserved; ///< 0
1134
1135/** @anchor psp_type
1136 * @name 预置位类型
1137 * @{*/
1138#define PSP_BY_NO 1 ///< 预置位类型: 索引
1139#define PSP_BY_POS 2 ///< 预置位类型: 位置
1140#define PSP_BY_NO_NONAME 3 ///< 预置位用编号表示,没有名字
1141#define PSP_BY_POS_NONAME 4 ///< 预置位用位置表示,没有名字
1142/**@}*/
1143
1144/** @anchor psp_flags
1145 * @name 预置位标志
1146 * 除 PSP_F_DISABLED 外,其它标志由设备返回,用于与app协商UI
1147 * @{*/
1148#define PSP_F_ZOOMONLY 0x01 ///< 本预置位仅含变焦信息(ex. 远景/近景)
1149#define PSP_F_SHORTCUT 0x02 ///< 表示这是个快捷位置,UI上有对应的按钮直达 (ex. 显示 远景/近景 按钮)
1150#define PSP_F_DISABLED 0x04 ///< 用于设置命令, 按编号删除. 单独使用
1151#define PSP_F_CANNOT_DELETE 0x08 ///< 设备内置,不可删除
1152/**@}*/
1153
1154/** 预置位数组
1155 *
1156 * 预置位有两种表示方式:\n
1157 * 1. 传统球机用编号表示的预置位。编号对应的具体位置保存在球机内,对外是黑盒。 本命令中用 struct PresetPointArray::unionPSP::psp_by_no 表示. \n
1158 * 2. 用位置表示的预置位。 本命令中用 struct PresetPointArray::unionPSP::psp_by_pos 表示. \n
1159 *
1160 * 一个预置位可以对应云台的某个朝向、镜头的某个变焦倍数,或二者组合。如果仅包含变焦信息,flags 应设置 \ref PSP_F_ZOOMONLY 。
1161 *
1162 * 对仅包含变焦信息的预置位,应该放在数组的最前面,并按变焦倍数从小到大的顺序排列。这样APP容易根据排序决定UI。 \n
1163 * 例如,对双目+变焦摄像机,返回两个预置位(同时设置 \ref PSP_F_ZOOMONLY 和 \ref PSP_F_SHORTCUT 标志),\n
1164 * 第一个位置将对应[近景]按钮, 第二个对应[远景]按扭。或者,对返回多个预置位的情形,APP在一个 \n
1165 * 滑动轴上,按变倍值单向排列并对每个预置位置描一个驻点。
1166 */
1167typedef struct PresetPointArray {
1168 uint16_t n_psp; ///< 预置位数组大小
1169 uint8_t type; ///< @ref psp_type "预置位类型"
1170 uint8_t channel; ///< 在TCI_CMD_GET_PSP 的应答中,为与请求匹配的通道号(Camera index)。设置时为0,因为请求结构中有定义channel字段
1171
1172 //** 预置位数组 */
1173 union unionPSP {
1174 //** 用编号表示的预置位. type=@ref PSP_BY_NO */
1175 struct psp_by_no {
1176 uint16_t flags; ///< 预置标志. 0 或 @ref PSP_F_DISABLED 或 其它 @ref psp_flags "PSP_F_xxx" 的组合
1177 uint16_t num; ///< 预置位编号: 1~n_psp. 0保留
1178 char name[32]; ///< 预置位名称
1179 } pspn[0]; ///< type = @ref PSP_BY_NO, 用编号表示的预置位
1180
1181 //** 用编号表示的预置位, 没有名字. type=@ref PSP_BY_NO_NONAME */
1182 struct pspn_noname {
1183 uint16_t flags; ///< 预置标志. 0 或 @ref PSP_F_DISABLED 或 其它 @ref psp_flags "PSP_F_xxx" 的组合
1184 uint16_t num; ///< 预置位编号: 1~n_psp. 0保留
1185 } pspn_nn[0]; ///< type = @ref PSP_BY_NO, 用编号表示的预置位
1186
1187 //** 用位置表示的预置位. type=@ref PSP_BY_POS */
1188 struct psp_by_pos {
1189 uint16_t flags; ///< 标志. 0 或 PSP_F_DISABLED 或 @ref PSP_F_DISABLED 或 其它 @ref psp_flags "PSP_F_xxx" 的组合
1190 uint16_t num; ///< ID, 用于删除或修改时作标识. 0保留不可删除(双目变焦设备用于镜头切换)
1191 PtzPos pos; ///< 预置位
1192 char name[32]; ///< 预置位名称
1193 } pspp[0]; ///< type = @ref PSP_BY_POS, 用位置表示的预置位
1194
1195 //** 用位置表示的预置位, 没有名字. type=@ref PSP_BY_POS_NONAME */
1197 uint16_t flags; ///< 标志. 0 或 PSP_F_DISABLED 或 @ref PSP_F_DISABLED 或 其它 @ref psp_flags "PSP_F_xxx" 的组合
1198 uint16_t num; ///< ID, 用于删除或修改时作标识. 0保留不可删除(双目变焦设备用于镜头切换)
1199 PtzPos pos; ///< 预置位
1200 } pspp_nn[0]; ///< type = @ref PSP_BY_POS, 用位置表示的预置位
1201 } u; ///< 预置位数组
1202} __PACKED__ PresetPointArray;
1203
1204/** 设备端返回的预置位.
1205 * @ref TCI_CMD_GET_PSP = 0x0452 \n
1206 * 本结构用于返回设备支持的所有预置位置.
1207 */
1209 union {
1210 /* 预置位能力.
1211 * Tcis_GetPresetPointsReq::flags == 1 */
1212 struct psp_cap {
1213 uint16_t cbSize; ///< 本结构大小 = sizeof(struct psp_cap)。目前为12
1214 uint8_t zero; ///< 0
1215 uint8_t channel; ///< 与 TCI_CMD_GET_PSP 请求匹配的通道号(Camera Index)
1216 uint16_t max_psp; ///< 支持的预置位数。有效预置位编号 1~max_psp. 0保留
1217 uint16_t type; ///< @ref psp_type "预置位类型"
1218 int flags; ///< 0x01: 预置位保存到设备端(app要调用 TCI_CMD_SET_PSP)
1219 } __PACKED__ psp_cap; ///< 预置位能力(Tcis_GetPresetPointsReq::flags == 1)
1220
1221 /** 预置位数组.
1222 * Tcis_GetPresetPointsReq::flags == 0 */
1223 PresetPointArray pspa;
1224 } u;
1225} __PACKED__ Tcis_GetPresetPointsResp;
1226
1227/** 设置设备端的预置点.
1228 * @ref TCI_CMD_SET_PSP = 0x0454
1229 */
1231 int channel; ///< Camera Index: 0~N-1
1232 struct PresetPointArray pspa; ///< 预置位数组(一般一次设置一个位置,即数组大小为1)
1233} __PACKED__ Tcis_SetPresetPointsReq;
1234
1235/** 设置守望位.
1236 * @ref TCI_CMD_SET_WATCHPOS = 0x0456
1237 */
1238typedef
1239struct Tcis_SetWatchPosReq {
1240 int channel; ///< Camera Index
1241 int num; ///< 预置位编号. -1:禁用; >0:设置预置位num为守望位
1242 int idle_time; ///< 回到守望位前的云台无动作时间,单位: 秒
1243} __PACKED__ Tcis_SetWatchPosReq;
1244
1245/** 获取守望位
1246 * @ref TCI_CMD_GET_WATCHPOS = 0x0458
1247 */
1248typedef
1249struct Tcis_GetWatchPosReq {
1250 int channel; ///< Camera Index
1251 int reserved; ///< 0
1252} __PACKED__ Tcis_GetWatchPosReq;
1253
1254/** \see Tcis_SetWatchPosReq */
1256
1257/** @anchor ptz_track_type
1258 * @name 轨迹的表示方式
1259 * @{*/
1260#define TRACK_BY_NO 1 ///< 轨迹由预置位号表示. 设备端保存轨迹名称
1261#define TRACK_BY_NO_NONAME 2 ///< 轨迹由预置位号表示,没有名字
1262/**@}*/
1263
1264#define ACTIVE_TRACK_DEFAULT 0xffff ///< 活动轨迹为缺省轨迹
1265#define ACTIVE_TRACK_AUTO_SCAN 0xfffe ///< 活动轨迹为水平线扫
1266/** 云台巡航轨迹数组 */
1267typedef struct PtzTrackArray {
1268 uint16_t type; ///< @ref ptz_track_type "轨迹表示方式"
1269 uint16_t n_track; ///< 轨迹数组大小
1270 uint16_t stay_time; ///< 在每个预置位停留的时间(s)
1271
1272 /** 设置时(@ref TCI_CMD_SET_PTZ_TRACK )忽略(为0)。\n
1273 * 获取时(@ref TCI_CMD_GET_PTZ_TRACK ) 为当前正执行的巡航轨迹: \n
1274 * - 0: 没有巡航
1275 * - 1~max_track: 轨迹编号(Tcis_PtzCmd::control=TCIC_PTZ_CALL_TRACK, Tcis_PtzCmd::point=1~255)
1276 * - 0xffff: 缺省轨迹(Tcis_PtzCmd::control=TCIC_PTZ_CALL_TRACK, Tcis_PtzCmd::point=0)
1277 * - 0xfffe: 水平线扫(Tcis_PtzCmd::control=TCIC_PTZ_AUTO_SCAN)
1278 */
1279 uint16_t active_track;
1280
1281 union {
1282 //** type = TRACK_BY_NO_NONAME */
1283 struct track_noname {
1284 uint16_t track_no; ///< 编号. >0
1285 uint16_t act; ///< 动作: 0:设置;1:删除
1286 uint16_t n_psp; ///< 本轨迹中的预置位数
1287 uint16_t pspn[0]; ///< 预置位号数组
1288 } __PACKED__ trck_nn[0]; ///< type = TRACK_BY_NO_NONAME. track_noname 轨迹数组
1289
1290 //** type = TRACK_BY_NO */
1291 struct track {
1292 char name[32]; ///< 轨迹名。以'\0'结束
1293 uint16_t track_no; ///< 编号。>0
1294 uint16_t act; ///< 动作: 0:设置;1:删除
1295 uint16_t n_psp; ///< 本轨迹中的预置位数
1296 uint16_t pspn[0]; ///< 预置位编号数组
1297 } __PACKED__ trck[0]; ///< type = TRACK_BY_NO. track 轨迹数组
1298 } u; ///< 轨迹数组
1299} __PACKED__ PtzTrackArray;
1300
1301
1302/** 巡航设置.
1303 * TCI_CMD_SET_PTZ_TRACK = 0x0474
1304 */
1305typedef struct Tcis_SetPtzTrackReq {
1306 int channel; ///< Camera Index
1307 struct PtzTrackArray pta; ///< 轨迹数组(一般一次设置一个位置,即数组大小为1)
1308} __PACKED__ Tcis_SetPtzTrackReq;
1309
1310/** 获取巡航设置.
1311 * TCI_CMD_GET_PTZ_TRACK = 0x0476
1312 */
1313typedef struct Tcis_GetPtzTrackReq {
1314 int16_t flags; ///< 0: 获取全部巡航轨迹; 1-查询巡航轨迹能力
1315 int16_t channel; ///< 视频通道号(Camera Index)(2022.12.15)
1316} __PACKED__ Tcis_GetPtzTrackReq;
1317
1318
1319/** 对获取巡航设置的应答.
1320 * TCI_CMD_GET_PTZ_TRACK = 0x0476
1321 */
1322typedef struct Tcis_GetPtzTrackResp {
1323 int16_t resp_type; ///< 应答数据类型:=Tcis_GetPtzTrackReq::flags
1324 int16_t channel; ///< 视频通道号(Camera Index)(2022.12.15)
1325 union {
1326 //** 巡航能力(resp_type = 1) */
1327 struct cruise_cap {
1328 uint16_t max_tracks; ///< 支持的轨迹数。有效轨迹编号 1~max_tracks
1329 uint16_t type; ///< @ref ptz_track_type "轨迹类型"
1330 } __PACKED__ cruise_cap; ///< 预置位能力(resp_type == 1)
1331
1332 //** 巡航轨迹(resp_type = 0) */
1333 PtzTrackArray pta; ///< 巡航航迹数组(resp_type == 0)
1334 } u; ///< 应答数据
1335} __PACKED__ Tcis_GetPtzTrackResp;
1336
1337
1338/**@}*/ //endof 云台
1339//--------------------------------------------------------------
1340/** 时钟表示. */
1341typedef struct CLOCKTIME {
1342 unsigned char hour; ///< Hour: 0~23
1343 unsigned char minute; ///< Minute: 0~59
1344 unsigned char second; ///< Second: 0~59
1345 unsigned char reserved; ///< always 0
1346} __PACKED__ CLOCKTIME;
1347
1348/** 时间范围 */
1349typedef struct { CLOCKTIME from, to; } TIMERANGE;
1350
1351/** @name 时间范围2
1352 @{*/
1353#define TR2_S_DAY 1 ///< 白天. 由设备自行判断(例如通过光敏电路)
1354#define TR2_S_NIGHT 2 ///< 晚上
1355#define TR2_S_ALLDAY 3 ///< all day
1356/** \struct TIMERANGE2
1357 时间范围2 */
1358typedef struct {
1359 unsigned char tag; ///< 0xff
1360 unsigned char spec_time; ///< @ref TR2_S_DAY 或 TR2_S_NIGHT 或 TR2_S_ALLDAY
1361 unsigned short flags;
1362 uint32_t reserved;
1363} __PACKED__ TIMERANGE2;
1364/**@}*/
1365
1366/** @name 布防条目
1367 @{*/
1368#define ECEVENT_ALL 0xffffffff ///< 所有事件
1369/**\struct DEFENCEITEM
1370 布防条目
1371 */
1372typedef struct {
1373 union {
1374 TIMERANGE time_range; ///< if time_range.from.hour==255, it's @ref TIMERANGE2
1375 TIMERANGE2 tr2; ///< see @ref TIMERANGE
1376 } u; ///< 时间范围
1377
1378 /** 事件类型掩码. bit0:保留; bit1:移动侦测; bit2:人体检测; ...[参看 @ref ECEVENT 定义] \n
1379 * 如果为ECEVENT_ALL, 表示本结构应用到设备端支持的全部报警类型上
1380 */
1381 uint32_t event_mask;
1382 uint32_t event_mask2; ///< 0. 用作值大于31的事件掩码
1383 unsigned int day_mask; ///< bit-mask of week-days. bit0:Sunday; bit1-Monday; ...
1384} __PACKED__ DEFENCEITEM;
1385/**@}*/
1386
1387/** @name 布防
1388 @{*/
1389/** \struct Tcis_GetDefenceReq
1390 获取布/撤防设置.
1391 @ref TCI_CMD_GET_DEFENCE_REQ = 0x032A \n
1392
1393 当设备的 @ref Feature_Cap-Defence 能力不为"bundle"时,APP在获取布/撤防设置时
1394 要带上此结构体,指定获取哪一个报警源的设置
1395 */
1396typedef
1397struct Tcis_GetDefenceReq {
1398 /**
1399 * 0 - 表示获取所有非单独设置的报警类型的配置。见@ref Feature_Cap-Defence 的说明
1400 * <0x10000 - 要获取其配置的事件类型 @ref ECEVENT 。
1401 */
1402 uint32_t event;
1403 uint32_t reserved; ///< 0
1404} __PACKED__ Tcis_GetDefenceReq;
1405
1406/** \struct Tcis_SetDefence
1407 设置布/撤防的参数,和获取布/撤防的应答结构体.
1408 @ref TCI_CMD_SET_DEFENCE_REQ = 0x0328 \n
1409 TCI_CMD_SET_DEFENCE_RESP = 0x0329 \n
1410 TCI_CMD_GET_DEFENCE_RESP = 0x032B
1411 */
1413 unsigned int nItems; ///< 布/撤防计划的个数
1414 DEFENCEITEM items[0]; ///< 布/撤防计划,个数由nItems决定 see @ref DEFENCEITEM
1415} __PACKED__;
1416/** \see Tcis_SetDefence*/
1417typedef struct Tcis_SetDefence Tcis_SetDefenceReq;
1418/** \see Tcis_SetDefence*/
1419typedef struct Tcis_SetDefence Tcis_GetDefenceResp;
1420
1421/** \struct Tcis_EventState
1422 * 报警事件状态(禁用或使能).
1423 * @ref TCI_CMD_SET_EVENT_STATE = 0x031C
1424 */
1426 int event; ///< @ref ECEVENT
1427 int enabled; ///<1:enabled; 0:disabled
1428} __PACKED__;
1429/** \see Tcis_EventState*/
1430typedef struct Tcis_EventState Tcis_SetEventStateReq;
1431/** \see Tcis_EventState*/
1432typedef struct Tcis_EventState Tcis_GetEventStateResp;
1433
1434/** \struct Tcis_GetEventStateReq
1435 * 获取报警事件状态
1436 * @ref TCI_CMD_GET_EVENT_STATE = 0x031E
1437 */
1439 int event; ///< @ref ECEVENT
1440 int reserved; ///< 0
1441} __PACKED__;
1442/** \see Tci_GetEventState */
1444/**@}*/
1445//--------------------------------------------------------------
1446/** @name 50/60Hz选择
1447 *@{ */
1448/** @struct Tcis_SetEnvironmentReq
1449 * 防闪烁参数设置请求命令的参数结构体.
1450 @ref TCI_CMD_SET_ENVIRONMENT_REQ = 0x0360
1451 */
1452typedef struct
1453{
1454 unsigned int channel; ///< Camera Index
1455 unsigned char mode; ///< refer to @ref ENUM_ENVIRONMENT_MODE
1456 unsigned char reserved[3];
1457} __PACKED__ Tcis_SetEnvironmentReq;
1458
1459
1460/** @struct Tcis_SetEnvironmentResp
1461 * 防闪烁参数设置应答命令的参数结构体.
1462 @ref TCI_CMD_SET_ENVIRONMENT_RESP = 0x0361
1463 */
1464typedef struct
1465{
1466 unsigned int channel; ///< Camera Index
1467 unsigned char result; ///< 0: success; otherwise: failed.
1468 unsigned char reserved[3];
1469} __PACKED__ Tcis_SetEnvironmentResp;
1470
1471
1472/** @struct Tcis_GetEnvironmentReq
1473 * 请求获取设备当前的防闪烁参数命令的参数结构体.
1474 * @ref TCI_CMD_GET_ENVIRONMENT_REQ = 0x0362,
1475 */
1476typedef struct
1477{
1478 unsigned int channel; ///< Camera Index
1479 unsigned char reserved[4];
1480} __PACKED__ Tcis_GetEnvironmentReq;
1481
1482/** @struct Tcis_GetEnvironmentResp
1483 * 获取当前设备防闪烁参数应答命令的参数结构体.
1484 * @ref TCI_CMD_GET_ENVIRONMENT_RESP = 0x0363,
1485 */
1486typedef struct
1487{
1488 unsigned int channel; ///< Camera Index
1489 unsigned char mode; ///< refer to @ref ENUM_ENVIRONMENT_MODE
1490 unsigned char reserved[3];
1491} __PACKED__ Tcis_GetEnvironmentResp;
1492/**@}*/
1493
1494/** @name OSD
1495 * @{*/
1496/** OSD内容 */
1497typedef enum {
1498 OSDT_DATETIME, ///< 日期时间
1499 OSDT_TEXT, ///< 自定义文字
1500 OSDT_BMP1555 = 30, ///< rgb1555
1501 OSDT_BMP32 = 31, ///< argb8888
1502} OSDTYPE;
1503
1504/** OSD 位置 */
1505typedef enum {
1506 OSDP_LEFTTOP, ///< 左上
1507 OSDP_TOPCENTER, ///< 上部居中
1508 OSDP_RIGHTTOP, ///< 右上
1509 OSDP_LEFTCENTER, ///< 左中
1510 OSDP_MIDDLECENTER, ///< 画面正中
1511 OSDP_RIGHTCENTER, ///< 右中
1512 OSDP_LEFTBOTTOM, ///< 左下
1513 OSDP_BOTTOMCENTER, ///< 底部居中
1514 OSDP_RIGHTBOTTOM ///< 右下
1516
1517/** @anchor osd_flags
1518 * @name OsdItem::flags 标志位
1519 * @{*/
1520#define OSDF_ABS_POSITION 0x0001 ///< 绝对位置
1521#define OSDF_DISABLED 0x0002 ///< 禁用某条osd(与 OSDF_DELETE互斥). 禁用的item仍需要传给APP
1522#define OSDF_DELETE 0x0004 ///< 删除某条osd(与 OSDF_DISABLED互斥)。 删除的item不要传给APP
1523/**@}*/
1524
1525/** @anchor alignment
1526 * @name 对齐方式常数
1527 * @{*/
1528#define ALIGNMENT_LEFT 0x00 ///< 左对齐
1529#define ALIGNMENT_TOP 0x00 ///< 上对齐
1530#define ALIGNMENT_RIGHT 0x01 ///< 右对齐
1531#define ALIGNMENT_BOTTOM 0x02 ///< 下部对齐
1532/**@}*/
1533
1534/** OSD 条目. */
1535typedef
1536struct OsdItem {
1537 uint16_t id; ///< 0 ~ Tcis_GetOsdResp::nMaxOsdItems - 1. 毎个条目有唯一id
1538 uint16_t flags; ///< 0 或 @ref osd_flags "OsdItem 标志" 的组合
1539 uint32_t type; ///< @ref OSDTYPE
1540 union {
1541 int pos; ///< flags==0: @ref OSDPOSITION
1542 struct abspos {
1543 short x, y; ///< osd区域在画面中的坐标. 解释受alignment的取值影响
1544 uint8_t alignment; ///< <a href="#alignment">对齐方式常数</a>的组合
1545 uint8_t reserved[3]; ///< 0
1546 } abspos; ///< flags == OSDF_ABS_POSITION
1547 } u;
1548
1549 int len; ///< data 中的数据长度.
1550
1551 /** data: 内容与 \c type 相关。长度填充到4的倍数,使下一个结构4字节边界对齐。例如\c len \c = \c 3, \c data则填充到4.
1552 * 举例: \c item 指向一个 OsdItem ,下一个 OsdItem 为
1553 * @code
1554 * (struct OsdItem*)(item->data + ((item->len + 3) & 0xfffc)
1555 * @endcode
1556 * 或者
1557 * @code
1558 * (struct OsdItem*)((long)(item->data + item->len + 3) & ~3L)
1559 * @endcode
1560 * - \c type=OSDT_DATETIME \n
1561 * 为格式字符串(参考strftime());为空时,取设备默认格式
1562 * - \c type=OSDT_TEXT \n
1563 * 自定义文本. 字符编码参见 @ref Tcis_GetOsdResp::eCharEncoding
1564 * - \c type=OSDT_BMP32/OSDT_BMP1555 \n
1565 * 带alpha属性的 bmp 文件
1566 */
1567 char data [1];
1568} OsdItem;
1569
1570
1571/** @struct Tcis_SetOsdReq
1572 * 设置OSD请求结构体.
1573 TCI_CMD_SET_OSD_REQ = 0x0374
1574*/
1575typedef struct {
1576 int channel; ///< Camera Index
1577 int nItems; ///< items数组大小。一次可以设置/修改/删除一条或多条OSD条目
1578 struct OsdItem items[1]; ///< osd条目数组
1580
1581
1582/** @enum CHAR_ENCODING
1583 * 自定义文字字符集和编码. 所有语言都包含对ascii的支持 */
1584typedef enum {
1585 CHAR_ENCODING_ASCII, ///< ascii only
1586 CHAR_ENCODING_ZH_UTF8, ///< 中文utf-8
1587 CHAR_ENCODING_GB2312, ///< 中文gb2312
1588 CHAR_ENCODING_GBK, ///< 中文gbk
1589 CHAR_ENCODING_MAX
1591
1592/** @struct Tcis_GetOsdReq
1593 获取OSD 设置.
1594 @ref TCI_CMD_GET_OSD_REQ = 0x0376
1595*/
1596typedef struct {
1597 int channel; ///< Camera Index
1598 int reserved[3];
1600
1601/** @struct Tcis_GetOsdResp
1602 获取OSD 应答.
1603 @ref TCI_CMD_GET_OSD_RESP = 0x0377
1604 */
1605typedef struct {
1606 int fSupportedTypes; ///< 支持的OSDTYPE的位组合. 如果支持类型T, 则第T位置1. 例如支持TEXT和BMP32: (1<<OSDT_TEXT) | (1<<OSDT_BMP32)
1607 uint16_t eCharEncoding; ///< 支持OSDT_TEXT时,对应的字符编码 @ref CHAR_ENCODING
1608 uint16_t nMaxTextLength; ///< OSDT_TEXT 允许的最大字节数. 如果为0的话,默认为32字节
1609 int nMaxOsdItems; ///< 支持最大osd条数
1610 int nItems; ///< osd条目数(items大小)
1611 struct OsdItem items[1]; ///< osd条目数组
1612} __PACKED__ Tcis_GetOsdResp;
1613/**@}*/ //name OSD
1614
1615/** @name 图像翻转
1616 * @{*/
1617/** @struct Tcis_SetVideoModeReq
1618 * 设置视频翻转参数请求命令参数结构体.
1619 * @ref TCI_CMD_SET_VIDEOMODE_REQ = 0x0370
1620 */
1621typedef struct
1622{
1623 unsigned int channel; ///< Camera Index
1624 unsigned char mode; ///< refer to ENUM_VIDEO_MODE
1625 unsigned char reserved[3];
1626} __PACKED__ Tcis_SetVideoModeReq;
1627
1628/** @struct Tcis_SetVideoModeResp
1629 * 设置视频翻转参数应答命令的参数结构体.
1630 * @ref TCI_CMD_SET_VIDEOMODE_RESP = 0x0371
1631 */
1632typedef struct
1633{
1634 unsigned int channel; ///< Camera Index
1635 unsigned char result; ///< 0: success; otherwise: failed.
1636 unsigned char reserved[3];
1637} __PACKED__ Tcis_SetVideoModeResp;
1638
1639
1640/** @struct Tcis_GetVideoModeReq
1641 * 获取当前设备视频翻转参数请求命令的参数结构体.
1642 * @ref TCI_CMD_GET_VIDEOMODE_REQ = 0x0372,
1643 */
1644typedef struct
1645{
1646 unsigned int channel; ///< Camera Index
1647 unsigned char reserved[4];
1648} __PACKED__ Tcis_GetVideoModeReq;
1649
1650
1651/** @struct Tcis_GetVideoModeResp
1652 获取当前设备视频翻转参数应答命令的参数结构体.
1653 @ref TCI_CMD_GET_VIDEOMODE_RESP = 0x0373,
1654 */
1655typedef struct
1656{
1657 unsigned int channel; ///< Camera Index
1658 unsigned char mode; ///< refer to @ref ENUM_VIDEO_MODE
1659 unsigned char reserved[3];
1660} __PACKED__ Tcis_GetVideoModeResp;
1661/**@}*/
1662
1663/** @name SD卡状态和格式化
1664 * @{*/
1665/** \brief SD卡状态应答结构.
1666 * @ref TCI_CMD_GET_EXTERNAL_STORAGE_RESP
1667 */
1668typedef struct Tcis_SDCapResp {
1669 unsigned int channel; ///< 0
1670 /** 总容量,单位 M
1671 - >0: total space size of sdcard (MBytes)
1672 - 0: 无卡
1673 - -1: 卡状态错,需要格式化
1674 - -2: SD卡状态为只读(可回放但不能继续写入)
1675 - -3: 正在格式化
1676 - -4: 正在初始化
1677 */
1679
1680 int free; ///< Free space size of sdcard (MBytes)
1681 unsigned char reserved[8]; // reserved
1682} __PACKED__ Tcis_SDCapResp;
1683
1684
1685/** @struct Tcis_FormatExtStorageReq
1686 格式化SD卡请求命令的参数结构体.
1687 @ref TCI_CMD_FORMATEXTSTORAGE_REQ = 0x0380,
1688 */
1689typedef struct
1690{
1691 unsigned int storage; ///< Storage index (ex. sdcard slot = 0, internal flash = 1, ...)
1692 unsigned char reserved[4];
1693} __PACKED__ Tcis_FormatExtStorageReq;
1694
1695
1696/** @struct Tcis_FormatExtStorageResp
1697 格式化SD卡应答命令的参数结构体.
1698 @ref TCI_CMD_FORMATEXTSTORAGE_REQ = 0x0381
1699 */
1700typedef struct
1701{
1702 unsigned int storage; ///< Storage index
1703 ///< 0: success;
1704 ///< -1: format command is not supported.
1705 ///< otherwise: failed.
1706 char result;
1707 unsigned char reserved[3];
1708} __PACKED__ Tcis_FormatExtStorageResp;
1709/**@}*/
1710
1711/** @name 带屏IPC
1712 * @{*/
1713/** \struct Tcis_ScreenDisplay
1714 @ref TCI_CMD_SET_SCREEN_DISPLAY = 0x0382 // 设置屏幕显示
1715 @ref TCI_CMD_GET_SCREEN_DISPLAY = 0x0384 // 获取屏幕显示设置
1716*/
1717typedef struct Tcis_ScreenDisplay {
1718 int disp_off_time; ///< 非呼叫原因(例如设置)点亮屏幕后转熄屏的时间,单位:秒.
1719 ///< - \c 0 - 表示永不熄屏
1721/**@}*/
1722
1723
1724/** @name 报警音
1725 * @{*/
1726
1727/** 音频文件格式 */
1728typedef enum AUDIOFILEFMT {
1729 AF_FMT_WAV, ///< .wav
1730 AF_FMT_AMR, ///< .amr
1731 AF_FMT_MP3, ///< .mp3
1732 AF_FMT_M4A ///< .m4a
1734/** 获取音频文件格式应答.
1735 * 音频文件格式结构体,用于协商报警音的格式. \n
1736 @ref TCI_CMD_GET_ALARMTONE_CAP = 0x041C
1737 * - 如果设备返回错误状态值,表示提示音不能修改,但可以通过 TCI_CMD_PLAY_ALARMTONE 播放 (2024/1/5)
1738 */
1740 unsigned short nSamplePerSec; ///< 采样频率
1741 unsigned char nBitsPerSample; ///< 采样位宽
1742 unsigned char nChannels; ///< 通道数
1743 unsigned int nExpectedFileFormats; ///< 期望的文件格式数
1744 unsigned char ExpectedFileFormats[8]; ///< 期望的音频格式 AUDIOFILEFMT
1745 unsigned int nSupportedAudioCodecs; ///< 支持的音频格式数
1746 unsigned char SupportedAudioCodecs[8]; ///< 支持的音频格式 TCMEDIA
1747
1748 /** 当前报警音标识. \n
1749 * - 0 - 默认
1750 * - 其它: 从app通过 @ref TCI_CMD_SET_ALARMTONE 指令收到的内容标识
1751 * @ref Tcis_SetAlarmTone_Req::id
1752 */
1753 unsigned int idAlarmTone;
1754 //2021-05-21 新增域
1755 unsigned int uiFileSizeLmt; ///< 文件大小上限(单位KB)。对APP来说,当收到的应答长度>=36时才存在这个信息
1756} __PACKED__ Tcis_GetAlarmToneCap_Resp;
1757
1758/**
1759 @ref TCI_CMD_SET_ALARMTONE = 0x041E, //设置报警音频 \n
1760 @ref TCI_CMD_PLAY_AUDIO = 0x0356 //播放语音不保存
1761
1762 如果app传入不支持的音频或文件格式,ipc返回TCI_E_INVALID_PARAM
1763 */
1765 unsigned int id; ///< 0: 默认声音; 其它:声音内容标识
1766 unsigned short type; ///< 0:data为音频内容; 1:data为下载音频文件的url
1767 unsigned char af_fmt; ///< @ref AUDIOFILEFMT
1768 unsigned char a_codec; ///< @ref TCMEDIA
1769 int data_len; ///< length of data
1770 char data[0];
1771} __PACKED__ Tcis_SetAlarmTone_Req;
1772/**@}*/
1773
1774/** @name 灯状态和语音提示
1775 * @{*/
1776/** 请求/返回指示灯状态.
1777 @ref TCI_CMD_SET_LED_STATUS = 0x0422\n
1778 @ref TCI_CMD_GET_LED_STATUS = 0x0424
1779 */
1780typedef struct Tcis_SetLedStatusReq {
1781 int status; ///< 0-关闭,1-打开
1782 char resvered[4]; ///< 保留字段
1783} __PACKED__ Tcis_SetLedStatusReq;
1784/** \see Tcis_SetLedStatusReq*/
1786
1787/** 获取/设置提示音状态
1788 * @ref TCI_CMD_SET_VOICE_PROMPT_STATUS = 0x0358 \n
1789 * @ref TCI_CMD_GET_VOICE_PROMPT_STATUS = 0x035A
1790 */
1792 int status; ///< 0-关闭; 1-打开
1793 int reserved; ///< 保留:0
1795
1796/**@}*/
1797
1798/** 使用电池供电的摄像机的电池工作状态.
1799 @ref TCI_CMD_GET_BATTERY_STATUS = 0x0426, \n
1800 */
1802 int batteryMode; ///< 电池工作模式0--放电,1--充电
1803 int batteryPower; ///< 电池电量0-100(%),-1未知
1804 int batteryLow; ///< 电量低标志.1:低电;0:有电。APP要检查收到的应答长度。>=12时才有此域
1805} __PACKED__ Tcis_GetBatteryStatusResp;
1806
1807/** 获取4G的信号强度.
1808 @ref TCI_CMD_GET_WIFI_SIGNALLEVEL = 0x0428,
1809 */
1811 int activeNetIntf; //0-有线,1-WiFi, 2-4g
1812 int signalLevel; //信号强度0-100(%),-1未知
1813} __PACKED__ Tcis_GetWifiLevelResp;
1814
1815/** @name 低功耗相关
1816 * @{*/
1817/** 低功耗摄像头唤醒后的最大工作时长.
1818 @ref TCI_CMD_SET_MAX_AWAKE_TIME = 0x042A,\n
1819 @ref TCI_CMD_GET_MAX_AWAKE_TIME = 0x042C,
1820 */
1822 int max_awake_time; ///< 设备唤醒后的最大工作时长(单位:秒). 0为一直工作
1823 int reserved;
1825/** \see Tcis_GetMaxAwakeTimeResp*/
1827
1828/** 休眠状态
1829 * @ref TCI_CMD_SET_ENABLE_DORMANCY = 0x0432 \n
1830 * @ref TCI_CMD_GET_ENABLE_DORMANCY = 0x0434
1831 */
1832typedef struct Tcis_DormancyState {
1833 int enable; ///< 1:允许休眠; 0:禁止休眠
1834 int reserved;
1836
1837/** 多时间段变长数组 */
1839 int n_tr; ///< 时间段数
1840 TIMERANGE tr[1]; ///< 时间段数组
1841} __PACKED__;
1842
1843/** 设置低功耗设备主动唤醒时间.
1844 @ref TCI_CMD_SET_AWAKE_TIME = 0x0470
1845*/
1846/** \see struct Fake_TimeRanges */
1847typedef struct Fake_TimeRanges Tcis_SetAwakeTimeReq;
1848
1849/** 获取低功耗设备主动唤醒时间.
1850 @ref TCI_CMD_GET_AWAKE_TIME = 0x0472
1851*/
1852typedef struct Tcis_GetAwakeTimeReq {
1853 uint32_t reserved;
1854} __PACKED__ Tcis_GetAwakeTimeReq;
1855
1856/** \see struct Fake_TimeRanges */
1857typedef struct Fake_TimeRanges Tcis_GetAwakeTimeResp;
1858
1859/** \struct TIMEPLAN.
1860 * 时间计划 */
1861typedef struct TIMEPLAN {
1862 TIMERANGE time_range; ///< 起止时间;如果结束时间<=开始时间;逻辑为跨天
1863 unsigned int day_mask; ///< 重复: bit-mask of week-day.bit0-Sunday;bit1-Monday......
1864 int enabled; ///< 该定时是否使能
1865} __PACKED__ TIMEPLAN;
1866
1867/** \struct TIMEPLANS 定时计划不定长数组 */
1868typedef struct TIMEPLANS {
1869 unsigned int nItems; ///< 时间计划个数
1870 TIMEPLAN items[0]; ///< 时间计划数组, 个数由nItems决定
1871} __PACKED__ TIMEPLANS;
1872
1873/** 电源策略.
1874 * 引入文档 https://tange-ai.feishu.cn/docx/M3DOddPWZoe8Mbxk1vpcf8avnqO
1875 */
1876typedef enum {
1877 PS_PERFORMANCE_FIRST, ///< 性能优先
1878 PS_POWERSAVING, ///< 省电模式. 开启ai, 录像不超过10"
1879 /** 超级省电模式(关闭本地pir唤醒).
1880 * @note App不发送关闭PIR的命令. 固件保留之前的PIR配置, \n
1881 * 但实际PIR不生效.
1882 */
1884 PS_USER_DEFINED ///< 用户定义录像时长
1886
1887/** @struct Tcis_PowerStrategy
1888 * 电池供电时电源策略.
1889 @ref TCI_CMD_SET_POWER_STRATEGY = 0x048C \n
1890 @ref TCI_CMD_GET_POWER_STRATEGY = 0x048E
1891*/
1892typedef struct Tcis_PowerStrategy {
1893 int strategy; ///< 当前工作模式 @ref POWERSTRATEGY
1894 int rec_len; ///< strategy=@ref PS_USER_DEFINED时的自定义录像(工作)时长. 非自定义模式时为0
1895 /** 定时计划. 仅当strategy不是 @ref PS_SUPER_POWERSAVING 时定时计划才有效。 \n
1896 * 在定时范围内, 按当前模式工作, 定时范围外按 PS_SUPER_POWERSAVING 模式工作. \n
1897 * 但在 strategy=PS_SUPER_POWERSAVING 时, 设备仍然要响应指令,返回或保存定时 \n
1898 * 计划的内容, 以方便APP对编辑操作
1899 */
1901} __PACKED__ Tcis_PowerStrategy;
1902
1903/**@}*/
1904
1905
1906/** @name 设备关闭计划
1907 * @{*/
1908/** 设备关闭计划单元. @see TIMEPLAN */
1909typedef struct TIMEPLAN CLOSEITEM;
1910
1911/** 设备关闭计划.
1912 @ref TCI_CMD_SET_CLOSE_PLAN = 0x042E \n
1913 @ref TCI_CMD_GET_CLOSE_PLAN = 0x0430
1914 */
1915/** \see TIMEPLANS*/
1917
1918/** \see TIMEPLANS*/
1920/**@}*/
1921
1922/** @name G-sensor
1923 * @{*/
1924/** @enum GSENSORSCENE
1925 * g-sensor检查场景.
1926 */
1927typedef enum GSENSORSCENE {
1928 GSENSOR_SCENE_DRIVING = 0, ///< 车辆运行中(行车记录仪); 或非行车记录仪的一般使用场景
1929 GSENSOR_SCENE_PARKING = 1 ///< 停车状态(行车记录仪). 停用!被 TCI_CMD_SET_PARKING_DET 命令代替
1931
1932/** G-Sensor设置.
1933 @ref TCI_CMD_SET_GSENSOR 0x432
1934 */
1936 int sensitivity; ///< 灵敏度: 0-关闭; 1-低; 2-中; 3-高
1937
1938 /** 场景 @ref GSENSORSCENE \n
1939 * 如果 @ref Feature_G-Sensor "G-Sensor" 能力不为 "scene", 则 scene 只能为0. \n
1940 * 如果设备不支持某个 scene, GET操作设备返回状态码 @ref TCI_E_INVALID_PARAM */
1942} __PACKED__;
1943/** \see Tcis_GsensorSetting */
1944typedef struct Tcis_GsensorSetting Tcis_SetGsensorReq;
1945
1946/** \see Tcis_GsensorSetting */
1947typedef struct Tcis_GsensorSetting Tcis_GetGsensorResp;
1948
1949/** 获取g-sensor设置.
1950 @ref TCI_CMD_GET_GSENSOR 0x434 \n
1951
1952 */
1954 /** 场景 @ref GSENSORSCENE \n
1955 * 如果 @ref Feature_G-Sensor "G-Sensor" 能力不为 "scene", 则 scene 只能为0. \n
1956 * scene非0时,APP要检查返回结构中的 scene 是不是与请求的scene一致,不一致则认为设备不支持相应场景。
1957 */
1959 int reserved; ///< 0
1960} __PACKED__;
1962
1963/** @anchor parkingdet_field_mask */
1964/** @name Tcis_ParkingDet::flags 停车监控域标志位
1965 * 设置后表示支持相应能力,并且 Tcis_ParkingDet 结构中对应成员有效
1966 * @{*/
1967#define PARKINGDET_F_SENS 0x0001 ///< 支持 sensitivity
1968#define PARKINGDET_F_WORKTIME 0x0002 ///< 支持 work_time
1969/**@}*/
1970
1971/** 停车监控设置.
1972 * TCI_CMD_SET_PARKING_DET = 0x0364 \n
1973 * TCI_CMD_GET_PARKING_DET = 0x0366
1974 *
1975 * 本结构在GET时作返回,SET时为输入
1976 */
1977typedef struct Tcis_ParkingDet {
1978 int id; ///< 0. 保留
1979 /** @ref parkingdet_field_mask "停车监控域标志位".
1980 * 获取时, flags 为支持的设置项的掩码。设置时,为结构体中有效成员的标志。\n
1981 * 例如,如果设备只支持灵敏度设置。设备在GET时,App在SET时,设置 flags=@ref PARKINGDET_F_SENS, sensitivity为灵敏度。
1982 */
1984 int sensitivity; ///< 灵敏度: 0-关闭; 1-低; 2-中; 3-高
1985 int work_time; ///< 工作时间。单位 hour. 要与app的UI匹配(目前是8/12/24)
1987
1988
1989/** 获取停车监控设置.
1990 * TCI_CMD_GET_PARKING_DET = 0x0366
1991 */
1993 int id; ///< 0. 保留
1995
1996/**@}*/
1997
1998/** @name 音量
1999 * @{*/
2000/** 喇叭音量
2001 @ref TCI_CMD_SET_VOLUME = 0x436 \n
2002 @ref TCI_CMD_GET_VOLUME = 0x438
2003 */
2004typedef struct Tcis_SetVolume {
2005 int flags; ///< 0: 音量调节范围不可知,1:音量调节范围可知
2006 int volume; ///< 音量:\n
2007 ///< - flags为0=> 1:音量加,-1:音量减
2008 ///< - flags为1=> 0-100之间的等级
2009} __PACKED__ Tcis_SetVolume;
2010/** \see Tcis_SetVolume*/
2012/** \see Tcis_SetVolume*/
2014
2015/** MIC 灵敏度
2016 @ref TCI_CMD_SET_MIC_LEVEL = 0x43A \n
2017 @ref TCI_CMD_GET_MIC_LEVEL = 0x43C
2018 */
2019typedef struct Tcis_SetMicLevel {
2020 int sensitivity; ///< 灵敏度:[0-100]
2021 unsigned char reserved[4];
2022} __PACKED__ Tcis_SetMicLevel;
2023/** \see Tcis_SetMicLevel*/
2025/** \see Tcis_SetMicLevel*/
2027/**@}*/
2028
2029/** @name 画中画
2030 * @{*/
2031/** @struct Tcis_PrimaryView
2032 * 选择和获取主画面.
2033 * @ref TCI_CMD_SET_PRIMARY_VIEW \n
2034 * @ref TCI_CMD_GET_PRIMARY_VIEW
2035 */
2036typedef struct Tcis_PrimaryView {
2037 int id; ///< 固定为0.
2038 int channel; ///< 主画面通道: 0|1. GET 请求时忽略
2039} __PACKED__ Tcis_PrimaryView;
2040/** \see Tcis_PrimaryView. */
2042/** \see Tcis_PrimaryView. */
2044/** \see Tcis_PrimaryView. */
2046/**@}*/
2047
2048/** @name 报警灯
2049 * @{*/
2050/** 设备和获取报警灯状态.
2051 * @ref TCI_CMD_SET_ALARMLIGHT = 0x442\n
2052 * @ref TCI_CMD_GET_ALARMLIGHT = 0x444
2053*/
2054typedef struct Tcis_AlarmLightState {
2055 int channel; ///< id of light: 0
2056 int state; ///< 0:关; 1:开; 2:自动; 3:按定时设置
2057} __PACKED__ Tcis_AlarmLightState;
2058/** \see Tcis_AlarmLightState*/
2060/** \see Tcis_AlarmLightState */
2062/**@}*/
2063
2064/** @name PIR
2065 * @{*/
2066/** PIR灵敏度设置.
2067 * @ref TCI_CMD_SET_PIR = 0x446
2068 * @ref TCI_CMD_GET_PIR = 0x448
2069 */
2070typedef struct Tcis_PirSens {
2071 int channel; ///< id of PIR:0
2072 int sens; ///< 0:关闭; 1:低; 2:中; 3:高
2073} __PACKED__ Tcis_PirSens;
2074/** @see Tcis_PirSens */
2076/** @see Tcis_PirSens */
2078/**@}*/
2079
2080/** @name 门铃
2081 * @{*/
2082/** 门铃呼叫应答. APP显式地接通或拒接.
2083 * @ref TCI_CMD_ANSWERTOCALL = 0x450
2084 */
2085typedef struct Tcis_AnswerToCall {
2086 /**
2087 * 高16位用作应答源类型: 0-App对门铃事件的响应; 1-自微信小程序; 2-来自App的呼叫连接
2088 * 低16位为呼叫应答状态. APP端支持:
2089 * - @ref CALLSTATE_ANSWERED
2090 * - @ref CALLSTATE_REJECTED
2091 * - @ref CALLSTATE_HANGUP
2092 *
2093 * sdk对接听应答(CALLSTATE_ANSWERED)会通过通用应答返回状态码:
2094 * - 0 成功接听
2095 * - TCI_E_INPROGRESSING 已经有人在接听
2096 * - TCI_E_NOT_ALLOWED 不在呼叫状态(已经挂断、超时等)
2097 */
2099
2100 /** For HANGUP, 0:normal hangup; 1:connection broken. 应用最好不用区分.
2101 *
2102 * SDK内部使用, app固定设置为0.
2103 */
2104 int more;
2105
2106 char user_id[0]; ///< 可选的null结尾的用户id
2107
2108 //char callid[0];
2110
2111/** 开门请求。
2112 * @ref TCI_CMD_UNLOCK = 0x045A ///< 开门 Req: @ref Tcis_UnlockReq
2113 */
2114typedef struct Tcis_UnlockReq {
2115 int user_id; ///< 0
2116 char token[60]; ///< 加密的密钥. sdk解密后推送给应用
2118
2119typedef enum UNLOCKRES {
2120 ULR_OK, ///< door is opened
2121 ULR_INVALID_KEY, ///< invalid key
2122 ULR_HW_FAILURE, ///< 硬件故障
2123 ULR_SYS_FROZEN, ///< 开锁被冻结
2124 ULR_TIME_SKEWED, ///< APP端时间与设备偏差太大
2125 ULR_VERIFY_FAILED, ///< 平台验证失败
2126} UNLOCKRES;
2127/** 开门应答
2128 * @ref TCI_CMD_UNLOCK = 0x045A ///< 开门 Req: @ref Tcis_UnlockReq
2129 */
2130typedef struct Tcis_UnlockResp {
2131 int status; ///< 开锁应答码 @ref UNLOCKRES
2133
2134/** 门(锁)状态(暂定). 本结构在与门锁对接后会调整
2135 * TCI_CMD_GET_LOCK_STATE = 0x045C ///< 获取门(锁状态)
2136 */
2137typedef struct Tcis_LockState {
2138 uint32_t state; ///< 1:开;0:关
2140/**@}*/
2141
2142/** @name 网络IP配置
2143 * @{*/
2144/** @struct IPCONFIG
2145 * 网络IP 配置.
2146 */
2147typedef struct IPCONFIG {
2148 char intf[16]; ///< 活动接口名
2149 int bDhcpEnabled; ///< 0:手动配置; 1:自动配置; 2:自动配置ip/gateway,手动dns
2150 char ip[16]; ///< ip地址
2151 char netmask[16]; ///< 子网掩码
2152 char gateway[16]; ///< 网关
2153 char dns1[16]; ///< dns服务器1
2154 char dns2[16]; ///< dns服务器2
2155 char mac[20]; ///< 设备MAC. 只读
2156} __PACKED__ IPCONFIG;
2157/**@}*/
2158
2159/** @name 台灯
2160 * @{*/
2161/** @struct Tcis_GetLightReq
2162 * 请求智能灯状态 \n
2163 * TCI_CMD_GET_LIGHT = 0x354
2164 */
2165typedef struct Tcis_GetLightReq {
2166 int id; ///< 灯标识: 0
2167 int reserved; ///< 0
2168} __PACKED__ Tcis_GetLightReq;
2169
2170/** @anchor light_op_mask */
2171/** @name 灯光设置操作内容
2172 * @{*/
2173#define SETLIGHT_F_ONOFF 0x0001 ///< 设置开关 Tcis_LightState::on
2174#define SETLIGHT_F_MODE 0x0002 ///< 设置控制模式 Tcis_LightState::mode
2175#define SETLIGHT_F_INTENSITY 0x0004 ///< 设置亮度 Tcis_LightState::intensity
2176#define SETLIGHT_F_DELAYSHUT 0x0008 ///< 设置延时关闭 Tcis_LightState::delay_shutdown
2177//#define SETLIGHT_F_COLOR 0x0008 ///< 设置颜色 Tcis_LightState::color
2178/**@}*/
2179
2180/** 智能灯状态.
2181 * TCI_CMD_SET_LIGHT = 0x352 \n
2182 * TCI_CMD_GET_LIGHT = 0x354 \n
2183 *
2184 * \b 举例 \n
2185 * - 手动开灯,并且亮度设为80
2186 * \code{.c}
2187 * Tcis_LightState state = {
2188 * .id = 0,
2189 * .fMask = SETLIGHT_F_ONOFF | SETLIGHT_F_INTENSITY,
2190 * .on = 1,
2191 * .intensity = 50
2192 * };
2193 * \endcode
2194 */
2195typedef struct Tcis_LightState {
2196 uint16_t id; ///< 灯标识: 0
2197 uint16_t fMask; ///< 结构内容掩码。见 @ref light_op_mask. 设备返回时, 也表示其支持的配置项
2198 uint8_t on; ///< 0:关闭; 1:开
2199 uint8_t mode; ///< 0:manually; 1:自动控制
2200 uint8_t delay_shutdown; ///< 延迟关闭: 0-不延时; 1-延时
2201 uint8_t intensity; ///< 强度 0~100
2202 //uint32_t color; ///< 颜色0xrrggbb
2203} __PACKED__ Tcis_LightState;
2204/**@}*/
2205
2206/**@name 提示音
2207 * @{*/
2208/** 提示音类型 */
2209typedef enum ENUMHINTTONE {
2210 EHT_XXXX = 1, ///< 保留。以后可以将alarmtone的设置统一到这个接口
2211 EHT_CRY = 2, ///< 哭声
2212 EHT_BAD_POSTURE = 3 ///< 错误坐姿
2214
2215/** @anchor hinttone_op_mask */
2216/** @name 设置提示音内容掩码
2217 * @{*/
2218/** 设置提示音功能开关。要设置 @ref Tcis_SetHintToneReq 的\c enabled 和 \c ht_type 成员 */
2219#define SETHINTTONE_F_SWITCH 0x01
2220/** 设置提示音数据. 要设置 @ref Tcis_SetHintToneReq 结构中除 \c enabled 之外的所有成员 */
2221#define SETHINTTONE_F_DATA 0x02
2222/*@}*/
2223
2224/** 更通用的设置设备端提示音的结构。比 Tcis_SetAlarmTone_Req 多一个 ht_type 参数 \n
2225 * TCI_CMD_SET_HINTTONE = 0x0480 \n
2226 * \n
2227 * app要先调用 @ref TCI_CMD_GET_ALARMTONE_CAP 获取设备端支持的音频格式.
2228 */
2229typedef struct Tcis_SetHintToneReq {
2230 unsigned char fMask; ///< 本结构中有效数据掩码. @ref hinttone_op_mask
2231
2232 unsigned char enabled; ///< 1:使能。0:禁用
2233
2234 unsigned short ht_type; ///< 提示对象。@ref ENUMHINTTONE
2235 unsigned int id; ///< 0: 默认声音; 其它:声音内容标识。设备端保存这个标识并在app查询时返回
2236 unsigned short type; ///< 0:data为音频内容; 1:data为下载音频文件的url
2237 unsigned char af_fmt; ///< @ref AUDIOFILEFMT
2238 unsigned char a_codec; ///< @ref TCMEDIA
2239 int data_len; ///< length of data
2240 char data[0]; ///< type规定的内容: 音频数据或url
2241} __PACKED__ Tcis_SetHintToneReq;
2242
2243/** 获取提示音的请求结构.
2244 * TCI_CMD_GET_HINTTONE 0x0482
2245 */
2246typedef
2247struct Tcis_GetHintToneReq {
2248 unsigned int ht_type; ///< 提示对象。 @ref ENUMHINTTONE
2249} __PACKED__ Tcis_GetHintToneReq;
2250
2251/** 获取提示音的应答结构.
2252 * TCI_CMD_GET_HINTTONE 0x0482
2253 */
2254typedef
2255struct Tcis_GetHintToneResp {
2256 short enabled; ///< 1:允许; 0:禁用
2257 unsigned short ht_type; ///< 提示对象。@ref ENUMHINTTONE
2258 unsigned int id; ///< TCI_CMD_SET_HINTTONE 的id参数
2259} __PACKED__ Tcis_GetHintToneResp;
2260/**@}*/
2261
2262/** 运行时状态 */
2263typedef
2264enum ENUMRTSTATE {
2265 RT_STATE_RECORDING = 0 ///< 是否在录像. 参数:无。值: iState。 0-没有录像; 1-在录像
2267
2268/** 获取设备运行时状态
2269 * TCI_CMD_GET_RUNTIME_STATE = 0x0388
2270 */
2271typedef
2273 int state_name; ///< 请求的状态名,@ref ENUMRTSTATE. 状态可能会有参数,见相应状态说明
2274} __PACKED__ Tcis_GetRuntimeStateReq;
2275
2276/** 设备端运行时状态的应答. 如果设备不支持相应的状态,\n
2277 * 在通用应答里返回 TCI_E_INVALID_PARAM .
2278 *
2279 * TCI_CMD_GET_RUNTIME_STATE = 0x0388
2280 */
2281typedef
2282struct Tcis_RuntimeStateResp {
2283 int state_name; ///< 状态名: @ref ENUMRTSTATE
2284 union {
2285 int iState; ///< 整型状态值
2286 } uState; ///< 状态值
2287} __PACKED__ Tcis_RuntimeStateResp;
2288
2289/** @name 行车记录仪
2290 * @{*/
2291/** \struct Tcis_ParkingMonitorSwitch
2292 * 停车监控总开关. 用于同时使能或禁用停车监控的有所功能. \n
2293 *
2294 @ref TCI_CMD_SET_PARKING_MONITOR = 0x0484 \n
2295 @ref TCI_CMD_GET_PARKING_MONITOR = 0x0486 \n
2296
2297 @note 该命令影响以下子功能:
2298 - 停车监控设置 @ref TCI_CMD_GET_PARKING_DET/@ref TCI_CMD_SET_PARKING_DET
2299 - 缩时录像设置 @ref TCI_CMD_SET_TIMELAPSE_RECORD/@ref TCI_CMD_GET_TIMELAPSE_RECORD
2300 */
2301typedef
2303 /** - \c 0: 禁用所有子功能
2304 - \c 1: 打开停车监控总开关,但各子功能有其自己的设置(包括是否启用);
2305 */
2307} __PACKED__ Tcis_ParkingMonitorSwitch;
2308/**@}*/
2309
2310/** @name 定时任务
2311 * 本处定义通用的定时任务配置机制。
2312 *@{*/
2313
2314/** 定时任务标准动作定义 */
2316 TTA_OFF, ///< 关闭/停止/...
2317 TTA_ON ///< 打开/启动/...
2319
2320/** 定时任务描述 */
2321typedef struct TgTimeAction {
2322 int size; ///< 本结构长度. 因为action的长度同具体动作有关。本结构是变长的
2323
2324 CLOCKTIME from, to; ///< 时间范围
2325 uint16_t state; ///< 0:禁止(或单次定时器已执行); 1:有效(调度中)
2326 uint16_t repeat; ///< weekdays mask. bit0:Sunday; bit1-Monday; ...
2327
2328 /** 对象相关的动作.
2329 * 简单动作为一个4字节整数, 复杂动作会扩展,但长度为4的倍数.
2330 * 简单动作定义见 @ref TgAction */
2331 uint32_t action;
2332} __PACKED__ TgTimeAction;
2333
2334/** \struct Tcis_TimerTask
2335 * 设置定时任务.
2336 TCI_CMD_SET_TIMER_TASK = 0x0488
2337 */
2338typedef
2339struct Tcis_TimerTask {
2340 uint16_t object; ///< 定时任务作用对象. @ref ETGTIMERTARGET
2341 uint16_t id; ///< 对象标识,用于区别同种类型的多个对象。从0开始编号
2342 uint32_t nItems; ///< 任务数
2343 TgTimeAction Items[0]; ///< 定时任务
2344} __PACKED__ Tcis_TimerTask;
2345
2346/** 定时任务对象 */
2347typedef enum ETgTimerTarget {
2348 TTT_ALL = 0, ///< 不限(全部对象)
2349 TTT_LIGHT, ///< 灯光定时任务
2350 TTT_ALARM_TONE ///< 警戒语音
2352
2353/** \struct Tcis_GetTimerTask
2354 * 获取定时任务.
2355 * TCI_CMD_GET_TIMER_TASK = 0x048A \n
2356 *
2357 * 当app传入设备不支持 object 或 id 时,返回状态码 TCI_E_INVALID_PARAM
2358 */
2359typedef
2360struct Tcis_GetTimerTask {
2361 uint16_t object; ///< 定时任务对象类型. @ref ETGTIMERTARGET
2362 uint16_t id; ///< 对象标识, 用于区别同种类型的多个对象. 从0开始编号
2364
2365/**@}*/
2366
2367__END_PACKED__
2368/**@}*/
2369
2370#endif
unsigned char a_codec
TCMEDIA
unsigned char signal
signal intensity 0–100%
int y
>0: up; <0:down ?
unsigned int err
通用错误码 TCI_OK ...
int focus
>0:far; <0:near (2022.10.30)
PtzPos pos
位置。 x,y为位置坐标相对图像(高,宽)的比例. 图片左上角为原点;z忽略
unsigned char index
ignored
uint16_t channel
视频通道号(camera index)(2022.12.15)
int enable
1:允许休眠; 0:禁止休眠
ENUM_AP_ENCTYPE
AP热点的加密方式
@ TCIC_WIFIAPENC_WEP
WEP, for no password
unsigned char hour
The number of hours past midnight, in the range 0 to 23.
unsigned char signal
signal intensity 0–100%
STimeDay start_time
录像开始时间
int when
1:目前固定取值1, 表示停车状态
unsigned char hasZone
1: nZones/zones has valid setting; 0: ignore zones
int result
同command相关.
int scene
场景 GSENSORSCENE 如果 G-Sensor 能力不为 "scene", 则 scene 只能为0.
ENUM_PLAYCONTROL
SD卡回放控制指令
@ TCIC_RECORD_PLAY_START
开始回放session。这是回放过程收到的第一个命令.
@ TCIC_RECORD_PLAY_PAUSE
暂停
@ TCIC_RECORD_PLAY_STOP
结束回放或停止某路视频.
@ TCIC_RECORD_PLAY_CONTINUE
继续
int disp_off_time
非呼叫原因(例如设置)点亮屏幕后转熄屏的时间,单位:秒.
DEFENCEITEM items[0]
布/撤防计划,个数由nItems决定 see DEFENCEITEM
uint16_t n_psp
预置位数组大小
uint16_t id
0 ~ Tcis_GetOsdResp::nMaxOsdItems - 1. 毎个条目有唯一id
short enabled
1:允许; 0:禁用
Tcis_MdAreaState Tcis_GetMdAreaStateResp
int sensitivity
灵敏度:[0-100]
unsigned int nItems
时间计划个数
int status
0-关闭,1-打开
ENUMRTSTATE
运行时状态
@ RT_STATE_RECORDING
是否在录像. 参数:无。值: iState。 0-没有录像; 1-在录像
int channel
Camera Index
int nMaxOsdItems
支持最大osd条数
uint16_t flags
预置标志. 0 或 PSP_F_DISABLED 或 其它 PSP_F_xxx 的组合
uint32_t event_mask
事件类型掩码.
int more
For HANGUP, 0:normal hangup; 1:connection broken.
unsigned int channel
Camera Index
unsigned char month
The number of months since January, in the range 1 to 12.
int interval
录像间隔.单位:秒
unsigned int file_len
time length: in second
uint16_t num
ID, 用于删除或修改时作标识. 0保留不可删除(双目变焦设备用于镜头切换)
int batteryLow
电量低标志.1:低电;0:有电。APP要检查收到的应答长度。>=12时才有此域
unsigned int channel
Camera Index: 0~N-1
unsigned char mode
refer to ENUM_ENVIRONMENT_MODE
unsigned int id
0: 默认声音; 其它:声音内容标识
int channel
Camera Index
char intf[16]
活动接口名
TIMEPLAN items[0]
时间计划数组, 个数由nItems决定
unsigned char second
Second: 0~59
int channel
id of light: 0
char user_id[0]
可选的null结尾的用户id
TgPOINT points[1]
点的坐标为相对位置: x: X坐标 转成浮点数据,除以图片宽,再乘10000后取整.
unsigned int channel
Camera Index
int channel
主画面通道: 0|1. GET 请求时忽略
int when
1:目前固定取值1, 表示停车状态
unsigned int idAlarmTone
当前报警音标识.
unsigned short ht_type
提示对象。ENUMHINTTONE
int nItems
osd条目数(items大小)
struct PresetPointArray::unionPSP::pspp_noname pspp_nn[0]
type = PSP_BY_POS, 用位置表示的预置位
uint16_t id
灯标识: 0
ENUM_RECORD_TYPE
录像模式
@ TCIC_RECORDTYPE_OFF
不录像
@ TCIC_RECORDTYPE_AUTO
自动录像
@ TCIC_RECORDTYPE_ALARM
报警录像
@ TCIC_RECORDTYPE_FULLTIME
全天录像
int batteryMode
电池工作模式0–放电,1–充电
uint16_t num
预置位编号: 1~n_psp. 0保留
char gateway[16]
网关
uint8_t intensity
强度 0~100
unsigned int channel
Camera Index
unsigned int day_mask
bit-mask of week-days. bit0:Sunday; bit1-Monday; ...
unsigned char ExpectedFileFormats[8]
期望的音频格式 AUDIOFILEFMT
int state
0x00:隐藏;0x01: 显示
unsigned int t_event
本段录像对应的事件的时间(要与上报给云端的事件时间一致). 没有事件时传0
char ip[16]
ip地址
unsigned char recordStream
SD卡录像清晰度:0-高清,1-标清. 要求 RecordConf = "res"
unsigned short type
0:data为音频内容; 1:data为下载音频文件的url
ENUMHINTTONE
提示音类型
@ EHT_XXXX
保留。以后可以将alarmtone的设置统一到这个接口
@ EHT_BAD_POSTURE
错误坐姿
@ EHT_CRY
哭声
uint16_t nMaxTextLength
OSDT_TEXT 允许的最大字节数. 如果为0的话,默认为32字节
int channel
id of PIR:0
unsigned short type
0:data为音频内容; 1:data为下载音频文件的url
char enctype
refer to ENUM_AP_ENCTYPE
unsigned int storage
Storage index
unsigned int storage
Storage index (ex. sdcard slot = 0, internal flash = 1, ...)
int channel
Camera Index
TgTimeAction Items[0]
定时任务
uint16_t repeat
weekdays mask. bit0:Sunday; bit1-Monday; ...
unsigned char excludeZone
0: 检测区域内;1: 检测区域外
uint16_t fMask
结构内容掩码。见 light_op_mask. 设备返回时, 也表示其支持的配置项
unsigned char af_fmt
AUDIOFILEFMT
unsigned char mode
refer to ENUM_VIDEO_MODE
int16_t flags
0: 获取全部巡航轨迹; 1-查询巡航轨迹能力
int data_len
length of data
unsigned char reserved[2]
0
unsigned int channel
Camera Index
uint32_t type
OSDTYPE
unsigned int file_len
time length: in second
uint16_t type
轨迹表示方式
int16_t resp_type
应答数据类型:=Tcis_GetPtzTrackReq::flags
unsigned char password[32]
WiFi password if not empty
uint16_t flags
0 或 OsdItem 标志 的组合
struct PtzTrackArray pta
轨迹数组(一般一次设置一个位置,即数组大小为1)
int psp_num
如果是要转到预置位,此为预置位编号,否则为0 [2021.11.2]
uint16_t object
定时任务对象类型. ETGTIMERTARGET
int len
data 中的数据长度.
ENUM_AP_MODE
doxygen 里匿名变量的占位符。定义为空,仅为了生成文档用
unsigned int uiFileSizeLmt
文件大小上限(单位KB)。对APP来说,当收到的应答长度>=36时才存在这个信息
unsigned int day_mask
重复: bit-mask of week-day.bit0-Sunday;bit1-Monday......
unsigned char hour
Hour: 0~23
int state_name
状态名: ENUMRTSTATE
unsigned char password[64]
if exist, WiFi password
int status
开锁应答码 UNLOCKRES
int x
>0: right; <0: left ?
uint16_t id
对象标识,用于区别同种类型的多个对象。从0开始编号
unsigned char reserved
always 0
uint16_t num
ID, 用于删除或修改时作标识. 0保留不可删除(双目变焦设备用于镜头切换)
uint16_t id
对象标识, 用于区别同种类型的多个对象. 从0开始编号
uint16_t eCharEncoding
支持OSDT_TEXT时,对应的字符编码 CHAR_ENCODING
int channel
定位参照通道(Refered camera-index)
unsigned int data1
消息类型相关数据1
int mode
灵敏度. 0:高(灵敏); 1:中(正常); 2:低(精准)
unsigned char SupportedAudioCodecs[8]
支持的音频格式 TCMEDIA
Tcis_SetDeviceStatus Tcis_GetDeviceStatusResp
ENUM_PTZCMD
PTZ Command Value
@ TCIC_PTZ_LEFT
向左
@ TCIC_PTZ_CALL_TRACK
调用巡航. Tcis_PtzCmd::point 为巡航轨迹号. 0为默认轨迹
@ TCIC_PTZ_STOP
停止
@ TCIC_PTZ_GOTO_POINT
调用预置位. Tcis_PtzCmd::point 为预置位编号
@ TCIC_LENS_FOCAL_NEAR
Focus Near. Cap-Zoom 带 'mfocus' 属性
@ TCIC_PTZ_UP
向上
@ TCIC_PTZ_LEFT_UP
左上
@ TCIC_LENS_ZOOM_IN
Zoom In
@ TCIC_PTZ_RIGHT_UP
右上
@ TCIC_LENS_ZOOM_OUT
Zoom Out
@ TCIC_PTZ_AUTO_SCAN
自动线扫
@ TCIC_PTZ_DOWN
向下
@ TCIC_LENS_FOCAL_FAR
Focus Far. Cap-Zoom 带 'mfocus' 属性
@ TCIC_MOTOR_RESET_POSITION
云台复位. 本指令要求在复位完成后给一个通用结构的应答
@ TCIC_PTZ_RIGHT_DOWN
右下
@ TCIC_PTZ_LEFT_DOWN
左下
@ TCIC_PTZ_RIGHT
向右
unsigned short ht_type
提示对象。ENUMHINTTONE
int status
1-打开; 0-关闭
uint16_t active_track
设置时(TCI_CMD_SET_PTZ_TRACK )忽略(为0)。 获取时(TCI_CMD_GET_PTZ_TRACK ) 为当前正执行的巡航轨迹:
int data_len
length of data
int idle_time
回到守望位前的云台无动作时间,单位: 秒
int channel
Camera Index: 0-N-1
unsigned char af_fmt
AUDIOFILEFMT
unsigned char minute
Minute: 0~59
unsigned char spec_time
TR2_S_DAY 或 TR2_S_NIGHT 或 TR2_S_ALLDAY
unsigned int ait_mask
AI类型掩码 的组合。 获取时为当前支持的AI功能; 设置时为要修改状态的AI功能
unsigned char day
The day of the month, in the range 1 to 31.
uint32_t event
0 - 表示获取所有非单独设置的报警类型的配置。见Cap-Defence 的说明 <0x10000 - 要获取其配置的事件类型 ECEVENT 。
unsigned char ssid[32]
WiFi ssid
Tcis_SetAlarmBellReq Tcis_GetAlarmBellResp
char dns2[16]
dns服务器2
AUDIOFILEFMT
音频文件格式
@ AF_FMT_AMR
.amr
@ AF_FMT_MP3
.mp3
@ AF_FMT_M4A
.m4a
@ AF_FMT_WAV
.wav
uint16_t flags
标志. 0 或 PSP_F_DISABLED 或 PSP_F_DISABLED 或 其它 PSP_F_xxx 的组合
int channel
视频通道(Camera Index) 0~N-1
Tcis_SetWatchPosReq Tcis_GetWatchPosResp
unsigned char result
0: success; otherwise: failed.
union PtzTrackArray::@5 u
轨迹数组
unsigned int channel
Camera Index
int result
0: wifi connected; 1: failed to connect
unsigned char wday
The number of days since Sunday, in the range 0 to 6. (Sunday = 0, Monday = 1, ......
unsigned char month
Month: 1~12
int total
总容量,单位 M
unsigned int channel
在 ENUM_PLAYCONTROL::TCIC_RECORD_PLAY_START/ENUM_PLAYCONTROLTCIC_RECORD_PLAY_STOP 里用于选择视频通道
unsigned char limit
0
unsigned char flags
not used (2021-9-18)
uint16_t stay_time
在每个预置位停留的时间(s)
int channel
Camera Index: 0~N-1
unsigned char channel
camera index
unsigned char event
事件类型 ECEVENT
unsigned char enctype
refer to ENUM_AP_ENCTYPE
unsigned int nSupportedAudioCodecs
支持的音频格式数
PtzSpace_t space
see PtzSpace_t
unsigned char mode
refer to ENUM_AP_MODE
int n_day
日期数组大小
int enabled
1: enable closeup; 0: disable closeup
unsigned char result
0: success; otherwise: failed.
int sensitivity
灵敏度: 0-关闭; 1-低; 2-中; 3-高
unsigned char mode
refer to ENUM_AP_MODE
struct PresetPointArray::unionPSP::psp_by_no pspn[0]
type = PSP_BY_NO, 用编号表示的预置位
SDay days[1]
日期数组
char ssid[32]
WiFi ssid
unsigned char enctype
refer to ENUM_AP_ENCTYPE
CHAR_ENCODING
自定义文字字符集和编码.
@ CHAR_ENCODING_ASCII
ascii only
@ CHAR_ENCODING_ZH_UTF8
中文utf-8
@ CHAR_ENCODING_GB2312
中文gb2312
@ CHAR_ENCODING_GBK
中文gbk
unsigned char reserved[2]
0
unsigned int channel
Camera Index
int zoom
>0: zoom-in; <0: zoom-out
unsigned int channel
Camera Index: 0~
unsigned int ht_type
提示对象。 ENUMHINTTONE
Tcis_SetMotionDetectReq Tcis_GetMotionDetectResp
unsigned int cmd
请求命令字
unsigned char mode
refer to ENUM_AP_MODE
int state
高16位用作应答源类型: 0-App对门铃事件的响应; 1-自微信小程序; 2-来自App的呼叫连接 低16位为呼叫应答状态.
unsigned char flags
录像条目其它标志. 0x01:缩时录像
uint16_t flags
预置标志. 0 或 PSP_F_DISABLED 或 其它 PSP_F_xxx 的组合
unsigned char ssid[32]
WiFi ssid
unsigned char speed
PTZ control speed
uint8_t type
预置位类型
uint16_t flags
标志. 0 或 PSP_F_DISABLED 或 PSP_F_DISABLED 或 其它 PSP_F_xxx 的组合
unsigned char nBitsPerSample
采样位宽
unsigned char mode
refer to ENUM_VIDEO_MODE
unsigned int command
play record command. refer to ENUM_PLAYCONTROL
unsigned int channel
Camera Index
uint8_t mode
0:manually; 1:自动控制
unsigned char nChannels
通道数
char dns1[16]
dns服务器1
unsigned char flags
录像条目其它标志. 0x01:缩时录像
ENUM_VIDEO_MODE
Video Flip Mode
@ TCIC_VIDEOMODE_NORMAL
正常
@ TCIC_VIDEOMODE_FLIP_MIRROR
旋转180度
@ TCIC_VIDEOMODE_FLIP
上下翻转
@ TCIC_VIDEOMODE_MIRROR
左右镜像
uint32_t event_mask2
用作值大于31的事件掩码
unsigned char ssid[32]
WiFi ssid
int scene
场景 GSENSORSCENE 如果 G-Sensor 能力不为 "scene", 则 scene 只能为0.
unsigned int channel
0
char signal
signal intensity 0–100%
int strategy
当前工作模式 POWERSTRATEGY
int status
延时摄影状态: 0-disable; 1-enable。
unsigned char password[32]
if exist, WiFi password
unsigned int command
来自请求中的命令码. 参见 ENUM_PLAYCONTROL
int free
Free space size of sdcard (MBytes)
int volume
音量:
int fSupportedTypes
支持的OSDTYPE的位组合. 如果支持类型T, 则第T位置1. 例如支持TEXT和BMP32: (1<<OSDT_TEXT) | (1<<OSDT_BMP32)
int rec_len
strategy=PS_USER_DEFINED时的自定义录像(工作)时长. 非自定义模式时为0
unsigned char ssid[32]
WiFi ssid
unsigned int recordType
Refer to ENUM_RECORD_TYPE
int work_time
工作时间。单位 hour. 要与app的UI匹配(目前是8/12/24)
unsigned char reserved[3]
0
unsigned int channel
视频通道(Camera Index) (polluted with value 3 ?)
unsigned char estype
0:录像记录为SAvExEvent数组; 1:录像记录为SAvEvent2数组
uint8_t on
0:关闭; 1:开
int enabled
1:enabled; 0:disabled
int channel
视频通道号(camera index)(2021.10.22)
unsigned char minute
The number of minutes after the hour, in the range 0 to 59.
unsigned int ai_flags
对应位为1表示使能
char data[1]
data: 内容与 type 相关。长度填充到4的倍数,使下一个结构4字节边界对齐。例如len = 3, data则填充到4.
unsigned int channel
Camera Index:0~N-1
unsigned int type
消息类型。 RTMTYPE
unsigned int id
0: 默认声音; 其它:声音内容标识。设备端保存这个标识并在app查询时返回
unsigned char endflag
为1是表示是最后一个包
int nItems
items数组大小。一次可以设置/修改/删除一条或多条OSD条目
uint32_t event_mask
事件类型掩码.
int sens
0:关闭; 1:低; 2:中; 3:高
unsigned char second
The number of seconds after the minute, in the range 0 to 59.
unsigned short year
Year
int channel
Camera Index
unsigned short year
The number of year.
uint32_t state
1:开;0:关
int flags
0: 音量调节范围不可知,1:音量调节范围可知
uint8_t delay_shutdown
延迟关闭: 0-不延时; 1-延时
STimeDay stTimeDay
Event time from ListEventi STimeDay
int16_t channel
视频通道号(Camera Index)(2022.12.15)
unsigned int nItems
布/撤防计划的个数
struct PresetPointArray::unionPSP::psp_by_pos pspp[0]
type = PSP_BY_POS, 用位置表示的预置位
unsigned char mode
refer to ENUM_ENVIRONMENT_MODE
float x
x,y,z: 取值0.0~1.0, 分别表示云台水平、垂直、纵深方向的位置点各自方向最大范围的比率。 例如x=0.5表示去云台水平居中;z=0.0表示纵深处在x1的位置 x,...
char token[60]
加密的密钥. sdk解密后推送给应用
unsigned int num
录像条目总数
union Tcis_GetPtzTrackResp::@6 u
应答数据
unsigned char control
PTZ control command, refer to ENUM_PTZCMD
struct PresetPointArray pspa
预置位数组(一般一次设置一个位置,即数组大小为1)
uint8_t version
*** 接收者要检查version的值。当前为0对应本结构定义 *** !!!!
@ ULR_VERIFY_FAILED
平台验证失败
@ ULR_TIME_SKEWED
APP端时间与设备偏差太大
@ ULR_SYS_FROZEN
开锁被冻结
@ ULR_HW_FAILURE
硬件故障
@ ULR_OK
door is opened
@ ULR_INVALID_KEY
invalid key
char data[0]
type规定的内容: 音频数据或url
unsigned char mode
refer to ENUM_AP_MODE
unsigned char fMask
本结构中有效数据掩码. hinttone_op_mask
TIMERANGE time_range
起止时间;如果结束时间<=开始时间;逻辑为跨天
char mode
refer to ENUM_AP_MODE
uint16_t num
预置位编号: 1~n_psp. 0保留
unsigned char enctype
refer to ENUM_AP_ENCTYPE
uint16_t n_track
轨迹数组大小
int size
本结构长度. 因为action的长度同具体动作有关。本结构是变长的
unsigned char event
事件类型, 参考 ECEVENT
unsigned int data2
消息类型相关数据2
int channel
Camera Index: 0~N-1
int flags
停车监控域标志位.
union PresetPointArray::unionPSP u
预置位数组
int n_tr
时间段数
int channel
Camera Index: 0~N-1
unsigned char point
预置位(control=TCIC_PTZ_GOTO_POINT)或巡航轨迹号(control=TCIC_PTZ_CALL_TRACK)
int bDhcpEnabled
0:手动配置; 1:自动配置; 2:自动配置ip/gateway,手动dns
unsigned int channel
Camera Index: 0~N-1
Tcis_SetDeviceStatus Tcis_SetDeviceStatusReq
unsigned char event
事件类型 ECEVENT
unsigned int avIndex
avIndex
uint32_t action
对象相关的动作.
STimeDay start_time
录像开始时间
CLOCKTIME to
时间范围
unsigned int channel
Camera Index
char netmask[16]
子网掩码
int channel
Camera Index
STimeDay stEndTime
Search event to
int enable
1-打开; 0-关闭
int result
0: success; otherwise: failed.
unsigned short flags
低字节为 移动侦测区域表示标志; 最高位为是否支持[区域排除]的标志位
unsigned char password[64]
WiFi password if not empty
int16_t channel
视频通道号(Camera Index)(2022.12.15)
unsigned char tag
0xff
unsigned char enabled
1:使能。0:禁用
int channel
Camera Index
int channel
视频通道(Camera Index) 0~N-1
uint8_t channel
在TCI_CMD_GET_PSP 的应答中,为与请求匹配的通道号(Camera index)。设置时为0,因为请求结构中有定义channel字段
uint16_t state
0:禁止(或单次定时器已执行); 1:有效(调度中)
STimeDay stStartTime
Search event from
unsigned short enabled
1:enabled; 0:disabled
int enabled
该定时是否使能
Tcis_SetLedStatusReq Tcis_GetLedStatusResp
unsigned char a_codec
TCMEDIA
unsigned char reserved[2]
=0
union Tcis_RuntimeStateResp::@9 uState
状态值
unsigned int Param
command param. Depend on command
unsigned short nSamplePerSec
采样频率
unsigned int number
MAX number: 1024(IOCtrl packet size) / 36(bytes) = 28
unsigned char status
refer to SWifiAp::status
uint16_t object
定时任务作用对象. ETGTIMERTARGET
unsigned char reserved[10]
保留字段,未使用
unsigned char aux
0
int result
0: success; otherwise: failed.
unsigned char day
Day: 1~31
int max_awake_time
设备唤醒后的最大工作时长(单位:秒). 0为一直工作
int status
0-关闭; 1-打开
ENUM_ENVIRONMENT_MODE
防闪烁参数
@ TCIC_ENVIRONMENT_INDOOR_60HZ
60Hz 电源
@ TCIC_ENVIRONMENT_INDOOR_50HZ
50Hz 电源
TIMERANGE tr[1]
时间段数组
char resvered[4]
保留字段
uint32_t event_mask2
用作值大于31的事件掩码
int num
预置位编号. -1:禁用; >0:设置预置位num为守望位
int state_name
请求的状态名,ENUMRTSTATE. 状态可能会有参数,见相应状态说明
unsigned char status
refer to SWifiAp::status
int show_box
1:显示边框; 0:不显示边框
int batteryPower
电池电量0-100(%),-1未知
int channel
Camera Index
char mac[20]
设备MAC. 只读
uint32_t nItems
任务数
unsigned char count
本包包含中的事件数
int id
灯标识: 0
unsigned int id
TCI_CMD_SET_HINTTONE 的id参数
struct PresetPointArray::unionPSP::pspn_noname pspn_nn[0]
type = PSP_BY_NO, 用编号表示的预置位
int state
0:关; 1:开; 2:自动; 3:按定时设置
unsigned char enctype
refer to ENUM_AP_ENCTYPE
unsigned int nExpectedFileFormats
期望的文件格式数
SWifiAp stWifiAp[1]
wifi信息 SWifiAp
TIMEPLANS plans
定时计划.
int sensitivity
灵敏度: 0-关闭; 1-低; 2-中; 3-高
@ OSDP_TOPCENTER
上部居中
@ OSDP_LEFTBOTTOM
左下
@ OSDP_RIGHTBOTTOM
右下
@ OSDP_BOTTOMCENTER
底部居中
@ OSDP_LEFTCENTER
左中
@ OSDP_RIGHTCENTER
右中
@ OSDP_MIDDLECENTER
画面正中
@ OSDP_RIGHTTOP
右上
@ OSDP_LEFTTOP
左上
@ TTA_OFF
关闭/停止/...
@ TTA_ON
打开/启动/...
@ PS_POWERSAVING
省电模式. 开启ai, 录像不超过10"
@ PS_PERFORMANCE_FIRST
性能优先
@ PS_SUPER_POWERSAVING
超级省电模式(关闭本地pir唤醒).
@ PS_USER_DEFINED
用户定义录像时长
@ GSENSOR_SCENE_DRIVING
车辆运行中(行车记录仪); 或非行车记录仪的一般使用场景
@ GSENSOR_SCENE_PARKING
停车状态(行车记录仪). 停用!被 TCI_CMD_SET_PARKING_DET 命令代替
@ TTT_ALARM_TONE
警戒语音
@ TTT_ALL
不限(全部对象)
@ TTT_LIGHT
灯光定时任务
@ OSDT_TEXT
自定义文字
@ OSDT_DATETIME
日期时间
@ OSDT_BMP1555
rgb1555
@ OSDT_BMP32
argb8888
时钟表示.
布防条目
多时间段变长数组
网络IP 配置.
移动侦测多边形区域的顶点坐标.
移动侦测区域的表示方式
OSD 条目.
预置位数组
云台位置结构体.
云台位置
云台巡航轨迹数组
实时事件通知
录像条目, 带事件的时间戳
录像条目
日期表示
时间的表示方法
WiFi信息结构体.
设备关闭计划单元.
时间范围
时间范围2
设置/获取 AI功能开关状态.
设备和获取报警灯状态.
门铃呼叫应答.
日期列表.
休眠状态 TCI_CMD_SET_ENABLE_DORMANCY = 0x0432 TCI_CMD_GET_ENABLE_DORMANCY = 0x0434
跟踪特写功能设置 TCI_CMD_SET_ENABLE_CLOSEUP = 0x033E TCI_CMD_GET_ENABLE_CLOSEUP = 0x034C
通用错误返回结构
报警事件状态(禁用或使能).
录像查询请求结构
SD卡录像查询返回结构
格式化SD卡请求命令的参数结构体.
格式化SD卡应答命令的参数结构体.
获取音频文件格式应答.
获取低功耗设备主动唤醒时间.
使用电池供电的摄像机的电池工作状态.
获取布/撤防设置.
请求获取设备当前的防闪烁参数命令的参数结构体.
获取当前设备防闪烁参数应答命令的参数结构体.
获取报警事件状态 TCI_CMD_GET_EVENT_STATE = 0x031E
获取g-sensor设置.
获取提示音的请求结构.
获取提示音的应答结构.
请求智能灯状态 TCI_CMD_GET_LIGHT = 0x354
低功耗摄像头唤醒后的最大工作时长.
获取移动侦测区域状态 TCI_CMD_GET_MDAREA_STATE = 0x033C
获取移动侦测区域请求结构 TCI_CMD_GETMOTIONDETECT_REQ 0x0326 ///< 获取移动侦测配置
获取OSD 设置.
获取OSD 应答.
获取停车监控设置.
获取设备端的预置点.
设备端返回的预置位.
获取云台位置.
获取巡航设置.
对获取巡航设置的应答.
获取设备运行时状态 TCI_CMD_GET_RUNTIME_STATE = 0x0388
获取人形/人脸边框设置状态.
获取延时摄像设置.
获取定时任务.
获取当前设备视频翻转参数请求命令的参数结构体.
获取当前设备视频翻转参数应答命令的参数结构体.
获取守望位 TCI_CMD_GET_WATCHPOS = 0x0458
获取4G的信号强度.
获取当前连接的WiFi信息请求命的求参数结构.
获取设备当前连接WiFi信息结构体.
获取当前连接WiFi应答命令的参数结构体.
智能灯状态.
获取WiFi列表请求命名参数结构体.
获取WiFi列表应答参数结构体.
云台图片内定位 TCI_CMD_LOCATE_IN_PIC = 0x1002
门(锁)状态(暂定).
设置移动侦测区域状态 TCI_CMD_SET_MDAREA_STATE = 0x033A 设置侦测区域状态(显示|隐藏)
停车监控设置.
停车监控总开关.
PIR灵敏度设置.
SD卡回放控制请求结构体 .
SD卡回放控制应答结构体.
电池供电时电源策略.
选择和获取主画面.
云台长按的参数结构体.
云台短按的参数结构体.
设备端运行时状态的应答.
SD卡状态应答结构.
TCI_CMD_SET_SCREEN_DISPLAY = 0x0382 // 设置屏幕显示 TCI_CMD_GET_SCREEN_DISPLAY = 0x0384 // 获取屏幕显示设置
设置设备警铃命令和获取设备警铃设置命令的参数结构体.
TCI_CMD_SET_ALARMTONE = 0x041E, //设置报警音频 TCI_CMD_PLAY_AUDIO = 0x0356 //播放语音不保存
设置布/撤防的参数,和获取布/撤防的应答结构体.
设备开关状态结构体.
人形追踪开关状态结构体.
防闪烁参数设置请求命令的参数结构体.
防闪烁参数设置应答命令的参数结构体.
更通用的设置设备端提示音的结构。比 Tcis_SetAlarmTone_Req 多一个 ht_type 参数 TCI_CMD_SET_HINTTONE = 0x0480 app要先调用 TCI_C...
请求/返回指示灯状态.
MIC 灵敏度 TCI_CMD_SET_MIC_LEVEL = 0x43A TCI_CMD_GET_MIC_LEVEL = 0x43C
设置移动侦测区域请求和获取移动侦测区域应答的结构(伪).
(flags&0x03)== MD_AT_RECTSWITHPOLYGON 的伪数据结构.
设置移动侦测区域应答结构体.
设置OSD请求结构体.
设置设备端的预置点.
设置云台位置 TCI_CMD_SET_PTZ_POS = 0x0408
SD卡录像模式结构体.
设置SD卡录像模式应答结构体 TCI_CMD_SETRECORD_RESP = 0x0311,
设置AI对象边框显示状态 TCI_CMD_SET_SHOW_BOX = 0x0348
设置延时摄像设置.
设置视频翻转参数请求命令参数结构体.
设置视频翻转参数应答命令的参数结构体.
喇叭音量 TCI_CMD_SET_VOLUME = 0x436 TCI_CMD_GET_VOLUME = 0x438
设置设备WiFi请求命令参数结构体.
设置WiFi请求2.
设置WiFi应答命令的参数结构体.
坐姿检测灵敏度.
设置定时任务.
开门请求。 TCI_CMD_UNLOCK = 0x045A ///< 开门 Req: Tcis_UnlockReq
开门应答 TCI_CMD_UNLOCK = 0x045A ///< 开门 Req: Tcis_UnlockReq
获取/设置提示音状态 TCI_CMD_SET_VOICE_PROMPT_STATUS = 0x0358 TCI_CMD_GET_VOICE_PROMPT_STATUS = 0x035A
坐标点
定时任务描述
Tcis_SetMicLevel Tcis_SetMicLevelReq
Tcis_PirSens Tcis_SetPirSensReq
TIMEPLANS Tcis_SetClosePlanReq
设备关闭计划.
Tcis_SetRecord Tcis_GetRecordResp
Tcis_GetAlarmLightStateResp Tcis_SetAlarmLightStateReq
Tcis_SetPtzPosReq Tcis_GetPtzPosResp
TIMEPLANS Tcis_GetClosePlanResp
OSDPOSITION
OSD 位置
Tcis_SetMicLevel Tcis_GetMicLevelResp
Tcis_PirSens Tcis_GetPirSensResp
Tcis_SetEnableBT Tcis_SetEnableBtReq
Tcis_SetEnableBT Tcis_GetEnableBtResp
Tcis_SetVolume Tcis_GetVolumeResp
Tcis_SetShowBoxReq Tcis_GetShowBoxResp
Tcis_GetMaxAwakeTimeResp Tcis_SetMaxAwakeTimeReq
TgAction
定时任务标准动作定义
POWERSTRATEGY
电源策略.
GSENSORSCENE
g-sensor检查场景.
Tcis_SetRecord Tcis_SetRecordReq
Tcis_AlarmLightState Tcis_GetAlarmLightStateResp
Tcis_PrimaryView Tcis_GetPrimaryViewResp
ETGTIMERTARGET
定时任务对象
Tcis_SetVolume Tcis_SetVolumeReq
Tcis_PrimaryView Tcis_GetPrimaryViewReq
OSDTYPE
OSD内容
Tcis_PrimaryView Tcis_SetPrimaryViewReq