2023年07月19日 04:24
POST   HOST/dvs/updatestatus
描述:
由DVS-Server程序发起,主动往注册的服务(Aplictaion  HOST)推送DVS设备状态,采用http协议,例如 http://192.168.20.x/dvs/updatestatus
调用方向:
DVS-Server--> Aplictaion HOST
Request:
{
   "DeviceId":"1234567",
   "time": "2021-06-04 09:45:10",
   "defence":"on",
   "fiber_length:"40000",
   "interval_time":"5",
   "rain_mode": "on",
   "zone_num": 0
}
| 参数 | 描述 | 备注 | 
|---|---|---|
| DeviceId | 设备ID | 设备ID建议由注册的服务分配 | 
| heartbeat | 上报时间 | 心跳时间 | 
| defence | 是否布防 | on or off | 
| fiber_length | 检测到的光缆长度 | |
| interval_time | 上报间隔秒数 | |
| rain_mode | 风雨模式 | 是否开启风雨模式 on or off | 
| zone_num | 当前DVS-SERVER上设置的防区数量 | 0代表没有设置防区,10代表10个防区 | 
| DVS_MONITORDATA | 上报整个光缆的实时曲线状态 | 1 or 0 | 
Response:
无
调用示例:
curl -g -i -X POST HOST/dvs/updatestatus \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "User-Agent:None" \
  -H "X-Auth-Token: yourtoken" \
  -d '{"DeviceId":"1234567", "defence": "on", "fiber_length": "40000", "heartbeat": "2023-07-19 15:16:34","rain_mode": "on", "zone_num":5, DVS_MONITORDATA:0}'