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