get_framegrabber_callbackT_get_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callback (Operator)

Name

get_framegrabber_callbackT_get_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callback — Query callback function of an image acquisition device.

Signature

get_framegrabber_callback( : : AcqHandle, CallbackType : CallbackFunction, UserContext)

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

void GetFramegrabberCallback(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)

static void HOperatorSet.GetFramegrabberCallback(HTuple acqHandle, HTuple callbackType, out HTuple callbackFunction, out HTuple userContext)

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

def get_framegrabber_callback(acq_handle: HHandle, callback_type: str) -> Tuple[int, int]

Description

The operator get_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callback queries a callback function for the image acquisition device specified by AcqHandleAcqHandleAcqHandleacqHandleacq_handle. If the callback function was registered via set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackset_framegrabber_callback before, CallbackFunctionCallbackFunctionCallbackFunctioncallbackFunctioncallback_function contains a pointer to it, otherwise NULL. Furthermore, UserContextUserContextUserContextuserContextuser_context contains a pointer to the user-specific context data that was set via set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackset_framegrabber_callback (or NULL).

With the parameter CallbackTypeCallbackTypeCallbackTypecallbackTypecallback_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_asyncgrab_image_asyncGrabImageAsyncGrabImageAsyncgrab_image_async.

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

Attention

For a multithreaded application, info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberinfo_framegrabber, open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberopen_framegrabber, and close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberclose_framegrabber are executed exclusively.

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

Execution Information

Parameters

AcqHandleAcqHandleAcqHandleacqHandleacq_handle (input_control)  framegrabber HFramegrabber, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the acquisition device to be used.

CallbackTypeCallbackTypeCallbackTypecallbackTypecallback_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Callback type.

Default: 'transfer_end' "transfer_end" "transfer_end" "transfer_end" "transfer_end"

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

CallbackFunctionCallbackFunctionCallbackFunctioncallbackFunctioncallback_function (output_control)  pointer HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Pointer to the callback function.

UserContextUserContextUserContextuserContextuser_context (output_control)  pointer HTupleintHTupleHtuple (integer) (IntPtr) (Hlong) (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_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallbackget_framegrabber_callback returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberopen_framegrabber, set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackset_framegrabber_callback

Possible Successors

grab_imagegrab_imageGrabImageGrabImagegrab_image, grab_datagrab_dataGrabDataGrabDatagrab_data, grab_image_startgrab_image_startGrabImageStartGrabImageStartgrab_image_start, grab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsyncgrab_image_async, grab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsyncgrab_data_async, set_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParamset_framegrabber_param, close_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabberclose_framegrabber

See also

open_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabberopen_framegrabber, info_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabberinfo_framegrabber, set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallbackset_framegrabber_callback

Module

Foundation