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

57 lines
2.6 KiB
Go
Raw Normal View History

2020-12-20 15:08:43 +08:00
package iot
const (
MessageDownTopic string = "$oc/devices/{device_id}/sys/messages/down"
MessageDownTopicName string = "messageDownTopicName"
MessageUpTopic string = "$oc/devices/{device_id}/sys/messages/up"
MessageUpTopicName string = "messageUpTopicName"
CommandDownTopicName string = "commandDownTopicName"
CommandDownTopic string = "$oc/devices/{device_id}/sys/commands/#"
CommandResponseTopicName string = "commandResponseTopicName"
CommandResponseTopic string = "$oc/devices/{device_id}/sys/commands/response/request_id="
2020-12-19 02:32:34 +08:00
PropertiesUpTopicName string = "propertiesUpTopicName"
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
//平台设置设备属性相关Topic
2020-12-19 23:09:58 +08:00
PropertiesSetRequestTopicName string = "propertiesSetRequestTopicName"
PropertiesSetRequestTopic string = "$oc/devices/{device_id}/sys/properties/set/#"
2020-12-19 22:20:38 +08:00
PropertiesSetResponseTopicName string = "propertiesSetResponseTopicName"
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
PropertiesQueryRequestTopicName string = "propertiesQueryRequestTopicName"
PropertiesQueryRequestTopic string = "$oc/devices/{device_id}/sys/properties/get/#"
2020-12-19 23:09:58 +08:00
PropertiesQueryResponseTopicName string = "propertiesQueryResponseTopicName"
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
DeviceShadowQueryRequestTopicName string = "deviceShadowQueryRequestTopicName"
DeviceShadowQueryRequestTopic string = "$oc/devices/{device_id}/sys/shadow/get/request_id="
2020-12-20 00:14:13 +08:00
DeviceShadowQueryResponseTopicName string = "deviceShadowQueryResponseTopicName"
2020-12-22 23:35:42 +08:00
DeviceShadowQueryResponseTopic string = "$oc/devices/{device_id}/sys/shadow/get/response/#"
// 网关批量上报子设备属性
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-23 23:08:35 +08:00
FileRequestTopicName string = "fileUploadRequestTopicName"
FileRequestTopic string = "$oc/devices/{device_id}/sys/events/up"
2020-12-23 08:15:56 +08:00
// 平台下发文件上传和下载URL
2020-12-23 23:08:35 +08:00
FileResponseTopicName string = "FileUploadResultTopic"
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"
)