有线网卡流量信息定时上报
1. 上报消息
1.1 Topic
Topic
/v1/devices/device/datas
消息发送方
网关设备
消息接收方
物联网平台
1.2 上报消息payload
参数说明
字段名
必选/可选
类型
参数描述
devices
必选
DeviceS[]
设备数据。
DeviceS结构体说明
字段名
必选/可选
类型
参数描述
deviceSn
必选
String(256)
设备ESN码,用于唯一标识设备。
services
必选
List<Services>
服务列表。
Services结构体说明
字段名
必选/可选
类型
参数描述
service
必选
String(256)
服务名。EthernetModuleData
mid
必选
string
消息ID,用来匹配请求消息和应答消息,以及消息去重。
data
必选
ObjectNode
服务数据。
dataTime
必选
String(256)
时间格式:采用RFC3339标准,例如:1985-04-12T23:20:50.52Z
Data结构体说明
字段名
必选/可选
类型
参数描述
rxBytes
必选
uint16
接收字节数区间累计值
txBytes
可选
uint16
发送字节数区间累计值
rxPackets
必选
uint16
接收包数区间累计值
txPackets
必选
uint16
接收包数区间累计值
iface
必选
string
网卡名
请求示例
{
"devices": [{
"deviceSn": "D68NZxB4",
"services": [{
"mid":"mymessageid",
"data": {
"rxBytes": 12714412,
"txBytes": 192826078,
"rxPackets": 55,
"txPackets": 70,
"iface": "eth0",
},
"dataTime": "2019-10-23T17:36:25Z",
"service": "EthernetModuleData"
}]
}]
}
最后更新于