public void IsisTrxvu_tcClearBeaconTest() { ISIStrxvuFrameLengths len = new ISIStrxvuFrameLengths(); len.maxAX25frameLengthRX = 20; len.maxAX25frameLengthTX = 20; TRX trx = new TRX(0, new ISIStrxvuI2CAddress(), len, ISIStrxvuBitrate.trxvu_bitrate_1200); byte[] data = Encoding.ASCII.GetBytes("data"); int res2 = trx.IsisTrxvu_tcSetAx25BeaconDefClSign(data, 15, 100); trx.IsisTrxvu_tcClearBeacon(); Assert.IsNull(trx.Beacon); }
public void IsisTrxvu_tcSetAx25BeaconDefClSignTest() { ISIStrxvuFrameLengths len = new ISIStrxvuFrameLengths(); len.maxAX25frameLengthRX = 20; len.maxAX25frameLengthTX = 20; TRX trx = new TRX(0, new ISIStrxvuI2CAddress(), len, ISIStrxvuBitrate.trxvu_bitrate_1200); int res = trx.IsisTrxvu_tcSetAx25BeaconDefClSign(new byte[30], 30, 100); Assert.AreEqual(Constants.E_TRXUV_FRAME_LENGTH, res); TRX trx2 = new TRX(0, new ISIStrxvuI2CAddress(), len, ISIStrxvuBitrate.trxvu_bitrate_1200); Output <byte> avail = new Output <byte>(); byte[] data = Encoding.ASCII.GetBytes("data"); int res2 = trx2.IsisTrxvu_tcSetAx25BeaconDefClSign(data, 15, 100); Assert.AreEqual(Constants.E_NO_SS_ERR, res2); Assert.AreEqual(trx2.beaconInterval, 100); Assert.AreEqual(trx2.Beacon.infoFeild, data); }