Mech-Eye API 2.5.0
API reference documentation for Mech-Eye Industrial 3D Camera
|
The camera event related. Use CameraEvent::getSupportedEvents to get supported events. Use CameraEvent::registerCameraEventCallback to register an event of interest. More...
#include <CameraEvent.h>
Classes | |
struct | EventInfo |
Describes the event information. More... | |
struct | PayloadMember |
Describes the data member of the event's payload. More... | |
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 = std::function< void(const EventData *eventData, const void *extraPayload)> |
callback function for a camera event. | |
using | Payload = std::vector< PayloadMember > |
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. | |
static ErrorStatus | getSupportedEvents (const Camera &camera, std::vector< EventInfo > &eventInfos) |
Get supported events by the camera. | |
static ErrorStatus | registerCameraEventCallback (Camera &camera, uint16_t 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, uint16_t event) |
Cancels the registration of a callback function for the specified event and Camera object. | |
The camera event related. Use CameraEvent::getSupportedEvents to get supported events. Use CameraEvent::registerCameraEventCallback to register an event of interest.
Definition at line 60 of file CameraEvent.h.
using mmind::eye::CameraEvent::CameraEventCallback = std::function<void(const EventData* eventData, const void* extraPayload)> |
callback function for a camera event.
[in] | eventData | shared data among events. |
[in] | extraPayload | event-specific data. |
Definition at line 116 of file CameraEvent.h.
using mmind::eye::CameraEvent::EventCallback = std::function<void(Event event, void* pUser)> |
Definition at line 86 of file CameraEvent.h.
using mmind::eye::CameraEvent::Payload = std::vector<PayloadMember> |
Definition at line 227 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-light 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 68 of file CameraEvent.h.
|
static |
Get supported events by the camera.
camera | The camera for which to get supported events. |
eventInfos | The information of the events supported. |
|
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 |
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 |
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. |
|
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. |