Exemple #1
0
        /* Public */

        public Controller(SerialPortStream port)
        {
            Buffer                    = new StringBuilder(16);
            TerminalQueue             = new BlockingCollectionQueue();
            DataQueue                 = new BlockingCollectionQueue();
            Port                      = port;
            Port.DataReceived        += Port_DataReceived;
            DataErrorEventThreadStart = (object x) => { DataError?.Invoke(this, (DataErrorEventArgs)x); };
            DeviceErrorThreadStart    = (object x) => { DeviceError?.Invoke(this, (TerminalEventArgs)x); };
        }