IDS peak comfortC  v1.3.0

Functions

peak_status peak_GFA_String_Set (peak_camera_handle hCam, peak_gfa_module module, const char *stringFeatureName, const char *stringValue)
 Set the string feature with the given name. More...
 
peak_status peak_GFA_String_Get (peak_camera_handle hCam, peak_gfa_module module, const char *stringFeatureName, char *stringValue, size_t *stringValueSize)
 Get the string feature with the given name. More...
 

Detailed Description

Generic string feature access related functions and types.

Function Documentation

◆ peak_GFA_String_Get()

peak_status peak_GFA_String_Get ( peak_camera_handle  hCam,
peak_gfa_module  module,
const char *  stringFeatureName,
char *  stringValue,
size_t *  stringValueSize 
)

Get the string feature with the given name.

Reads the current value of the string feature with the given name.

This function implements the Two Staged Data Query principle.

Parameters
[in]hCamThe camera handle.
[in]moduleThe addressed module.
[in]stringFeatureNameThe name of the string feature as a zero-terminated string.
[out]stringValuePointer to a user allocated character buffer to receive the value of the string feature. If this parameter is NULL, stringValueSize will contain the current size of the string, including the terminating 0.
The required size of stringValue in bytes is stringValueSize x sizeof(char).
[in,out]stringValueSize
  • stringValue equal NULL:
    out: minimal number of characters stringValue must be large enough to hold, including the terminating 0
  • stringValue unequal NULL:
    in: number of characters stringValue can hold
    out: number of characters filled by the function, including the terminating 0
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_BUFFER_TOO_SMALL stringValue is not NULL and the value of *stringValueSize is too small to receive the expected amount of data.
PEAK_STATUS_ACCESS_DENIED The string feature is not available for read access. Check the access status via peak_GFA_Feature_GetAccessStatus.
PEAK_STATUS_INVALID_PARAMETER module is an invalid GFA module or at least one of stringFeatureName, stringValue, and stringValueSize is an invalid pointer or stringFeatureName is not zero-terminated. Check peak_gfa_module.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

For a description of the generic feature access concept see Generic Feature Access (GFA).

Note
Consider that the string value might change between the size query call and the value query call.
This may be the case if the camera configuration or the camera status have changed in the time between the two function calls.

◆ peak_GFA_String_Set()

peak_status peak_GFA_String_Set ( peak_camera_handle  hCam,
peak_gfa_module  module,
const char *  stringFeatureName,
const char *  stringValue 
)

Set the string feature with the given name.

Writes the desired value to the string feature with the given name.

Note
The write access is only available in the GFA write access mode. See peak_GFA_EnableWriteAccess.
Parameters
[in]hCamThe camera handle.
[in]moduleThe addressed module.
[in]stringFeatureNameThe name of the string feature as a zero-terminated string.
[in]stringValueThe zero-terminated string value to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The string feature is not available for write access. Check the access status via peak_GFA_Feature_GetAccessStatus. Check for the GFA write access mode to be enabled via peak_GFA_IsWriteAccessEnabled.
PEAK_STATUS_INVALID_PARAMETER module is an invalid GFA module or stringFeatureName and/or stringValue are invalid pointers or not zero-terminated. Check peak_gfa_module.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

For a description of the generic feature access concept see Generic Feature Access (GFA).