CoaxlinkGrabber to EGrabber migration guide

This document shows how to migrate from the obsolete .NET CoaxlinkGrabber interface to the new .NET EGrabber interfaces.

IntelliSense

Visual Studio is of great help while migrating from CoaxlinkGrabber to EGrabber: you can explore the Euresys API with the IntelliSense auto-complete feature of the IDE.

Namespaces

EGrabber

CoaxlinkGrabber is superseded by a set of EGrabber classes:

A few methods from CoaxlinkGrabber have been renamed in EGrabber:

ScopedBuffer

Euresys.SizeT, Euresys.PtrDiffT

Some GenTL module information (e.g., BUFFER_INFO_SIZE_FILLED) correspond to size_t values. The size of such information depend on the target architecture. Unfortunately C# does not expose such types directly. For this purpose, Euresys exposes two value structures: SizeT and PtrDiffT. Those structures embed a private element whose size corresponds to size_t and ptrdiff_t respectively (i.e., 4 bytes for x86 and 8 bytes for x64). These structures provide implicit conversions, which allow the user to use them as integers without worrying about the actual size of the underlying data. For example:

Euresys.SizeT size;
buffer.getInfo(Euresys.gc.BUFFER_INFO_CMD.BUFFER_INFO_SIZE_FILLED, out size);
// the information is available in size

Euresys.GenTL.Infinite

Some EGrabber methods (e.g., those with a timeout parameter) accept an infinite value. That special value is available as a static member of the GenTL class:

grabber.pop(Euresys.GenTL.Infinite)

Euresys.Platform

The new class Euresys.Platform provides static information about the library:

Exceptions

The managed exceptions corresponding to the C++ EGrabber exceptions are now available in the namespace Euresys and their members are the same as their C++ counterparts.

New features

Euresys.GenApiQueryBuilder

The class GenApiQueryBuilder exposes helper functions to build special GenICam features that perform advanced queries on the GenICam features and/or enumeration entries. For example:

using Euresys;

// To get all the features of the remote device
String[] features =
    grabber.getStringListRemoteModule(GenApiQueryBuilder.Features());

// To get the available enumeration entries of the feature "ExposureMode"
String[] entries =
    grabber.getStringListRemoteModule(GenApiQueryBuilder.EnumEntries("ExposureMode"));

Euresys Events

Sample programs

Please have a look at the samples in the cs and vb directories.