返回JSON格式的结果。该JSON数据的格式如下:
{ /*对象*/ | |||||||||
"Result": 数值 | 200表示OK, 其它错误码含义类似于HTTP Response. | ||||||||
"Status": "字符串" | 状态消息。反馈API执行的结果状态,如有错误,将描述出错的原因。 | ||||||||
"Data": { /*对象*/ | |||||||||
"Device": "字符串" | Ethernet设备名称 (如eth0, usb1, ...) | ||||||||
"Object": "字符串" | Ethernet对象名(注:是DeviceObject) | ||||||||
"State": "字符串" | 当前Ethernet的连接状态,为以下值之一:
| ||||||||
"ConnectionObject": "字符串" | 当前以太网的Connection Object,在setEthernet.lua中需要用到 | ||||||||
"ConnectionUuid": "字符串" | 当前连接的Uuid,在setEthernet.lua中需要用到 | ||||||||
"Carrier": 整数 |
| ||||||||
"Speed": 整数 | 连接速率(10/100/1000,单位Mbps) | ||||||||
"HwAddress": "字符串" | 网络的MAC地址(可能是Clone的Mac地址) | ||||||||
"PermHwAddress": "字符串" | 网络设备的原始Mac地址 | ||||||||
"DHCP": 整数 |
| ||||||||
"IP": "字符串" | 当前获得的IP地址 | ||||||||
"Prefix": "字符串" | 以prefix形式表示的子网掩码(如24表示255.255.255.0, 16表示255.255.0.0) | ||||||||
"Gateway": "字符串" | 默认网关 | ||||||||
"Dns1": "字符串" | DNS1 | ||||||||
"Dns2": "字符串" | DNS2 | ||||||||
} | |||||||||
} |
Device HTTP API, v1.0
Copyright (c) 2016.