1 #ifndef _CHRONOPTICS_TOF_USB_INTERFACE_H_
2 #define _CHRONOPTICS_TOF_USB_INTERFACE_H_
4 #include <chronoptics/tof/camera_config.h>
5 #include <chronoptics/tof/calibration.h>
6 #include <chronoptics/tof/data.h>
7 #include <chronoptics/tof/gige_interface.h>
15 typedef struct tof_usb_device* tof_usb_device_t;
18 TOF_EXPORT
void tof_usb_device_delete(tof_usb_device_t ptr);
25 TOF_EXPORT
const char* tof_usb_device_serial(tof_usb_device_t ptr, tof_error_t *error);
29 typedef struct tof_usb_interface* tof_usb_interface_t;
32 TOF_EXPORT
void tof_usb_interface_delete(tof_usb_interface_t ptr);
40 TOF_EXPORT tof_usb_interface_t tof_usb_interface_new(tof_usb_device_t usb_device, tof_error_t *error);
47 TOF_EXPORT
bool tof_usb_interface_is_connected(
const tof_usb_interface_t ptr, tof_error_t *error);
56 TOF_EXPORT
double tof_usb_interface_test_stream_speed(tof_usb_interface_t ptr, tof_error_t *error);
63 TOF_EXPORT tof_camera_config_t tof_usb_interface_download_configuration(tof_usb_interface_t ptr, tof_error_t *error);
70 TOF_EXPORT tof_calibration_t tof_usb_interface_download_calibration(tof_usb_interface_t ptr, tof_error_t *error);
77 TOF_EXPORT
void tof_usb_interface_upload_configuration(tof_usb_interface_t ptr,
const tof_camera_config_t config, tof_error_t *error);
85 TOF_EXPORT
bool tof_usb_interface_depth_stream_capable(
const tof_usb_interface_t ptr,
enum tof_depth_stream_type stream, tof_error_t *error);
92 TOF_EXPORT
void tof_usb_interface_start_depth_stream(tof_usb_interface_t ptr,
enum tof_depth_stream_type stream, tof_error_t *error);
98 TOF_EXPORT
void tof_usb_interface_stop_depth_stream(tof_usb_interface_t ptr, tof_error_t *error);
105 TOF_EXPORT
bool tof_usb_interface_has_depth_data(
const tof_usb_interface_t ptr, tof_error_t *error);
112 TOF_EXPORT tof_data_t tof_usb_interface_get_depth_data(tof_usb_interface_t ptr, tof_error_t *error);
119 TOF_EXPORT
bool tof_usb_interface_image_stream_capable(
const tof_usb_interface_t ptr, tof_error_t *error);
125 TOF_EXPORT
void tof_usb_interface_start_image_stream(tof_usb_interface_t ptr, tof_error_t *error);
131 TOF_EXPORT
void tof_usb_interface_stop_image_stream(tof_usb_interface_t ptr, tof_error_t *error);
138 TOF_EXPORT
bool tof_usb_interface_has_image_data(
const tof_usb_interface_t ptr, tof_error_t *error);
145 TOF_EXPORT tof_data_t tof_usb_interface_get_image_data(tof_usb_interface_t ptr, tof_error_t *error);
157 TOF_EXPORT tof_data_t tof_usb_interface_get_image_data_into_pointer(tof_usb_interface_t ptr, uint8_t* pointer,
size_t capacity, tof_user_pointer_destructed_t callback,
void* callback_user_data, tof_error_t *error);
164 TOF_EXPORT
size_t tof_usb_interface_get_user_pointer_capacity(
const tof_usb_interface_t ptr, tof_error_t *error);
171 TOF_EXPORT
void tof_usb_interface_set_user_pointer_capacity(tof_usb_interface_t ptr,
size_t capacity, tof_error_t *error);
184 TOF_EXPORT
void tof_usb_interface_add_depth_user_pointer(tof_usb_interface_t ptr, uint8_t* pointer,
size_t capacity, tof_user_pointer_destructed_t callback,
void* callback_user_data, tof_error_t *error);
191 TOF_EXPORT
const char* tof_usb_interface_version(tof_usb_interface_t ptr, tof_error_t *error);
199 TOF_EXPORT
size_t tof_usb_device_discover(tof_usb_device_t* usb_devices,
size_t capacity, tof_error_t *error);
205 TOF_EXPORT tof_usb_device_t tof_usb_device_discover_one(tof_error_t *error);
212 TOF_EXPORT tof_usb_device_t tof_usb_device_find(
const char* serial, tof_error_t *error);