Vimba C registering event callbacks
// 1. define callback function
void VMB_CALL EventCallbackFunction(VmbHandle_t handle, const char* name, void* context)
{
printf("Event was fired: %s\n", name);
}
// 2. select "AcquisitionStart" event
VmbFeatureStringSet( cameraHandle, "EventSelector", "AcquisitionStart");
// 3. switch the even notification on
VmbFeatureEnumSet (cameraHandle, "EventNotification", "On");
// 4. register the callback for that event
VmbFeatureInvalidationRegister( cameraHandle, "EventAcquisitionStart", EventCallbackFunction, NULL);
Zurück zur Übersicht