OceanDirectLighthouse 3.1.3
OceanDirect Lighthouse C++/C API
lhdefs.h
Go to the documentation of this file.
1#ifndef LH_DEFS_H
2#define LH_DEFS_H
3/*******************************************************
4 * @file lhdefs.h
5 * @date November 2023
6 * @author Ocean Insight, Inc.
7 *
8 * Convenience typedefs and type definitions to make the meaning of the API arguments
9 * and return values completely clear.
10 *
11 */
12 /************************************************************************
13 *
14 * OCEAN INSIGHT CONFIDENTIAL
15 * __________________
16 *
17 * [2018] - [2023] Ocean Insight Incorporated
18 * All Rights Reserved.
19 *
20 * NOTICE: All information contained herein is, and remains
21 * the property of Ocean Insight Incorporated and its suppliers,
22 * if any. The intellectual and technical concepts contained
23 * herein are proprietary to Ocean Insight Incorporated
24 * and its suppliers and may be covered by U.S. and Foreign Patents,
25 * patents in process, and are protected by trade secret or copyright law.
26 * Dissemination of this information or reproduction of this material
27 * is strictly forbidden unless prior written permission is obtained
28 * from Ocean Insight Incorporated.
29 *
30 **************************************************************************/
31#include "lighthouse/api/LighthouseDllDecl.h"
32#ifdef __cplusplus
33#include <cstdint>
34#include <cstddef>
35extern "C" {
36#else
37#include <stdint.h>
38#endif /* __cplusplus */
43 typedef uint32_t lh_device_id_t;
47 typedef int32_t lh_error_code_t;
52 typedef uint32_t lh_microseconds_t;
55 typedef uint32_t lh_milliseconds_t;
59 typedef float lh_celcius_t;
63 typedef uint16_t lh_microns_t;
68 enum lh_enable_state_t { off = 0x00, on = 0x01 };
73 enum lh_open_state_t { closed = 0x00, open = 0x01 };
78 enum lh_ip_assign_mode_t { manual = 0x01, automatic = 0x02 };
83 enum lh_trigger_mode_t { software = 0x00000000, edge = 0x00000001, level = 0x00000002 };
88 struct LIGHTHOUSE_DLL_DECL lh_spectrum_with_metadata_t {
89 float* buffer;
91 uint64_t tickCount;
92 };
96 typedef uint16_t lh_pixel_index_t;
101 typedef uint32_t lh_pixel_intensity_t;
105 typedef uint32_t lh_autonull_saturation_t;
109 typedef uint32_t lh_autonull_baseline_t;
117 typedef uint32_t lh_scan_averaging_t;
121 typedef uint16_t lh_boxcar_width_t;
125 typedef uint8_t* lh_ipv4_address_array_t;
143 typedef uint8_t* lh_mac_address_array_t;
144 typedef const uint8_t* lh_const_mac_address_array_t;
148 typedef uint16_t lh_usb_identifier_t;
153#ifdef __cplusplus
154 // this would be fine in C23
155 : uint32_t
156#endif
157 {
158 B300 = 300,
159 B600 = 600,
160 B1200 = 1200,
161 B2400 = 2400,
162 B9600 = 9600,
163 B14400 = 14400,
164 B19200 = 19200,
165 B38400 = 38400,
166 B57600 = 57600,
167 B115200 = 115200
168 };
172 typedef uint32_t lh_gpio_bitmask_t;
176 typedef uint32_t lh_gpio_directions_t;
180 typedef uint32_t lh_gpio_values_t;
184 enum lh_serial_comms_mode_t { rs232 = 0x10, uart = 0x20 };
185#ifdef __cplusplus
186}
187#endif /* __cplusplus */
188
189#endif // !LH_DEFS_H
190
uint32_t lh_autonull_baseline_t
Definition lhdefs.h:109
float lh_celcius_t
Definition lhdefs.h:59
lh_trigger_mode_t
Definition lhdefs.h:83
@ level
Definition lhdefs.h:83
@ edge
Definition lhdefs.h:83
@ software
Definition lhdefs.h:83
uint32_t lh_microseconds_t
Definition lhdefs.h:52
uint8_t * lh_ipv4_address_array_t
Definition lhdefs.h:125
uint32_t lh_milliseconds_t
Definition lhdefs.h:55
lh_open_state_t
Definition lhdefs.h:73
@ open
Definition lhdefs.h:73
@ closed
Definition lhdefs.h:73
uint16_t lh_microns_t
Definition lhdefs.h:63
int32_t lh_error_code_t
Definition lhdefs.h:47
lh_baud_rate_t
Definition lhdefs.h:157
@ B1200
Definition lhdefs.h:160
@ B600
Definition lhdefs.h:159
@ B57600
Definition lhdefs.h:166
@ B300
Definition lhdefs.h:158
@ B9600
Definition lhdefs.h:162
@ B115200
Definition lhdefs.h:167
@ B38400
Definition lhdefs.h:165
@ B2400
Definition lhdefs.h:161
@ B14400
Definition lhdefs.h:163
@ B19200
Definition lhdefs.h:164
uint32_t lh_autonull_fpga_digital_t
Definition lhdefs.h:113
uint32_t lh_gpio_values_t
Definition lhdefs.h:180
lh_enable_state_t
Definition lhdefs.h:68
@ off
Definition lhdefs.h:68
@ on
Definition lhdefs.h:68
uint32_t lh_pixel_intensity_t
Definition lhdefs.h:101
uint32_t lh_gpio_bitmask_t
Definition lhdefs.h:172
uint32_t lh_gpio_directions_t
Definition lhdefs.h:176
uint16_t lh_usb_identifier_t
Definition lhdefs.h:148
uint16_t lh_pixel_index_t
Definition lhdefs.h:96
uint16_t lh_boxcar_width_t
Definition lhdefs.h:121
uint32_t lh_scan_averaging_t
Definition lhdefs.h:117
uint8_t * lh_mac_address_array_t
Definition lhdefs.h:143
lh_serial_comms_mode_t
Definition lhdefs.h:184
@ uart
Definition lhdefs.h:184
@ rs232
Definition lhdefs.h:184
uint32_t lh_autonull_saturation_t
Definition lhdefs.h:105
uint32_t lh_device_id_t
Definition lhdefs.h:43
const uint8_t * lh_const_mac_address_array_t
Definition lhdefs.h:144
lh_ip_assign_mode_t
Definition lhdefs.h:78
@ automatic
Definition lhdefs.h:78
@ manual
Definition lhdefs.h:78
Definition lhdefs.h:130
size_t ipv4AddressSize
Definition lhdefs.h:132
lh_ipv4_address_array_t ipv4Address
Definition lhdefs.h:131
size_t defaultGatewaySize
Definition lhdefs.h:136
size_t subnetMaskSize
Definition lhdefs.h:134
lh_ipv4_address_array_t defaultGateway
Definition lhdefs.h:135
lh_ipv4_address_array_t dnsServer
Definition lhdefs.h:137
lh_ipv4_address_array_t subnetMask
Definition lhdefs.h:133
size_t dnsServerSize
Definition lhdefs.h:138
Definition lhdefs.h:88
uint64_t tickCount
Definition lhdefs.h:91
size_t bufferLength
Definition lhdefs.h:90
float * buffer
Definition lhdefs.h:89