Time-of-Flight Library(ToF) 4.0.1
 
tui_camera.h
1#ifndef _CHRONOPTICS_TOF_TUI_CAMERA_H_
2#define _CHRONOPTICS_TOF_TUI_CAMERA_H_
3
4#include <chronoptics/tof/camera.h>
5#include <chronoptics/tof/camera_config.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11/** The main interface to the tui camera
12 */
13typedef struct tof_tui_camera* tof_tui_camera_t;
14
15typedef struct tof_tui_camera const* tof_tui_camera_ct;
16
17/** Destruct tof_tui_camera */
18TOF_EXPORT void tof_tui_camera_delete(tof_tui_camera_t ptr);
19
20/** Construct the tui camera
21 * @param ptr Pointer to class
22 * @param serial The serial number of the camera to connect to, if the camera is
23 * available over both usb and gige it will be connected over usb. If an empty
24 * string is supplied the camera will connect to the first usb camera, if no usb
25 * camera is connected it will connect to the first gige camera that replies
26 * (this reply time is random, so you might connect to a different camera each
27 * time if you've got multiple cameras connected to your network).
28 * @param error Pointer to error
29 * @return New object
30 */
31TOF_EXPORT tof_tui_camera_t tof_tui_camera_new(const char* serial, tof_error_t *error);
32
33/** Set GPIO mode for a certain pin
34 * @param ptr Pointer to class
35 * @param pin Pin
36 * @param gpio_mode GPIO Mode
37 * @param error Pointer to error
38 */
39TOF_EXPORT void tof_tui_camera_set_gpio_mode(tof_tui_camera_t ptr, size_t pin, enum tof_gpio_mode gpio_mode, tof_error_t *error);
40
41/** Set trigger mode
42 * @param ptr Pointer to class
43 * @param trigger_mode Trigger mode
44 * @param error Pointer to error
45 */
46TOF_EXPORT void tof_tui_camera_set_trigger_mode(tof_tui_camera_t ptr, enum tof_trigger_mode trigger_mode, tof_error_t *error);
47
48/** Construct a tui camera using the gige interface. This could be useful in two
49 * cases. The first is when the camera is connected with both usb and ethernet
50 * but you want to use ethernet. The second is when for some reason the default
51 * maximum packet size is too large.
52 * @param serial The serial number of the camera to connect to. If an empty
53 * string is supplied the camera will connect to the first gige camera that
54 * replies (this reply time is random, so you might connect to a different
55 * camera each time if you've got multiple cameras connected to your network).
56 * @param packet_size The packet size to use for communication over ethernet
57 * @param error Pointer to error
58 * @return A tui camera
59 */
60TOF_EXPORT tof_tui_camera_t tof_create_tui_camera_gige(const char* serial, uint16_t packet_size, tof_error_t *error);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif