![Euresys Coaxlink Programmer'S Manual Download Page 12](http://html1.mh-extra.com/html/euresys/coaxlink/coaxlink_programmers-manual_2436136012.webp)
Coaxlink Programmer's Guide
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. Minor differences between the C++ and .NET interfaces are listed in
a dedicated chapter
.
To use the classes described here, you need to include the main
Euresys::EGrabber
file:
#include <EGrabber.h>
Euresys::EGrabber
is a header-only library (it isn't provided as a
lib
or
dll
file). It comprises several classes,
the most important of which is also named
Euresys::EGrabber
:
namespace
Euresys {
class
EGrabber;
}
In this text, we'll refer to this class as a
grabber
. A grabber encapsulates a set of related GenTL modules:
• An interface: the module that represents global (shared) frame grabber settings and features. This includes digital
I/O control, PCIe and firmware status...
• A device (or
local
device, as opposed to
remote
device): the module that contains the frame grabber settings and
features relating to the camera. This consists mainly of camera and illumination control features: strobes, triggers...
• A data stream: the module that handles image buffers.
• A remote device: the CoaXPress camera.
• A number of buffers.
Go back to
the chapter about GenTL modules
if these concepts are not clear.
A first example
This example creates a grabber and displays basic information about the interface, device, and remote device modules
it contains:
#include <iostream>
#include <EGrabber.h> // 1
static
const
uint32_t CARD_IX = 0;
static
const
uint32_t DEVICE_IX = 0;
void
showInfo() {
Euresys::EGenTL gentl;
// 2
Euresys::EGrabber<> grabber(gentl, CARD_IX, DEVICE_IX);
// 3
std::string card = grabber.getString<Euresys::InterfaceModule>(
"InterfaceID"
);
// 4
std::string dev = grabber.getString<Euresys::DeviceModule>(
"DeviceID"
);
// 5
int64_t width = grabber.getInteger<Euresys::RemoteModule>(
"Width"
);
// 6
int64_t height = grabber.getInteger<Euresys::RemoteModule>(
"Height"
);
// 6
std::cout <<
"Interface: "
<< card << std::endl;
std::cout <<
"Device: "
<< dev << std::endl;
std::cout <<
"Resolution: "
<< width <<
"x"
<< height << std::endl;
}
int
main() {
try
{
// 7
12