예제 #1
0
 private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType)
 {
     if (eventType == SocketStatusEventType.Connected)
     {
         Send("VC");
     }
 }
예제 #2
0
        private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType)
        {
            if (eventType != SocketStatusEventType.Connected)
            {
                return;
            }

            foreach (var level in _levels.Values)
            {
                level.Poll();
            }
        }
예제 #3
0
        private void SocketOnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType)
        {
            switch (eventType)
            {
            case SocketStatusEventType.Connected:
                DeviceCommunicating = true;
                break;

            case SocketStatusEventType.Disconnected:
                DeviceCommunicating = false;
                break;
            }
        }
예제 #4
0
 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;
     }
 }
예제 #5
0
        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;
            }
        }
예제 #6
0
 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;
     }
 }
예제 #7
0
        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;
            }
        }
예제 #8
0
        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;
            }
        }
예제 #9
0
        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;
            }
        }
예제 #10
0
        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;
            }
        }
예제 #11
0
 private void OnStatusChanged(TCPClientSocketBase socket, SocketStatusEventType eventType)
 {
     DeviceCommunicating = eventType == SocketStatusEventType.Connected;
 }