Beispiel #1
0
        public void DiscardOutBuffer()
        {
            DGSerial serial1 = new DGSerial(_portName1, _baudRate1);

            serial1.Open();

            byte[] buffertx = new byte[serial1.Get().WriteBufferSize];
            serial1.WriteBytes(buffertx);

            serial1.DiscardOutBuffer();

            Assert.That(serial1.BytesToRead(), Is.EqualTo(0));

            serial1.Close();
        }