HxNvr
HxIVA | ||
HxServer | ||
HxVideoCaptor | ||
resources | ||
.gitignore | ||
ReadMe.md |
通讯协议
协议结构
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 操作类型 |
msgInfo | object | 每个接口特有的参数,详见每个接口定义 |
数据格式
心跳
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 0 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
name | string | 程序名称 |
version | string | 版本信息 |
查询软件参数信息
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 1 |
- 回复
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 1 |
msgInfo | Dictionary < string, string > | 设置信息 |
修改软件参数信息
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 2 |
msgInfo | Dictionary < string, string > | 设置信息 |
- 回复
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 2 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
status | bool | true: 成功; false: 失败; |
message | string | 异常信息 |
查询日志
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 3 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
type | int | 0: 系统事件; 1: 用户操作; 2: 视频通道; |
date | string | 日期 |
index | int | 通道号(仅视频通道日志有效) |
month | bool | true: 检索全月; false: 不检索全月 |
- 回复
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 3 |
msgInfo | object[] |
**msgInfo ** 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
timestamp | DateTime | 事件事件 |
type | int | 事件类型 |
index | int | 视频通道日志类型时为通道号,其他为空 |
message | string | 消息 |
data | string | 详细信息 |
添加日志
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 4 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
timestamp | DateTime | 事件事件 |
type | int | 事件类型 |
index | int | 视频通道日志类型时为通道号,其他为空 |
message | string | 消息 |
data | string | 详细信息 |
查询录像
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 5 |
msgInfo | object |
msgInfo 参数为空,查询最早的一条录像数据
msgInfo 参数如下, 按通道、开始日期、结束日期参数查询录像数据
参数名称 | 类型 | 描述 |
---|---|---|
channel | int | 通道号 |
start_date | DateTime | 开始日期 |
end_date | DateTime | 结束日期 |
msgInfo 参数如下, 按日期查询录像数据
参数名称 | 类型 | 描述 |
---|---|---|
date | DateTime | 日期 |
- 回复
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 5 |
msgInfo | object[] |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
channel | int | 通道号 |
start_date | DateTime | 开始日期 |
end_date | DateTime | 结束日期 |
duration | int | 录像时长 |
name | string | 文件名称 |
path | string | 文件路径 |
更新录像数据
- 请求
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 6 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
channel | int | 通道号 |
start_date | DateTime | 开始日期 |
end_date | DateTime | 结束日期 |
duration | int | 录像时长 |
name | string | 文件名称 |
path | string | 文件路径 |
删除录像数据
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 7 |
msgInfo | object |
msgInfo 参数如下, 按文件路径删除录像
参数名称 | 类型 | 描述 |
---|---|---|
path | string | 文件路径 |
msgInfo 参数如下, 按录像日期删除录像
参数名称 | 类型 | 描述 |
---|---|---|
date | DateTime | 日期 |
创建报警视频
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 10 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
channel | int | 通道 |
timestamp | string | 报警时间 |
车辆状态
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 100 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
speed | float | 车速 |
brake | int | 刹车 1: 刹车 0: 未刹车 |
reversing | int | 倒车 1: 倒车 0: 未倒车 |
left | int | 左转向 1: 转向 0: 未转向 |
right | int | 右转向 1: 转向 0: 未转向 |
智能分析数据
参数名称 | 类型 | 描述 |
---|---|---|
action_type | int | 101 |
msgInfo | object |
msgInfo 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
timestamp | DateTime | 报警事件 |
channel | int | 通道 |
level | int | 报警级别 1表示最高危险报警,2表示次高危险报警,3表示第三高危险报警 |
event_type | int | 事件类型 |
object_infos | object[] | 目标信息 |
face_land_marks | object[] | 人脸关键点 |
left_line_type | int | 左车道线类型 |
right_line_type | int | 右车道线类型 |
object_infos 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
detect_type | int | 目标类型 |
left | int | 目标位置左 |
top | int | 目标位置上 |
right | int | 目标位置右 |
bottom | int | 目标位置下 |
distance | float | 距离 [0, 250] |
speed | float | 相对运动目标的相对速度 (m/s) |
ttc | float | ttc 时间 (s) |
target_post_x | int | 落脚点横坐标 (BSD用) |
target_post_y | int | 落脚点纵坐标 (BSD用) |
face_land_marks 参数如下
参数名称 | 类型 | 描述 |
---|---|---|
x | int | x坐标 |
y | int | y坐标 |
event_type 定义如下
参数 | 描述 |
---|---|
1 | 向左车道偏离报警 |
2 | 向右车道偏离报警 |
3 | 前车碰撞报警 |
4 | 行人碰撞报警 |
5 | 车距监测报警 |
6 | 人行横道检测报警 |
7 | 右侧盲区报警 |
8 | 抽烟 |
9 | 打电话 |
10 | 打哈欠 |
11 | 未对准(偏离座位) |
12 | 摄像头遮挡 |
13 | 身份异常(不是原来的驾驶员) |
14 | 异常驾驶(检测不到脸) |
15 | 阻断型墨镜 |
16 | 嘴部遮挡 |
17 | 闭眼 |
18 | 分神驾驶(东张) |
19 | 分神驾驶(西望) |
20 | 分神驾驶(仰望) |
21 | 分神驾驶(低头) |
22 | 身份正常 |
23 | 未系安全带 |
24 | 手脱离方向盘 |
25 | 玩手机 |
26 | 超员 |