| Home > C: Programming > Function descriptions > | History back Previous chapter Next chapter Print |
is_GetCameraList |
|
uEye Camera Manual Version 4.00
|
|
USB 2.0 USB 3.0 GigE |
USB 2.0 USB 3.0 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. |
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 |
DWORD |
dwStatus |
Information for the status of the camera |
DWORD |
dwReserved[15] |
Reserved for later use |
|
|
Return values
IS_ACCESS_VIOLATION |
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;
}