Home > History back  Previous chapter    Print  

Programming

uEye GenICam Integration Version 4.00

Programming

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

Hinweis

The GenTL is described in detail on the GenICam website. You will find a guide to programming in Chapter 3: "Module Enumeration and Instantiation". This chapter also includes a complete sample code that you can use for your own applications.

The GenTL description and all other documents can be downloaded from www.genicam.org.

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

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.


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!

For technical questions please contact you local distributor or use the support form on our website.


© 2012 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com