iotModel

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigGetMessage

type ConfigGetMessage struct {
	ConfigScope string `json:"configScope"`
	GetType     string `json:"getType"`
}

type ConfigSetReplyMessage

type ConfigSetReplyMessage struct {
	Code      int                    `json:"code"`      //int类型,响应码
	Data      map[string]interface{} `json:"data"`      //map类型,响应数据列表,key为数据标识,value为数据值
	Timestamp int64                  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
}

平台接收到配置设置响应

type DeviceAddMessage

type DeviceAddMessage struct {
	Timestamp int64  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
	Desc      string `json:"desc"`      //string类型,描述信息
}

添加设备

type DeviceDeleteMessage

type DeviceDeleteMessage struct {
	Timestamp int64  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
	Desc      string `json:"desc"`      //string类型,描述信息
}

删除设备

type DeviceLog

type DeviceLog struct {
	Ts      *gtime.Time `json:"ts" dc:"时间"`
	Device  string      `json:"device" dc:"设备标识"`
	Type    string      `json:"type" dc:"日志类型"`
	Content string      `json:"content" dc:"日志内容"`
}

DeviceLog 设备日志

type DeviceOfflineMessage

type DeviceOfflineMessage struct {
	Timestamp int64  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
	Desc      string `json:"desc"`      //string类型,描述信息
}

设备下线

type DeviceOnlineMessage

type DeviceOnlineMessage struct {
	Timestamp int64  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
	Desc      string `json:"desc"`      //string类型,描述信息
}

设备上线

type DevicePropertiy

type DevicePropertiy struct {
	Key   string      `json:"key" dc:"属性标识"`
	Name  string      `json:"name" dc:"属性名称"`
	Type  string      `json:"type" dc:"属性值类型"`
	Unit  string      `json:"unit" dc:"属性值单位"`
	Value *gvar.Var   `json:"value" dc:"属性值"`
	List  []*gvar.Var `json:"list" dc:"当天属性值列表"`
}

type DeviceStatusLog

type DeviceStatusLog struct {
	DeviceKey string
	Status    int       //设备状态
	Timestamp time.Time //数据时间
}

DeviceStatusLog 设备状态动态变化日志

type EventReportMessage

type EventReportMessage struct {
	EventId   string                 `json:"eventId"`   //string类型,事件标识
	Events    map[string]interface{} `json:"events"`    //map类型,事件列表,key为事件标识,value为事件值
	Timestamp int64                  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
}

设备事件上报

type PropertyReportMessage

type PropertyReportMessage struct {
	Properties map[string]ReportPropertyNode `json:"properties"` //map类型,属性列表,key为属性标识,value为属性值
}

设备属性上报

type PropertySetMessage

type PropertySetMessage struct {
	Properties map[string]interface{} `json:"properties"` //map类型,属性列表,key为属性标识,value为属性值
	Timestamp  int64                  `json:"timestamp"`  //int64类型,时间戳,单位为毫秒
}

平台设置设备属性

type PropertySetReplyMessage

type PropertySetReplyMessage struct {
	Code      int                    `json:"code"`      //int类型,响应码
	Data      map[string]interface{} `json:"data"`      //map类型,响应数据列表,key为数据标识,value为数据值
	Timestamp int64                  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
}

平台接收到设置设备属性响应

type ReportEventData

type ReportEventData struct {
	Key   string           // 事件标识
	Param ReportEventParam // 事件输出参数
}

上报事件数据

type ReportEventParam

type ReportEventParam struct {
	Value      map[string]any // 事件输出参数
	CreateTime int64          // 上报时间
}

事件输出参数

type ReportPropertyData

type ReportPropertyData map[string]ReportPropertyNode

上报属性数据

type ReportPropertyNode

type ReportPropertyNode struct {
	Value      any   // 属性值
	CreateTime int64 // 上报时间
}

属性值

type ReportStatusData

type ReportStatusData struct {
	Status     string // 状态:online、offline
	CreateTime int64  // 上下线时间
}

设备上下线状态

type ServiceCallMessage

type ServiceCallMessage struct {
	ServiceId string                 `json:"serviceId"` //string类型,服务标识
	Params    map[string]interface{} `json:"params"`    //map类型,服务参数列表,key为参数标识,value为参数值
	Timestamp int64                  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
}

设备服务调用请求

type ServiceCallReplyMessage

type ServiceCallReplyMessage struct {
	ServiceId string                 `json:"serviceId"` //string类型,服务标识
	Code      int                    `json:"code"`      //int类型,响应码
	Data      map[string]interface{} `json:"data"`      //map类型,响应数据列表,key为数据标识,value为数据值
	Timestamp int64                  `json:"timestamp"` //int64类型,时间戳,单位为毫秒
}

平台接收到设备服务响应

type TsdTableDataInfo

type TsdTableDataInfo struct {
	Filed []string                 `json:"filed"        description:"字段"`
	Info  []map[string]interface{} `json:"info"        description:"数据"`
}

type TsdTableInfo

type TsdTableInfo struct {
	Field  string `json:"field"        description:"字段名"`
	Type   string `json:"type"        description:"类型"`
	Length int    `json:"length"        description:"长度"`
	Note   string `json:"note" description:"note"`
}

type TsdTables

type TsdTables struct {
	TableName  string      `json:"tableName"        description:"表名"`
	DbName     string      `json:"dbName"        description:"数据库名"`
	StableName string      `json:"stableName"        description:"超级表名"`
	CreateTime *gtime.Time `json:"createTime" description:"创建时间"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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