void Socket_SocketConnectionEvent(UXLib.Sockets.SimpleClientSocket socket, Crestron.SimplSharp.CrestronSockets.SocketStatus status)
 {
     if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_CONNECTED)
     {
         Channel.Subscribe(SoundWebChannelParamType.Mute);
     }
 }
示例#2
0
 void Socket_SocketConnectionEvent(SimpleClientSocket socket, Crestron.SimplSharp.CrestronSockets.SocketStatus status)
 {
     if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_CONNECTED)
     {
         pollTimer = new CTimer(PollPower, null, 1000, 10000);
     }
     else if (pollTimer != null)
     {
         pollTimer.Dispose();
     }
 }
示例#3
0
        public static SocketError ToError(this SS ss)
        {
            SocketError err;

            if (dictStatusToError.TryGetValue(ss, out err))
            {
                return(err);
            }

            return(SocketError.SocketError);
        }
示例#4
0
        void Socket_StatusChanged(TCPSocketClient client, Crestron.SimplSharp.CrestronSockets.SocketStatus status)
        {
            if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_CONNECTED)
            {
#if DEBUG
                CrestronConsole.PrintLine("NEC Display Connected");
#endif
                pollTimer = new CTimer(OnPollEvent, null, 1000, 1000);
            }
            else if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_NO_CONNECT && this.pollTimer != null)
            {
#if DEBUG
                CrestronConsole.PrintLine("NEC Display Disconnected");
#endif
                this.pollTimer.Stop();
                this.pollTimer.Dispose();
                this.DeviceCommunicating = false;
            }
        }
示例#5
0
 void Socket_StatusChanged(TCPSocketClient client, Crestron.SimplSharp.CrestronSockets.SocketStatus status)
 {
     if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_CONNECTED)
     {
         CrestronConsole.PrintLine("Soundstructure device Connected on {0}", this.Socket.HostAddress);
         ErrorLog.Notice("Soundstructure device Connected on {0}", this.Socket.HostAddress);
         if (!this.Initialized)
         {
             this.Initialize();
         }
     }
     else if (status == Crestron.SimplSharp.CrestronSockets.SocketStatus.SOCKET_STATUS_NO_CONNECT)
     {
         this.DeviceCommunicating = false;
         this.FusionUpdate();
         if (this.DeviceCommunicatingChanged != null)
         {
             this.DeviceCommunicatingChanged(this, false);
         }
     }
 }