All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rcg::System Class Reference

The system class encapsulates a Genicam transport layer. More...

#include <system.h>

Inheritance diagram for rcg::System:

Public Member Functions

void close ()
 Closes the system. More...
 
std::string getDisplayName ()
 Returns the display name of the GenTL provider. More...
 
const std::string & getFilename () const
 Get file name from which this system was created. More...
 
void * getHandle () const
 Get internal handle of open transport layer. More...
 
std::string getID ()
 Returns the ID of the GenTL provider. More...
 
std::vector< std::shared_ptr< Interface > > getInterfaces ()
 Returns the currently available interfaces. More...
 
int getMajorVersion ()
 Returns the major version number. More...
 
int getMinorVersion ()
 Returns the minor version number. More...
 
std::string getModel ()
 Returns the model of the GenTL provider. More...
 
std::string getName ()
 Returns the file name of the GenTL provider. More...
 
std::shared_ptr< GenApi::CNodeMapRefgetNodeMap ()
 Returns the node map of this object. More...
 
std::string getPathname ()
 Returns the full path name of the GenTL provider. More...
 
std::string getTLType ()
 Returns the transport layer type of the GenTL provider. More...
 
std::string getVendor ()
 Returns the vendor name of the GenTL provider. More...
 
std::string getVersion ()
 Returns the version of the GenTL provider. More...
 
bool isCharEncodingASCII ()
 Returns the character encoding. More...
 
void open ()
 Opens the system for working with it. More...
 
 ~System ()
 

Static Public Member Functions

static void clearSystems ()
 Clears the internal list of systems. More...
 
static std::vector< std::shared_ptr< System > > getSystems ()
 This function creates systems for all producers that can be found. More...
 
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. More...
 

Private Member Functions

void clearInterfaces ()
 
Systemoperator= (const System &)
 
 System (class System &)
 
 System (const std::string &_filename)
 

Private Attributes

std::shared_ptr< CPortcport
 
std::string filename
 
std::shared_ptr< const GenTLWrappergentl
 
std::vector< std::shared_ptr< Interface > > ilist
 
std::recursive_mutex mtx
 
int n_open
 
std::shared_ptr< GenApi::CNodeMapRefnodemap
 
void * tl
 

Detailed Description

The system class encapsulates a Genicam transport layer.

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

Definition at line 58 of file system.h.

Constructor & Destructor Documentation

◆ ~System()

rcg::System::~System ( )

Definition at line 55 of file system.cc.

◆ System() [1/2]

rcg::System::System ( const std::string &  _filename)
private

Definition at line 615 of file system.cc.

◆ System() [2/2]

rcg::System::System ( class System )
private

Member Function Documentation

◆ clearInterfaces()

void rcg::System::clearInterfaces ( )
private

Definition at line 604 of file system.cc.

◆ clearSystems()

void rcg::System::clearSystems ( )
static

Clears the internal list of systems.

This may be called before exit so that all resources are cleaned before leaving the main function.

Definition at line 282 of file system.cc.

◆ close()

void rcg::System::close ( )

Closes the system.

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

Definition at line 315 of file system.cc.

◆ getDisplayName()

std::string rcg::System::getDisplayName ( )

Returns the display name of the GenTL provider.

Returns
Display name.

Definition at line 513 of file system.cc.

◆ getFilename()

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

Get file name from which this system was created.

Returns
File name.

Definition at line 295 of file system.cc.

◆ getHandle()

void * rcg::System::getHandle ( ) const

Get internal handle of open transport layer.

Returns
Internal handle.

Definition at line 599 of file system.cc.

◆ getID()

std::string rcg::System::getID ( )

Returns the ID of the GenTL provider.

Returns
ID.

Definition at line 471 of file system.cc.

◆ getInterfaces()

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

Returns the currently available interfaces.

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

Returns
List of interfaces.

Definition at line 352 of file system.cc.

◆ getMajorVersion()

int rcg::System::getMajorVersion ( )

Returns the major version number.

Returns
Major version number.

Definition at line 547 of file system.cc.

◆ getMinorVersion()

int rcg::System::getMinorVersion ( )

Returns the minor version number.

Returns
Minor version number.

Definition at line 567 of file system.cc.

◆ getModel()

std::string rcg::System::getModel ( )

Returns the model of the GenTL provider.

Returns
Model.

Definition at line 483 of file system.cc.

◆ getName()

std::string rcg::System::getName ( )

Returns the file name of the GenTL provider.

Returns
File name.

Definition at line 501 of file system.cc.

◆ getNodeMap()

std::shared_ptr< GenApi::CNodeMapRef > rcg::System::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.

Definition at line 587 of file system.cc.

◆ getPathname()

std::string rcg::System::getPathname ( )

Returns the full path name of the GenTL provider.

Returns
Full path name.

Definition at line 507 of file system.cc.

◆ getSystems()

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

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.

Definition at line 201 of file system.cc.

◆ getTLType()

std::string rcg::System::getTLType ( )

Returns the transport layer type of the GenTL provider.

Returns
Transport layer type.

Definition at line 495 of file system.cc.

◆ getVendor()

std::string rcg::System::getVendor ( )

Returns the vendor name of the GenTL provider.

Returns
Vendor name.

Definition at line 477 of file system.cc.

◆ getVersion()

std::string rcg::System::getVersion ( )

Returns the version of the GenTL provider.

Returns
Version.

Definition at line 489 of file system.cc.

◆ isCharEncodingASCII()

bool rcg::System::isCharEncodingASCII ( )

Returns the character encoding.

Returns
True for ASCII, false for UTF8.

Definition at line 519 of file system.cc.

◆ open()

void rcg::System::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.

Definition at line 300 of file system.cc.

◆ operator=()

System& rcg::System::operator= ( const System )
private

◆ setSystemsPath()

bool rcg::System::setSystemsPath ( const char *  path,
const char *  ignore 
)
static

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
pathList 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.
ignoreName 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.

Definition at line 118 of file system.cc.

Member Data Documentation

◆ cport

std::shared_ptr<CPort> rcg::System::cport
private

Definition at line 267 of file system.h.

◆ filename

std::string rcg::System::filename
private

Definition at line 259 of file system.h.

◆ gentl

std::shared_ptr<const GenTLWrapper> rcg::System::gentl
private

Definition at line 260 of file system.h.

◆ ilist

std::vector<std::shared_ptr<Interface> > rcg::System::ilist
private

Definition at line 271 of file system.h.

◆ mtx

std::recursive_mutex rcg::System::mtx
private

Definition at line 262 of file system.h.

◆ n_open

int rcg::System::n_open
private

Definition at line 264 of file system.h.

◆ nodemap

std::shared_ptr<GenApi::CNodeMapRef> rcg::System::nodemap
private

Definition at line 268 of file system.h.

◆ tl

void* rcg::System::tl
private

Definition at line 265 of file system.h.


The documentation for this class was generated from the following files:


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:13