GenICam_SDK.docx
23
csiCloseDataStream
Close the data stream
Syntax
csiErr csiCloseDataStream(csiHandle dataStream)
Parameters:
In: dateStream
A handle to the data stream to be closed.
Out: None
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
Make sure to release all used buffers with
() and unregister all events with
csiUnregisterEvent()
before closing the data stream. Any buffer or event will be invalid after a call to this function. In addition, acquisition must be
stopped before calling this function, see
.
csiRegisterEvent
Register an event which will be signaled in the case the desired event is triggered
Syntax
csiErr csiRegisterEvent(csiHandle moduleHandle, csiEventType evtType, csiHandle* eventOut, csiModuleLevel module =
CSI_DEVICE_MODULE)
Parameters:
In: moduleHandle
Handle to the module that is used to register an event. This can be either a device handle or a data
stream handle.
evtType
The type of event that should be registered.
module
The module level where the event should be registered on.
Out: eventOut
A handle to the event that was registered. Use this handle to wait for events using the
or
csiGetNextImage()
functions.
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
csiWaitForEvent
Wait for a desired event to happen
Syntax
csiErr csiWaitForEvent(csiHandle evt, uint64_t timeoutMilliseconds, csiEventData** evtDataOut)
Parameters:
In: evt
the handle of the event to wait for
timeoutMilliseconds
Timeout after the waiting stops if no event was received
Out: evtDataOut
the event data for further use. See
. In case of an error or timeout the output will be
NULL, therefore please check the return value before using it.
Return value:
Returns csiSuccess or an error defined in the csiErr-Enum.
Comment:
After the event was registered with
it is possible to actively wait for the event using this function. The
waiting can be done asynchronously in a separate thread. This function must be called for each event separately. Please note
that this function will return a more general representation of the event data (
). There exists also an event data
structure for image data (
) which contains more information on the image that was received.
Note:
Also see
csiGetNextImage()
which can be used as convenience function to wait for new image data events.