跳到主要内容

Device Management

Device Topology Update​

Topic: sys/product/{gateway_sn}/status

Direction: up

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
domainNamespace of the gateway devicestringDevice domain identifier
typeProduct type of the gatewayintDevice type enumeration value
sub_typeSub-type of the gateway deviceintDevice subtype enumeration value
device_secretGateway device secrettextDevice secret key
noncenoncetextRandom nonce for authentication
thing_versionModel version of the gatewaytextThing model version
sub_devicesList of sub-devicesarray{"size": 1, "item_type": struct}Sub-device list
»snSerial number of the sub-device (SN)textSub-device serial number
»domainNamespace of the sub-devicestringSub-device domain identifier
»typeProduct type of the sub-deviceintSub-device type enumeration value
»sub_typeSub-type of the sub-deviceintSub-device subtype enumeration value
»indexChannel index connecting the gatewaystringSub-device index
»device_secretSecret of the sub-devicetextSub-device secret key
»noncenoncetextSub-device nonce
»thing_versionModel version of the sub-devicetextSub-device thing model version

Example:


//sub_devices online
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": "3",
"type": 119,
"sub_type": 0,
"device_secret": "secret",
"nonce": "nonce",
"thing_version": "1.1.2",
"sub_devices": [
{
"sn": "drone001",
"domain": "0",
"type": 60,
"sub_type": 0,
"index": "A",
"device_secret": "secret",
"nonce": "nonce",
"thing_version": "1.1.2"
}
]
}
}

//sub_devices offline
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": "3",
"type": 119,
"sub_type": 0,
"device_secret":"secret",
"nonce":"nonce",
"thing_version": "1.1.2",
"sub_devices":[]
}
}