void ComPort_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args)
 {
     foreach (byte b in args.SerialData.ToByteArray())
     {
         RxQueue.Enqueue(b);
     }
 }
Example #2
0
 private void ComPortOnSerialDataReceived(IComPortDevice device, ComPortSerialDataEventArgs args)
 {
     foreach (var b in args.SerialData.ToByteArray())
     {
         RxQueue.Enqueue(b);
     }
 }
Example #3
0
        void ComPort_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args)
        {
            foreach (byte b in args.SerialData.ToByteArray())
            {
                RxQueue.Enqueue(b);
            }

            if (!RxHandlerThreadRunning)
            {
                CreateRxHandlerThread();
            }
        }
Example #4
0
        void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
        {
            if (programEventType == eProgramStatusEventType.Stopping)
            {
#if DEBUG
                CrestronConsole.PrintLine("Samsung com port handler - Program Stopping!");
#endif
                programStopping = true;

                if (RxThread != null && RxThread.ThreadState == Thread.eThreadStates.ThreadRunning)
                {
                    if (RxQueue.IsEmpty)
                    {
                        RxQueue.Enqueue(0x00);
                    }
                }
            }
        }