| Home > | History back Previous chapter Print |
Programming |
|
uEye GenICam Integration Version 4.00
GenAPI Principle
The GenICam interface is programmed in C, which allows using it in different operating systems and programming environments.
The following sample code uses the "Set Hardware Gain" function as an example to illustrate how a GenICam compatible camera is basically controlled:
if (IsAvailable(Camera.Gain))
Camera.Gain = 42;
This sample code first checks whether the selected camera supports the "Gain" function. If it does, a value (here: 42) can be assigned. This code is thus generic, which means it is independent of proprietary programming commands. The GenICam transport layer now translates this statement into a command that the camera driver understands.
GenTL Programming
|
|
The GenTL consists of five layers (modules) that need to be called when enumerating (i.e. first addressing) a connected camera.

Fig. 4: Initialization of the GenTL
•System module
The system module is called once for each transport layer. It is the entry point from which the subsequent modules are called.
•Interface module
An interface module represents a specific hardware interface, e.g. a camera series or a frame grabber board. In the case of the uEye transport layer, one interface is used for accessing all the uEye cameras.
•Device module
You can access multiple devices through an interface. The devices represent the cameras that are actually available, as seen from the driver. A device can only be opened once.
•Data Stream module
To capture images from a camera, for example, a data stream has to be initialized in that device. The GenTL can capture multiple streams per device, but not all devices support this feature. uEye cameras support one stream per device.
•Buffer module
The captured images are written to the buffers. The buffers can be allocated either by the application (consumer) or by the transport layer (producer). Buffers allocated by the consumer have to be announced to the Data Stream module.