BGAPI2 Device Functions

Functions related to the GenICam Device, typically the camera. More...

Typedefs

typedef struct BGAPI2_Device BGAPI2_Device
 Struct for pointers of type Device. More...
 
typedef void(BGAPI2CALL * BGAPI2_DevEventHandler) (void *callBackOwner, BGAPI2_DeviceEvent *deviceEvent)
 Declaration for callback functions for BGAPI2_DevEventHandler. More...
 

Functions

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_Open (BGAPI2_Device *device)
 Opens a device for reading and writing. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_OpenExclusive (BGAPI2_Device *device)
 Opens a device in exclusive mode. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_OpenReadOnly (BGAPI2_Device *device)
 Opens a device in read-only-mode. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsOpen (BGAPI2_Device *device, bo_bool *is_open)
 Checks if the device is opened. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDataStream (BGAPI2_Device *device, bo_uint index, BGAPI2_DataStream **data_stream)
 Returns a pointer to the data stream handle identified by index. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNumDataStreams (BGAPI2_Device *device, bo_uint *count_data_streams)
 Returns the number of datastreams of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_Close (BGAPI2_Device *device)
 Closes a device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNode (BGAPI2_Device *device, const char *name, BGAPI2_Node **node)
 Get a named node of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNodeTree (BGAPI2_Device *device, BGAPI2_NodeMap **node_tree)
 Get the node tree of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNodeList (BGAPI2_Device *device, BGAPI2_NodeMap **node_list)
 Get the node list of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetDeviceEventMode (BGAPI2_Device *device, BGAPI2_EventMode event_mode)
 Set the device event mode (polling, callback, off) More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDeviceEventMode (BGAPI2_Device *device, BGAPI2_EventMode *event_mode)
 Get the device event mode (polling, callback, off) More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_CreateDeviceEvent (BGAPI2_DeviceEvent **device_event)
 Creates a structure to store device events retrieved via BGAPI2_Device_GetDeviceEvent More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_ReleaseDeviceEvent (BGAPI2_DeviceEvent *device_event)
 Destroys a device event structure. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDeviceEvent (BGAPI2_Device *device, BGAPI2_DeviceEvent *device_event, bo_uint64 timeout)
 Polls for event information until timeout is reached. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_CancelGetDeviceEvent (BGAPI2_Device *device)
 Cancels a running BGAPI2_Device_GetDeviceEvent More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_RegisterDeviceEventHandler (BGAPI2_Device *device, void *callback_owner, BGAPI2_DevEventHandler device_event_handler)
 Register one callback function to handle all device events of the interface. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetPayloadSize (BGAPI2_Device *device, bo_uint64 *payload_size)
 Returns the payload size in bytes, used to allocate image buffers. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNode (BGAPI2_Device *device, const char *name, BGAPI2_Node **node)
 Get the named node of given remote device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNodeTree (BGAPI2_Device *device, BGAPI2_NodeMap **node_tree)
 Get the update node tree of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNodeList (BGAPI2_Device *device, BGAPI2_NodeMap **node_list)
 Get the update node list of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetID (BGAPI2_Device *device, char *ID, bo_uint64 *string_length)
 Returns the identifier of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetVendor (BGAPI2_Device *device, char *vendor, bo_uint64 *string_length)
 Returns the vendor of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetModel (BGAPI2_Device *device, char *model, bo_uint64 *string_length)
 Returns the name (model) of the device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetSerialNumber (BGAPI2_Device *device, char *serial_number, bo_uint64 *string_length)
 Returns the serial number of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetTLType (BGAPI2_Device *device, char *tl_type, bo_uint64 *string_length)
 Returns the transport layer of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDisplayName (BGAPI2_Device *device, char *display_name, bo_uint64 *string_length)
 Returns the "user friendly" display name of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetAccessStatus (BGAPI2_Device *device, char *access_status, bo_uint64 *string_length)
 Returns the access state of device, can be called on a device which is not open. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteConfigurationFile (BGAPI2_Device *device, char *config_file, bo_uint64 *string_length)
 Returns the configuration file (xml) of the remote device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetRemoteConfigurationFile (BGAPI2_Device *device, const char *config_file)
 Sets a configuration file (xml) to use with the attached remote device (camera) More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_StartStacking (BGAPI2_Device *device, bo_bool replace_mode)
 Starts a stack of feature writes to the device (caching write operations). More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_WriteStack (BGAPI2_Device *device)
 End the stacking and write all featues to the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_CancelStack (BGAPI2_Device *device)
 End the stacking without writing featues to the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsUpdateModeAvailable (BGAPI2_Device *device, bo_bool *is_available)
 Checks for availability of update state of device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsUpdateModeActive (BGAPI2_Device *device, bo_bool *is_active)
 Returns the update mode state of device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetUpdateMode (BGAPI2_Device *device, bo_bool update_mode, const char *custom_key)
 Set the update mode state of device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNode (BGAPI2_Device *device, const char *name, BGAPI2_Node **node)
 Get the named node of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNodeTree (BGAPI2_Device *device, BGAPI2_NodeMap **node_tree)
 Get the update node tree of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNodeList (BGAPI2_Device *device, BGAPI2_NodeMap **node_list)
 Get the update node list of the device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateConfigurationFile (BGAPI2_Device *device, char *config_file, bo_uint64 *string_length)
 Returns the configuration file (xml) of the update device. More...
 
BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetParent (BGAPI2_Device *device, BGAPI2_Interface **parent)
 Returns the parent object (interface) of the device. More...
 

Detailed Description

Functions related to the GenICam Device, typically the camera.

Typedef Documentation

◆ BGAPI2_Device

typedef struct BGAPI2_Device BGAPI2_Device

Struct for pointers of type Device.

◆ BGAPI2_DevEventHandler

typedef void(BGAPI2CALL * BGAPI2_DevEventHandler) (void *callBackOwner, BGAPI2_DeviceEvent *deviceEvent)

Declaration for callback functions for BGAPI2_DevEventHandler.

Function Documentation

◆ BGAPI2_Device_Open()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_Open ( BGAPI2_Device device)

Opens a device for reading and writing.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDInterface not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORGenTL producer error
BGAPI2_RESULT_RESOURCE_IN_USEDevice is already opened
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Interface_UpdateDeviceList
BGAPI2_Interface_GetDevice
BGAPI2_Device_Close

◆ BGAPI2_Device_OpenExclusive()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_OpenExclusive ( BGAPI2_Device device)

Opens a device in exclusive mode.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDInterface not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORGenTL producer error
BGAPI2_RESULT_RESOURCE_IN_USEDevice is already opened
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_OpenReadOnly()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_OpenReadOnly ( BGAPI2_Device device)

Opens a device in read-only-mode.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDInterface not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORGenTL producer error
BGAPI2_RESULT_RESOURCE_IN_USEDevice is already opened
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_IsOpen()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsOpen ( BGAPI2_Device device,
bo_bool *  is_open 
)

Checks if the device is opened.

Parameters
[in]devicePointer to the device
[out]is_openResult variable for open state of device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetDataStream()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDataStream ( BGAPI2_Device device,
bo_uint  index,
BGAPI2_DataStream **  data_stream 
)

Returns a pointer to the data stream handle identified by index.

Parameters
[in]devicePointer to the device
[in]indexIndex of the data stream
[out]data_streamPointer to the data stream
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetNumDataStreams()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNumDataStreams ( BGAPI2_Device device,
bo_uint *  count_data_streams 
)

Returns the number of datastreams of the device.

Parameters
[in]devicePointer to the device
[out]count_data_streamsNumber of datastreams
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORInternal error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_Close()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_Close ( BGAPI2_Device device)

Closes a device.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_Open

◆ BGAPI2_Device_GetNode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNode ( BGAPI2_Device device,
const char *  name,
BGAPI2_Node **  node 
)

Get a named node of the device.

Parameters
[in]devicePointer to the device
[in]nameNode name
[out]nodePointer to store node
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetNodeTree()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNodeTree ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_tree 
)

Get the node tree of the device.

Parameters
[in]devicePointer to the device
[out]node_treePointer to store node tree
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_NOT_AVAILABLEError for missing root node
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetNodeList()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetNodeList ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_list 
)

Get the node list of the device.

Parameters
[in]devicePointer to the device
[out]node_listPointer to store node list
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_NOT_AVAILABLEError for missing root node
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_SetDeviceEventMode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetDeviceEventMode ( BGAPI2_Device device,
BGAPI2_EventMode  event_mode 
)

Set the device event mode (polling, callback, off)

Parameters
[in]devicePointer to the device
[in]event_modeEvent mode for device events
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_EventMode

◆ BGAPI2_Device_GetDeviceEventMode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDeviceEventMode ( BGAPI2_Device device,
BGAPI2_EventMode event_mode 
)

