Time-of-Flight Library(ToF) 4.0.1
 
kea_camera.h
1#ifndef _CHRONOPTICS_TOF_KEA_CAMERA_H_
2#define _CHRONOPTICS_TOF_KEA_CAMERA_H_
3
4#include <chronoptics/tof/camera.h>
5#include <chronoptics/tof/processing_config.h>
6#include <chronoptics/tof/camera_config.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12/** The main interface to the kea camera
13 */
14typedef struct tof_kea_camera* tof_kea_camera_t;
15
16typedef struct tof_kea_camera const* tof_kea_camera_ct;
17
18/** Destruct tof_kea_camera */
19TOF_EXPORT void tof_kea_camera_delete(tof_kea_camera_t ptr);
20
21/** Construct the kea camera with the given processing and camera config.
22 * @param ptr Pointer to class
23 * @param serial The serial number of the camera to connect to, if the camera is
24 * available over both usb and gige it will be connected over usb. If an empty
25 * string is supplied the camera will connect to the first usb camera, if no usb
26 * camera is connected it will connect to the first gige camera that replies
27 * (this reply time is random, so you might connect to a different camera each
28 * time if you've got multiple cameras connected to your network). If no camera
29 * is found with the given serial number a nullptr and error is returned.
30 * @param processing_config The processing config
31 * @param camera_config The camera config
32 * @param error Pointer to error
33 * @return New object
34 */
35TOF_EXPORT tof_kea_camera_t tof_kea_camera_new_both_configs(const char* serial, tof_processing_config_ct processing_config, tof_camera_config_ct camera_config, tof_error_t *error);
36
37/** Construct the kea camera
38 * @param ptr Pointer to class
39 * @param serial The serial number of the camera to connect to, if the camera is
40 * available over both usb and gige it will be connected over usb. If an empty
41 * string is supplied the camera will connect to the first usb camera, if no usb
42 * camera is connected it will connect to the first gige camera that replies
43 * (this reply time is random, so you might connect to a different camera each
44 * time if you've got multiple cameras connected to your network). If no camera
45 * is found with the given serial number a nullptr and error is returned.
46 * @param processing_config The processing config
47 * @param error Pointer to error
48 * @return New object
49 */
50TOF_EXPORT tof_kea_camera_t tof_kea_camera_new(const char* serial, tof_processing_config_ct processing_config, tof_error_t *error);
51
52/** Construct the kea camera with a processing config generated by
53 * default_processing from the camera config
54 * @param ptr Pointer to class
55 * @param serial The serial number of the camera to connect to, if the camera is
56 * available over both usb and gige it will be connected over usb. If an empty
57 * string is supplied the camera will connect to the first usb camera, if no usb
58 * camera is connected it will connect to the first gige camera that replies
59 * (this reply time is random, so you might connect to a different camera each
60 * time if you've got multiple cameras connected to your network). If no camera
61 * is found with the given serial number a nullptr and error is returned.
62 * @param error Pointer to error
63 * @return New object
64 */
65TOF_EXPORT tof_kea_camera_t tof_kea_camera_new_simple(const char* serial, tof_error_t *error);
66
67/** Check whether this kea camera can do on camera processing
68 * @param ptr Pointer to class
69 * @param error Pointer to error
70 * @return On camera processing capable
71 */
72TOF_EXPORT bool tof_kea_camera_on_camera_processing_capable(tof_kea_camera_ct ptr, tof_error_t *error);
73
74/** Get on camera processing
75 * @param ptr Pointer to class
76 * @param error Pointer to error
77 * @return True on camera processing, false on host processing
78 */
79TOF_EXPORT bool tof_kea_camera_get_on_camera_processing(tof_kea_camera_ct ptr, tof_error_t *error);
80
81/** Set on camera processing
82 * @param ptr Pointer to class
83 * @param on_camera_processing True on camera processing, false on host
84 * processing
85 * @param error Pointer to error
86 */
87TOF_EXPORT void tof_kea_camera_set_on_camera_processing(tof_kea_camera_t ptr, bool on_camera_processing, tof_error_t *error);
88
89/** Set the camera config
90 * @param ptr Pointer to class
91 * @param camera_config Camera config
92 * @param error Pointer to error
93 */
94TOF_EXPORT void tof_kea_camera_set_camera_config(tof_kea_camera_t ptr, tof_camera_config_ct camera_config, tof_error_t *error);
95
96/** Set both the camera and processing config
97 * @param ptr Pointer to class
98 * @param camera_config Camera config
99 * @param processing_config Processing config
100 * @param error Pointer to error
101 */
102TOF_EXPORT void tof_kea_camera_set_configurations(tof_kea_camera_t ptr, tof_camera_config_ct camera_config, tof_processing_config_ct processing_config, tof_error_t *error);
103
104/** Check whether camera supports multiple configurations
105 * @param ptr Pointer to class
106 * @param error Pointer to error
107 * @return Multiple configurations possible
108 */
109TOF_EXPORT bool tof_kea_camera_multiple_configurations_possible(tof_kea_camera_ct ptr, tof_error_t *error);
110
111/** Set multiple configurations
112 * @param ptr Pointer to class
113 * @param camera_configs Camera configurations
114 * @param camera_configs_size The size of the above array
115 * @param pro_configs Processing configurations
116 * @param pro_configs_size The size of the above array
117 * @param error Pointer to error
118 */
119TOF_EXPORT void tof_kea_camera_set_multiple_configurations(tof_kea_camera_t ptr, const tof_camera_config_t* camera_configs, size_t camera_configs_size, const tof_processing_config_t* pro_configs, size_t pro_configs_size, tof_error_t *error);
120
121/** the processing config of the camera
122 * @param ptr Pointer to class
123 * @param config The processing config
124 * @param error Pointer to error
125 */
126TOF_EXPORT void tof_kea_camera_set_process_config(tof_kea_camera_t ptr, tof_processing_config_ct config, tof_error_t *error);
127
128/** Simple class containing information about found cameras
129 */
130typedef struct tof_discovered_camera* tof_discovered_camera_t;
131
132typedef struct tof_discovered_camera const* tof_discovered_camera_ct;
133
134/** Destruct tof_discovered_camera */
135TOF_EXPORT void tof_discovered_camera_delete(tof_discovered_camera_t ptr);
136
137/** The serial
138 * @param ptr Pointer to class
139 * @param error Pointer to error
140 * @return Serial
141 */
142TOF_EXPORT const char* tof_discovered_camera_serial(tof_discovered_camera_ct ptr, tof_error_t *error);
143
144/** Additional information about the discovered camera
145 * @param ptr Pointer to class
146 * @param error Pointer to error
147 * @return Additional information
148 */
149TOF_EXPORT const char* tof_discovered_camera_info(tof_discovered_camera_ct ptr, tof_error_t *error);
150
151/** Get the camera model name
152 * @param ptr Pointer to class
153 * @param error Pointer to error
154 * @return Camera model
155 */
156TOF_EXPORT const char* tof_discovered_camera_model(tof_discovered_camera_ct ptr, tof_error_t *error);
157
158/** Check whether this camera is a TUI camera
159 * @param ptr Pointer to class
160 * @param error Pointer to error
161 * @return Is tui
162 */
163TOF_EXPORT bool tof_discovered_camera_is_tui(tof_discovered_camera_ct ptr, tof_error_t *error);
164
165/** Discover all available cameras
166 * @param available_cameras All available cameras
167 * @param capacity The amount of data the above pointer can hold
168 * @param error Pointer to error
169 * @return Number of pointers filled or complete array size
170 */
171TOF_EXPORT size_t tof_discover_cameras(tof_discovered_camera_t* available_cameras, size_t capacity, tof_error_t *error);
172
173/** Construct a kea camera using the gige interface. This could be useful in two
174 * cases. The first is when the camera is connected with both usb and ethernet
175 * but you want to use ethernet. The second is when for some reason the default
176 * maximum packet size is too large.
177 * @param processing_config The processing config
178 * @param serial The serial number of the camera to connect to, if the camera is
179 * available over both usb and gige it will be connected over usb. If an empty
180 * string is supplied the camera will connect to the first usb camera, if no usb
181 * camera is connected it will connect to the first gige camera that replies
182 * (this reply time is random, so you might connect to a different camera each
183 * time if you've got multiple cameras connected to your network). If no camera
184 * is found with the given serial number a nullptr and error is returned.
185 * @param packet_size The packet size to use for communication over ethernet
186 * @param error Pointer to error
187 * @return A kea camera
188 */
189TOF_EXPORT tof_kea_camera_t tof_create_kea_camera_gige(tof_processing_config_ct processing_config, const char* serial, uint16_t packet_size, tof_error_t *error);
190
191#ifdef __cplusplus
192}
193#endif
194
195#endif