Back to Adaptive Vision Library website

You are here: Start » Function Reference » GenTL » GenTL_FindDevices

GenTL_FindDevices


Header: Genicam.h
Namespace: avl
Module: Genicam

Performs enumeration of GenTL devices and returns a list of present device descriptors.

Syntax

C++
C#
 
void avl::GenTL_FindDevices
(
	atl::Optional<const atl::String&> inLibraryPath,
	atl::Optional<const atl::String&> inInterfaceId,
	atl::Optional<const atl::String&> inTLType,
	int inInterfaceScanTime,
	atl::Array<GenTL_DeviceDescriptor>& outDevices
)

Parameters

Name Type Default Description
inLibraryPath Optional<const String&> NIL Path identifying provider library to limit enumeration to.
inInterfaceId Optional<const String&> NIL String identifying communication interface to limit enumeration to.
inTLType Optional<const String&> NIL Name of interface transport technology to limit enumeration to.
inInterfaceScanTime int Time limit, in milliseconds, that the function will wait for device response on each enumerated interface.
outDevices Array<GenTL_DeviceDescriptor>& Returns a list with device list descriptors.

Description

This function requests available GenTL provider libraries to perform enumeration of their interfaces and devices, and returns a unified list of all available devices. The function can perform a global enumeration (all available libraries and interfaces) as well as limited enumeration, where search can be narrowed to specific library, interface or transport technology.

inLibraryPath parameter can be set to a path identifying one of available GenTL libraries to limit enumeration to (only interfaces provided by this library will be checked). Setting this parameter will not force the GenTL subsystem to load the specified file. Requested library must be properly registered in local system and loaded upon GenTL subsystem initialization. Setting this parameter to atl::NIL causes that all available providers will be included in enumeration.

inInterfaceId parameter can be set to an internal identifier of provider interfaces to limit enumeration to (only these interfaces will be enumerated). When this argument is used, parameter inLibraryPath must be also specified. Setting this parameter to atl::NIL causes that all interfaces of applicable providers are enumerated.

inTLType parameter can be set to a name of Transport Technology Type. When this argument is used, only interfaces with equal transport technology type name are enumerated. When this parameter is set to atl::NIL enumeration is not restricted by interface type. This parameter cannot be used simultaneously with inInterfaceId (at least one of those arguments must be equal atl::NIL).

Any textual name of transport technology can be used for inTLType argument, including following standard type names:

  • "Custom" - Custom technologies.
  • "GEV" - GigE Vision technology.
  • "CL" - Camera Link technology.
  • "IIDC" - IIDC 1394 technology.
  • "UVC" - USB video class devices.
  • "CXP" - CoaXPress.
  • "CLHS" - Camera Link HS.
  • "USB3" - USB3 Vision Standard.
  • "Ethernet" - Ethernet devices.
  • "PCI" - PCI/PCIe devices.

(according to GenTL standard version 1.3)

inInterfaceScanTime argument specifies the time limit in milliseconds, that a single provider interface will be given to enumerate its devices. Every applicable interface will be given the same amount of time. Exact time that this function will block execution depends on number of applicable providers, number of applicable interfaces and on the way that provider performs enumeration.

All found devices (regardless of parent library or interface) are stored in a unified list returned by outDevices parameter. Single device is described by GenTL_DeviceDescriptor structure. Please note, that it is not impossible that single device is reachable by multiple interfaces or provider libraries. In such case, single device will be present in the list multiple times.

Exceptions

This function will throw an exception in the following situation:

  • Optional arguments are used in improper way.
  • Library specified by inLibraryPath or interface specified by inInterfaceId is not found.
  • Other general GenTL error occurred.

Errors

List of possible exceptions:

Error type Description
DomainError Parameter inLibraryPath is required when inInterfaceId is specified.
DomainError Parameters inInterfaceId and inTLType cannot be used simultaneously.