mvIMPACT Acquire SDK C++
GenTLDriverConfigurator Class Reference

A class that contains items to configure the behaviour of the GenICam GenTL driver stack. More...

Inheritance diagram for GenTLDriverConfigurator:
ComponentCollection

Public Member Functions

GenTLProducerConfiguration createProducerConfiguration (const std::string &producerName, const std::string &interfaceID="")
 Creates a new mvIMPACT::acquire::GenICam::GenTLProducerConfiguration object for the desired interface reported by the specified producer. More...
 
void deleteAllProducerConfigurations (void)
 Deletes all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects. More...
 
void deleteProducerConfiguration (const std::string &producerName)
 Deletes a mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects. More...
 
 GenTLDriverConfigurator ()
 Constructs a new mvIMPACT::acquire::GenICam::GenTLDriverConfigurator object. More...
 
 GenTLDriverConfigurator (const GenTLDriverConfigurator &src)
 Constructs a new mvIMPACT::acquire::GenICam::GenTLDriverConfigurator from an existing one. More...
 
GenTLProducerConfiguration getProducerConfiguration (const std::string &producerName) const
 Returns the mvIMPACT::acquire::GenICam::GenTLProducerConfiguration associated with the referenced producer library. More...
 
std::vector< GenTLProducerConfigurationgetProducerConfigurations (void) const
 Returns a vector containing all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects currently defined. More...
 
bool hasProducerConfiguration (const std::string &producerName) const
 Checks if a certain producer library has been associated with a mvIMPACT::acquire::GenICam::GenTLProducerConfiguration. More...
 
HOBJ hObj (void) const
 Returns a unique identifier for the component collection referenced by this object. More...
 
GenTLDriverConfiguratoroperator= (const GenTLDriverConfigurator &rhs)
 Allows assignments of mvIMPACT::acquire::GenICam::GenTLDriverConfigurator objects. More...
 
const ComponentCollectionrestoreDefault (void) const
 Restores the default for every component of this collection. More...
 

Public Attributes

PropertyIInterfaceEnumerationBehaviour masterEnumerationBehaviour
 An enumerated integer property defining the master enumeration mode for all GenTL producer detected in the current session. More...
 

Protected Attributes

HOBJ m_hRoot
 

Detailed Description

A class that contains items to configure the behaviour of the GenICam GenTL driver stack.

This class contains items e.g. to configure the enumeration behaviour of third party GenTL producer libraries.

Since version 2.32.0 mvIMPACT Acquire has built-in support for third party GenTL producer libraries. The latest version of the GenTL specification can be found here: https://www.emva.org/standards-technology/genicam/.

Detection of GenTL producer libraries works by evaluating the GENICAM_GENTL32_PATH environment variable within a 32-bit process or the GENICAM_GENTL64_PATH variable in a 64-bit process. This variable contains a list of directories that might potentially contain GenTL producer libraries. These libraries use a the file extension .cti and export a defined interface.

All libraries that fulfill these requirements will be loaded into the mvIMPACT Acquire process. By default all these libraries will then also be enumerated for connected/bound devices. The only exception will be if a third party producer is found that reports an interface supporting the same technology as one delivered by mvIMPACT Acquire (e.g. for the GigE Vision or USB3 Vision standard). These interfaces by default will not be enumerated.

The purpose of this class now is to allow an application to modify this behaviour. This might be beneficial for several reasons:

  • a certain third party library on the system has negative impact on the overall stability of the process
  • there are so many third party libraries on the system that enumeration takes a very long time but the application does not want to access devices reported by these third party libraries
  • multiple producers support the same device resulting in very long and confusing device lists
  • etc.

To exclude a certain producer from enumeration first a mvIMPACT::acquire::GenICam::GenTLProducerConfiguration entry for that producer must be created and then the mvIMPACT::acquire::GenICam::GenTLProducerConfiguration::enumerationEnable property for this producer must be set to mvIMPACT::acquire::bFalse.

// Assuming a certain 'ACME.producer.cti' producer has been found somewhere in the GENICAM_GENTLXY_PATH.
GenTLDriverConfigurator driverConfigurator;
if( !driverConfigurator.hasProducerConfiguration( "ACME.producer.cti" ) )
{
driverConfigurator.createProducerConfiguration( "ACME.producer.cti" ); // the 'enumerationEnable' will be false by default!
}
else
{
driverConfigurator.getProducerConfiguration( "ACME.producer.cti" ).enumerationEnable.write( bFalse );
}
GenTLDriverConfigurator()
Constructs a new mvIMPACT::acquire::GenICam::GenTLDriverConfigurator object.
Definition: mvIMPACT_acquire.h:23388
@ bFalse
Off, false or logical low.
Definition: mvDriverBaseEnums.h:574

To exclude a certain interface from a producer from enumeration an mvIMPACT::acquire::GenICam::GenTLProducerConfiguration::enumerationEnable property for this producer can be set to mvIMPACT::acquire::bFalse and the interface enumeration behaviour should be set to mvIMPACT::acquire::iebForceEnumerate.

// Assuming a certain 'ACME.producer.cti' producer has been found somewhere in the GENICAM_GENTLXY_PATH.
GenTLDriverConfigurator driverConfigurator;
GenTLProducerConfiguration configuration( driverConfigurator.hasProducerConfiguration( "ACME.producer.cti" ) ? driverConfigurator.getProducerConfiguration( "ACME.producer.cti" ) : driverConfigurator.createProducerConfiguration( "ACME.producer.cti" ) );
configuration.enumerationEnable.write( bTrue ); // switch on ALL interfaces...
configuration.createProducerInterfaceConfigurationEntry( "ACME.interface0.ID" ).write( iebForceIgnore ); // ... except this one
@ bTrue
On, true or logical high.
Definition: mvDriverBaseEnums.h:576
@ iebForceIgnore
The interface will not enumerate devices, regardless of the general enumeration behavior of this inte...
Definition: mvDriverBaseEnums.h:4395

