application

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionReport added in v0.6.0

type ActionReport struct {
	Device      devices.Core     `json:"device"`
	ClientToken string           `json:"clientToken,omitempty"` //调用id
	Timestamp   int64            `json:"timestamp,string"`      //毫秒时间戳
	ActionID    string           `json:"actionID,omitempty"`    //数据模板中的行为标识符,由开发者自行根据设备的应用场景定义
	Params      map[string]any   `json:"params,omitempty"`      //参数列表
	Code        int64            `json:"code,omitempty"`
	Status      string           `json:"status,omitempty"`
	Dir         schema.ActionDir `json:"dir"`
	ReqType     string           `json:"reqType"` //req resp
}

属性上报消息体

type ConnectMsg

type ConnectMsg struct {
	Device    devices.Core `json:"device"`
	Timestamp int64        `json:"timestamp,string"` //毫秒时间戳
}

连接和断连消息信息

func (ConnectMsg) GenSerial added in v0.4.1

func (c ConnectMsg) GenSerial() string

type EventReport

type EventReport struct {
	Device     devices.Core          `json:"device"`
	Timestamp  int64                 `json:"timestamp,string"` //毫秒时间戳
	Identifier string                `json:"identifier"`       //标识符
	Type       string                `json:"type" `            //事件类型: 信息:info  告警:alert  故障:fault
	Params     map[string]ParamValue `json:"params" `          //事件参数
}

func (EventReport) GenSerial added in v0.4.1

func (c EventReport) GenSerial() string

type ParamValue added in v0.4.1

type ParamValue struct {
	Value any             `json:"value"` //值
	Type  schema.DataType `json:"type"`  //值的类型
}

func (*ParamValue) UnmarshalJSON added in v0.4.1

func (c *ParamValue) UnmarshalJSON(b []byte) error

type PropertyReport

type PropertyReport struct {
	Device     devices.Core `json:"device"`
	Timestamp  int64        `json:"timestamp,string"` //毫秒时间戳
	Identifier string       `json:"identifier"`       //推送属性的标识符
	Param      ParamValue   `json:"param"`            //推送属性的参数
}

属性上报消息体

func (PropertyReport) GenSerial added in v0.4.1

func (c PropertyReport) GenSerial() string

type StructValue added in v0.4.1

type StructValue map[string]ParamValue

Jump to

Keyboard shortcuts

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