Пример #1
0
        public void BytesToWrite()
        {
            DGSerial serial1 = new DGSerial(_portName1, _baudRate1);
            DGSerial serial2 = new DGSerial(_portName2, _baudRate2);

            serial1.Open();
            serial2.Open();

            byte[] buffertx = DGSerialHelper.StringToBytes("Test1");
            serial1.WriteBytes(buffertx);

            byte[] bufferrx = serial2.ReadBytes();

            Assert.That(serial2.BytesToWrite(), Is.EqualTo(0));

            serial1.Close();
            serial2.Close();
        }