APX-3302 User's Manual (OM110000019A)
-91 -
■
Register callback function
It registers callback function for notice of interrupt by AcapRegistCallback/AcapRegistCallbackEx. Only 1
callback function can be registered, but it can specify multiple interrupts.
■
The setting example for software
The sample code to register callback function that occurs at "1 frame input completion interrupt" for ch1 is
as follows.
<Sample code>
void
CALLBACK CallbackFunc (
int
nChannel, DWORD dwEvent,
int
nFrameNo,
int
nMemoryNo)
{
printf(
"CallbackFunc called. nChannel[%d] dwEvent[%d] nFrameNo[%d] nMemoryNo[%d]¥n"
,
nChannel, dwEvent, nFrameNo, nMemoryNo);
//Process at 1 frame input completion
}
// Register callback function at main routine
int
rtn;
int
channel = 1;
rtn = AcapRegistCallback(hDevice, channel, ACL_INT_FRAMEEND, (EVENT_FUNC)&CallbackFunc);
// Start capturing (Grab)
rtn = AcapGrabStart(hDevice, channel, 0);
// CallbackFunc is called as inputting 1 frame
<< Output result>> * If number of transfer destination memory = 3
CallbackFunc called. nChannel[1] dwEvent[2] nFrameNo[1] nMemoryNo[1]
CallbackFunc called. nChannel[1] dwEvent[2] nFrameNo[2] nMemoryNo[2]
CallbackFunc called. nChannel[1] dwEvent[2] nFrameNo[3] nMemoryNo[3]
CallbackFunc called. nChannel[1] dwEvent[2] nFrameNo[4] nMemoryNo[1]
CallbackFunc called. nChannel[1] dwEvent[2] nFrameNo[5] nMemoryNo[2]
Содержание APX-3302
Страница 1: ...APX 3302 User s Manual ...