EasyManua.ls Logo

Euresys Coaxlink - Page 38

Euresys Coaxlink
45 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Coaxlink Programmer's GuideEGrabber for MultiCam users
MC_SignalEnable_ON);
if (status != MC_OK) {
...
}
// enable "END_EXPOSURE" events
status = McSetParamInt(channel, MC_SignalEnable + MC_SIG_END_EXPOSURE,
MC_SignalEnable_ON);
if (status != MC_OK) {
...
}
// register "extern C" callback function
MCSTATUS status = McRegisterCallback(channel, GlobalCallbackFunction, this);
if (status != MC_OK) {
...
}
}
void onEvent(MCSIGNALINFO *info) {
switch (info->Signal) {
case MC_SIG_SURFACE_PROCESSING:
MCHANDLE surface = info.SignalInfo;
// process surface
...
break;
case MC_SIG_END_EXPOSURE:
// handle "END_EXPOSURE" event
...
break;
}
}
private:
MCHANDLE channel;
};
void MCAPI GlobalCallbackFunction(MCSIGNALINFO *info) {
if (info && info->Context) {
MyGrabber *grabber = (MyGrabber *)info->Context;
grabber->onEvent(info);
}
};
//EGrabber
class MyGrabber : public EGrabber<CallbackSingleThread> {
public:
MyGrabber(EGenTL &gentl) : EGrabber<CallbackSingleThread>(gentl) {
// configure grabber
...
// enable "NewBuffer" events
enableEvent<NewBufferData>();
// enable "Cic" events
enableEvent<CicData>();
}
private:
virtual void onNewBufferEvent(const NewBufferData& data) {
ScopedBuffer buffer(*this, data);
// process buffer
...
}
virtual void onCicEvent(const CicData &data) {
// handle "Cic" event
...
}
};
Synchronous (blocking) event handling
//MultiCam
class MyChannel {
public:
38

Related product manuals