package lc import ( "fmt" "lc-smartX/bx" "net" ) // Screener 屏接口 type Screener interface { Display(int) } type Screen struct { Name string Addr string conn net.Conn liveState bool StateInfo *bx.StateInfo //状态信息 Params *bx.Params //屏参 } func NewScreen(name string, ip, port string) *Screen { s := &Screen{ Name: name, Addr: fmt.Sprintf("%s:%s", ip, port), StateInfo: &bx.StateInfo{}, Params: &bx.Params{}, } s.Reconnect() return s } func (s *Screen) Display(id int) { SwitchProgram(id) } // Correct 校正时间 func (s *Screen) Correct() { } // Reconnect 重连 func (s *Screen) Reconnect() { }