HALCON Reference Manual 10.0.2
Table of Contents / Image / Acquisition ClassesClassesClasses | | | Operators

get_framegrabber_callbackget_framegrabber_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback (Operator)

Name

get_framegrabber_callbackget_framegrabber_callbackget_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 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_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback queries a callback function for the image acquisition device specified by AcqHandleAcqHandleAcqHandleAcqHandleacqHandle. If the callback function was registered via set_framegrabber_callbackset_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback before, CallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctioncallbackFunction contains a pointer to it, otherwise NULL. Furthermore, UserContextUserContextUserContextUserContextuserContext contains a pointer to the user-specific context data that was set via set_framegrabber_callbackset_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback (or NULL).

With the parameter CallbackTypeCallbackTypeCallbackTypeCallbackTypecallbackType, 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_asyncgrab_image_asyncGrabImageAsyncGrabImageAsync.

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

Parallelization

Parameters

AcqHandleAcqHandleAcqHandleAcqHandleacqHandle (input_control)  framegrabber HFramegrabber, HTupleHFramegrabber, HTupleHFramegrabberX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Handle of the acquisition device to be used.

CallbackTypeCallbackTypeCallbackTypeCallbackTypecallbackType (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Callback type.

Default value: '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"

CallbackFunctionCallbackFunctionCallbackFunctionCallbackFunctioncallbackFunction (output_control)  pointer HTupleHTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Pointer to the callback function.

UserContextUserContextUserContextUserContextuserContext (output_control)  pointer HTupleHTupleVARIANTHtuple (integer) (IntPtr) (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_callbackget_framegrabber_callbackGetFramegrabberCallbackGetFramegrabberCallback returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

open_framegrabberopen_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, set_framegrabber_callbackset_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback

Possible Successors

grab_imagegrab_imagegrab_imageGrabImageGrabImage, grab_datagrab_datagrab_dataGrabDataGrabData, grab_image_startgrab_image_startgrab_image_startGrabImageStartGrabImageStart, grab_image_asyncgrab_image_asyncgrab_image_asyncGrabImageAsyncGrabImageAsync, grab_data_asyncgrab_data_asyncgrab_data_asyncGrabDataAsyncGrabDataAsync, set_framegrabber_paramset_framegrabber_paramset_framegrabber_paramSetFramegrabberParamSetFramegrabberParam, close_framegrabberclose_framegrabberclose_framegrabberCloseFramegrabberCloseFramegrabber

See also

open_framegrabberopen_framegrabberopen_framegrabberOpenFramegrabberOpenFramegrabber, info_framegrabberinfo_framegrabberinfo_framegrabberInfoFramegrabberInfoFramegrabber, set_framegrabber_callbackset_framegrabber_callbackset_framegrabber_callbackSetFramegrabberCallbackSetFramegrabberCallback

Module

Foundation


Table of Contents / Image / Acquisition ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH