27 lines
543 B
Go
27 lines
543 B
Go
package cp3000
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// Command is a CP3000 command
|
|
type Command string
|
|
|
|
// nolint: golint
|
|
const (
|
|
CommandStatus Command = "STAT"
|
|
CommandUpdate Command = "UPDT"
|
|
CommandGateway Command = "GW"
|
|
CommandExit Command = "EXIT"
|
|
CommandSync Command = "SYNC"
|
|
CommandWatchdog Command = "WD"
|
|
CommandStore Command = "STOR"
|
|
CommandRetrieve Command = "RETR"
|
|
CommandLogin Command = "ZKL"
|
|
CommandSendSMS Command = "SENDSMS"
|
|
)
|
|
|
|
func replyToCommand(reply uint8) Command {
|
|
return Command(fmt.Sprintf("%02d", reply))
|
|
}
|