deviceMsgEvent

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDmDevicesCore added in v0.3.0

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

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) 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 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) 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)

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) (respMsg *deviceMsg.PublishMsg, err error)

func (*ThingLogic) HandleResp

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

Jump to

Keyboard shortcuts

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