Beispiel #1
0
        public void testSetClientAddress()
        {
            HdlcParameters hdlcParams = new HdlcParameters();

            hdlcParams.setClientAddress(0x01);
            Assert.AreEqual(0x03, hdlcParams.clientAddress);
        }
Beispiel #2
0
        public void testSetServerAddress()
        {
            HdlcParameters hdlcParams = new HdlcParameters();

            hdlcParams.setServerAddress(0x3FFE, 0x3FFF);
            byte[] expected = new byte[] { (0xFE), (0xFC), (0xFE), (0xFF) };
            CollectionAssert.AreEqual(expected, hdlcParams.serverAddress);
        }
Beispiel #3
0
 /// <summary>
 /// Creates a HdlcLinkLayer object </summary>
 /// <param name="params"> the HdlcParameters for this object </param>
 public HdlcLinkLayer(HdlcParameters parameters)
 {
     this.parameters = new HdlcParameters();
     this.stream     = new System.IO.MemoryStream();
     this.connection = new HdlcConnection();
 }