实现 GeneralDeviceService

This commit is contained in:
2025-09-16 17:12:27 +08:00
parent 2ac3dcda84
commit c9df4fd6f4
5 changed files with 137 additions and 14 deletions

View File

@@ -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 抽象了一组方法用于控制设备行为