Get the device event mode (polling, callback, off)

Parameters
[in]devicePointer to the device
[out]event_modeEvent mode of device events
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_EventMode

◆ BGAPI2_CreateDeviceEvent()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_CreateDeviceEvent ( BGAPI2_DeviceEvent **  device_event)

Creates a structure to store device events retrieved via BGAPI2_Device_GetDeviceEvent

Parameters
[in,out]device_eventPointer to a struct which can store events
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetDeviceEvent

◆ BGAPI2_ReleaseDeviceEvent()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_ReleaseDeviceEvent ( BGAPI2_DeviceEvent device_event)

Destroys a device event structure.

Parameters
[in]device_eventPointer to a event struct
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetDeviceEvent()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDeviceEvent ( BGAPI2_Device device,
BGAPI2_DeviceEvent device_event,
bo_uint64  timeout 
)

Polls for event information until timeout is reached.

Parameters
[in]devicePointer to the device
[in]device_eventPointer for events structure created with BGAPI2_CreateDeviceEvent
[in]timeoutMaximum time to wait for events, if set to -1 wait indefinitely
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERROR
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_EventMode
BGAPI2_CreateDeviceEvent
BGAPI2_Device_CancelGetDeviceEvent

◆ BGAPI2_Device_CancelGetDeviceEvent()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_CancelGetDeviceEvent ( BGAPI2_Device device)

Cancels a running BGAPI2_Device_GetDeviceEvent

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_RegisterDeviceEventHandler()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_RegisterDeviceEventHandler ( BGAPI2_Device device,
void *  callback_owner,
BGAPI2_DevEventHandler  device_event_handler 
)

Register one callback function to handle all device events of the interface.

Parameters
[in]devicePointer to the device
[in]callback_ownerData, context pointer for use in callback function
[in]device_event_handlerPointer to callback function from type BGAPI2_DevEventHandler
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORCould not start event thread
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
Todo:
check... what is the callback owner???

◆ BGAPI2_Device_GetPayloadSize()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetPayloadSize ( BGAPI2_Device device,
bo_uint64 *  payload_size 
)

Returns the payload size in bytes, used to allocate image buffers.

Parameters
[in]devicePointer to the device
[out]payload_sizePointer to payload size in bytes
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetRemoteNode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNode ( BGAPI2_Device device,
const char *  name,
BGAPI2_Node **  node 
)

Get the named node of given remote device.

Parameters
[in]devicePointer to the device
[in]nameNode name
[out]nodePointer to store the node
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (no node found)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetRemoteNodeTree()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNodeTree ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_tree 
)

Get the update node tree of the device.

Parameters
[in]devicePointer to the device
[out]node_treePointer to store the node tree
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (no nodemap found)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetRemoteNodeList()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteNodeList ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_list 
)

Get the update node list of the device.

Parameters
[in]devicePointer to the device
[out]node_listPointer to store the node list
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (no nodemap found)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetID()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetID ( BGAPI2_Device device,
char *  ID,
bo_uint64 *  string_length 
)

Returns the identifier of device, can be called on a device which is not open.

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_Device_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]devicePointer to device
[in,out]IDNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetVendor()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetVendor ( BGAPI2_Device device,
char *  vendor,
bo_uint64 *  string_length 
)

Returns the vendor of device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]vendorNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetModel()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetModel ( BGAPI2_Device device,
char *  model,
bo_uint64 *  string_length 
)

Returns the name (model) of the device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]modelNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetSerialNumber()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetSerialNumber ( BGAPI2_Device device,
char *  serial_number,
bo_uint64 *  string_length 
)

Returns the serial number of device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]serial_numberNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetTLType()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetTLType ( BGAPI2_Device device,
char *  tl_type,
bo_uint64 *  string_length 
)

Returns the transport layer of device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]tl_typeNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetDisplayName()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetDisplayName ( BGAPI2_Device device,
char *  display_name,
bo_uint64 *  string_length 
)

Returns the "user friendly" display name of device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]display_nameNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetAccessStatus()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetAccessStatus ( BGAPI2_Device device,
char *  access_status,
bo_uint64 *  string_length 
)

Returns the access state of device, can be called on a device which is not open.

Parameters
[in]devicePointer to the device
[in,out]access_statusNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDProducer not initialized
BGAPI2_RESULT_LOWLEVEL_ERRORCan't read producer interface infos
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_GetID for detail how to retrieve strings with unknown size

