private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType == SocketStatusEventType.Connected) { Send("VC"); } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType != SocketStatusEventType.Connected) { return; } foreach (var level in _levels.Values) { level.Poll(); } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { switch (eventType) { case SocketStatusEventType.Connected: DeviceCommunicating = true; break; case SocketStatusEventType.Disconnected: DeviceCommunicating = false; break; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType == SocketStatusEventType.Connected) { _pollCount = 0; _pollTimer = new CTimer(PollStep, null, 1000, 1000); DeviceCommunicating = true; } else { _pollTimer.Stop(); _pollTimer.Dispose(); DeviceCommunicating = false; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { switch (eventType) { case SocketStatusEventType.Connected: //Send("scpmode keepalive 10000"); Send("devinfo protocolver"); Send("prmnum"); break; case SocketStatusEventType.Disconnected: break; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType == SocketStatusEventType.Connected) { CrestronConsole.PrintLine("Soundstructure device Connected on {0}", _socket.HostAddress); ErrorLog.Notice("Soundstructure device Connected on {0}", _socket.HostAddress); if (!Initialized) { Initialize(); } } else if (eventType == SocketStatusEventType.Disconnected) { DeviceCommunicating = false; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { switch (eventType) { case SocketStatusEventType.Connected: Send("GET /MANAGEMENT/UID.*"); Send("GET /MEDIA/NAMES/VIDEO.*"); Send("GET /MEDIA/XP/VIDEO.*"); Send("OPEN /MEDIA/NAMES/VIDEO"); Send("OPEN /MEDIA/XP/VIDEO"); break; case SocketStatusEventType.Disconnected: DeviceCommunicating = false; break; } }
private void SocketOnStatusChanged(TCPClientSocketBase client, SocketStatusEventType eventType) { switch (eventType) { case SocketStatusEventType.Connected: _pollTimer = new CTimer(item => PollRecordStatus(), null, 5000, 1000); break; case SocketStatusEventType.Disconnected: if (_pollTimer != null) { _pollTimer.Dispose(); _pollTimer = null; } break; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType == SocketStatusEventType.Connected) { #if DEBUG CrestronConsole.PrintLine("NEC Display Connected"); #endif _pollTimer = new CTimer(OnPollEvent, null, 1000, 1000); } else if (eventType == SocketStatusEventType.Disconnected && _pollTimer != null) { #if DEBUG CrestronConsole.PrintLine("NEC Display Disconnected"); #endif _pollTimer.Stop(); _pollTimer.Dispose(); DeviceCommunicating = false; } }
private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { if (eventType == SocketStatusEventType.Connected) { Debug.WriteSuccess("Display connected", Name); ResetPolling(); } else if (eventType == SocketStatusEventType.Disconnected) { Debug.WriteError("Display disconnected", Name); if (_pollTimer != null && !_pollTimer.Disposed) { _pollTimer.Stop(); _pollTimer.Dispose(); _pollTimer = null; } DeviceCommunicating = false; } }
private void OnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType) { DeviceCommunicating = eventType == SocketStatusEventType.Connected; }