void ComPort_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args) { foreach (byte b in args.SerialData.ToByteArray()) { RxQueue.Enqueue(b); } }
private void ComPortOnSerialDataReceived(IComPortDevice device, ComPortSerialDataEventArgs args) { foreach (var b in args.SerialData.ToByteArray()) { RxQueue.Enqueue(b); } }
void ComPort_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args) { foreach (byte b in args.SerialData.ToByteArray()) { RxQueue.Enqueue(b); } if (!RxHandlerThreadRunning) { CreateRxHandlerThread(); } }
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); } } } }