
28 / 58
28
int
iCube
SDK_
SetCallback (int nCamIndex,int nMode,long
(CALLBACK *CallbackFunc,void* pCBContext)
Purpose: sets the callback function.
Only necessary, if Callback-Flag in “
iCube
SDK_Start” is true.
The structure of the callback-function has to be as follows:
long CALLBACK CallbackFunc(BYTE * pBuffer, long lBufferSize,PVOID pContext )
Parameters passed by the Callback-function:
BYTE * pBuffer: pointer to frame data.
long lBufferSize: size of the frame data buffer.
PVOID pContext: context parameter (see below).
Description
Parameters
int
CamIndex,
int
nMode,
long
(
CALLBACK*
CallbackFunc),
void*
pCBContext
Return value
Int
stat
Return value:
int
stat
:
IC_SUCCESS:
success
else: error
Parameters:
int
nCamIndex: index of camera.
int
nMode: defines the grab mode.
CALLBACK_RAW:
Data-format, passed to the callback function:
- color-camera: 8bit/Pixel (Bayer-raw Data)
- monochrome -camera: 8bit/Pixel (Raw Data)
CALLBACK_RGB:
Data-format, passed to the callback function:
- color-camera: 24bit/Pixel (RGB24 Data)
- monochrome-camera: 24bit/Pixel (RGB24 Data)
- color order in callback data is BGR.
long*
CallbackFunc: pointer to the callback function.
void*
pCBContext: pointer to user defined argument, which is passed by the callback function.