Ejemplo n.º 1
0
        public static void ConfigureRF(ref RFmxWlanMX wlanSignal, CommonConfiguration commonConfig, AutoLevelConfiguration autoLevelConfig, string selectorString = "")
        {
            wlanSignal.ConfigureFrequency(selectorString, commonConfig.CenterFrequency_Hz);
            wlanSignal.ConfigureExternalAttenuation(selectorString, commonConfig.ExternalAttenuation_dB);

            //Make sure all other parameters are configured before calling autolevel
            if (autoLevelConfig.AutoLevelReferenceLevel)
            {
                wlanSignal.AutoLevel(selectorString, autoLevelConfig.AutoLevelMeasureTime_s);
            }
            else
            {
                wlanSignal.ConfigureReferenceLevel(selectorString, commonConfig.ReferenceLevel_dBm);
            }
        }
        /// <summary>Performs actions to initiate acquisition and measurement.<para></para> Enables the specified measurement(s) before optionally
        /// automatically adjusting the reference level before beginning measurements. Finally, initiates the acquisition and measurement(s).</summary>
        /// <param name="wlanSignal">Specifies the WLAN signal to configure.</param>
        /// <param name="measurements">Specifies one or more previously configured measurements to enable for this acquisition.</param>
        /// <param name="autoLevelConfig">Specifies the configuration for the optional AutoLevel process which will automatically set the analyzer's reference level.</param>
        /// <param name="enableTraces">(Optional) Specifies whether traces should be enabled for the measurement(s). See the RFmx help for more documention of this parameter.</param>
        /// <param name="selectorString">Pass an empty string. The signal name that is passed when creating the signal configuration is used.See the RFmx help for more documention of this parameter.</param>
        /// <param name="resultName">(Optional) Specifies the name to be associated with measurement results. Provide a unique name, such as "r1" to enable
        /// fetching of multiple measurement results and traces. See the RFmx help for more documentation of this parameter.</param>
        public static void SelectAndInitiateMeasurements(RFmxWlanMX wlanSignal, RFmxWlanMXMeasurementTypes[] measurements, AutoLevelConfiguration autoLevelConfig = default,
                                                         bool enableTraces = false, string selectorString = "", string resultName = "")
        {
            // Aggregate the selected measurements into a single value
            // OR of 0 and x equals x
            RFmxWlanMXMeasurementTypes selectedMeasurements = 0;

            foreach (RFmxWlanMXMeasurementTypes measurement in measurements)
            {
                selectedMeasurements |= measurement;
            }
            wlanSignal.SelectMeasurements(selectorString, selectedMeasurements, enableTraces);

            if (autoLevelConfig.Enabled)
            {
                wlanSignal.AutoLevel(selectorString, autoLevelConfig.MeasurementInterval_s);
            }

            // Initiate acquisition and measurement for the selected measurements
            wlanSignal.Initiate(selectorString, resultName);
        }
Ejemplo n.º 3
0
        public static void ConfigureCommon(RFmxInstrMX sessionHandle, RFmxWlanMX wlanSignal, CommonConfiguration commonConfig,
                                           AutoLevelConfiguration autoLevelConfig, string selectorString = "")
        {
            string instrModel;

            sessionHandle.ConfigureFrequencyReference("", commonConfig.FrequencyReferenceSource, 10e6);
            sessionHandle.GetInstrumentModel("", out instrModel);

            sessionHandle.SetLOSource("", commonConfig.LOSource);
            sessionHandle.SetDownconverterFrequencyOffset("", commonConfig.LOOffset);

            wlanSignal.ConfigureDigitalEdgeTrigger(selectorString, commonConfig.DigitalEdgeSource, commonConfig.DigitalEdgeType, commonConfig.TriggerDelay_s, commonConfig.EnableTrigger);
            wlanSignal.ConfigureFrequency(selectorString, commonConfig.CenterFrequency_Hz);
            wlanSignal.ConfigureExternalAttenuation(selectorString, commonConfig.ExternalAttenuation_dB);

            if (autoLevelConfig.AutoLevelReferenceLevel)
            {
                wlanSignal.AutoLevel(selectorString, autoLevelConfig.AutoLevelMeasureTime_s);
            }
            else
            {
                wlanSignal.ConfigureReferenceLevel(selectorString, commonConfig.ReferenceLevel_dBm);
            }
        }