Array Configuration and Fetch Functions

NI-RFmx TDSCDMA 2.5 Help

Edition Date: June 2018

Part Number: 375760F-01

»View Product Info
Download Help (Windows Only)

Array Configuration Functions

RFmx provides array-based configuration functions to enable you to set different values to multiple instances of an attribute in a single call to the function. The first N instances of each attribute are configured to the values specified in the corresponding elements of the array. If you pass an empty array to the input of a function, none of the instances of the attribute corresponding to that input are modified. You can pass up to M values in the array, where M is the current value of the <Number of X> attribute (for example, Number of Carriers, Number of Harmonics, Number of Offsets, and so on). If the array size, N, is smaller than M, only the first N instances of the attribute are modified. For example, if you set the RFMXSPECAN_ATTR_ACP_NUMBER_OF_OFFSETS attribute to 3, and if the offsetSideband parameter of the RFmxSpecAn_ACPCfgOffsetArray function has two elements in the array, the RFMXSPECAN_ATTR_ACP_OFFSET_SIDEBAND attribute for the first two offset channels are set to the values in the array, and the RFMXSPECAN_ATTR_ACP_OFFSET_SIDEBAND attribute for the third offset channel is not modified.

In the following code, offsetReferenceCarrier and offsetReferenceSpecific should be of same size. In this case, the array size is equal to the value of the numberOfOffsets parameter.

RFmxSpecAn_ACPCfgNumberOfOffsets (instrumentHandle,"",numberOfOffsets);
RFmxSpecAn_ACPCfgOffsetPowerReferenceArray (instrumentHandle, "", offsetReferenceCarrier,
                                            offsetReferenceSpecific, numberOfOffsets);

Note Note  For array configuration functions that have multiple array inputs, you must pass identically sized arrays to each input.

To set the values to a subset of attribute instances, you can use the non-array based functions. In the non-array based functions, you can configure one or more instances of a property to the same value in each call to the function.

Array Fetch Functions

RFmx provides array-based fetch functions to enable you to fetch multiple instances of a result in a single call to the function. For array-based Fetch functions, you should pass array buffers that have a size greater than or equal to the value of the arraySize parameter.
You can use array fetch functions in the below shown way to query the size of the arrays.

RFmxSpecAn_ACPFetchOffsetMeasurementArray (instrumentHandle, "", timeout, NULL, NULL, NULL, NULL, 0, &actualArraySize);
In the above function call, the variable actualArraySize is the size of the arrays returned by the fetch function.

Array fetch functions return arrays containing the values for all instances of the results during a specific call to a measurement. For example, if you have configured an ACP measurement to measure three offset channels, the array contains the results for these three offset channels. In the following code, the size of the lowerRelativePower, upperRelativePower, lowerAbsolutePower, and upperAbsolutePower parameters are equal to the value of the actualArraySize parameter.

lowerRelativePower = (float64 *)malloc(sizeof(float64)*actualArraySize);
upperRelativePower = (float64 *)malloc(sizeof(float64)*actualArraySize);
lowerAbsolutePower = (float64 *)malloc(sizeof(float64)*actualArraySize);
upperAbsolutePower = (float64 *)malloc(sizeof(float64)*actualArraySize);
RFmxSpecAn_ACPFetchOffsetMeasurementArray (instrumentHandle, "", timeout, lowerRelativePower, upperRelativePower,
                                           lowerAbsolutePower, upperAbsolutePower, actualArraySize, NULL);

WAS THIS ARTICLE HELPFUL?

Not Helpful