ClassesClassesClassesClasses | | | | Operators

get_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback (Operator)

Name

get_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback — Query callback function of an image acquisition device.

Signature

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

Herror get_framegrabber_callback(const Hlong AcqHandle, const char* CallbackType, Hlong* CallbackFunction, Hlong* UserContext)

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

Herror get_framegrabber_callback(const HTuple& AcqHandle, const HTuple& CallbackType, Hlong* CallbackFunction, Hlong* UserContext)

Hlong HFramegrabber::GetFramegrabberCallback(const HTuple& CallbackType, HTuple* UserContext) const

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 HOperatorSetX.GetFramegrabberCallback(
[in] VARIANT AcqHandle, [in] VARIANT CallbackType, [out] VARIANT* CallbackFunction, [out] VARIANT* UserContext)

Hlong HFramegrabberX.GetFramegrabberCallback(
[in] BSTR CallbackType, [out] Hlong* UserContext)

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

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

Description

The operator get_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback queries a callback function for the image acquisition device specified by AcqHandleAcqHandleAcqHandleAcqHandleAcqHandleacqHandle. If the callback function was registered via set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback before, CallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctioncallbackFunction contains a pointer to it, otherwise NULL. Furthermore, UserContextUserContextUserContextUserContextUserContextuserContext contains a pointer to the user-specific context data that was set via set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback (or NULL).

With the parameter CallbackTypeCallbackTypeCallbackTypeCallbackTypeCallbackTypecallbackType, 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_asyncGrabImageAsyncgrab_image_asyncGrabImageAsyncGrabImageAsync.

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

Attention

Basically an image acquisition handle AcqHandleAcqHandleAcqHandleAcqHandleAcqHandleacqHandle cannot be used in multiple threads. However, possible exceptions are described in the specific reference documentation of the respective image acquisition interface. Different image acquisition handles can be used safely with different threads for each handle.

For a multithreaded application all image acquisition operators (as listed in open_framegrabberopen_framegrabberOpenFramegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber) are an own group in which info_framegrabberinfo_framegrabberInfoFramegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabber, open_framegrabberopen_framegrabberOpenFramegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, close_framegrabberclose_framegrabberCloseFramegrabberclose_framegrabberCloseFramegrabberCloseFramegrabber and close_all_framegrabbersclose_all_framegrabbersCloseAllFramegrabbersclose_all_framegrabbersCloseAllFramegrabbersCloseAllFramegrabbers are executed exclusively.

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

Parallelization

Parameters

AcqHandleAcqHandleAcqHandleAcqHandleAcqHandleacqHandle (input_control)  framegrabber HFramegrabber, HTupleHTupleHFramegrabber, HTupleHFramegrabberX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the acquisition device to be used.

CallbackTypeCallbackTypeCallbackTypeCallbackTypeCallbackTypecallbackType (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Callback type.

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

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

CallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctioncallbackFunction (output_control)  pointer HTupleHTupleHTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Pointer to the callback function.

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

Possible Predecessors

open_framegrabberopen_framegrabberOpenFramegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback

Possible Successors

grab_imagegrab_imageGrabImagegrab_imageGrabImageGrabImage, grab_datagrab_dataGrabDatagrab_dataGrabDataGrabData, grab_image_startgrab_image_startGrabImageStartgrab_image_startGrabImageStartGrabImageStart, grab_image_asyncgrab_image_asyncGrabImageAsyncgrab_image_asyncGrabImageAsyncGrabImageAsync, grab_data_asyncgrab_data_asyncGrabDataAsyncgrab_data_asyncGrabDataAsyncGrabDataAsync, set_framegrabber_paramset_framegrabber_paramSetFramegrabberParamset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam, close_framegrabberclose_framegrabberCloseFramegrabberclose_framegrabberCloseFramegrabberCloseFramegrabber

See also

open_framegrabberopen_framegrabberOpenFramegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, info_framegrabberinfo_framegrabberInfoFramegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabber, set_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback

Module

Foundation


ClassesClassesClassesClasses | | | | Operators