USB 2.0 USB 3.x GigE |
USB 2.0 USB 3.x GigE |
Syntax
INT is_GetCameraList (UEYE_CAMERA_LIST* pucl)
Description
Using is_GetCameraList(), you can query information about the connected cameras. To get all information that is available, you need to adjust the field size to the number of connected cameras. The following tables explain the structures used for that purpose.
Input parameters
pucl |
Handle to the UEYE_CAMERA_LIST structure |
Contents of the UEYE_CAMERA_LIST Structure
ULONG |
dwCount |
Has to be initialized with the number of cameras connected to the system. This value can be read out with is_GetNumberOfCameras(). |
UEYE_CAMERA_INFO |
uci[1] |
Placeholder for 1 … n UEYE_CAMERA_INFO structures |
Contents of the UEYE_CAMERA_LIST::UEYE_CAMERA_INFO Structure
DWORD |
dwCameraID |
Customizable camera ID. This ID is stored in the camera and is persistent. When the camera is delivered, the value 1 is stored. |
DWORD |
dwDeviceID |
Internal device ID. This ID is generated by the driver depending on order of connection and camera type. The device ID is not persistent. |
DWORD |
dwSensorID |
Sensor ID, e.g. IS_SENSOR_UI124x_M As the same sensor is used in different camera families, the sensor ID returns even IS_SENSOR_UI124x_M if you use a GigE uEye camera (UI-524x), as the first number describes only the camera interface. |
DWORD |
dwInUse |
1 = camera is being used. 0 = camera is not being used. |
Char |
SerNo[16] |
Serial number of the camera |
Char |
Model[16] |
Camera model (short designation) |
DWORD |
dwStatus |
Information for the status of the camera |
DWORD |
dwReserved[2] |
Reserved |
IS_CHAR |
FullModelName[32] |
Camera model (full model name) Note: Use this string for display purpose only. The model name might change when updating the camera driver. |
DWORD |
dwReserved2[5] |
Reserved |
The serial number or model name should not be used to find a specific camera (e.g. in order to control this specific camera). If you use the serial number, the software may not find the serial number after exchanging the camera. The model name can be changed when updating the camera driver. Instead, we recommend identifying a camera by a fixed camera ID, the camera type or by the sensor ID. The advantage of the camera ID is that you can set it manually. That means if you exchange a camera, you can set the same camera ID for the new camera. |
Return values
IS_ACCESS_VIOLATION |
An access violation has occurred. For example, not enough memory allocated for the UEYE_CAMERA_LIST structure |
IS_CANT_OPEN_DEVICE |
An attempt to initialize or select the camera failed (no camera connected or initialization error). |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_IO_REQUEST_FAILED |
An IO request from the uEye driver failed. Possibly the versions of the ueye_api.dll (API) and the driver file (ueye_usb.sys or ueye_eth.sys) do not match. |
IS_NO_SUCCESS |
General error message |
IS_SUCCESS |
Function executed successfully |
Related functions
Example
// At least one camera must be available
INT nNumCam;
if( is_GetNumberOfCameras( &nNumCam ) == IS_SUCCESS) {
if( nNumCam >= 1 ) {
// Create new list with suitable size
UEYE_CAMERA_LIST* pucl;
pucl = (UEYE_CAMERA_LIST*) new BYTE [sizeof (DWORD) + nNumCam * sizeof (UEYE_CAMERA_INFO)];
pucl->dwCount = nNumCam;
//Retrieve camera info
if (is_GetCameraList(pucl) == IS_SUCCESS) {
int iCamera;
for (iCamera = 0; iCamera < (int)pucl->dwCount; iCamera++) {
//Test output of camera info on the screen
printf("Camera %i Id: %d", iCamera,
pucl->uci[iCamera].dwCameraID);
}
}
delete [] pucl;
}
}