IOTMQTTClient

package
v5.1.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PushDeviceFindData

func PushDeviceFindData(args ArgsPushDeviceFindData) (err error)

PushDeviceFindData 分量更新设备数据 device/find

func PushDeviceGroupFindData

func PushDeviceGroupFindData(args ArgsPushDeviceGroupFindData) (err error)

PushDeviceGroupFindData 分量更新设备数据 group/find

func PushDeviceInfoUpdate

func PushDeviceInfoUpdate(args ArgsPushDeviceInfoUpdate) (err error)

PushDeviceInfoUpdate 分量更新设备数据 device/info/update

func PushDeviceInfosUpdate

func PushDeviceInfosUpdate(args ArgsPushDeviceInfosUpdate) (err error)

PushDeviceInfosUpdate 全量更新设备数据 device/infos/update

func PushDeviceMissionResult

func PushDeviceMissionResult(args ArgsPushDeviceMissionResult) (err error)

PushDeviceMissionResult 反馈设备任务结果 device/error

func PushDeviceOnline

func PushDeviceOnline(args ArgsPushDeviceOnline) (err error)

PushDeviceOnline 设备在线情况更正 device/online

func PushError

func PushError(args ArgsPushError) (err error)

PushError 广播错误采集器参数 device/error

func Run

func Run()

func SubBaseGroupInfoUpdate

func SubBaseGroupInfoUpdate(groupMark string, handle SubBaseGroupInfoHandle) (token mqtt.Token, err error)

SubBaseGroupInfoUpdate 服务端下发设备组信息

func SubBaseGroupInfoUpdateCancel

func SubBaseGroupInfoUpdateCancel(groupMark string) (token mqtt.Token, err error)

SubBaseGroupInfoUpdateCancel 取消订阅服务端下发设备组信息

func SubBaseInfoUpdate

func SubBaseInfoUpdate(groupMark, deviceCode string, handle SubBaseInfoNeedHandle) (token mqtt.Token, err error)

SubBaseInfoUpdate 服务端下发最新的设备数据包

func SubBaseInfoUpdateCancel

func SubBaseInfoUpdateCancel(groupMark, deviceCode string) (token mqtt.Token, err error)

SubBaseInfoUpdateCancel 取消订阅服务端下发最新的设备数据包

func SubBaseOnline

func SubBaseOnline(groupMark, deviceCode string, handle SubBaseOnlineHandle) (token mqtt.Token, err error)

SubBaseOnline 服务端要求设备更新设备在线状态

func SubBaseOnlineCancel

func SubBaseOnlineCancel(groupMark, deviceCode string) (token mqtt.Token, err error)

SubBaseOnlineCancel 取消服务端要求设备更新设备在线状态

func SubMissionSendDevice

func SubMissionSendDevice(groupMark, deviceCode string, handle SubMissionSendDeviceHandle) (token mqtt.Token, err error)

SubMissionSendDevice 设备任务消息

func SubMissionSendDeviceCancel

func SubMissionSendDeviceCancel(groupMark, deviceCode string) (token mqtt.Token, err error)

SubMissionSendDeviceCancel 取消设备任务消息

func SubMissionSendGroup

func SubMissionSendGroup(groupMark string, handle SubMissionSendGroupHandle) (token mqtt.Token, err error)

SubMissionSendGroup 设备组消息

func SubMissionSendGroupCancel

func SubMissionSendGroupCancel(groupMark string) (token mqtt.Token, err error)

SubMissionSendGroupCancel 取消订阅设备组消息

Types

type ArgsPushDeviceFindData

type ArgsPushDeviceFindData struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
}

ArgsPushDeviceFindData 分量更新设备数据参数

type ArgsPushDeviceGroupFindData

type ArgsPushDeviceGroupFindData struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
}

ArgsPushDeviceGroupFindData 分量更新设备数据参数

type ArgsPushDeviceInfoUpdate

type ArgsPushDeviceInfoUpdate struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
	//目标设备ID
	DeviceID int64 `json:"deviceID"`
	//数据集合
	Params CoreSQLConfig.FieldsConfigsType `json:"params"`
}

ArgsPushDeviceInfoUpdate 分量更新设备数据参数

type ArgsPushDeviceInfosUpdate

type ArgsPushDeviceInfosUpdate struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
	//目标设备ID
	DeviceID int64 `json:"deviceID"`
	//数据集合
	Params CoreSQLConfig.FieldsConfigsType `json:"params"`
}

ArgsPushDeviceInfosUpdate 全量更新设备数据

type ArgsPushDeviceMissionResult

type ArgsPushDeviceMissionResult struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
	//设备ID
	ID int64 `db:"id" json:"id" check:"id"`
	//任务状态
	// 0 wait 等待发起 / 1 send 已经发送 / 3 failed 已经失败 / 4 cancel 取消
	Status int `db:"status" json:"status" check:"intThan0" empty:"true"`
	//回收数据
	// 回收数据如果过大,将不会被存储到本地
	ReportData []byte `db:"report_data" json:"reportData"`
	//行为标识码
	Mark string `db:"mark" json:"mark" check:"mark"`
	//日志内容
	Content string `db:"content" json:"content" check:"des" min:"1" max:"1000"`
}

ArgsPushDeviceMissionResult 反馈设备任务结果参数

type ArgsPushDeviceOnline

type ArgsPushDeviceOnline struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
	//目标设备ID
	DeviceID int64 `json:"deviceID"`
	//是否在线
	IsOnline bool `json:"isOnline"`
}

ArgsPushDeviceOnline 设备在线情况更正参数

type ArgsPushError

type ArgsPushError struct {
	//配对密钥
	Keys IOTDevice.ArgsCheckDeviceKey `json:"keys"`
	//是否推送了预警信息
	SendEW bool `db:"send_ew" json:"sendEW"`
	//设备ID
	DeviceID int64 `db:"device_id" json:"deviceID"`
	//错误标识码
	Code string `db:"code" json:"code"`
	//日志内容
	Content string `db:"content" json:"content"`
	//扩展参数
	Params CoreSQLConfig.FieldsConfigsType `db:"params" json:"params"`
}

ArgsPushError 广播错误采集器参数

type SubBaseGroupInfoHandle

type SubBaseGroupInfoHandle func(data IOTMQTT.ArgsPushDeviceNeedGroup)

SubBaseGroupInfoHandle 下发设备组信息 group/info[设备组标识码]

type SubBaseInfoNeedHandle

type SubBaseInfoNeedHandle func(data IOTMQTT.ArgsPushDeviceNeedInfo)

SubBaseInfoNeedHandle 下发更新设备信息 device/info/need/group/[设备组标识码]/code/[设备厂商编码]

type SubBaseOnlineHandle

type SubBaseOnlineHandle func()

SubBaseOnlineHandle 设备在线判定 device/online/group/[设备组标识码]/code/[设备厂商编码]

type SubMissionSendDeviceHandle

type SubMissionSendDeviceHandle func(data IOTMQTT.ArgsPushMissionToGroup)

SubMissionSendDeviceHandle 设备消息 device/mission/send/group/[设备组标识码]/code/[设备厂商编码]

type SubMissionSendGroupHandle

type SubMissionSendGroupHandle func(data IOTMQTT.ArgsPushMissionToDevice)

SubMissionSendGroupHandle 设备组消息 device/mission/send/group/[设备组标识码]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL