GenICam_SDK.docx
17
csiGetFeatureString
Retrieve a string feature from the device
Syntax
csiErr csiGetFeatureString(csiHandle device, const char* parameterName, char* valueOut, size_t* sizeOut, csiModuleLevel
module = CSI_DEVICE_MODULE)
Parameters:
In:
device:
Handle provided by the
-function
parameterName: name (Not the display name!) of the feature to get
module: Module for which the parameter should be set. Please use the enum csiModuleLevel to select.
Determines if the parameter should be retrieved from the device-, transport layer-, interface- stream- or
buffer-module
Out: valueOut:
Pointer to a char-value where the current value of the feature will be written to
sizeOut:
size of the read string
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
To avoid unexpected behavior, you should first retrieve the length of the string to be received!
1.
Call the function with valueOut set to NULL. The function will return the current size of the string parameter.
This enables the user to provide sufficient space to return the desired string.
Alternative: Call
the function “csiGetFeatureParameter”. This function will provide all necessary information
about the parameter (including min and max values).
The maximum string length to be retrieved can be read from from the
“maximumStringLength”-parameter
2.
Call the function as described by providing a pointer to the string buffer with the sufficient length
csiSetFeatureString
Set a string feature on the device
Syntax
csiErr csiSetFeatureString(csiHandle device, const char* parameterName,const char* value,
csiModuleLevel module = CSI_DEVICE_MODULE)
Parameters:
In: device: Handle provided by the
-function
parameterName: name (Not the display name!) of the feature to set
value: pointer to a character array which contains the string to set
module: Module for which the parameter should be set. Please use the enum csiModuleLevel to select.
Determines if the parameter should be set on the device-, transport layer-, interface- stream- or buffer-
module
Out:
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
To avoid unexpected behavior, it is recommended to retrieve the maximum string length before setting it to the device.
This can be achieved by using the function
“csiGetFeatureParameter”. This function will provide all necessary information
about the parameter (including min and max values).
The string length must not exceed the
length given in the “maximumStringLength”-parameter
csiExecuteCommand
Execute a command on the device
Syntax
csiErr csiExecuteCommand(csiHandle device, const char* parameterName,
csiModuleLevel module = CSI_DEVICE_MODULE)
Parameters:
In: device: Handle provided by the
-function
parameterName: name (Not the display name!) of the feature to set.
module: Module for which the parameter should be executed. Please use the enum csiModuleLevel to select.
Determines if the parameter should be executed on the device-, transport layer-, interface- stream- or buffer-
module
Out:
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
The function will return immediately. Even if the triggered function is still active. To check if the command is still running,
please use the function “