Time-of-Flight Library(ToF)  3.2.2
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
9 extern "C" {
10 #endif
11 
12 /** The main interface to the kea camera
13  */
14 typedef struct tof_kea_camera* tof_kea_camera_t;
15 
16 /** Destruct tof_kea_camera */
17 TOF_EXPORT void tof_kea_camera_delete(tof_kea_camera_t ptr);
18 
19 /** Construct the kea camera
20  * @param ptr Pointer to class
21  * @param processing_config The processing config
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). If no camera
28  * is found with the given serial number a nullptr and error is returned.
29  * @param error Pointer to error
30  * @return New object
31  */
32 TOF_EXPORT tof_kea_camera_t tof_kea_camera_new(const tof_processing_config_t processing_config, const char* serial, tof_error_t *error);
33 
34 /** Check whether this kea camera can do on camera processing
35  * @param ptr Pointer to class
36  * @param error Pointer to error
37  * @return On camera processing capable
38  */
39 TOF_EXPORT bool tof_kea_camera_on_camera_processing_capable(const tof_kea_camera_t ptr, tof_error_t *error);
40 
41 /** Get on camera processing
42  * @param ptr Pointer to class
43  * @param error Pointer to error
44  * @return True on camera processing, false on host processing
45  */
46 TOF_EXPORT bool tof_kea_camera_get_on_camera_processing(const tof_kea_camera_t ptr, tof_error_t *error);
47 
48 /** Set on camera processing
49  * @param ptr Pointer to class
50  * @param on_camera_processing True on camera processing, false on host
51  * processing
52  * @param error Pointer to error
53  */
54 TOF_EXPORT void tof_kea_camera_set_on_camera_processing(tof_kea_camera_t ptr, bool on_camera_processing, tof_error_t *error);
55 
56 /** Get delay between network packets
57  * @param ptr Pointer to class
58  * @param error Pointer to error
59  * @return The delay, depending on the camera software it is in nanoseconds or
60  * in cpu instruction
61  */
62 TOF_EXPORT uint32_t tof_kea_camera_get_delay(const tof_kea_camera_t ptr, tof_error_t *error);
63 
64 /** Set delay between network packets
65  * @param ptr Pointer to class
66  * @param delay The delay, depending on the camera software it is in nanoseconds
67  * or in cpu instruction
68  * @param error Pointer to error
69  */
70 TOF_EXPORT void tof_kea_camera_set_delay(tof_kea_camera_t ptr, uint32_t delay, tof_error_t *error);
71 
72 /** Get maximum size of each network packet transmitted
73  * @param ptr Pointer to class
74  * @param error Pointer to error
75  * @return Packet size in bytes
76  */
77 TOF_EXPORT uint16_t tof_kea_camera_get_packet_size(const tof_kea_camera_t ptr, tof_error_t *error);
78 
79 /** Set maximum size of each network packet transmitted
80  * @param ptr Pointer to class
81  * @param size Packet size in bytes
82  * @param error Pointer to error
83  */
84 TOF_EXPORT void tof_kea_camera_set_packet_size(tof_kea_camera_t ptr, uint16_t size, tof_error_t *error);
85 
86 /** Set the camera config
87  * @param ptr Pointer to class
88  * @param camera_config Camera config
89  * @param error Pointer to error
90  */
91 TOF_EXPORT void tof_kea_camera_set_camera_config(tof_kea_camera_t ptr, const tof_camera_config_t camera_config, tof_error_t *error);
92 
93 /** Set both the camera and processing config
94  * @param ptr Pointer to class
95  * @param camera_config Camera config
96  * @param processing_config Processing config
97  * @param error Pointer to error
98  */
99 TOF_EXPORT void tof_kea_camera_set_configurations(tof_kea_camera_t ptr, const tof_camera_config_t camera_config, const tof_processing_config_t processing_config, tof_error_t *error);
100 
101 /** Get the tof library version running on the camera
102  * @param ptr Pointer to class
103  * @param error Pointer to error
104  * @return Version
105  */
106 TOF_EXPORT const char* tof_kea_camera_version(tof_kea_camera_t ptr, tof_error_t *error);
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif