Class System

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< System >

Class Documentation

class System : public std::enable_shared_from_this<System>

The system class encapsulates a Genicam transport layer.

NOTE: A GenTLException is thrown in case of a severe error.

Public Functions

~System()
const std::string &getFilename() const

Get file name from which this system was created.

Returns:

File name.

void open()

Opens the system for working with it. The system may be opened multiple times. However, for each open(), the close() method must be called as well.

void close()

Closes the system. Each call of open() must be followed by a call to close() at some point in time.

std::vector<std::shared_ptr<Interface>> getInterfaces()

Returns the currently available interfaces.

NOTE: open() must be called before calling this method.

Returns:

List of interfaces.

std::string getID()

Returns the ID of the GenTL provider.

Returns:

ID.

std::string getVendor()

Returns the vendor name of the GenTL provider.

Returns:

Vendor name.

std::string getModel()

Returns the model of the GenTL provider.

Returns:

Model.

std::string getVersion()

Returns the version of the GenTL provider.

Returns:

Version.

std::string getTLType()

Returns the transport layer type of the GenTL provider.

Returns:

Transport layer type.

std::string getName()

Returns the file name of the GenTL provider.

Returns:

File name.

std::string getPathname()

Returns the full path name of the GenTL provider.

Returns:

Full path name.

std::string getDisplayName()

Returns the display name of the GenTL provider.

Returns:

Display name.

bool isCharEncodingASCII()

Returns the character encoding.

Returns:

True for ASCII, false for UTF8.

int getMajorVersion()

Returns the major version number.

Returns:

Major version number.

int getMinorVersion()

Returns the minor version number.

Returns:

Minor version number.

std::shared_ptr<GenApi::CNodeMapRef> getNodeMap()

Returns the node map of this object.

NOTE: open() must be called before calling this method. The returned pointer remains valid until close() of this object is called.

Returns:

Node map of this object.

void *getHandle() const

Get internal handle of open transport layer.

Returns:

Internal handle.

Public Static Functions

static bool setSystemsPath(const char *path, const char *ignore)

Set the path for finding GenTL producers on the file system and the name of a producer that should be ignored.

NODE: This function must be called before the first call to getSystems() or after calling clearSystems().

If this function is not called before calling getSystems() for the first time, then the path is taken from the environment variable GENICAM_GENTL32_PATH or GENICAM_GENTL64_PATH (depending on the compilation with 32 or 64 bit). If that variable is empty or not defined, then the install directory of the GenTL producers that are included in the rc_genicam_api are used.

Parameters:
  • path – List of GenTL producers with absolute path or directories with producers (i.e. with suffix .cti). The files or directories are separated by ‘;’ under Windows or ‘:’ under Linux. The parameter can be 0 or “” for using the install directory of the GenTL producers that are included in the rc_genicam_api.

  • ignore – Name of producer (i.e. file name without path) that is ignored. This parameter can be 0.

Returns:

False if either setSystemsPath() or setSystems() was called before.

static std::vector<std::shared_ptr<System>> getSystems()

This function creates systems for all producers that can be found. See also setSystemPath() for and explanation where the producers are sought.

NOTE: This is the only method that can instantiate System objects.

Returns:

List of available systems.

static void clearSystems()

Clears the internal list of systems. This may be called before exit so that all resources are cleaned before leaving the main function.