The same thing can be done the other way round:

// Assuming a certain 'ACME.producer.cti' producer has been found somewhere in the GENICAM_GENTLXY_PATH and only a certain interface shall be enumerated.
GenTLDriverConfigurator driverConfigurator;
GenTLProducerConfiguration configuration( driverConfigurator.hasProducerConfiguration( "ACME.producer.cti" ) ? driverConfigurator.getProducerConfiguration( "ACME.producer.cti" ) : driverConfigurator.createProducerConfiguration( "ACME.producer.cti" ) );
configuration.enumerationEnable.write( bFalse ); // switch off ALL interfaces...
configuration.createProducerInterfaceConfigurationEntry( "ACME.interface0.ID" ).write( iebForceEnumerate ); // ... except this one
@ iebForceEnumerate
The interface will forcefully enumerate devices, regardless of the general enumeration behavior of th...
Definition: mvDriverBaseEnums.h:4397
See also
Setting Up The Framework For Third Party GenTL Producer Usage
Since
2.34.0

Constructor & Destructor Documentation

◆ GenTLDriverConfigurator() [1/2]

◆ GenTLDriverConfigurator() [2/2]

Constructs a new mvIMPACT::acquire::GenICam::GenTLDriverConfigurator from an existing one.

Parameters
[in]srcA constant reference to the mvIMPACT::acquire::GenICam::GenTLDriverConfigurator object, this object shall be created from

Member Function Documentation

◆ createProducerConfiguration()

GenTLProducerConfiguration createProducerConfiguration ( const std::string &  producerName,
const std::string &  interfaceID = "" 
)
inline

Creates a new mvIMPACT::acquire::GenICam::GenTLProducerConfiguration object for the desired interface reported by the specified producer.

Calling this function will creates a new mvIMPACT::acquire::GenICam::GenTLProducerConfiguration object for the desired interface reported by the specified producer.

Note
If a configuration entry for the specified interface does already exist an exception will be thrown.
Parameters
[in]producerNameThe exact name of the producer library without the path to create the entry for.
[in]interfaceIDThe interface ID to create the configuration entry for.

◆ deleteAllProducerConfigurations()

void deleteAllProducerConfigurations ( void  )
inline

Deletes all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects.

Calling this function will result in all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects to be deleted. When the next mvIMPACT Acquire process will be started after shutting down the current one all producer libraries found on the system will be processed. By default only interfaces reporting types/technologies (e.g. GigE Vision) also supported by MATRIX VISION will be ignored (will not enumerate devices) then.

◆ deleteProducerConfiguration()

void deleteProducerConfiguration ( const std::string &  producerName)
inline

Deletes a mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects.

Calling this function will delete the mvIMPACT::acquire::GenICam::GenTLProducerConfiguration object for the referenced producer.

Note
If no entry for the specified producer can be found an exception will be thrown.
Parameters
[in]producerNameThe exact name of the producer library without the path to delete the entry from.

◆ getProducerConfiguration()

GenTLProducerConfiguration getProducerConfiguration ( const std::string &  producerName) const
inline

Returns the mvIMPACT::acquire::GenICam::GenTLProducerConfiguration associated with the referenced producer library.

Note
If no entry for the specified producer can be found an exception will be thrown.
Returns
The mvIMPACT::acquire::GenICam::GenTLProducerConfiguration associated with the referenced producer library.
Parameters
[in]producerNameThe exact name of the producer library without the path.

◆ getProducerConfigurations()

std::vector<GenTLProducerConfiguration> getProducerConfigurations ( void  ) const
inline

Returns a vector containing all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects currently defined.

Returns
A vector containing all mvIMPACT::acquire::GenICam::GenTLProducerConfiguration objects currently defined.

◆ hasProducerConfiguration()

bool hasProducerConfiguration ( const std::string &  producerName) const
inline

Checks if a certain producer library has been associated with a mvIMPACT::acquire::GenICam::GenTLProducerConfiguration.

Returns
Parameters
[in]producerNameThe exact name of the producer library without the path.

◆ hObj()

HOBJ hObj ( void  ) const
inlineinherited

Returns a unique identifier for the component collection referenced by this object.

This handle will always reference an object of type mvIMPACT::acquire::ComponentList.

Returns
A unique identifier for the component referenced by this object.

◆ operator=()

GenTLDriverConfigurator& operator= ( const GenTLDriverConfigurator rhs)
inline

◆ restoreDefault()

const ComponentCollection& restoreDefault ( void  ) const
inlineinherited

Restores the default for every component of this collection.

Calling this function will restore the default value for every component belonging to this collection.

Note
The caller must have the right to modify the component. Otherwise an exception will be thrown.
Returns
A const reference to the component.

Member Data Documentation

◆ m_hRoot

HOBJ m_hRoot
protectedinherited

◆ masterEnumerationBehaviour

PropertyIInterfaceEnumerationBehaviour masterEnumerationBehaviour

An enumerated integer property defining the master enumeration mode for all GenTL producer detected in the current session.

Valid values for this property are defined by the enumeration mvIMPACT::acquire::TInterfaceEnumerationBehaviour.


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