◆ BGAPI2_Device_GetRemoteConfigurationFile()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetRemoteConfigurationFile ( BGAPI2_Device device,
char *  config_file,
bo_uint64 *  string_length 
)

Returns the configuration file (xml) of the remote device.

Parameters
[in]devicePointer to the device
[in,out]config_fileNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (no remote device)
BGAPI2_RESULT_NOT_INITIALIZEDError device not opened
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_SetRemoteConfigurationFile()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetRemoteConfigurationFile ( BGAPI2_Device device,
const char *  config_file 
)

Sets a configuration file (xml) to use with the attached remote device (camera)

Parameters
[in]devicePointer to the device
[in]config_fileConfiguration file
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_RESOURCE_IN_USEError device is opened
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_StartStacking()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_StartStacking ( BGAPI2_Device device,
bo_bool  replace_mode 
)

Starts a stack of feature writes to the device (caching write operations).

If many features are written to the device, this becomes slow as each write is acknowledged by the device. The feature stacking will send many commands at once and therefore reduces the roundtrip times

Parameters
[in]devicePointer to the device
[in]replace_modeTrue to enable combining of writes to the same register on the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (remote device not opened)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_WriteStack()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_WriteStack ( BGAPI2_Device device)

End the stacking and write all featues to the device.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (remote device not opened)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_StartStacking

◆ BGAPI2_Device_CancelStack()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_CancelStack ( BGAPI2_Device device)

End the stacking without writing featues to the device.

Parameters
[in]devicePointer to the device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (remote device not opened)
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters
See also
BGAPI2_Device_StartStacking

◆ BGAPI2_Device_IsUpdateModeAvailable()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsUpdateModeAvailable ( BGAPI2_Device device,
bo_bool *  is_available 
)

Checks for availability of update state of device.

Parameters
[in]devicePointer to the device
[out]is_availablePointer for open state of device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_IsUpdateModeActive()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_IsUpdateModeActive ( BGAPI2_Device device,
bo_bool *  is_active 
)

Returns the update mode state of device.

Parameters
[in]devicePointer to the device
[out]is_activePointer to get update mode state
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_SetUpdateMode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_SetUpdateMode ( BGAPI2_Device device,
bo_bool  update_mode,
const char *  custom_key 
)

Set the update mode state of device.

Parameters
[in]devicePointer to the device
[in]update_modeUpdate mode state to set
[in]custom_keyCustom key for security
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_RESOURCE_IN_USEUpdate mode is not enabled
BGAPI2_RESULT_NOT_INITIALIZEDError for not opened device
BGAPI2_RESULT_NOT_AVAILABLEUpdate mode is not available
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetUpdateNode()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNode ( BGAPI2_Device device,
const char *  name,
BGAPI2_Node **  node 
)

Get the named node of the device.

Parameters
[in]devicePointer to the device
[in]nameNode name
[out]nodePointer to store node
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (no node found)
BGAPI2_RESULT_NOT_INITIALIZEDError update mode is not set
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetUpdateNodeTree()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNodeTree ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_tree 
)

Get the update node tree of the device.

Parameters
[in]devicePointer to the device
[out]node_treeUpdate node map of device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_NOT_AVAILABLEError for missing root node
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetUpdateNodeList()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateNodeList ( BGAPI2_Device device,
BGAPI2_NodeMap **  node_list 
)

Get the update node list of the device.

Parameters
[in]devicePointer to the device
[out]node_listUpdate node map of device
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_NOT_AVAILABLEError for missing root node
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetUpdateConfigurationFile()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetUpdateConfigurationFile ( BGAPI2_Device device,
char *  config_file,
bo_uint64 *  string_length 
)

Returns the configuration file (xml) of the update device.

Parameters
[in]devicePointer to the device
[in,out]config_fileNullptr to get string length or pointer to store result
[in,out]string_lengthResult size, length of version string (including string end zero)
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_ERRORInternal error (init failed)
BGAPI2_RESULT_NOT_INITIALIZEDError update mode is not set
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters

◆ BGAPI2_Device_GetParent()

BGAPI2_C_DECL BGAPI2_RESULT BGAPI2CALL BGAPI2_Device_GetParent ( BGAPI2_Device device,
BGAPI2_Interface **  parent 
)

Returns the parent object (interface) of the device.

Parameters
[in]devicePointer to the device
[out]parentThe parent object
Return values
BGAPI2_RESULT_SUCCESSNo error
BGAPI2_RESULT_INVALID_PARAMETERError for invalid parameters