设备异常告警消息结构体
功能介绍
设备异常告警消息:设备状态变更(例如设备、通道上下线,升级等)时推送的消息
设备异常告警消息的message_type值为device_status。
|
字段名 |
类型 |
是否可为空 |
说明 |
|---|---|---|---|
|
method |
String |
不为空 |
设备状态变更方法。 枚举值
|
|
param |
Param object |
不为空 |
异常设备数据 |
|
字段名 |
类型 |
说明 |
|---|---|---|
|
device_id |
String |
设备ID |
|
device_name |
String |
设备名称 |
|
channel_id |
String |
通道ID |
|
time |
String |
设备告警时间 |
|
video_channel |
VideoChannel object |
设备视频通道信息,数组对象 |
|
onine_time |
Int |
上次在线时长:单位为秒/s |
|
last_login_time |
String |
上次上线时间 |
|
alarm_uuid |
String |
告警UUID:告警唯一标识,当method为设备升级失败/成功时,可通过该字段去查询设备升级失败/成功的详细信息。 |
|
overall_upgrade_status |
String |
设备升级状态 |
|
device_type |
String |
设备类型 |
|
offline_reason_type |
String |
设备离线原因 枚举值:
|
|
qos |
Float64 |
网络质量 |
|
time_delay |
Float64 |
时延 |
|
packet_loss_rate |
Float64 |
丢包率 |
|
push_time |
String |
上报时间 |
|
字段名 |
类型 |
说明 |
|---|---|---|
|
channel_id |
String |
通道ID |
|
channel_name |
String |
通道名称 |
|
channel_state |
Int |
通道状态,0:通道离线,1:通道上线 |
|
channel_ability |
String |
视频通道能力。取值为 [ptz、talk、intelligent、soundlightalarm、algorithm] 中的零或多种,分别代表 [云台,对讲,智能分析,声光警戒,长尾算法] |
|
device_type |
String |
视频通道的设备类型 |
|
manufacture |
String |
通道接入设备的通道厂商 |
|
firmware |
String |
通道接入设备的固件版本 |
|
model |
String |
通道接入设备的型号 |
|
status_list |
Array of UpgradeStatusList objects |
升级状态,如果method不是upgrade_result,该字段为null |
|
alarm_uuid |
String |
告警UUID:告警唯一标识,当method为设备升级失败/成功时,可通过该字段去查询设备升级失败/成功的详细信息 |
|
字段名 |
类型 |
说明 |
|---|---|---|
|
file_type |
Int |
文件类型 枚举值:
|
|
file_name |
String |
文件名称:文件的名称,例如XXXXX.bin文件 |
|
package_name |
String |
升级包名称:该升级文件所属的类型名,该名称与文件类型相对应,例如基础升级包、目标和目标整体检测算法, |
|
status |
String |
升级状态 枚举值:
|
示例一、设备上线
{
"message_id": 1676292308043441909,
"message_type": "device_status",
"data": {
"method": "login",
"param": {
"device_id": "219123456CYP***",
"device_name": "MicroEdge",
"channel_id": "",
"time": "2023-02-13T20:43:47+08:00",
"video_channel": [
{
"channel_id": "7",
"channel_name": "SDC",
"channel_state": 1,
"channel_ability": [
"talk",
"intelligent",
"soundlightalarm",
"sdcardformat",
"alarmsound",
"abilityauth"
],
"device_type": "IPC-CONCH",
"manufacture": "huawei",
"firmware": "SDC 10.0.RC11.SPC100",
"model": "D3250-10-SIU",
"status_list": null,
"alarm_uuid": ""
}
],
"overall_upgrade_status": "",
"device_type": "MEdge",
"offline_reason_type": "",
"qos": 0,
"time_delay": 0,
"packet_loss_rate": 0,
"push_time": "2023-02-13 20:45:07"
}
},
"test": false
}
示例二、设备离线
{
"message_id": 1676293195851991937,
"message_type": "device_status",
"data": {
"method": "logout",
"param": {
"device_id": "021123456MKR***",
"device_name": "HoloSens SDC",
"channel_id": "",
"time": "2023-02-13T20:59:55+08:00",
"video_channel": null,
"online_time": 1077,
"last_login_time": "2023-02-13 20:41:58",
"alarm_uuid": "021RMK2202091846_device_offline_2023-02-13T20:59:55+08:00",
"overall_upgrade_status": "",
"device_type": "IPC-BOX",
"offline_reason_type": "TMOUT",
"qos": 0,
"time_delay": 0,
"packet_loss_rate": 0,
"push_time": "2023-02-13 20:59:55"
}
},
"test": false
}
示例三、设备通道离线
{
"message_id": 1676294530831471492,
"message_type": "device_status",
"data": {
"method": "channel_state_notice",
"param": {
"device_id": "219123456CYP***",
"device_name": "FX_3.2.9.9_B016",
"channel_id": "",
"time": "2023-02-13T21:17:09+08:00",
"video_channel": [
{
"channel_id": "14",
"channel_name": "${time@sys: YYYY-MM-DD}",
"channel_state": 0,
"channel_ability": [],
"device_type": "IPC-BOX",
"manufacture": "huawei",
"firmware": "SDC 8.0.T2002",
"model": "M2120-10-EI",
"status_list": null,
"alarm_uuid": "219123456CYP***_14_channel_offline_2023-02-13T21:17:09+08:00"
}
],
"overall_upgrade_status": "",
"device_type": "",
"offline_reason_type": "",
"qos": 0,
"time_delay": 0,
"packet_loss_rate": 0,
"push_time": "2023-02-13 21:22:07"
}
},
"test": false
}