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