//jmanning 09/22/2014
        /// <summary>
        /// Using CPLayback:CLISt:NAME? Compares signal name from captured list with expected signal name.
        /// </summary>
        /// <param name="awg">specific awg object</param>
        /// <param name="expectedName">Expected Signal Name</param>
        public void CompileSignalNameShouldBe(IAWG awg, string expectedName)
        {
            string actualName = _utils.Dequotify(awg.CompileSignalName);
            string errMessage = "Captured Signal Name of  " + actualName + " does not match expected name of " + expectedName;

            Assert.AreEqual(expectedName, actualName, errMessage);
        }
        //glennj 8/16/2013
        /// <summary>
        /// Test for an expected sequence name in the updated property<para>
        /// Note: Sequence name, step number and waveform number are</para><para>
        /// not currently used.  The expected waveform is tested against</para><para>
        /// the one property that gets updated using sequence name, step</para><para>
        /// number and track number.</para>
        /// </summary>
        /// <param name="awg"></param>
        /// <param name="seqName"></param>
        /// <param name="stepNumber"></param>
        /// <param name="trackNumber"></param>
        /// <param name="expectedWfmName"></param>
        public void SequenceStepTrackAssetShouldBe(IAWG awg, string seqName, string stepNumber, string trackNumber,
                                                   string expectedWfmName)
        {
            const string possibleErrorString = "Updated property from a get for seq step track asset";

            Assert.AreEqual(expectedWfmName, _utils.Dequotify(awg.SequenceStepTrackAsset), possibleErrorString);
        }
Example #3
0
        /// <summary>
        /// This depends on the content of Waveform list of lists<para>
        /// It will use whatever is in the list to check against.</para><para>
        /// It does not look for duplicates.  Though there shouldn't be</para><para>
        /// but this isn't testing for accuracy of the list at the moment.</para><para>
        /// Code generates an error of the expected waveform name is not found.</para>
        /// </summary>
        /// <param name="awg"></param>
        /// <param name="expectedWfmName"></param>
        /// <param name="toIncludeOrNotToInclude">True to include, False should not be included</param>
        public void WaveformNameShouldBeIncluded(IAWG awg, string expectedWfmName, bool toIncludeOrNotToInclude)
        {
            string dequotified = _utils.Dequotify(awg.WaveformListList);

            string[] wfmNames = dequotified.Split(',');

            bool notFound = true;

            foreach (var wfmName in wfmNames)
            {
                if (wfmName == expectedWfmName)
                {
                    if (toIncludeOrNotToInclude)
                    {
                        notFound = false;
                        break;
                    }
                }
            }

            if (toIncludeOrNotToInclude)
            {
                Assert.IsFalse(notFound, "Waveform name was not found:" + expectedWfmName);
            }
            else
            {
                Assert.IsTrue(notFound, "Waveform name was found:" + expectedWfmName);
            }
        }
        // Unkown 01/01/01
        /// <summary>
        /// Selects calibration procedures specified by the selection variable.
        ///
        /// CAL:SEL
        /// </summary>
        /// <param name="awg">the AWG object</param>
        /// <param name="requiredSubsystem">Required at a minimum</param>
        /// <param name="optionalArea">Optional but required if there is procedure</param>
        /// <param name="optionalProcedure">Optional</param>
        public void SelectCal(IAWG awg, string requiredSubsystem, string optionalArea = "", string optionalProcedure = "")
        {
            string dequotedSubsystem = _utils.Dequotify(requiredSubsystem);
            string dequotedArea      = (optionalArea != "") ? _utils.Dequotify(optionalArea) : optionalArea;
            string dequotedProcedure = (optionalProcedure != "") ? _utils.Dequotify(optionalProcedure) : optionalProcedure;

            awg.CalSelect(dequotedSubsystem, dequotedArea, dequotedProcedure);
        }
        //glennj 6/12/2013
        /// <summary>
        /// Selects (or unselects) a subsystem, an area or a test based on supplied parameters.
        /// </summary>
        /// <param name="awg"></param>
        /// <param name="select"></param>
        /// <param name="requiredSubsystem"></param>
        /// <param name="optionalArea"></param>
        /// <param name="optionalTest"></param>
        public void SelectTheDiagnosticTestOnAWG(IAWG awg, bool select, string requiredSubsystem, string optionalArea = "", string optionalTest = "")
        {
            string deQuotedSubsystem = _utils.Dequotify(requiredSubsystem);
            string deQuotedArea      = _utils.Dequotify(optionalArea);
            string deQuotedTest      = _utils.Dequotify(optionalTest);

            if (select)
            {
                awg.DiagSelect(deQuotedSubsystem, deQuotedArea, deQuotedTest);
            }
            else
            {
                awg.DiagUnselect(deQuotedSubsystem, deQuotedArea, deQuotedTest);
            }
        }
Example #6
0
        //glennj 6/21/2013
        /// <summary>
        /// Given a waveform name, file and type, import a waveform
        /// </summary>
        /// <param name="awg">specific awg object</param>
        /// <param name="wfmName">Specific AWG object</param>
        /// <param name="wfmType"></param>
        /// <param name="fileName"></param>
        public void ImportAFile(IAWG awg, string wfmName, WaveformFormatType wfmType, string fileName)
        {
            string wfmFormat = "";

            switch (wfmType)
            {
            case WaveformFormatType.ISF:
            case WaveformFormatType.TDS3000:
            case WaveformFormatType.DPO4000:
                wfmFormat = "ISF";
                break;

            case WaveformFormatType.TDS:
            case WaveformFormatType.TDS5000:
            case WaveformFormatType.TDS6000:
            case WaveformFormatType.TDS7000:
            case WaveformFormatType.DPO7000:
            case WaveformFormatType.DPO70000:
            case WaveformFormatType.DSA70000:
                wfmFormat = "TDS";
                break;

            case WaveformFormatType.TXT:
            case WaveformFormatType.FLOATING_POINT:
                wfmFormat = "TXT";
                break;

            case WaveformFormatType.TXT8:
            case WaveformFormatType.DAC_8_BIT:
                wfmFormat = "TXT8";
                break;

            case WaveformFormatType.TXT9:
            case WaveformFormatType.DAC_9_BIT:
                wfmFormat = "TXT9";
                break;

            case WaveformFormatType.TXT10:
            case WaveformFormatType.DAC_10_BIT:
                wfmFormat = "TXT10";
                break;

            case WaveformFormatType.TXT14:
            case WaveformFormatType.DAC_14_BIT:
                wfmFormat = "TXT14";
                break;

            case WaveformFormatType.WFM:
            case WaveformFormatType.AWG400_WFM:
            case WaveformFormatType.AWG500_WFM:
            case WaveformFormatType.AWG600_WFM:
            case WaveformFormatType.AWG700_WFM:
                wfmFormat = "WFM";
                break;

            case WaveformFormatType.PAT:
            case WaveformFormatType.AWG400_PAT:
            case WaveformFormatType.AWG500_PAT:
            case WaveformFormatType.AWG600_PAT:
            case WaveformFormatType.AWG700_PAT:
                wfmFormat = "PAT";
                break;

            case WaveformFormatType.TFW:
            case WaveformFormatType.AFG3000:
                wfmFormat = "TFW";
                break;

            case WaveformFormatType.IQT:
            case WaveformFormatType.RSA3000:
                wfmFormat = "IQT";
                break;

            case WaveformFormatType.TIQ:
            case WaveformFormatType.RSA6000:
                wfmFormat = "TIQ";
                break;
            }

            awg.MemoryImport(_utils.Dequotify(wfmName), wfmFormat, fileName);
        }