//jmanning 09/22/2014 /// <summary> /// Using OUTPut[n]:FILTer sets the filter type of the of the selected signal path /// </summary> /// <param name="awg"></param> /// <param name="outputIndex">Index of output</param> /// <param name="filterType">Type of Filter [NONE|BPASs|LPASs]</param> public void SetOutputFilter(IAWG awg, string outputIndex, OutputFilterType filterType) { var expectedSyntax = "Syntax not Valid"; switch (filterType) { case OutputFilterType.BandPass: expectedSyntax = SyntaxForOutputFilterBandPass; break; case OutputFilterType.LowPass: expectedSyntax = SyntaxForOutputFilterLowPass; break; case OutputFilterType.None: expectedSyntax = SyntaxForOutputFilterNone; break; } awg.SetOutputFilter(outputIndex, expectedSyntax); }
//jmanning 09/22/2014 /// <summary> /// Verify the AWG filter type for an expected output source /// </summary> /// <param name="awg"></param> /// <param name="expectedFilterType"></param> public void OutputFilterTypeShouldBe(IAWG awg, OutputFilterType expectedFilterType) { var expectedSyntax = "Syntax not Valid"; switch (expectedFilterType) { case OutputFilterType.BandPass: expectedSyntax = SyntaxForOutputFilterBandPass; break; case OutputFilterType.LowPass: expectedSyntax = SyntaxForOutputFilterLowPass; break; case OutputFilterType.None: expectedSyntax = SyntaxForOutputFilterNone; break; } string possibleErrorString = "Output filter type" + awg.OutputFilterType + " found not the expected filter type of " + expectedSyntax; Assert.AreEqual(expectedSyntax, awg.OutputFilterType, possibleErrorString); }