GenICam_SDK.docx
12
4
List of SDK-functions
4.1 Init/Deinit-functions
csiInit
Initializes the SDK. Needs to be called first before any other function of the SDK is called!
Syntax
csiErr csiInit(csiLogLevel logLvl = CSI_LOGLEVEL_WARN, , csiLogSinkCallbackFunc logCallbackFunc = NULL,
csiLogUserData* userdata = NULL)
Parameters:
In:
logLvl:
Defines the loglevel for the SDK. This will enable a closer debugging of the SDK. Use
the enum csiLogLevel for setting the desired loglevel
logCallbackFunc :
An optional callback function for log messages coming from the SDK.
userData:
Optional user data that will be passed as parameter when the log callback function is
called.
Out:Nothing
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
After the usage of the SDK make sure to call csiClose in order to free all memory again and not leaving any interfaces open.
csiClose
Closes the SDK and frees all allocated memory and interfaces.
Syntax
csiErr csiClose();
Parameters:
In: Nothing
Out:Nothing
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
4.2 Connecting and closing a device
csiDiscoverDevices
This function will look for attached GenICAM-devices on the available transport layers.
Syntax
csiErr csiDiscoverDevices(csiDiscoveryInfo* discoveryInfoOut, uint64_t timeoutMilliseconds,
csiDiscoveryInfoCallbackFunc discCallbackFunc = NULL,
const char* additionalSearchPaths = NULL, bool overrideSearchPath = false)
Parameters:
In: timeoutMilliseconds
The time until when a response from a device needs to be received when doing a discovery
discCallbackFunc
Pointer to a callback function which receives information about the discovery progress.
The callback function receives the current progress in %, number and names of the found
devices Also a flag if the discovery is running is provided.
additionalSearchPaths
You can specify additional paths to search for transport layers. If you want to specify multiple
paths, you need to divide the paths by using
a “;”-sign
overrideSearchPath
If this flag is set, only the path(s) provided
in “additionalSearchPaths” will be searched for the
cti-files to load
Out: discoveryInfoOut
pointer to a structure which will contain the information about the found devices. The
information is the same provided to the callback function
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
By default, this function tries to use all available transport layers in the system. The search paths for the cti-files are set in the
environmental variable GENICAM_GENTL64_PATH (64 bit) or GENICAM_GENTL32_PATH(32 bit applications).