public void LoadMultiBurstDataTest() { string filePath = Path.GetFullPath(@"Support Files\LTE TDD Waveform.tdms"); SG.Waveform waveform = SG.LoadWaveformFromTDMS(filePath); double actualLength = waveform.WaveformData.SampleCount / waveform.SampleRate; Assert.AreEqual(waveform.BurstLength_s, actualLength, 1e-9, "Burst length should be properly calculated for multi-burst waveforms."); double papr; NIRfsgPlayback.ReadWaveformFileVersionFromFile(filePath, out string waveformVersion); if (waveformVersion == "1.0.0") { NIRfsgPlayback.ReadPeakPowerAdjustmentFromFile(filePath, 0, out papr); } else { NIRfsgPlayback.ReadPaprFromFile(filePath, 0, out papr); //Version 2.0.0 and later } Assert.AreEqual(waveform.PAPR_dB, papr, .001, "PAPR for a multi-burst waveform should match what is reported by RFmx."); }
public void LoadSingleBurstDataTest() { string filePath = Path.GetFullPath(@"Support Files\WLAN Single Burst.tdms"); SG.Waveform waveform = SG.LoadWaveformFromTDMS(filePath); //This value is known empirically from the waveform configuration double actualLength = 5.132112e-3; Assert.AreEqual(waveform.BurstLength_s, actualLength, 1e-6, "Burst length should be properly calculated for a single-burst waveforms."); double papr; NIRfsgPlayback.ReadWaveformFileVersionFromFile(filePath, out string waveformVersion); if (waveformVersion == "1.0.0") { NIRfsgPlayback.ReadPeakPowerAdjustmentFromFile(filePath, 0, out papr); } else { NIRfsgPlayback.ReadPaprFromFile(filePath, 0, out papr); //Version 2.0.0 and later } Assert.AreEqual(waveform.PAPR_dB, papr, .001, "PAPR for a single-burst waveform should match what is reported by RFmx."); }
public void LoadNoBurstDataTest() { string filePath = Path.GetFullPath(@"Support Files\BT No Burst.tdms"); SG.Waveform waveform = SG.LoadWaveformFromTDMS(filePath, "", true); Assert.IsTrue(waveform.BurstStartLocations[0] == 0, "Burst start set to 0"); Assert.IsTrue(waveform.BurstStopLocations[0] == waveform.WaveformData.SampleCount - 1, "Burst stop set to last sample"); double papr; NIRfsgPlayback.ReadWaveformFileVersionFromFile(filePath, out string waveformVersion); if (waveformVersion == "1.0.0") { NIRfsgPlayback.ReadPeakPowerAdjustmentFromFile(filePath, 0, out papr); } else { NIRfsgPlayback.ReadPaprFromFile(filePath, 0, out papr); //Version 2.0.0 and later } Assert.AreEqual(waveform.PAPR_dB, papr, .001, "PAPR for a no-burst waveform should match what is reported by RFmx."); }
public static void TestFixtureSetup(TestContext context) { sim = new NIRfsg("sim", false, false, "Simulate=1,RangeCheck=0,DriverSetup=Model:5646R"); //string path = Path.Combine(context.TestRunDirectory, @"Support Files"); files = Directory.GetFiles("Support Files", "*.tdms"); waveforms = new Waveform[files.Length]; iniData = new IniData[files.Length]; FileIniDataParser parser = new FileIniDataParser(); string fileName, directory, iniPath; for (int i = 0; i < files.Length; i++) { waveforms[i] = SG.LoadWaveformFromTDMS(files[i]); fileName = Path.GetFileNameWithoutExtension(files[i]); directory = Path.GetDirectoryName(files[i]); iniPath = Path.Combine(directory, fileName + ".ini"); { iniData[i] = parser.ReadFile(iniPath); } } }
public static void TestFixtureSetup(TestContext context) { lteTdd10Waveform = SG.LoadWaveformFromTDMS(@"Support Files\LTE_TDD_2.0.tdms"); }