IMAQdxEnumerateAttributes2

NI-IMAQdx Function Reference

IMAQdxEnumerateAttributes2

Format

rval = IMAQdxEnumerateAttributes2 (IMAQdxSession id, IMAQdxAttributeInformation attributeInformationArray[], unsigned int *count, const char *root, IMAQdxAttributeVisibility visibility)

Purpose

Gets the attributes supported by the camera. If you do not know in advance the number of features, complete the following steps:

  1. Call this function with the attributeInformationArray parameter set to NULL. The necessary size is then stored in count.
  2. Allocate attributeInformationArray with the given size.
  3. Call this function again using the previously allocated array.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
attributeInformationArray IMAQdxAttributeInformationArray [] Contains a pointer to an array of attribute information structures in which the attributes supported by the camera are stored. Set this parameter to NULL to get the size needed by the array in the count parameter.
count unsigned int (passed by reference) Contains the size of the array used to store the attributes. If the user passes NULL as the attributeInformationArray parameter, this parameter contains the needed size.
root const char * Specifies the branch of the attribute tree to enumerate. Specify an empty string to enumerate the entire attribute tree.
visibility IMAQdxAttributeVisibility Specifies the visibility of the attribute to enumerate. Only attributes with the specified visibility will be returned. Available options are the same as IMAQdxGetAttributeVisibility. Specify IMAQdxAttributeVisibilityAdvanced to return all the visible attributes.

Return Value

On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString.