jl-iot/mqtt/app_protocol.go

29 lines
694 B
Go
Raw Normal View History

2023-12-15 18:08:06 +08:00
package mqtt
import "joylink.club/iot/mqtt/proto"
type IotServiceStateHandler func(state *proto.IotServiceState)
type IotService interface {
PubIotServiceState(state *proto.IotServiceState)
PubIotQdData(qd *proto.IotQd)
SubIotQd()
RegIotQd(h func(qd *proto.IotQd))
PubIotCjData(cj *proto.IotCj)
SubIotCj()
RegIotCj(h func(cj *proto.IotCj))
SubIotReq(cmd *proto.IotServiceReq)
}
type Service interface {
SubIotServiceState()
RegIotServiceState(h func(state *proto.IotServiceState))
PubIotQdData(qd *proto.IotQd)
SubIotQd()
RegIotQd(h func(qd *proto.IotQd))
PubIotCjData(cj *proto.IotCj)
SubIotCj()
RegIotCj(h func(cj *proto.IotCj))
ReqIotService(cmd *proto.IotServiceReq)
}