Status
Device Topology Update
Topic: sys/product/{gateway_sn}/status
Direction: up
Method: update_topo
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| domain | Namespace of the gateway device | int | Refer to the product support page | |
| type | Product type of the gateway device | int | Refer to the product support page | |
| sub_type | Product subtype of the gateway sub-device | int | Refer to the product support page | |
| device_secret | Device secret of the gateway device | text | Device authentication secret | |
| nonce | Nonce | text | Random number for device authentication anti-replay | |
| version | Model version of the gateway device | text | Thing model protocol version | |
| sub_devices | List of sub-devices | array | {"size": 1, "item_type": struct} | Sub-devices attached to the gateway (e.g., aircraft); empty array indicates sub-device offline |
| »sn | Sub-device serial number (SN) | text | Unique serial number of the sub-device | |
| »domain | Namespace of the sub-device | int | Refer to the product support page | |
| »type | Product type of the sub-device | int | Refer to the product support page | |
| »sub_type | Product subtype of the sub-device | int | Refer to the product support page | |
| »index | Channel index connecting the gateway device | string | Channel identifier for sub-device connection to gateway | |
| »device_secret | Device secret of the sub-device | text | Sub-device authentication secret | |
| »nonce | Nonce | text | Random number for sub-device authentication anti-replay | |
| »version | Model version of the sub-device | text | Sub-device thing model protocol version |
Example:
//sub_devices online
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": 2,
"type": 119,
"sub_type": 0,
"device_secret": "secret",
"nonce": "nonce",
"version": "1",
"sub_devices": [
{
"sn": "drone001",
"domain": 0,
"type": 60,
"sub_type": 0,
"index": "A",
"device_secret": "secret",
"nonce": "nonce",
"version": "1"
}
]
}
}
//sub_devices offline
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": 2,
"type": 119,
"sub_type": 0,
"device_secret":"secret",
"nonce":"nonce",
"version": "1",
"sub_devices":[]
}
}