Home > C: Programming > Function Descriptions > History back  Previous chapter  Next chapter  Print  

is_InitEvent

uEye Camera Manual Version 3.80

is_InitEvent

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_InitEvent (HIDS hCam, HANDLE hEv, INT which)

Description

is_InitEvent() initializes the event handle for the specified event object. This registers the event object in the uEye kernel driver.

Achtung

Note on using USB cameras under Windows

The following events require a Windows message loop. This message loop has to be executed by the thread that loads the uEye API. The message loop is usually provided by the application window. In some cases, the message loop might not be created automatically (e.g. in console applications). In this case you will need to implement the message loop yourself.

This applies to the following uEye events:

IS_SET_EVENT_REMOVED
IS_SET_EVENT_REMOVAL
IS_SET_EVENT_DEVICE_RECONNECTED
IS_SET_EVENT_NEW_DEVICE

If no message loop exists, a USB camera will not be automatically detected after reconnecting.

Input Parameters

hCam

Camera handle

hEv

Event handle created by the CreateEvent() Windows API function.

Note: Under Linux, hEv has to be NULL.

which

ID of the event to be initialized

IS_SET_EVENT_FRAME

A new image is available.

IS_SET_EVENT_SEQ

The sequence is completed.

IS_SET_EVENT_STEAL

An image extracted from the overlay is available.

IS_SET_EVENT_TRANSFER_FAILED

During the transfer, data was lost.

IS_SET_EVENT_EXTTRIG

An image which was captured following the arrival of a trigger has been transferred completely.
This is the earliest possible moment for a new capturing process. The image must then be post-processed by the driver and will be available after the IS_FRAME processing event.

IS_SET_EVENT_REMOVE

A camera initialized with is_InitCamera() was disconnected. *)

IS_SET_EVENT_DEVICE_RECONNECTED

A camera initialized with is_InitCamera() and disconnected afterwards was reconnected. *)

IS_SET_EVENT_NEW_DEVICE

A new camera was connected.
This is independent of the device handle (hCam is ignored).

IS_SET_EVENT_REMOVAL

A camera was removed.
This is independent of the device handle (hCam is ignored).

IS_SET_EVENT_WB_FINISHED

The automatic white balance control is completed.

*) Not available under Linux.

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Related Functions

is_EnableEvent()
is_DisableEvent()
is_ExitEvent()
is_WaitEvent()

Code Sample


HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, "");

 

if (hEvent != NULL)

{

  //Enable frame event, start image capture and wait for event:

  is_InitEvent(hCam, hEvent, IS_SET_EVENT_FRAME);

  is_EnableEvent(hCam, IS_SET_EVENT_FRAME);

  is_FreezeVideo(hCam, IS_DONT_WAIT);

 

  if (WaitForSingleObject(hEvent, 1000) == WAIT_OBJECT_0)

   {

      // Image was captured successfully

      is_DisableEvent(hCam, IS_SET_EVENT_FRAME);

      is_ExitEvent(hCam, IS_SET_EVENT_FRAME);

   }

}

Sample Programs

SimpleLive (C++)
uEyeEvent (C++)

Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com