1#ifndef _CHRONOPTICS_TOF_CAMERA_H_
2#define _CHRONOPTICS_TOF_CAMERA_H_
4#include <chronoptics/tof/stream.h>
5#include <chronoptics/tof/processing_config.h>
6#include <chronoptics/tof/data.h>
7#include <chronoptics/tof/camera_config.h>
8#include <chronoptics/tof/calibration.h>
16typedef struct tof_camera* tof_camera_t;
19TOF_EXPORT
void tof_camera_delete(tof_camera_t ptr);
25TOF_EXPORT
void tof_camera_start(tof_camera_t ptr, tof_error_t *error);
31TOF_EXPORT
void tof_camera_stop(tof_camera_t ptr, tof_error_t *error);
38TOF_EXPORT
bool tof_camera_is_streaming(
const tof_camera_t ptr, tof_error_t *error);
45TOF_EXPORT
bool tof_camera_is_connected(
const tof_camera_t ptr, tof_error_t *error);
54TOF_EXPORT
size_t tof_camera_get_stream_list(
const tof_camera_t ptr, tof_stream_t* streams,
size_t capacity, tof_error_t *error);
62TOF_EXPORT
void tof_camera_set_stream_list(tof_camera_t ptr,
const tof_stream_t* streams,
size_t streams_size, tof_error_t *error);
69TOF_EXPORT
bool tof_camera_is_stream_list_set(
const tof_camera_t ptr, tof_error_t *error);
78TOF_EXPORT
size_t tof_camera_get_set_stream_list(tof_camera_t ptr, tof_stream_t* streams,
size_t capacity, tof_error_t *error);
85TOF_EXPORT tof_processing_config_t tof_camera_get_process_config(
const tof_camera_t ptr, tof_error_t *error);
92TOF_EXPORT
void tof_camera_set_process_config(tof_camera_t ptr, tof_processing_config_t config, tof_error_t *error);
99TOF_EXPORT
bool tof_camera_has_frames(
const tof_camera_t ptr, tof_error_t *error);
108TOF_EXPORT
size_t tof_camera_get_frames(tof_camera_t ptr, tof_data_t* frames,
size_t capacity, tof_error_t *error);
114TOF_EXPORT
void tof_camera_clear_buffer(tof_camera_t ptr, tof_error_t *error);
122TOF_EXPORT
size_t tof_camera_get_buffer_size(
const tof_camera_t ptr, tof_error_t *error);
130TOF_EXPORT
void tof_camera_set_buffer_size(tof_camera_t ptr,
size_t size, tof_error_t *error);
137TOF_EXPORT tof_camera_config_t tof_camera_get_camera_config(
const tof_camera_t ptr, tof_error_t *error);
144TOF_EXPORT
const char* tof_camera_get_serial(
const tof_camera_t ptr, tof_error_t *error);
151TOF_EXPORT tof_calibration_t tof_camera_get_calibration(
const tof_camera_t ptr, tof_error_t *error);
158TOF_EXPORT
size_t tof_camera_get_user_pointer_capacity(
const tof_camera_t ptr, tof_error_t *error);
165TOF_EXPORT
void tof_camera_set_user_pointer_capacity(tof_camera_t ptr,
size_t capacity, tof_error_t *error);
178TOF_EXPORT
void tof_camera_add_user_pointer(tof_camera_t ptr, uint8_t* pointer,
size_t capacity, tof_user_pointer_destructed_t callback,
void* callback_user_data,
enum tof_frame_type frame_type, tof_error_t *error);
184TOF_EXPORT
void tof_camera_clear_user_pointers(tof_camera_t ptr, tof_error_t *error);
191TOF_EXPORT uint32_t tof_camera_config_index(
const tof_camera_t ptr, tof_error_t *error);
199TOF_EXPORT
void tof_camera_switch_config(tof_camera_t ptr, uint32_t config_index, tof_error_t *error);
208TOF_EXPORT
size_t tof_camera_possible_frame_types(
const tof_camera_t ptr,
enum tof_frame_type* frame_types,
size_t capacity, tof_error_t *error);
215TOF_EXPORT
bool tof_camera_output_frame_types_set(tof_camera_t ptr, tof_error_t *error);
224TOF_EXPORT
size_t tof_camera_get_output_frame_types(
const tof_camera_t ptr,
enum tof_frame_type* output_frame_types,
size_t capacity, tof_error_t *error);
232TOF_EXPORT
void tof_camera_set_output_frame_types(tof_camera_t ptr,
const enum tof_frame_type* output_frame_types,
size_t output_frame_types_size, tof_error_t *error);
240TOF_EXPORT
bool tof_camera_has_multiple_configurations(
const tof_camera_t ptr, tof_error_t *error);
249TOF_EXPORT
size_t tof_camera_get_multiple_camera_configurations(
const tof_camera_t ptr, tof_camera_config_t* cam_configs,
size_t capacity, tof_error_t *error);
258TOF_EXPORT
size_t tof_camera_get_multiple_processing_configurations(
const tof_camera_t ptr, tof_processing_config_t* processing_configs,
size_t capacity, tof_error_t *error);
267TOF_EXPORT
size_t tof_camera_get_multiple_names(
const tof_camera_t ptr,
const char** names,
size_t capacity, tof_error_t *error);
276TOF_EXPORT
size_t tof_camera_get_multiple_descriptions(
const tof_camera_t ptr,
const char** description,
size_t capacity, tof_error_t *error);
285TOF_EXPORT
size_t tof_select_streams(
const tof_camera_t camera,
const enum tof_frame_type* frame_types,
size_t frame_types_size, tof_error_t *error);
296TOF_EXPORT
size_t tof_select_streams_mod_freq(
const tof_camera_t camera,
const enum tof_frame_type* frame_types,
size_t frame_types_size,
float mod_freq, tof_error_t *error);