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); } }
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(); } }
public static SocketError ToError(this SS ss) { SocketError err; if (dictStatusToError.TryGetValue(ss, out err)) { return(err); } return(SocketError.SocketError); }
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; } }
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); } } }