Page 2
EURESYS s.a. may modify the product specification or change the information given in this documentation at any time, at its discretion, and without prior notice. EURESYS s.a. shall not be liable for any loss of or damage to revenues, profits, goodwill, data, information systems or other special, incidental, indirect, consequential or punitive damages of any kind arising in connection with the use of the hardware or the soware of EURESYS s.a.
These libraries are referred to as GenTL producers, or Common Transport Interfaces (CTI) and use the cti file extension. The GenTL producer for Coaxlink cards is coaxlink.cti. This document is meant to be read from beginning to end. Each chapter and section builds upon the preceding ones.
A GenApi implementation is a soware module that can read and interpret register description files. provides a implementation, but it is fairly difficult to use, and logging is very poor. Instead, we EMVA reference recommend using the Euresys implementation bundled with the Coaxlink soware package. This implementation also allows writing powerful configuration scripts. Features What the user gets from GenApi is a bunch of named features, organized in categories.
Figure 1: GenTL Module Hierarchy System module The system module (also referred to as TLSystem), represents the GenTL producer (the coaxlink.cti library). This module is at the top of the parent/child tree. The system module provides basic information about the GenTL producer: things like the complete path to...
The GenTL standard calls frame grabbers interfaces. The system module has one child interface for each frame grabber: if there are 2 Coaxlink cards in the computer, the system module will have two child interfaces. Each interface represents a frame grabber. Global frame grabber features such as digital I/O lines belong in the interface module.
Page 9
Instead of using the GenTL API directly, we recommend using either: • the Euresys::EGenTL library which deals with these complications so that the user doesn't have to; • or the Euresys::EGrabber library which provides a high-level, easy-to-use interface.
GC_API GCGetInfo(TL_INFO_CMD iInfoCmd, INFO_DATATYPE *piType, void *pBuffer, size_t *piSize); template<typename T> T gcGetInfo(TL_INFO_CMD cmd); A first example This program uses Euresys::EGenTL to iterate over the Coaxlink cards present in the system, and display their id: #include <iostream> #include <EGrabber.h> // 1...
4. Find out how many cards are present in the system. 5. Retrieve the id of the n-th card. 6. Euresys::EGenTL uses exceptions to report errors, so we wrap our code inside a try ... catch block. Example of program output:...
Euresys::EGrabber Euresys::EGrabber Euresys::EGrabber is a library of C++ classes that provide a high-level interface. It is built on top of the Euresys::EGenTL library, and is recommended for most users. A .NET assembly, built on top of the Euresys::EGrabber C++ classes, is also provided. In this document, we focus mainly on the C++ API.
• initialize coaxlink.cti (this is done by calling the GenTL initialization function GCInitLib). 3. Create a Euresys::EGrabber object. The constructor needs the gentl object created in step 2. It also takes as optional arguments the indices of the interface and device to use.
Page 14
This will be shown in another example. 4. Wait for a buffer filled by the grabber. The result is a Euresys::ScopedBuffer. The term scoped is used to indicate that the lifetime of the buffer is the current scope (i.e., the current block).
Euresys::EGrabber Coaxlink Programmer's Guide • the Coaxlink driver pops a buffer from the front of the input queue, and gives it to the Coaxlink card for DMA transfer; • when the transfer is complete, the buffer is pushed to the back of the output queue;...
The other types of events are restricted to Coaxlink and can be viewed as categories of specific events. For example, in the CIC category of events, we have:...
= grabber.getInteger<DeviceModule>("EventCount[CameraTriggerRisingEdge]"); Notifications As we've just seen, when an event occurs, a dedicated counter is incremented. Coaxlink can also notify the application of this event by having Euresys::EGrabber execute a user-defined function. But first, it is required to...
5. Likewise, enable notifications for all events coming from the device module (CIC events). 6. Finally, enable notifications for all data stream events. Callback functions When an event occurs, and event notification is enabled for that event, Euresys::EGrabber executes one of several callback functions. These callback functions are defined in overridden virtual methods:...
Euresys::EGrabber Coaxlink Programmer's Guide Event identification When an event is notified to the application, the callback function that is executed indicates the category of that event. The actual event that occurred is identified by a numerical ID, called numid, and defined in include/ GenTL_v1_5_EuresysCustom.h:...
Coaxlink Programmer's Guide Euresys::EGrabber Interface module – I/O Toolbox category numid prefix Callback function Data type onIoToolboxEvent IoToolboxData EVENT_DATA_NUMID_IO_TOOLBOX_ Interface module – CXP Interface category numid prefix Callback function Data type onCxpInterfaceEvent CxpInterfaceData EVENT_DATA_NUMID_CXP_INTERFACE_ Examples We'll soon show a few complete...
To give the user maximum flexibility, we support all three callback models. This is why Euresys::EGrabber exists in different flavors. So far, we have eluded the meaning of the angle brackets in EGrabber<>. The EGrabber class is actually a template class, i.e., a class that is parameterized by another type:...
"error: " << e.what() << std::endl; 1. This using directive allows writing Xyz instead of Euresys::Xyz. This helps keep lines relatively short. 2. Define a new class MyGrabber which is derived from EGrabber<CallbackOnDemand>. 3. MyGrabber's constructor initializes its base class by calling EGrabber<CallbackOnDemand>'s constructor.
Main header. Includes other headers except Defines Euresys::EGrabber, Euresys::Buffer, Euresys::ScopedBuffer include/EGrabberTypes.h Defines data types related to Euresys::EGrabber include/EGenTL.h Defines Euresys::EGenTL include/GenTL_v1_5.h Standard GenTL header. Defines standard types, functions and constants include/GenTL_v1_5_EuresysCustom.h Defines Coaxlink-specific constants include/RGBConverter.h Defines Euresys::RGBConverter helper class...
Euresys GenApi scripts Coaxlink Programmer's Guide Euresys GenApi scripts The Euresys GenApi Script language is documented in a few GenApi scripts. For convenience, they are also included here. doc/basics.js // Euresys GenApi Script uses a syntax inspired by JavaScript, but is not // exactly JavaScript.
Page 26
// x: [3.14159, 2.71828, 1.61803, undefined, 1.41421]; function RegularExpressions() { x = /CXP[36]_X[124]/; // Like JavaScript, Euresys GenApi Script is a dynamically typed language. The // type of a variable is defined by the value it holds, which can change. function DynamicVariables() { x = 1;...
Page 27
1 !== 2); // Equality (==) and inequality (!=) JavaScript operators lead to confusing // and inconsistent conversions of their operands. They are not implemented // in Euresys GenApi Script. // Relational operators: < <= > >= assert(1 < 2);...
Page 28
= { one: 1, two: 2 }; sum = 0; for (var obj) { sum += obj[p]; assertEqual(3, sum); str = "Coaxlink"; sum = ""; for (var str) { sum += str[i]; assertEqual("Coaxlink", sum); // for..of loops: iterating over values...
Page 29
Euresys GenApi scripts Coaxlink Programmer's Guide function ContinueAndBreak() { sum = 0; (i = 0; i < 100; ++i) { (i === 3) { continue; else if (i === 6) { break; else sum += i; assertEqual(0 + 1 + 2 + 4 + 5, sum);...
'failed assertion'; doc/builtins.js // This file describes the builtins (functions or objects) of Euresys GenApi // Script. It can be executed by running 'gentl script // coaxlink://doc/builtins.js'. // The builtin object 'console' contains a single function, log, which can be // used to output text to the standard output.
// - absolute paths var mod = require('C:\\absolute\\path\\some-module.js'); // - relative paths (paths relative to the current script) var mod = require('./utils/helper.js'); // - coaxlink:// paths (paths relative to the directory where coaxlink scripts are installed) var mod = require(coaxlink://doc/builtins.js); doc/grabbers.js // This file describes the 'grabbers' object of Euresys GenApi Script.
Page 32
Coaxlink Programmer's Guide Euresys GenApi scripts // Ports also have the following functions to work on GenICam features: get(f) | get value of f set(f,v) | set value v to f execute(f) | execute f features([re]) | get list of features [matching regular expression re]...
"Revision" is ' + revision); doc/module1.js // This file describes the special 'module' variable of Euresys GenApi Script. // It can be executed by running 'gentl script coaxlink://doc/module1.js'. It // is also dynamically loaded by the coaxlink://doc/builtins.js script.
2. Create a Euresys.EGrabberCallbackOnDemand object. The constructor needs the gentl object we've just created. It also takes as optional arguments the indices of the interface and device to use. on page 6 to find out the ID of the Coaxlink card. Notice the InterfaceModule suffix in getString 3. Use GenApi InterfaceModule .
.NET assembly Coaxlink Programmer's Guide Example of program output: Interface: PC1633 - Coaxlink Quad G3 (2-camera) - KQG00014 Device: Device0 Resolution: 4096x4096 Differences between C++ and .NET EGrabber Terms in ITALIC are placeholders: • MODULE can be replaced by InterfaceModule, DeviceModule...
Defines when and where (in which thread) callback functions are executed. One of CallbackOnDemand, CallbackSingleThread, CallbackMultiThread. Camera and illumination controller Part of Coaxlink card that controls a camera and its associated illumination devices. Hosted in the device module. CoaXPress High speed digital interface that allows the transmission of data from a device (e.g., a camera) to a host...
Page 45
GenTL module that represents a frame grabber. Parent of the device module. I/O toolbox Part of Coaxlink card that controls digital I/O lines and implements tools such as rate converters, delay lines, etc. Hosted in the interface module. Register description XML file mapping low-level hardware registers to camera or frame grabber features.
Need help?
Do you have a question about the Coaxlink and is the answer not in the manual?
Questions and answers