Functions related to the GenICam System or Producer
The System is the abstraction for an GenTL Producer. The System module provides functions to find, load/unload and open/close GenTL producers. There are also functions to retrieve informations like ID, vendor or name from a producer and to retrieve the the accessable Interfaces.
More...
Typedefs | |
typedef struct BGAPI2_System | BGAPI2_System |
Struct for pointers of type System. More... | |
Functions | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_UpdateSystemList () |
Search for GenTL producers in the current directory and in GENICAM_GENTLxx_PATH. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_UpdateSystemListFromPath (const char *producer_path) |
Search for GenTL producers only in the path specified. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_LoadSystemFromPath (const char *file_path, BGAPI2_System **system) |
Creates a system (GenTL producer) object, specified by filepath before opening it. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_GetNumSystems (bo_uint *count) |
Returns the number of systems (GenTL Producers) found by BGAPI2_UpdateSystemList() More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_GetSystem (bo_uint index, BGAPI2_System **system) |
Get a pointer to the System (GenTL Producer) specified by the index. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_Open (BGAPI2_System *system) |
Opens a system (GenTL producer) to work with it. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_IsOpen (BGAPI2_System *system, bo_bool *is_open) |
Check if the system (GenTL producer) is opened. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_UpdateInterfaceList (BGAPI2_System *system, bo_bool *changed, bo_uint64 timeout) |
Updates the list of of accessable interfaces and creates an object for each. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetInterface (BGAPI2_System *system, bo_uint index, BGAPI2_Interface **iface) |
Get a pointer to the interface with the specified index. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetNumInterfaces (BGAPI2_System *system, bo_uint *count_interfaces) |
Returns the number of accessable interfaces. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_Close (BGAPI2_System *system) |
Closes a system (producer), you need to call BGAPI2_ReleaseSystem to unload the library. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_ReleaseSystem (BGAPI2_System *system) |
Release a system (GenTL producer) specified. You need to call BGAPI2_System_Close first! More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetNode (BGAPI2_System *system, const char *name, BGAPI2_Node **node) |
Get the named node (feature) of given map of system. More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetNodeTree (BGAPI2_System *system, BGAPI2_NodeMap **node_tree) |
Get a tree of all system nodes (features) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetNodeList (BGAPI2_System *system, BGAPI2_NodeMap **node_list) |
Get a list of all system nodes (features) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetID (BGAPI2_System *system, char *ID, bo_uint64 *string_length) |
Returns the identifier of the system (GenTL producer). More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetVendor (BGAPI2_System *system, char *vendor, bo_uint64 *string_length) |
Returns the vendor of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetModel (BGAPI2_System *system, char *model, bo_uint64 *string_length) |
Returns the name (model) of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetVersion (BGAPI2_System *system, char *version, bo_uint64 *string_length) |
Returns the version of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetTLType (BGAPI2_System *system, char *tl_type, bo_uint64 *string_length) |
Returns the name of the transport layer of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetFileName (BGAPI2_System *system, char *name, bo_uint64 *string_length) |
Returns the file name of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetPathName (BGAPI2_System *system, char *path_name, bo_uint64 *string_length) |
Returns the complete path name of the system (GenTL producer) More... | |
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL | BGAPI2_System_GetDisplayName (BGAPI2_System *system, char *display_name, bo_uint64 *string_length) |
Returns the "user friendly" display name of the system (GenTL producer) More... | |
Detailed Description
Functions related to the GenICam System or Producer
The System is the abstraction for an GenTL Producer. The System module provides functions to find, load/unload and open/close GenTL producers. There are also functions to retrieve informations like ID, vendor or name from a producer and to retrieve the the accessable Interfaces.
Typedef Documentation
◆ BGAPI2_System
typedef struct BGAPI2_System BGAPI2_System |
Struct for pointers of type System.
Function Documentation
◆ BGAPI2_UpdateSystemList()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_UpdateSystemList | ( | ) |
Search for GenTL producers in the current directory and in GENICAM_GENTLxx_PATH.
This function creates an System object for each found producer. GenTL producer are files with the .cti extension and are synonymous with the system. After the list of systems is updated, you can use BGAPI2_GetNumSystems() function to get the number of producers found and the BGAPI2_GetSystem() function to open a specific system to work with it
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_LOWLEVEL_ERROR An error
◆ BGAPI2_UpdateSystemListFromPath()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_UpdateSystemListFromPath | ( | const char * | producer_path | ) |
Search for GenTL producers only in the path specified.
This function creates an System object for each found producer. GenTL producer are files with the .cti extension and are synonymous with the system. After the list of systems is updated, you can use BGAPI2_GetNumSystems() function to get the number of producers found and the BGAPI2_GetSystem() function to open a specific system to work with it
- Parameters
-
[in] producer_path Path where producers should be searched
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error BGAPI2_RESULT_LOWLEVEL_ERROR An error
◆ BGAPI2_LoadSystemFromPath()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_LoadSystemFromPath | ( | const char * | file_path, |
BGAPI2_System ** | system | ||
) |
Creates a system (GenTL producer) object, specified by filepath before opening it.
This function creates an System object for each found producer. You need to create and open a producer before you can get any information about it. Once a producer is created it will not be counted by subsequent BGAPI2_GetNumSystems() calls!
- Parameters
-
[in] file_path Path and Filename of the producer to create [out] system Reference to a pointer to the system (producer)
- Return values
-
BGAPI2_RESULT_SUCCESS No error
◆ BGAPI2_GetNumSystems()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_GetNumSystems | ( | bo_uint * | count | ) |
Returns the number of systems (GenTL Producers) found by BGAPI2_UpdateSystemList()
- Parameters
-
[out] count Count of found GenTL Producer
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_GetSystem()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_GetSystem | ( | bo_uint | index, |
BGAPI2_System ** | system | ||
) |
Get a pointer to the System (GenTL Producer) specified by the index.
You need to open a System before you can get any information about it. Once a System is opened it will not be counted by subsequent BGAPI2_GetNumSystems calls!
- Parameters
-
[in] index Index of the system (producer) to use [out] system Reference to a pointer to the system (producer)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_RESOURCE_IN_USE Producer already loaded BGAPI2_RESULT_LOWLEVEL_ERROR Error in producer (functions not found)
◆ BGAPI2_System_Open()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_Open | ( | BGAPI2_System * | system | ) |
Opens a system (GenTL producer) to work with it.
- Parameters
-
[in] system Pointer to the system (producer) obtained from BGAPI2_GetSystem
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_RESOURCE_IN_USE Already opened BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_GetSystem
- BGAPI2_System_Close
◆ BGAPI2_System_IsOpen()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_IsOpen | ( | BGAPI2_System * | system, |
bo_bool * | is_open | ||
) |
Check if the system (GenTL producer) is opened.
- Parameters
-
[in] system Pointer to the system (producer) [out] is_open Pointer to the result variable
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_UpdateInterfaceList()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_UpdateInterfaceList | ( | BGAPI2_System * | system, |
bo_bool * | changed, | ||
bo_uint64 | timeout | ||
) |
Updates the list of of accessable interfaces and creates an object for each.
- Parameters
-
[in] system Pointer to the system (producer) [out] changed Flag if interfaces are changed since last call [in] timeout Maximum time in milliseconds to search for interfaces
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_NOT_INITIALIZED Interface not initialized BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetInterface()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetInterface | ( | BGAPI2_System * | system, |
bo_uint | index, | ||
BGAPI2_Interface ** | iface | ||
) |
Get a pointer to the interface with the specified index.
You need to call BGAPI2_System_UpdateInterfaceList() first! A System (GenTL producer) connects devices through a transport layer via an interface. The Interface can be a physical interface such as an ethernet network adapter or a logical interface such as an USB port.
- Parameters
-
[in] system Pointer to the system (producer) [in] index Index in the interface list [out] iface Device instance
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_NOT_INITIALIZED Interface not initialized BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetNumInterfaces()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetNumInterfaces | ( | BGAPI2_System * | system, |
bo_uint * | count_interfaces | ||
) |
Returns the number of accessable interfaces.
- Parameters
-
[in] system Pointer to the system (producer) [out] count_interfaces Number of interfaces
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_NOT_INITIALIZED Interface not initialized BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetInterface
◆ BGAPI2_System_Close()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_Close | ( | BGAPI2_System * | system | ) |
Closes a system (producer), you need to call BGAPI2_ReleaseSystem to unload the library.
- Parameters
-
[in] system Pointer to the system (producer)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_ReleaseSystem()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_ReleaseSystem | ( | BGAPI2_System * | system | ) |
Release a system (GenTL producer) specified. You need to call BGAPI2_System_Close first!
- Parameters
-
[in] system Pointer to the system (producer)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters BGAPI2_RESULT_NOT_INITIALIZED Error producer was not loaded BGAPI2_RESULT_ERROR Internal Error (nullptr as system) BGAPI2_RESULT_LOWLEVEL_ERROR Error on close of producer
◆ BGAPI2_System_GetNode()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetNode | ( | BGAPI2_System * | system, |
const char * | name, | ||
BGAPI2_Node ** | node | ||
) |
Get the named node (feature) of given map of system.
- Parameters
-
[in] system Pointer to the system (producer) [in] name Name of the node to return [out] node Variable for returned node value
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetNodeTree()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetNodeTree | ( | BGAPI2_System * | system, |
BGAPI2_NodeMap ** | node_tree | ||
) |
Get a tree of all system nodes (features)
- Parameters
-
[in] system Pointer to the system (producer) [out] node_tree Variable for the returned node tree
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_NOT_AVAILABLE Error for missing root node BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetNodeList()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetNodeList | ( | BGAPI2_System * | system, |
BGAPI2_NodeMap ** | node_list | ||
) |
Get a list of all system nodes (features)
- Parameters
-
[in] system Pointer to the system (producer) [out] node_list Variable for the returned node map
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_NOT_AVAILABLE Error for missing root node BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetID()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetID | ( | BGAPI2_System * | system, |
char * | ID, | ||
bo_uint64 * | string_length | ||
) |
Returns the identifier of the system (GenTL producer).
The BGAPI2 C-Interface utilizes a two step process for the retrieval of strings.
1. Get the size of the string: For the first call to BGAPI2_System_GetID, you need to supply the function with an null-pointer for the parameter ID. In this case the function will return you the size of the ID. You can now use this size to set up the pointer with the right size.
2. Get the actual ID string: Now you can supply the function with the right sized pointer you created for the ID. In that case, the function will return the ID into your provided memory pointer.
Alternatively, to save the extra call to get the size, you can supply the function with a larger memory pointer than required (e.g. 1024 byte).
- Parameters
-
[in] system Pointer to the system (producer) [in,out] ID Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
◆ BGAPI2_System_GetVendor()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetVendor | ( | BGAPI2_System * | system, |
char * | vendor, | ||
bo_uint64 * | string_length | ||
) |
Returns the vendor of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [in,out] vendor Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetModel()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetModel | ( | BGAPI2_System * | system, |
char * | model, | ||
bo_uint64 * | string_length | ||
) |
Returns the name (model) of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [in,out] model Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetVersion()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetVersion | ( | BGAPI2_System * | system, |
char * | version, | ||
bo_uint64 * | string_length | ||
) |
Returns the version of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [in,out] version Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetTLType()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetTLType | ( | BGAPI2_System * | system, |
char * | tl_type, | ||
bo_uint64 * | string_length | ||
) |
Returns the name of the transport layer of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [in,out] tl_type Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_ERROR Internal error (init failed) BGAPI2_RESULT_LOWLEVEL_ERROR Can't read producer infos BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetFileName()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetFileName | ( | BGAPI2_System * | system, |
char * | name, | ||
bo_uint64 * | string_length | ||
) |
Returns the file name of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [out] name Nullptr to get string length or pointer to store result [out] string_length Result size, length of name
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetPathName()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetPathName | ( | BGAPI2_System * | system, |
char * | path_name, | ||
bo_uint64 * | string_length | ||
) |
Returns the complete path name of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [out] path_name Nullptr to get string length or pointer to store result [out] string_length Result size, length of path name
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size
◆ BGAPI2_System_GetDisplayName()
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_System_GetDisplayName | ( | BGAPI2_System * | system, |
char * | display_name, | ||
bo_uint64 * | string_length | ||
) |
Returns the "user friendly" display name of the system (GenTL producer)
- Parameters
-
[in] system Pointer to the system (producer) [in,out] display_name Nullptr to get string length or pointer to store result [in,out] string_length Result size, length of version string (including string end zero)
- Return values
-
BGAPI2_RESULT_SUCCESS No error BGAPI2_RESULT_INVALID_PARAMETER Error for invalid parameters
- See also
- BGAPI2_System_GetID for detail how to retrieve strings with unknown size