IDS peak AFL v1.7.0
Loading...
Searching...
No Matches

Data Structures

struct  peak_afl_process_data
 generic process data More...
 
struct  peak_afl_process_data_brightness
 brightness process data More...
 
struct  peak_afl_process_data_whitebalance
 whitebalance process data More...
 
struct  peak_afl_process_data_focus
 focus process data More...
 

Typedefs

typedef void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_FINISHED_FUNC) (void *context)
 Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_FINISHED.
 
typedef void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_PROCESSING_FUNC) (peak_afl_process_data *data, void *context)
 Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING.
 

Enumerations

enum  peak_afl_callback_type { PEAK_AFL_CONTROLLER_CALLBACK_FINISHED , PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA , PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING }
 controller callback type More...
 

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_Callback_Set (peak_afl_controller_handle controller, peak_afl_callback_type type, void *funcPtr, void *context)
 Set a callback for a controller.
 

Detailed Description

It is possible to be informed for specific events via callbacks. The following callbacks are available:

Note
The Finished callback will only be called when the controller runs in Once mode.

Examples

Note
To reduce and simplify the sample code, the examples do not check the return values.

Finished callback function

void on_automanager_finished(void* context)
{
// controller signaled finished
uint8_t last_average = 0;
peak_afl_AutoController_GetLastAutoAverage(controller, &last_average);
}

Processing callback function

void on_automanager_processing(peak_afl_process_data* data, void* context)
{
if (data->controller_type == PEAK_AFL_CONTROLLER_TYPE_BRIGHTNESS)
{
// controller signaled processing of brightness data
if (brightness->controller_status == PEAK_AFL_CONTROLLER_STATUS_ERROR)
{
// something failed during processing (e.g. ROI size) check last error with peak_afl_GetLastError
}
}
}

Register callback functions

hController, PEAK_AFL_CONTROLLER_CALLBACK_FINISHED, (void*)&on_automanager_finished, hController);
hController, PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING, (void*)&on_automanager_processing, hController);

Typedef Documentation

◆ PEAK_AFL_CALLBACK_FINISHED_FUNC

typedef void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_FINISHED_FUNC) (void *context)

Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_FINISHED.

Parameters
contextUser context data
Since
1.0

◆ PEAK_AFL_CALLBACK_PROCESSING_FUNC

typedef void(PEAK_AFL_CALLCONV * PEAK_AFL_CALLBACK_PROCESSING_FUNC) (peak_afl_process_data *data, void *context)

Callback function type definition for PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING.

Parameters
dataProcessing data
contextUser context data
Since
1.7

Enumeration Type Documentation

◆ peak_afl_callback_type

controller callback type

Enumerator
PEAK_AFL_CONTROLLER_CALLBACK_FINISHED 

Controller callback type finished.

PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING_DATA 

Controller callback type processing.

Deprecated
use PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING instead
PEAK_AFL_CONTROLLER_CALLBACK_PROCESSING 

Controller callback type processing.

Function Documentation

◆ peak_afl_AutoController_Callback_Set()

PEAK_AFL_API_STATUS peak_afl_AutoController_Callback_Set ( peak_afl_controller_handle controller,
peak_afl_callback_type type,
void * funcPtr,
void * context )

Set a callback for a controller.

Set funcPtr to NULL to disable the callback. Set funcPtr to !NULL to enable the callback.

The callback set by funcPtr will be called with context as its last parameter.

For a list of valid types see peak_afl_callback_type.

Parameters
[in]controllercontroller handle
[in]typecallback type
[in]funcPtrfunction pointer
[in]contextpointer
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_INVALID_PARAMETER The argument is invalid.
PEAK_AFL_STATUS_NOT_SUPPORTED The function is not supported.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.
Since
1.0