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>
15typedef struct tof_usb_device* tof_usb_device_t;
18TOF_EXPORT
void tof_usb_device_delete(tof_usb_device_t ptr);
25TOF_EXPORT
const char* tof_usb_device_serial(tof_usb_device_t ptr, tof_error_t *error);
30typedef struct tof_usb_interface* tof_usb_interface_t;
33TOF_EXPORT
void tof_usb_interface_delete(tof_usb_interface_t ptr);
41TOF_EXPORT tof_usb_interface_t tof_usb_interface_new(tof_usb_device_t usb_device, tof_error_t *error);
48TOF_EXPORT
bool tof_usb_interface_is_connected(
const tof_usb_interface_t ptr, tof_error_t *error);
57TOF_EXPORT
double tof_usb_interface_test_stream_speed(tof_usb_interface_t ptr, tof_error_t *error);
64TOF_EXPORT tof_camera_config_t tof_usb_interface_download_configuration(tof_usb_interface_t ptr, tof_error_t *error);
71TOF_EXPORT tof_calibration_t tof_usb_interface_download_calibration(tof_usb_interface_t ptr, tof_error_t *error);
78TOF_EXPORT
void tof_usb_interface_upload_configuration(tof_usb_interface_t ptr,
const tof_camera_config_t config, tof_error_t *error);
86TOF_EXPORT
bool tof_usb_interface_depth_stream_capable(
const tof_usb_interface_t ptr,
enum tof_depth_stream_type stream, tof_error_t *error);
93TOF_EXPORT
void tof_usb_interface_start_depth_stream(tof_usb_interface_t ptr,
enum tof_depth_stream_type stream, tof_error_t *error);
99TOF_EXPORT
void tof_usb_interface_stop_depth_stream(tof_usb_interface_t ptr, tof_error_t *error);
106TOF_EXPORT
bool tof_usb_interface_has_depth_data(
const tof_usb_interface_t ptr, tof_error_t *error);
113TOF_EXPORT tof_data_t tof_usb_interface_get_depth_data(tof_usb_interface_t ptr, tof_error_t *error);
120TOF_EXPORT
bool tof_usb_interface_image_stream_capable(
const tof_usb_interface_t ptr, tof_error_t *error);
126TOF_EXPORT
void tof_usb_interface_start_image_stream(tof_usb_interface_t ptr, tof_error_t *error);
132TOF_EXPORT
void tof_usb_interface_stop_image_stream(tof_usb_interface_t ptr, tof_error_t *error);
139TOF_EXPORT
bool tof_usb_interface_has_image_data(
const tof_usb_interface_t ptr, tof_error_t *error);
146TOF_EXPORT tof_data_t tof_usb_interface_get_image_data(tof_usb_interface_t ptr, tof_error_t *error);
157TOF_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);
164TOF_EXPORT
size_t tof_usb_interface_get_user_pointer_capacity(
const tof_usb_interface_t ptr, tof_error_t *error);
171TOF_EXPORT
void tof_usb_interface_set_user_pointer_capacity(tof_usb_interface_t ptr,
size_t capacity, tof_error_t *error);
183TOF_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);
190TOF_EXPORT
const char* tof_usb_interface_version(tof_usb_interface_t ptr, tof_error_t *error);
197TOF_EXPORT
bool tof_usb_interface_software_trigger_capable(tof_usb_interface_t ptr, tof_error_t *error);
203TOF_EXPORT
void tof_usb_interface_software_trigger(tof_usb_interface_t ptr, tof_error_t *error);
211TOF_EXPORT
size_t tof_usb_device_discover(tof_usb_device_t* usb_devices,
size_t capacity, tof_error_t *error);
217TOF_EXPORT tof_usb_device_t tof_usb_device_discover_one(tof_error_t *error);
224TOF_EXPORT tof_usb_device_t tof_usb_device_find(
const char* serial, tof_error_t *error);