FetchMeasurement(string, double, out double, out double, out double)
- Updated2025-10-13
- 1 minute(s) read
Fetches the peak amplitude and frequency at which the peak occurred in the spectrum.
Syntax
Namespace: NationalInstruments.RFmx.SpecAnMX
public int FetchMeasurement(string selectorString, double timeout, out double peakAmplitude, out double peakFrequency, out double frequencyResolution)
Remarks
This method maps to the RFmxSpecAn_SpectrumFetchMeasurement() function in C.
Parameters
| Name | Type | Description |
|---|---|---|
| selectorString | string | Specifies the result name. Example: "", "result::r1". You can use the BuildResultString(string) method to build the selector string. |
| timeout | double | Specifies the timeout, in seconds, for fetching the specified measurement. Set this value to an appropriate time longer than expected for fetching the measurement. A value of -1 specifies that the method waits until the measurement is complete. |
| peakAmplitude | out double | Upon return, contains the peak amplitude, of the averaged spectrum. When you set the spectrum span to 0, this method returns the peak amplitude in the time domain power trace. |
| peakFrequency | out double | Upon return, contains the frequency, in hertz (Hz), at the peak amplitude of the averaged spectrum. This parameter is not valid if you set the SetSpan(string, double) method to 0. |
| frequencyResolution | out double | Upon return, contains the frequency bin spacing, in Hz, of the spectrum acquired by the measurement. This parameter is not valid if you set the SetSpan(string, double) method to 0. |
Returns
Returns the status code of this method. The status code either indicates success or describes an error or warning condition.