deviceMsgEvent

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: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDmDevicesBind added in v0.5.1

func ToDmDevicesBind(devices []*msgGateway.Device) (ret []*dm.DeviceGatewayBindDevice, err error)

func ToDmDevicesCore added in v0.3.0

func ToDmDevicesCore(devices []*msgGateway.Device) (ret []*dm.DeviceCore)

func ToDmDevicesInfoReq added in v0.5.1

func ToDmDevicesInfoReq(diDeviceBasicInfoDo *msgThing.DeviceBasicInfo) (dmDeviceInfoReq *dm.DeviceInfo)

func ToParamValue added in v0.4.1

func ToParamValue(p msgThing.Param) (application.ParamValue, error)

func ToParamValues added in v0.4.1

func ToParamValues(tp map[string]msgThing.Param) (map[string]application.ParamValue, error)

Types

type ConfigLogic

type ConfigLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewConfigLogic

func NewConfigLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ConfigLogic

func (*ConfigLogic) Handle

func (l *ConfigLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

type ConnectedLogic

type ConnectedLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewConnectedLogic

func NewConnectedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ConnectedLogic

func (*ConnectedLogic) Handle

func (l *ConnectedLogic) Handle(msg *deviceStatus.ConnectMsg) error

type DeviceMsgHandle

type DeviceMsgHandle struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewDeviceMsgHandle

func NewDeviceMsgHandle(ctx context.Context, svcCtx *svc.ServiceContext) *DeviceMsgHandle

func (*DeviceMsgHandle) Config

func (l *DeviceMsgHandle) Config(msg *deviceMsg.PublishMsg) error

func (*DeviceMsgHandle) Connected

func (l *DeviceMsgHandle) Connected(msg *deviceStatus.ConnectMsg) error

func (*DeviceMsgHandle) Disconnected

func (l *DeviceMsgHandle) Disconnected(msg *deviceStatus.ConnectMsg) error

func (*DeviceMsgHandle) Ext added in v0.5.1

func (*DeviceMsgHandle) Gateway added in v0.3.0

func (l *DeviceMsgHandle) Gateway(msg *deviceMsg.PublishMsg) error

func (*DeviceMsgHandle) Ota

func (*DeviceMsgHandle) SDKLog

func (l *DeviceMsgHandle) SDKLog(msg *deviceMsg.PublishMsg) error

func (*DeviceMsgHandle) Shadow

func (l *DeviceMsgHandle) Shadow(msg *deviceMsg.PublishMsg) error

func (*DeviceMsgHandle) Thing

func (l *DeviceMsgHandle) Thing(msg *deviceMsg.PublishMsg) error

type DisconnectedLogic

type DisconnectedLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewDisconnectedLogic

func NewDisconnectedLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DisconnectedLogic

func (*DisconnectedLogic) Handle

type ExtLogic added in v0.5.1

type ExtLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewExtLogic added in v0.5.1

func NewExtLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ExtLogic

func (*ExtLogic) DeviceResp added in v0.5.1

func (l *ExtLogic) DeviceResp(msg *deviceMsg.PublishMsg, err error, data any) *deviceMsg.PublishMsg

func (*ExtLogic) Handle added in v0.5.1

func (l *ExtLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

Handle for topics.DeviceUpExtAll

func (*ExtLogic) HandleGetNtpReply added in v0.5.1

func (l *ExtLogic) HandleGetNtpReply(msg *deviceMsg.PublishMsg, req msgExt.Req) (respMsg *deviceMsg.PublishMsg, err error)

ntp时间返回

func (*ExtLogic) HandleNtp added in v0.5.1

func (l *ExtLogic) HandleNtp(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

ntp请求处理

type GatewayLogic added in v0.3.0

type GatewayLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGatewayLogic added in v0.3.0

func NewGatewayLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GatewayLogic

func (*GatewayLogic) Handle added in v0.3.0

func (l *GatewayLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

func (*GatewayLogic) HandleOperation added in v0.3.0

func (l *GatewayLogic) HandleOperation(msg *deviceMsg.PublishMsg) (respMsg *msgGateway.Msg, err error)

func (*GatewayLogic) HandleRegister added in v0.5.1

func (l *GatewayLogic) HandleRegister(msg *deviceMsg.PublishMsg, resp *msgGateway.Msg) (respMsg *msgGateway.Msg, err error)

func (*GatewayLogic) HandleStatus added in v0.3.0

func (l *GatewayLogic) HandleStatus(msg *deviceMsg.PublishMsg) (respMsg *msgGateway.Msg, err error)

type OtaLogic

type OtaLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewOtaLogic

func NewOtaLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OtaLogic

func (*OtaLogic) Handle

func (l *OtaLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

type SDKLogLogic

type SDKLogLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewSDKLogLogic

func NewSDKLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SDKLogLogic

func (*SDKLogLogic) DeviceResp

func (l *SDKLogLogic) DeviceResp(msg *deviceMsg.PublishMsg, err error, data any) *deviceMsg.PublishMsg

func (*SDKLogLogic) GetLogLevel

func (l *SDKLogLogic) GetLogLevel(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

获取当前日志等级

func (*SDKLogLogic) Handle

func (l *SDKLogLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

func (*SDKLogLogic) ReportLogContent

func (l *SDKLogLogic) ReportLogContent(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

获取设备上传的调试日志内容

type ShadowLogic

type ShadowLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewShadowLogic

func NewShadowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShadowLogic

func (*ShadowLogic) Handle

func (l *ShadowLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

type ThingLogic

type ThingLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewThingLogic

func NewThingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ThingLogic

func (*ThingLogic) DeviceResp

func (l *ThingLogic) DeviceResp(msg *deviceMsg.PublishMsg, err error, data any) *deviceMsg.PublishMsg

func (*ThingLogic) Handle

func (l *ThingLogic) Handle(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

Handle for topics.DeviceUpThingAll

func (*ThingLogic) HandleAction added in v0.6.0

func (l *ThingLogic) HandleAction(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

func (*ThingLogic) HandleControl added in v0.6.0

func (l *ThingLogic) HandleControl(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

func (*ThingLogic) HandleEvent

func (l *ThingLogic) HandleEvent(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

func (*ThingLogic) HandleProperty

func (l *ThingLogic) HandleProperty(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

属性上报

func (*ThingLogic) HandlePropertyGetStatus

func (l *ThingLogic) HandlePropertyGetStatus(msg *deviceMsg.PublishMsg) (respMsg *deviceMsg.PublishMsg, err error)

设备请求获取 云端记录的最新设备信息

func (*ThingLogic) HandlePropertyReport

func (l *ThingLogic) HandlePropertyReport(msg *deviceMsg.PublishMsg, req msgThing.Req) (respMsg *deviceMsg.PublishMsg, err error)

设备属性上报

func (*ThingLogic) HandlePropertyReportInfo added in v0.5.1

func (l *ThingLogic) HandlePropertyReportInfo(msg *deviceMsg.PublishMsg, req msgThing.Req) (respMsg *deviceMsg.PublishMsg, err error)

设备基础信息上报

Jump to

Keyboard shortcuts

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