![]() |
![]() |
---|---|
USB 2.0 USB 3.x GigE |
USB 2.0 USB 3.x GigE |
Syntax
INT is_EnableEvent (HIDS hCam, INT which)
Description
This function is obsolete and should not be used anymore. We recommend to use the is_Event() function instead. |
Using is_EnableEvent(), you release an event object. Following the release, the event messages for the created event object are enabled. Depending on the operating system different functions are to call.
Windows |
•Event has to be provided by the application program •Event has to be declared by is_InitEvent() •Event has to be activated by is_EnableEvent() •You have to wait for the event in the application program by WaitForSingleObject or WaitForMultipleObject •Event has to be deactivated by is_DisableEvent() •Event has to be logged off by is_ExitEvent() |
Linux |
•Event has to be provided by the uEye API •Event has to be activated by is_EnableEvent() •You have to wait for the event by is_WaitEvent() •Event has to be deactivated by is_DisableEvent() |
Event handling for images If you use the event handling to signal new images from the camera, it may occur under high system load that the event-based application does not receive a signal for every image. This is because the event concept does not provide that several events of the same type are stored. If due to system load more than one image is signaled before the application is ready (e.g. WaitForSingleObject), you have no option to capture these missed events. |
Input parameters
hCam |
Camera handle |
||
|
Return values
IS_INVALID_CAMERA_HANDLE |
Invalid camera handle |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_NO_SUCCESS |
General error message |
IS_SUCCESS |
Function executed successfully |
Related functions
•Windows only: is_InitEvent()
•Windows only: is_ExitEvent()
•Linux only: is_WaitEvent()
Example Window
HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
is_InitEvent(hCam, hEvent, IS_SET_EVENT_FRAME);
is_EnableEvent(hCam, IS_SET_EVENT_FRAME);
is_FreezeVideo(hCam, IS_DONT_WAIT);
DWORD dwRet = WaitForSingleObject(hEvent, 1000);
if (dwRet == WAIT_TIMEOUT)
{
/* wait timed out */
}
else if (dwRet == WAIT_OBJECT_0)
{
/* event signaled */
}
is_DisableEvent(hCam, IS_SET_EVENT_FRAME);
is_ExitEvent(hCam, IS_SET_EVENT_FRAME);
CloseHandle(hEvent);
Example Linux
is_EnableEvent(hCam, IS_SET_EVENT_FRAME);
is_FreezeVideo(hCam, IS_DONT_WAIT);
INT nRet = is_WaitEvent(hCam, IS_SET_EVENT_FRAME, 1000);
if (nRet == IS_TIMED_OUT)
{
/* wait timed out */
}
else if (nRet == IS_SUCCESS)
{
/* event signaled */
}
is_DisableEvent(hCam, IS_SET_EVENT_FRAME);