DPF/command.go
2019-11-04 14:29:08 +08:00

27 lines
482 B
Go

package main
import "time"
// Command 命令相关
type Command struct {
commands CommandType
commandTime time.Time
}
// CommandType 命令
type CommandType string
const (
CMDDoNothing = "不做任何操作"
CMDChaoShengBoQingXi = "超声波清洗"
CMDQingXiGuanFangShui = "清洗罐放水"
)
// CreateCommand 生成一个命令
func CreateCommand(cmdtype CommandType) *Command {
c := &Command{}
c.commands = cmdtype
c.commandTime = time.Now()
return c
}