get-status 接口

实时获取设备的工作状态,主要有直播状态、固件升级状态等。

请求方式

GET http://ip/usapi?method=get-status
参数 说明
method 方法名称:get-status

返回数据

JSON 结构如下:

{
  "result": 0,                     // 返回状态
  "cur-status": 64,                // 设备运行状态掩码
  "cur-time": "2021-01-11 ...",    // 设备当前时间
  "box-name": "",                  // 设备名称
  "input-source": 1,               // 输入信号源              
  "input-device": 1,               // 输入设备
  "cpu-temperature": 61100, 
  "enable-ndi-hx3": 0,
  "codec": {                       // 编码器状态
    "main-stream": {},
    "sub-stream": {},
    "audio": {}
  },
  "sysstat": {},                   // 设备运行状态
  "live-status": {                 // 直播状态
    "live": []
  },
  "upgrade-status": {},            // 固件升级过程状态
  "rec-status": {                  // 录制状态
    "rec": []
  },
  "format-status": {},             // 磁盘格式化过程状态
  "disk-test": {},                 // 磁盘性能测试过程状态
  "nas": {},                       // 网络存储连接过程状态
  "living-test": {},               // 直播推流测试过程状态
  "check-upgrade": {},             // 固件在线检测过程状态
  "conn-wifi": {},                 // 无线网络连接过程状态
  "send-file-test: {},             // 文件上传测试过程状态
  "send-file": {},                 // 文件上传过程状态
  "input-signal": {},              // 输入信号信息
  "disk-info": {},                 // 磁盘信息       
  "wifi": {},                      // 无线网信息
  "softap": {},                    // AP 网络信息
  "eth": {},                       // 以太网信息
  "mobile": {},                    // 移动网络信息
  "rndis": {},                     // USB 网络信息 
  "upgrade": {},                   // 新版本固件信息
  "channel-count": 2,
  "vumeters": [
    33,
    32
    ]
}
返回状态
"result": 0
设备运行状态掩码
"cur-status": 65552

设备当前运行的各种状态,通过不同掩码值表示,各个状态对应的掩码值请参考 设备状态掩码。采用以下计算方式来判断:

1、通设备状态掩码表可知,正在进行固件升级的值为:statusUpgrade = 0x4000

2、如果 cur-status & statusUpgrade = statusUpgrade,则说明设备正处于固件升级的状态中

输入信号状态
"input-signal": {
  "status": 0,
  "cx": 0,
  "cy": 0,
  "interlaced": 0,
  "frame-rate": 0.00,
  "channel-valid": 0,
  "is-lpcm": 0,
  "bits-per-sample": 0,
  "sample-rate": 0,
  "hdmi": {
    "status": 0,
    "cx": 0,
    "cy": 0,
    "interlaced": 0,
    "interlaced-scale": 1,
    "frame-rate": 0.00,
    "channel-valid": 0,
    "is-lpcm": 0,
    "bits-per-sample": 0,
    "sample-rate": 0 
  },
  "sdi": {
    "status": 0,
    "cx": 0,
    "cy": 0,
    "interlaced": 0,
    "interlaced-scale": 1,
    "frame-rate": 0.00,
    "channel-valid": 0,
    "is-lpcm": 0,
    "bits-per-sample": 0,
    "sample-rate": 0
  }
}
直播状态
"live-status": {
  [
    {
      "id": 0,
      "type": 130,
      "is-use": 1,
      "is-skd-runnung": 0,
      "name": "NDI HX",
      "run-ms": 231465213,
      "result": 22,
      "main-inst-bps": 993141,
      "sub-inst-bps": 103444,
    }
  ]
}
直播推流测试过程状态
"living-test": {
  "upload-bps": 0,
  "percent": 0,
  "result": 27,
  "net": 0,
  "client-id": ""
}
录制状态
"rec-status": {
  "rec": [
    {
      "id": 1,
      "type": 1,
      "is-use": 1,
      "is-skd-runnung": 0,
      "result": 2,
      "run-ms": 1700,
      "parted-num": 1,
      "video-frame-count": 70,
      "audio-frame-count": 54
    }
  ]
}
磁盘格式化过程状态
"format-status": {
  "type": 0,
  "percent": 0,
  "result": 27,
  "client-id": ""
}
磁盘测试过程状态
"disk-test": {
  "type": 0,
  "read-bps": 0,
  "write-bps": 0,
  "percent": 0,
  "result": 27,
  "client-id": ""
}
网络存储连接过程状态
"nas": [
  {
    "id": 0,
    "type": 2,
    "result": 22
  }
]
文件上传测试过程状态
"send-file-test": {
  "result": 0,
  "client-id": "",
  "id": 0
}
文件上传过程状态
"send-file": {
  "total-count-ongoing": 1,
  "total-count-done": 0,
  "disk-type": 0,
  "name": "",
  "result": -17,
  "message": "",
  "left-time": 0,
  "percent": 0
}
在线固件检测过程状态
"check-upgrade": {
  "result": 0,
  "client-id": ""
}
新版本固件信息
"upgrade": {
  "ver": "",
  "date": "",
  "size-byte": 0,
  "info": []
}
固件升级过程状态
"upgrade-status": {
  "step": 0,
  "percent": 0,
  "result": 27,
  "client-id": "",
  "mode": "none"
}
无线网信息
"wifi": {
  "name": "MWL1",
  "level": 0,
  "ip": "192.168.8.249",
  "mask": "255.255.255.0",
  "router": "192.168.8.1",
  "dns": "192.168.8.1"
}
以太网信息
"eth": {
  "ip": "10.10.107.212",
  "mask": "255.255.0.0",
  "router": "10.10.0.1",
  "dns": "10.0.0.3"
}
移动网络信息
"mobile": {
  "ip": "",
  "mask": "",
  "router": "",
  "dns": ""
}

与“”相关结果约

    找不到与“”相关的结果

    与“”相关结果约

      找不到与“”相关的结果