NI Bluetooth Analysis Toolkit

niBTSA_RFSAAutoLevel

  • Updated2023-02-21
  • 2 minute(s) read

int32 __stdcall niBTSA_RFSAAutoLevel (ViSession RFSAHandle, char hwChannelString[], double bandwidth, double measurementInterval, int32 maxNumberOfIterations, double *resultantReferenceLevel);

Purpose

Examines the incoming signal to calculate the peak power level. This function then returns the estimated peak power level in the resultantReferenceLevel parameter.

Use this function if you need help calculating an approximate setting for the power level for I/Q measurements. This function queries the NIRFSA_ATTR_REFERENCE_LEVEL attribute and uses this value as the starting point for auto level calculations. Set the NIRFSA_ATTR_REFERENCE_LEVEL attribute to the highest expected power level of the signal for faster convergence. For example, if the device under test (DUT) generates the signal with the average power of x dBm, set the NIRFSA_ATTR_REFERENCE_LEVEL attribute to x + expected peak-to-average power ratio (PAPR) of the signal.

Parameters

Input
Name Type Description
RFSAHandle ViSession Identifies the instrument session. The toolkit obtains this value from the niRFSA_init function or the niRFSA_InitWithOptions function.
hwChannelString char[] Specifies the NI RF vector signal analyzer device channel. Set this parameter to "" (empty string) or NULL.
bandwidth double Specifies the bandwidth of the signal to be analyzed. This value is expressed in Hz.
measurementInterval double Specifies the acquisition length, in seconds. The toolkit uses this value to compute the number of samples to acquire from the NI RF vector signal analyzer. The default value is 10m.
maxNumberOfIterations int32 Specifies the maximum number of iterations to perform when computing the reference level to set on the NI RF vector signal analyzer. The default value is 5.
Output
Name Type Description
resultantReferenceLevel double* Returns the estimated peak power level of the input signal. This value is expressed in dBm.

Return Value

Name Type Description
status int32 Returns the status code of this operation. The status code either indicates success or describes an error or warning. Examine the status code from each call to an niBT SA function to determine if an error has occurred.

To obtain a text description of the status code and additional information about the error condition, call the niBTSA_GetErrorString function.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Log in to get a better experience