imgGetCameraAttributeString

NI IMAQ Function

imgGetCameraAttributeString

Usage

rval imgGetCameraAttributeString (SESSION_ID sid, const char* attributeString, char* currentValue, uInt32 sizeofcurrentValue);

Purpose

Gets the value of camera attributes. Camera attributes vary according to which camera you are using. Refer to Measurement & Automation Explorer (MAX) for information about valid camera attributes for your camera and image acquisition device. Use this function to get the value of string or numeric attribute types.

Parameters

Name Type Direction
sid SESSION_ID input
attributeString const char* input
currentValue char* output
sizeofcurrentValue uInt32 input
rval Int32 output

Parameter Discussion

sid: valid SESSION_ID.

attributeString: attribute name as described in the Camera Attributes tab in MAX.

currentValue: pointer to the array to receive the attribute. Upon success, the function populates the variable with the current value of the attribute.

sizeofcurrentValue: size of the currentValue that has been passed in. If the size of the string is not large enough to hold the attribute, the attribute is truncated.

Return Value

This function returns 0 on success. On failure, this function returns an error code. For more information about the error code, call imgShowError.