public static void ConfigureCommon(ref RFmxInstrMX sessionHandle, ref RFmxSpecAnMX specAnSignal, CommonConfiguration commonConfig, AutoLevelConfiguration autoLevelConfig, string selectorString = "") { sessionHandle.ConfigureFrequencyReference("", commonConfig.FrequencyReferenceSource, 10e6); sessionHandle.SetLOSource("", commonConfig.LOSource); sessionHandle.SetDownconverterFrequencyOffset("", commonConfig.LOOffset); specAnSignal.ConfigureDigitalEdgeTrigger(selectorString, commonConfig.DigitalEdgeSource, commonConfig.DigitalEdgeType, commonConfig.TriggerDelay_s, commonConfig.EnableTrigger); specAnSignal.ConfigureFrequency(selectorString, commonConfig.CenterFrequency_Hz); specAnSignal.Spectrum.Configuration.ConfigureSpan(selectorString, commonConfig.Span_Hz); specAnSignal.ConfigureExternalAttenuation(selectorString, commonConfig.ExternalAttenuation_dB); if (autoLevelConfig.AutoLevelReferenceLevel) { specAnSignal.AutoLevel(selectorString, commonConfig.Span_Hz, autoLevelConfig.AutoLevelMeasureTime_s, out _); } else { specAnSignal.ConfigureReferenceLevel(selectorString, commonConfig.ReferenceLevel_dBm); } }
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); } }