summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pira32ctl/command.go67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/pira32ctl/command.go b/src/pira32ctl/command.go
new file mode 100644
index 0000000..ad399c8
--- /dev/null
+++ b/src/pira32ctl/command.go
@@ -0,0 +1,67 @@
+//
+// pira32ctl
+//
+// Copyright (C) 2016 Christian Pointner <equinox@helsinki.at>
+//
+// This file is part of pira32ctl.
+//
+// pira32ctl is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// any later version.
+//
+// pira32ctl is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with pira32ctl. If not, see <http://www.gnu.org/licenses/>.
+//
+
+package main
+
+import (
+ "time"
+)
+
+const (
+ REQ_PERSISTANT = '*'
+
+ RESP_OK = '+'
+ RESP_UNKNOWN_CMD = '!'
+ RESP_INVALID_ARG = '-'
+ RESP_PARTIAL = '/'
+)
+
+type command struct {
+ code string
+ description string
+ exec_time time.Duration
+ get bool
+ assign bool
+ store bool
+ assignStore bool
+}
+
+var (
+ CMD_AF = command{"AF", "Alternative Frequencies", 0, true, true, true, true}
+ CMD_AFCH = command{"AFCH", "Alternative Frequencies Channels", 0, true, true, true, false}
+ CMD_DI = command{"DI", "Decoder Identification", 0, true, true, true, false}
+ CMD_DPS1 = command{"DPS1", "Dynamic PS1", 400 * time.Millisecond, true, true, true, false}
+ CMD_DPS1ENQ = command{"DPS1ENQ", "Dynamic PS1 Enqueue", 400 * time.Millisecond, false, true, false, false}
+ CMD_DPS2 = command{"DPS2", "Dynamic PS2", 400 * time.Millisecond, true, true, true, false}
+ CMD_DPS1MOD = command{"DPS1MOD", "Dynamic PS1 Mode", 400 * time.Millisecond, true, true, true, false}
+ CMD_DPS2MOD = command{"DPS2MOD", "Dynamic PS2 Mode", 400 * time.Millisecond, true, true, true, false}
+ CMD_DPS1REP = command{"DPS1REP", "Dynamic PS2 Number of Repeating", 400 * time.Millisecond, true, true, true, false}
+ CMD_DPS2REP = command{"DPS2REP", "Dynamic PS2 Number of Repeating", 400 * time.Millisecond, true, true, true, false}
+ CMD_DTTMOUT = command{"DTTMOUT", "Default Text Timeout", 0, true, true, true, false}
+ CMD_EQTEXT1 = command{"EQTEXT1", "Equal Text 1", 0, true, true, true, false}
+ CMD_LABPER = command{"LABPER", "Label Period", 0, true, true, true, false}
+ CMD_MS = command{"MS", "Music/Speech", 0, true, true, true, false}
+ CMD_PI = command{"PI", "Program Identifaction", 0, true, true, true, false}
+ CMD_PS = command{"PS", "Program Service name", 0, true, true, true, false}
+ CMD_PTY = command{"PTY", "Program Type number", 0, true, true, true, false}
+ CMD_PTYN = command{"PTYN", "Program Type Name", 0, true, true, true, false}
+ CMD_PTYNEN = command{"PTYNEN", "PTYN Enable", 0, true, true, true, false}
+)