IDS peak AFL v2.0.1
Loading...
Searching...
No Matches

Event notification callbacks for brightness control component operations. More...

Functions

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Callback_Set (peak_afl_controller_handle controller, peak_afl_controller_brightness_component component, peak_afl_callback_type type, void *funcPtr, void *context)
 Set a callback function for a specific brightness component.

Detailed Description

Event notification callbacks for brightness control component operations.

It is possible to be informed for specific events via callbacks. Callbacks provide real-time feedback about controller operations and enable responsive application behavior.

Available Callback Types

Finished Callback

Finished will be called when the controller has completed its operation and reached the target value.

When called:

  • Controller completes adjustment in Once mode
  • Target value is reached within tolerance
  • Operation is cancelled or encounters an error

Processing Callback

Processing will be called during image processing to provide real-time feedback.

When called:

  • Each time an image is processed
  • Provides intermediate calculation results
  • Available in all controller modes

Callback Threading Considerations

Important Threading Notes:

  • Callbacks may be invoked from worker threads
  • Avoid blocking operations in callbacks
  • Keep callback execution time minimal
Note
The Finished callback will only be called when the controller runs in Once mode.

Function Documentation

◆ peak_afl_AutoController_BrightnessComponent_Callback_Set()

PEAK_AFL_API_STATUS peak_afl_AutoController_BrightnessComponent_Callback_Set ( peak_afl_controller_handle controller,
peak_afl_controller_brightness_component component,
peak_afl_callback_type type,
void * funcPtr,
void * context )

Set a callback function for a specific brightness component.

Configures a callback function that will be invoked when specific events occur for an individual brightness component within a brightness controller. Callbacks provide asynchronous notification of component state changes, processing completion, convergence events, or errors. This enables responsive application behavior and real-time monitoring of brightness adjustment mechanisms.

Parameters
[in]controllerController handle for which to set the brightness component callback
[in]componentBrightness component for which to configure the callback. Available components include exposure time, analog gain, digital gain, and other brightness adjustment mechanisms. See peak_afl_controller_brightness_component for available options.
[in]typeType of callback event to monitor. Different types correspond to different component events such as processing completion, convergence, or status changes. See peak_afl_callback_type for available options.
[in]funcPtrFunction pointer to the callback function. Set to NULL to disable the callback, or provide a valid function pointer to enable it. The callback signature must match the specified callback type.
[in]contextUser-defined context pointer that will be passed as the last parameter to the callback function. Can be NULL if no context is needed.
Returns
PEAK_AFL_STATUS_SUCCESS Brightness component callback configured successfully
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized
PEAK_AFL_STATUS_INVALID_PARAMETER Invalid controller handle, component, or callback type
PEAK_AFL_STATUS_NOT_SUPPORTED Component callbacks are not supported
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred
Note
Set funcPtr to NULL to disable the callback for the specified component and type
The callback function will be called from the processing thread context
Multiple callback types can be configured for the same component
The context pointer is passed unchanged to the callback function
Callback functions should be lightweight to avoid impacting processing performance
See also
peak_afl_AutoController_BrightnessComponent_Status()
peak_afl_controller_brightness_component
peak_afl_callback_type
Since
1.2