summaryrefslogtreecommitdiff
path: root/src/rhctl/playout_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhctl/playout_server.go')
-rw-r--r--src/rhctl/playout_server.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go
index 02533de..c3cfcf1 100644
--- a/src/rhctl/playout_server.go
+++ b/src/rhctl/playout_server.go
@@ -32,32 +32,25 @@ const (
Alive = true
)
-type ServerChannel uint
-
-const (
- Main ServerChannel = iota
- Music
-)
-
type PlayoutServer struct {
name string
control *SerialPort
heartbeat *SerialPort
health ServerHealth
- channel ServerChannel
+ channel string
}
func (srv *PlayoutServer) Run() {
rhdl.Printf("running playout server: %s", srv.name)
- srv.control.tx <- "hello world"
- srv.heartbeat.tx <- "hello world"
+ srv.control.tx <- fmt.Sprintf("hello %s", srv.name)
+ srv.heartbeat.tx <- fmt.Sprintf("beat %s", srv.name)
}
func ServerInit(name string, ctrldev, hbdev string, rate Baudrate) (srv *PlayoutServer, err error) {
srv = &PlayoutServer{}
srv.name = name
srv.health = Dead
- srv.channel = Music
+ srv.channel = "music"
if srv.control, err = SerialOpenAndHandle(ctrldev, rate); err != nil {
err = fmt.Errorf("Error opening control port(%s): %s", srv.name, err)