Mech-Eye API 2.4.0
API reference documentation for Mech-Eye Industrial 3D Camera
|
The camera event related. Use CameraEvent::registerCameraEventCallback to register an event of interest. More...
#include <CameraEvent.h>
Public Types | |
enum | Event { CAMERA_EVENT_NONE = 0x0000 , CAMERA_EVENT_DISCONNECTED = 0x0001 , CAMERA_EVENT_EXPOSURE_END , CAMERA_EVENT_ALL = 0xFFFF } |
The defined camera event. More... | |
using | EventCallback = std::function<void(Event event, void* pUser)> |
using | CameraEventCallback |
callback function for a camera event. | |
Static Public Member Functions | |
static ErrorStatus | registerCameraEventCallback (Camera &camera, EventCallback callback, void *pUser, unsigned int events) |
Registers a camera event of interest. | |
static ErrorStatus | registerCameraEventCallback (Camera &camera, Event event, const CameraEventCallback &callback) |
Registers a callback function to be executed when the specified Event occurs on the specified Camera object. | |
static ErrorStatus | unregisterCameraEventCallback (Camera &camera, Event event) |
Cancels the registration of a callback function for the specified event and Camera object. | |
The camera event related. Use CameraEvent::registerCameraEventCallback to register an event of interest.
Definition at line 58 of file CameraEvent.h.
callback function for a camera event.
[in] | eventData | shared data among events. |
[in] | extraPayload | event-specific data. |
Definition at line 110 of file CameraEvent.h.
Definition at line 81 of file CameraEvent.h.
The defined camera event.
Enumerator | |
---|---|
CAMERA_EVENT_NONE | The default value. |
CAMERA_EVENT_DISCONNECTED | The camera has disconnected. |
CAMERA_EVENT_EXPOSURE_END | The camera has completed structured-light projection and exposure. Note: This event is sent after the structured-ligh projection has been completed. To ensure both 2D and 3D data have been acquired before the event is sent, check the following recommendations: If the flash exposure mode is used for acquiring the 2D data, and the scanning2d_setting::FlashAcquisitionMode parameter is set to "Fast", call Camera::capture3D before calling Camera::capture2D. Otherwise, call Camera::capture2D before calling Camera::capture3D. Alternatively, you can call Camera.capture2Dand3D instead to avoid the timing issue. |
CAMERA_EVENT_ALL | All camera events. |
Definition at line 64 of file CameraEvent.h.
|
static |
Registers a callback function to be executed when the specified Event occurs on the specified Camera object.
camera | The camera for which the callback function is registered. |
event | The event for which the callback function is registered. |
callback | The callback function to be executed when the specified event occurs. |
|
static |
Registers a camera event of interest.
[in] | camera | The camera handle. |
[in] | callback | The callback functions for responding to camera events. |
[in] | pUser | Pointer used by the user. |
[in] | events | The camera event. See CameraEvent::Event for details. |
|
static |
Cancels the registration of a callback function for the specified event and Camera object.
camera | The camera for which to cancel the registration of the callback function. |
event | The event for which to cancel the registration of the callback function. |