Documentation ¶
Index ¶
- Variables
- func AppendSubFunc(sF func())
- func CheckDeviceAndOrg(message mqtt.Message, resultData interface{}) (b bool)
- func DeletePushWait(mark string)
- func DeleteSearchPushWait(mark string)
- func PushAppUpdate(groupMark, deviceCode string, appMark string, data ToolsAppUpdate.FieldsUpdate) (err error)
- func PushDeviceBind(deviceID int64) (err error)
- func PushDeviceNeedGroup(groupMark string, args ArgsPushDeviceNeedGroup) (err error)
- func PushDeviceNeedInfo(groupMark, deviceCode string, args ArgsPushDeviceNeedInfo) (err error)
- func PushDeviceNeedInfoByID(deviceID int64) error
- func PushDeviceRest(deviceID int64)
- func PushDeviceUpdateOnline(groupMark, deviceCode string) (err error)
- func PushMissionToDevice(args *ArgsPushMissionToDevice) (err error)
- func PushMissionToGroup(args ArgsPushMissionToGroup) (err error)
- func PushOperate(groupMark, deviceCode string, deviceID int64) (err error)
- func PushUpdateData(orgID int64, action string, updateID int64) (err error)
- func PushWait(mark string, topic string, qos byte, data []byte)
- func PushWeather(groupMark, deviceCode string, country int, city int, dataCount int) (err error)
- func Run()
- func SubBefore(keys IOTDevice.ArgsCheckDeviceKey, orgID int64, logAppend interface{}) (deviceID int64, operateData IOTDevice.FieldsOperate, b bool)
- type ArgsPushDeviceNeedGroup
- type ArgsPushDeviceNeedInfo
- type ArgsPushMissionToDevice
- type ArgsPushMissionToGroup
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //MQTTClient mqtt对象 MQTTClient CoreMQTTSimple.MQTTSimple //MQTTIsConnect mqtt初始化和连接标记 MQTTIsConnect = false //OpenBaseMission 是否启动任务广播环节 OpenBaseMission = true )
Functions ¶
func CheckDeviceAndOrg ¶
CheckDeviceAndOrg 组织专用检查程序 * 1. 解析数据 2. 检查设备key是否正确 3. 检查设备授权给组织情况
func DeleteSearchPushWait ¶
func DeleteSearchPushWait(mark string)
func PushAppUpdate ¶
func PushAppUpdate(groupMark, deviceCode string, appMark string, data ToolsAppUpdate.FieldsUpdate) (err error)
PushAppUpdate 推送设备更新数据
func PushDeviceNeedGroup ¶
func PushDeviceNeedGroup(groupMark string, args ArgsPushDeviceNeedGroup) (err error)
PushDeviceNeedGroup 主动更新设备组信息
func PushDeviceNeedInfo ¶
func PushDeviceNeedInfo(groupMark, deviceCode string, args ArgsPushDeviceNeedInfo) (err error)
PushDeviceNeedInfo 主动更新设备信息
func PushDeviceNeedInfoByID ¶
PushDeviceNeedInfoByID 使用设备ID推送设备更新
func PushDeviceUpdateOnline ¶
PushDeviceUpdateOnline 要求设备更新设备在线状态
func PushMissionToDevice ¶
func PushMissionToDevice(args *ArgsPushMissionToDevice) (err error)
PushMissionToDevice 推送新的任务 device/mission
func PushMissionToGroup ¶
func PushMissionToGroup(args ArgsPushMissionToGroup) (err error)
PushMissionToGroup 推送新的任务到分组
func PushOperate ¶
func PushUpdateData ¶
PushUpdateData 全局通知业务层面的更新处理 * 1. 根据组织ID来进行通告 2. 业务设备收到信息后,根据ID或进行业务层面的强制更新数据
func PushWeather ¶
PushWeather 推送给设备天气预报信息
func SubBefore ¶
func SubBefore(keys IOTDevice.ArgsCheckDeviceKey, orgID int64, logAppend interface{}) (deviceID int64, operateData IOTDevice.FieldsOperate, b bool)
SubBefore 检查商户的所有权等一揽子前缀处理
Types ¶
type ArgsPushDeviceNeedGroup ¶
type ArgsPushDeviceNeedGroup struct {
GroupData IOTDevice.FieldsGroup `json:"groupData"`
}
ArgsPushDeviceNeedGroup 主动更新设备组信息参数
type ArgsPushDeviceNeedInfo ¶
type ArgsPushDeviceNeedInfo struct {
DeviceData IOTDevice.FieldsDevice `json:"deviceData"`
}
ArgsPushDeviceNeedInfo 主动更新设备信息参数
type ArgsPushMissionToDevice ¶
type ArgsPushMissionToDevice struct { //设备ID ID int64 `json:"id"` //任务ID MissionID int64 `json:"missionID"` //过期时间 ExpireAt time.Time `json:"expireAt"` //任务动作 Action string `json:"action"` //发送请求数据集合 ParamsData []byte `json:"paramsData"` }
ArgsPushMissionToDevice 推送新的任务参数
type ArgsPushMissionToGroup ¶
type ArgsPushMissionToGroup struct { //设备ID ID int64 `json:"id"` //任务ID MissionID int64 `json:"missionID"` //分组ID GroupID int64 `json:"groupID"` //过期时间 ExpireAt time.Time `json:"expireAt"` //任务动作 Action string `json:"action"` //发送请求数据集合 ParamsData []byte `json:"paramsData"` }
ArgsPushMissionToGroup 推送新的任务到分组参数
Source Files ¶
- auto_send.go
- check_org.go
- core.go
- init_sub.go
- push_app_update.go
- push_auto.go
- push_bind.go
- push_device.go
- push_mission.go
- push_operate.go
- push_update_data.go
- push_wait.go
- push_weather.go
- run.go
- run_connect.go
- run_mission.go
- run_update_data.go
- sub_app_update.go
- sub_bind.go
- sub_device.go
- sub_error.go
- sub_mission.go
- sub_operate.go
- sub_track.go
- sub_weather.go
- v2_push_device.go
- v2_sub_device.go
Click to show internal directories.
Click to hide internal directories.