huaweicloud-iot-device-sdk-go/constants.go

55 lines
2.0 KiB
Go
Raw Normal View History

2020-12-20 15:08:43 +08:00
package iot
2020-12-26 20:29:09 +08:00
const (
2020-12-26 20:43:33 +08:00
// 平台下发消息topic
MessageDownTopic string = "$oc/devices/{device_id}/sys/messages/down"
2020-12-26 20:43:33 +08:00
// 设备上报消息topic
MessageUpTopic string = "$oc/devices/{device_id}/sys/messages/up"
2020-12-26 20:29:09 +08:00
// 平台下发命令topic
CommandDownTopic string = "$oc/devices/{device_id}/sys/commands/#"
2020-12-26 20:43:33 +08:00
// 设备响应平台命令
CommandResponseTopic string = "$oc/devices/{device_id}/sys/commands/response/request_id="
2020-12-19 02:32:34 +08:00
2020-12-26 20:43:33 +08:00
// 设备上报属性
2020-12-19 23:09:58 +08:00
PropertiesUpTopic string = "$oc/devices/{device_id}/sys/properties/report"
2020-12-19 22:20:38 +08:00
2020-12-26 20:43:33 +08:00
//平台设置属性topic
2020-12-19 23:09:58 +08:00
PropertiesSetRequestTopic string = "$oc/devices/{device_id}/sys/properties/set/#"
2020-12-26 20:43:33 +08:00
// 设备响应平台属性设置topic
2020-12-19 23:09:58 +08:00
PropertiesSetResponseTopic string = "$oc/devices/{device_id}/sys/properties/set/response/request_id="
// 平台查询设备属性
2020-12-22 23:35:42 +08:00
PropertiesQueryRequestTopic string = "$oc/devices/{device_id}/sys/properties/get/#"
2020-12-26 20:58:03 +08:00
// 设备响应平台属性查询
2020-12-19 23:09:58 +08:00
PropertiesQueryResponseTopic string = "$oc/devices/{device_id}/sys/properties/get/response/request_id="
2020-12-20 00:14:13 +08:00
// 设备侧获取平台的设备影子数据
2020-12-22 23:35:42 +08:00
DeviceShadowQueryRequestTopic string = "$oc/devices/{device_id}/sys/shadow/get/request_id="
2020-12-26 20:58:03 +08:00
// 设备侧响应获取平台设备影子
2020-12-22 23:35:42 +08:00
DeviceShadowQueryResponseTopic string = "$oc/devices/{device_id}/sys/shadow/get/response/#"
// 网关批量上报子设备属性
2020-12-26 20:58:03 +08:00
//GatewayBatchReportSubDeviceTopicName string = "gatewayBatchReportSubDeviceTopicName"
2020-12-22 23:35:42 +08:00
GatewayBatchReportSubDeviceTopic string = "$oc/devices/{device_id}/sys/gateway/sub_devices/properties/report"
2020-12-23 08:15:56 +08:00
// 平台下发文件上传和下载URL
2020-12-26 20:58:03 +08:00
//FileResponseTopicName string = "FileUploadResultTopic"
2020-12-23 23:08:35 +08:00
2020-12-24 23:31:16 +08:00
FileActionUpload string = "upload"
FileActionDownload string = "download"
// 设备或网关向平台发送请求
DeviceToPlatformTopic string = "$oc/devices/{device_id}/sys/events/up"
2020-12-25 23:59:35 +08:00
// 平台向设备下发事件topic
PlatformEventToDeviceTopic string = "$oc/devices/{device_id}/sys/events/down"
)