niTuner_getAttenuation

NI Tuner

niTuner_getAttenuation

Function Prototype

int niTuner_getAttenuation (int taskID, unsigned long listSize, double *attenuation, double *scaleFactor);

Purpose

This function returns the IF signal attenuation for each frequency in the scan list. Currently, this function sets the same attenuation for each frequency in the scan list. Future versions of NI–TUNER may allow different attenuation values for each frequency.

Parameters

Name Type Description
taskID int

The Task ID obtained from niTuner_init that identifies the session of a particular device.

listSize unsigned long

The size of the attenuation and scaleFactor arrays. This number cannot exceed the number of frequencies in the scan list.

listSize must be less than or equal to the number of frequencies in the scan list.

attenuation double *

A listSize element array of the actual attenuations in dB. Attenuation is equal to 20log10(scale factor).

Only the first element in the array is used, because this version of NI–TUNER sets the same attenuation for all frequencies in the scan list.

scaleFactor double *

A listSize element array of scale factors. Multiply the IF time domain data by this number to calculate the actual amplitude of the input RF signal.

Return Value

Returns the status of the function. To see an explanation of common error and warning codes, see Error and Status Codes. To see a text explanation of the status code, call niTuner_errorHandler.