Skip to content

get_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callbackT_get_framegrabber_callback🔗

Short description🔗

get_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callbackT_get_framegrabber_callback — Query callback function of an image acquisition device.

Signature🔗

get_framegrabber_callback( framegrabber AcqHandle, string CallbackType, out pointer CallbackFunction, out pointer UserContext )void GetFramegrabberCallback( const HTuple& AcqHandle, const HTuple& CallbackType, HTuple* CallbackFunction, HTuple* UserContext )static void HOperatorSet.GetFramegrabberCallback( HTuple acqHandle, HTuple callbackType, out HTuple callbackFunction, out HTuple userContext )def get_framegrabber_callback( acq_handle: HHandle, callback_type: str ) -> Tuple[int, int]

Herror T_get_framegrabber_callback( const Htuple AcqHandle, const Htuple CallbackType, Htuple* CallbackFunction, Htuple* UserContext )

void* HFramegrabber::GetFramegrabberCallback( const HString& CallbackType, void** UserContext ) const

void* HFramegrabber::GetFramegrabberCallback( const char* CallbackType, void** UserContext ) const

void* HFramegrabber::GetFramegrabberCallback( const wchar_t* CallbackType, void** UserContext ) const (Windows only)

IntPtr HFramegrabber.GetFramegrabberCallback( string callbackType, out IntPtr userContext )

Description🔗

The operator get_framegrabber_callbackGetFramegrabberCallback queries a callback function for the image acquisition device specified by AcqHandleacqHandleacq_handle. If the callback function was registered via set_framegrabber_callbackSetFramegrabberCallback before, CallbackFunctioncallbackFunctioncallback_function contains a pointer to it, otherwise NULL. Furthermore, UserContextuserContextuser_context contains a pointer to the user-specific context data that was set via set_framegrabber_callbackSetFramegrabberCallback (or NULL).

With the parameter CallbackTypecallbackTypecallback_type, you can select different callback types. Suggested values are:

  • ‘exception’: The image acquisition has raised an exception.

  • ‘exposure_end’: The exposure of the next image has been finished.

  • ‘exposure_start’: The exposure of the next image has been started.

  • ‘transfer_end’: A new image is ready to be fetched by grab_image_asyncGrabImageAsync.

Depending on the functionality of the underlying API, additional values for CallbackTypecallbackTypecallback_type are possible. All actually supported callback types of a specific image acquisition device can be queried by calling get_framegrabber_paramGetFramegrabberParam with the parameter 'available_callback_types'. For more details see the documentation of the specific image acquisition interface.

Attention🔗

For a multithreaded application, info_framegrabberInfoFramegrabber, open_framegrabberOpenFramegrabber, and close_framegrabberCloseFramegrabber are executed exclusively.

get_framegrabber_callbackGetFramegrabberCallback runs in parallel with all non-exclusive operators inside and outside of this group.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

AcqHandleacqHandleacq_handle (input_control) framegrabber → (handle)HTuple (HHandle)HFramegrabber, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the acquisition device to be used.

CallbackTypecallbackTypecallback_type (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Callback type.

Default: 'transfer_end'"transfer_end"
Suggested values: 'exception', 'exposure_end', 'exposure_start', 'transfer_end'"exception", "exposure_end", "exposure_start", "transfer_end"

CallbackFunctioncallbackFunctioncallback_function (output_control) pointer → (integer)HTuple (Hlong)HTuple (IntPtr)intHtuple (Hlong)

Pointer to the callback function.

UserContextuserContextuser_context (output_control) pointer → (integer)HTuple (Hlong)HTuple (IntPtr)intHtuple (Hlong)

Pointer to user-specific context data.

Result🔗

If the image acquisition device is open and the specified callback type is supported, the operator get_framegrabber_callbackGetFramegrabberCallback returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

open_framegrabberOpenFramegrabber, set_framegrabber_callbackSetFramegrabberCallback

Possible successors

grab_imageGrabImage, grab_dataGrabData, grab_image_startGrabImageStart, grab_image_asyncGrabImageAsync, grab_data_asyncGrabDataAsync, set_framegrabber_paramSetFramegrabberParam, close_framegrabberCloseFramegrabber

See also

open_framegrabberOpenFramegrabber, info_framegrabberInfoFramegrabber, set_framegrabber_callbackSetFramegrabberCallback

Module🔗

Foundation