Documentation ¶
Index ¶
- Constants
- func TransformToProtoMsg(deviceId string, t int, data interface{}, baseMsg BaseMessage) (*thingmodel.ThingModelMsg, error)
- type BaseMessage
- type CloudPluginNotifyType
- type CloudServiceInfo
- type CloudServiceStatus
- type DeviceConnectStatus
- type DeviceNotifyType
- type DeviceStatus
- type IotPlatform
- type MsgAckChan
- type ProductNetType
- type ProductNodeType
- type ProductNotifyType
Constants ¶
View Source
const ( PropertyReport = iota + 1 PropertySetResponse PropertyGetResponse ServiceExecuteResponse EventReport BatchReport LogReport PropertyDesiredGet PropertyDesiredDelete )
Variables ¶
This section is empty.
Functions ¶
func TransformToProtoMsg ¶
func TransformToProtoMsg(deviceId string, t int, data interface{}, baseMsg BaseMessage) (*thingmodel.ThingModelMsg, error)
Types ¶
type BaseMessage ¶
type BaseMessage struct { UsePlatform bool CloudServiceInfo *CloudServiceInfo DriverInstanceId string }
func (BaseMessage) BuildBaseRequest ¶
func (c BaseMessage) BuildBaseRequest() *drivercommon.BaseRequestMessage
func (BaseMessage) UseCloudPlatform ¶
func (c BaseMessage) UseCloudPlatform() bool
type CloudPluginNotifyType ¶
type CloudPluginNotifyType string
const ( CloudPluginStartNotify CloudPluginNotifyType = "start" CloudPluginStopNotify CloudPluginNotifyType = "stop" )
type CloudServiceInfo ¶
type CloudServiceInfo struct { CloudInstanceId string Address string CloudInstanceName string Status CloudServiceStatus Platform IotPlatform }
type CloudServiceStatus ¶
type CloudServiceStatus string
const ( Start CloudServiceStatus = "start" Stop CloudServiceStatus = "stop" )
func (CloudServiceStatus) TransformToRpcCloudInstanceStatus ¶
func (i CloudServiceStatus) TransformToRpcCloudInstanceStatus() cloudinstance.CloudInstanceStatus
type DeviceConnectStatus ¶
type DeviceConnectStatus string
const ( Online DeviceConnectStatus = "online" //在线 Offline DeviceConnectStatus = "offline" //离线 )
type DeviceNotifyType ¶
type DeviceNotifyType string
const ( DeviceAddNotify DeviceNotifyType = "add" DeviceUpdateNotify DeviceNotifyType = "update" DeviceDeleteNotify DeviceNotifyType = "delete" )
type DeviceStatus ¶
type DeviceStatus string
const ( DeviceUnKnow DeviceStatus = "unknow" DeviceOnline DeviceStatus = "online" //在线 DeviceOffline DeviceStatus = "offline" //离线 DeviceUnActive DeviceStatus = "unactive" //未激活 DeviceDisable DeviceStatus = "disable" //禁用 )
func TransformRpcDeviceStatusToModel ¶
func TransformRpcDeviceStatusToModel(deviceStatus driverdevice.DeviceStatus) DeviceStatus
type IotPlatform ¶
type IotPlatform string
const ( HummingbirdIot IotPlatform = "蜂鸟物联网平台" //蜂鸟平台 WinCLinkIot IotPlatform = "赢创物联网平台" //赢创万联 AliIot IotPlatform = "阿里物联网平台" //阿里 HuaweiIot IotPlatform = "华为物联网平台" //华为 TencentIot IotPlatform = "腾讯物联网平台" //腾讯 OneNetIot IotPlatform = "OneNET物联网平台" //中国移动 )
func TransformRpcPlatformToModel ¶
func TransformRpcPlatformToModel(p drivercommon.IotPlatform) IotPlatform
func (IotPlatform) TransformModelToRpcPlatform ¶
func (i IotPlatform) TransformModelToRpcPlatform() drivercommon.IotPlatform
type MsgAckChan ¶
func (*MsgAckChan) TryCloseChan ¶
func (mac *MsgAckChan) TryCloseChan()
func (*MsgAckChan) TrySendDataAndCloseChan ¶
func (mac *MsgAckChan) TrySendDataAndCloseChan(data interface{}) bool
type ProductNetType ¶
type ProductNetType string
const ( NetTypeOther ProductNetType = "other" NetTypeCellular ProductNetType = "cellular" NetTypeWifi ProductNetType = "wifi" NetTypeEthernet ProductNetType = "ethernet" NetTypeNB ProductNetType = "nb" )
func TransformRpcNetTypeToModel ¶
func TransformRpcNetTypeToModel(netType driverproduct.ProductNetType) ProductNetType
type ProductNodeType ¶
type ProductNodeType string
const ( NodeTypeUnKnow ProductNodeType = "unKnow" NodeTypeGateway ProductNodeType = "gateway" NodeTypeDevice ProductNodeType = "device" NodeTypeSubDevice ProductNodeType = "subDevice" )
func TransformRpcNodeTypeToModel ¶
func TransformRpcNodeTypeToModel(nodeType driverproduct.ProductNodeType) ProductNodeType
type ProductNotifyType ¶
type ProductNotifyType string
const ( ProductAddNotify ProductNotifyType = "add" ProductUpdateNotify ProductNotifyType = "update" ProductDeleteNotify ProductNotifyType = "delete" )
Click to show internal directories.
Click to hide internal directories.