实现 GeneralDeviceService
This commit is contained in:
@@ -6,15 +6,15 @@ import "git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
|
||||
type DeviceAction string
|
||||
|
||||
var (
|
||||
DeviceActionStart = "start" // 启动
|
||||
DeviceActionStop = "stop" // 停止
|
||||
DeviceActionStart DeviceAction = "start" // 启动
|
||||
DeviceActionStop DeviceAction = "stop" // 停止
|
||||
)
|
||||
|
||||
// 指令类型
|
||||
type Method string
|
||||
|
||||
var (
|
||||
MethodPing = "ping" // ping指令
|
||||
MethodSwitch Method = "switch" // 启停指令
|
||||
)
|
||||
|
||||
// Service 抽象了一组方法用于控制设备行为
|
||||
|
||||
Reference in New Issue
Block a user