OceanDirectLighthouse 3.1.3
OceanDirect Lighthouse C++/C API
clighthouseapi.h File Reference
#include "lighthouse/api/LighthouseDllDecl.h"
#include "lighthouse/api/lhdefs.h"
#include <cstdint>

Go to the source code of this file.

Functions

LIGHTHOUSE_DLL_DECL lh_device_id_t lh_add_network_devices (const char ipAddressStr[], const char deviceTypeStr[], lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_add_RS232_device_location (const char deviceTypeName[], const char deviceBusPath[], unsigned int baud, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_boxcar_correct_spectrum (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float illuminatedSpectrum[], size_t illuminatedSpectrumLength, lh_boxcar_width_t boxcarWidth, float boxcarCorrectedSpectrum[], size_t boxcarCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL void lh_close_device (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_dark_correct_spectrum1 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float illuminatedSpectrum[], size_t illuminatedSpectrumLength, float darkCorrectedSpectrum[], size_t darkCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_dark_correct_spectrum2 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float darkSpectrum[], size_t darkSpectrumLength, const float illuminatedSpectrum[], size_t illuminatedSpectrumLength, float darkCorrectedSpectrum[], size_t darkCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL bool lh_get_accessory_board_available (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_increment (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_maximum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_minimum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_active_pixel_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_active_pixel_indices (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_pixel_index_t indices[], size_t indicesSize)
 
LIGHTHOUSE_DLL_DECL void lh_get_api_version_numbers (uint32_t *major, uint32_t *minor, uint32_t *point)
 
LIGHTHOUSE_DLL_DECL lh_autonull_baseline_t lh_get_autonull_baseline_level (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_autonull_fpga_digital_t lh_get_autonull_fpga_digital_gain (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_autonull_fpga_digital_t lh_get_autonull_fpga_digital_offset (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_pixel_intensity_t lh_get_autonull_maximum_adc_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_autonull_saturation_t lh_get_autonull_saturation_level (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_bad_pixel_indices (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_pixel_index_t indices[], size_t indicesSize)
 
LIGHTHOUSE_DLL_DECL enum lh_baud_rate_t lh_get_baud_rate (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_boxcar_width_t lh_get_boxcar_width (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_increment (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_maximum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_minimum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_continuous_strobe_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_dark_corrected_spectrum1 (lh_device_id_t deviceID, lh_error_code_t *errorCode, float darkCorrectedSpectrum[], size_t darkCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_dark_corrected_spectrum2 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float darkSpectrum[], size_t darkSpectrumLength, float darkCorrectedSpectrum[], size_t darkCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_alias (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_ids (lh_device_id_t ids[], size_t idsLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_manufacturer_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_model (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_model_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_original_manufacturer_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_original_model_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_original_pid (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_original_vid (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_pid (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_device_type (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_vid (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_electric_dark_correction_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_electric_dark_pixel_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_electric_dark_pixel_indices (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_pixel_index_t indices[], size_t indicesLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_error_string (lh_error_code_t errorCode, char message[], size_t messageLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_error_string_length (lh_error_code_t errorCode)
 
LIGHTHOUSE_DLL_DECL bool lh_get_ethernet_addon_available (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_ethernet_mac_address (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_mac_address_array_t outMACAddress, size_t outMACAddressSize)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_flash_slot_data (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t slotNumber, uint8_t data[], size_t dataLength)
 
LIGHTHOUSE_DLL_DECL lh_gpio_directions_t lh_get_gpio_output_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_gpio_pin_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_gpio_values_t lh_get_gpio_value (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_high_gain_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_integration_time (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_integration_time_increment (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_ip_assign_mode_t lh_get_ip_address_assigned_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_lamp_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_led_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_manual_network_configuration (lh_device_id_t deviceID, lh_error_code_t *errorCode, struct lh_network_configuration_t *configuration)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_maximum_integration_time (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_pixel_intensity_t lh_get_maximum_intensity (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_minimum_averaging_integration_time (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_minimum_integration_time (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_network_configuration (lh_device_id_t deviceID, lh_error_code_t *errorCode, bool *outManualAssignment, struct lh_network_configuration_t *configuration)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_network_device_ids (lh_device_id_t ids[], size_t idsLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_coefficients (lh_device_id_t deviceID, lh_error_code_t *errorCode, float buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_corrected_spectrum1 (lh_device_id_t deviceID, lh_error_code_t *errorCode, float nonlinearityCorrectedSpectrum[], size_t nonlinearityCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_corrected_spectrum2 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float darkSpectrum[], size_t darkSpectrumLength, float nonlinearityCorrectedSpectrum[], size_t nonlinearityCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_nonlinearity_correction_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_number_of_device_ids ()
 
LIGHTHOUSE_DLL_DECL size_t lh_get_pixel_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_rc_version_number (uint32_t *candidate)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_revision_firmware (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint8_t buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_revision_fpga (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint8_t buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_revision_system (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint8_t buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL lh_scan_averaging_t lh_get_scans_to_average (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_sensor_gain_hwstate (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_sensor_gain_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t *highGainState, enum lh_enable_state_t *standardGainState)
 
LIGHTHOUSE_DLL_DECL enum lh_serial_comms_mode_t lh_get_serial_comm_threshold_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_serial_number (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_serial_number_maximum_length (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_open_state_t lh_get_shutter_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_increment (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_maximum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_minimum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_single_strobe_state (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_increment (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_maximum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_minimum (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_spectrum (lh_device_id_t deviceID, lh_error_code_t *errorCode, float buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_spectrum_length (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_get_spectrum_with_metadata (lh_device_id_t deviceID, lh_error_code_t *errorCode, struct lh_spectrum_with_metadata_t *spectrum)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_stored_dark_spectrum (lh_device_id_t deviceID, lh_error_code_t *errorCode, float darkSpectrum[], size_t darkSpectrumLength)
 
LIGHTHOUSE_DLL_DECL bool lh_get_tec_stable (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_celcius_t lh_get_tec_temperature (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL lh_celcius_t lh_get_tec_temperature_setpoint (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_transition_pixel_count (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_transition_pixel_indices (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_pixel_index_t indices[], size_t indicesSize)
 
LIGHTHOUSE_DLL_DECL enum lh_trigger_mode_t lh_get_trigger_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_user_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_wavelength_coefficients (lh_device_id_t deviceID, lh_error_code_t *errorCode, float coeff[], size_t coeffLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_get_wavelengths (lh_device_id_t deviceID, lh_error_code_t *errorCode, float wavelengths[], size_t wavelengthsLength)
 
LIGHTHOUSE_DLL_DECL void lh_initialize ()
 This is an interface to OceanDirect that allows the user to connect to devices over USB and other buses. This is intended as a usable and extensible API.
 
LIGHTHOUSE_DLL_DECL size_t lh_nonlinearity_correct_spectrum1 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float illuminatedSpectrum[], size_t illuminatedSpectrumLength, float nonlinearityCorrectedSpectrum[], size_t nonlinearityCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL size_t lh_nonlinearity_correct_spectrum2 (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float darkSpectrum[], size_t darkSpectrumLength, const float illuminatedSpectrum[], size_t illuminatedSpectrumLength, float nonlinearityCorrectedSpectrum[], size_t nonlinearityCorrectedSpectrumLength)
 
LIGHTHOUSE_DLL_DECL void lh_open_device (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL size_t lh_probe_all_devices ()
 
LIGHTHOUSE_DLL_DECL size_t lh_probe_network_devices ()
 
LIGHTHOUSE_DLL_DECL size_t lh_probe_usb_devices ()
 
LIGHTHOUSE_DLL_DECL void lh_reset_device (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_save_settings_to_flash (lh_device_id_t deviceID, lh_error_code_t *errorCode)
 
LIGHTHOUSE_DLL_DECL void lh_set_acquisition_delay (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_microseconds_t microseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_baud_rate (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_baud_rate_t baudRate)
 
LIGHTHOUSE_DLL_DECL void lh_set_boxcar_width (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_boxcar_width_t boxcarWidth)
 
LIGHTHOUSE_DLL_DECL void lh_set_continuous_strobe_period (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_microseconds_t microseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_continuous_strobe_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_electric_dark_correction_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_flash_slot_data (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t slotNumber, const uint8_t data[], size_t dataLength)
 
LIGHTHOUSE_DLL_DECL void lh_set_gpio_output_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_gpio_directions_t direction, lh_gpio_bitmask_t bitmask)
 
LIGHTHOUSE_DLL_DECL void lh_set_gpio_value (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_gpio_values_t value, lh_gpio_bitmask_t bitmask)
 
LIGHTHOUSE_DLL_DECL void lh_set_high_gain_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_i2c_data (lh_device_id_t deviceID, lh_error_code_t *errorCode, uint32_t i2cBusIndex, uint32_t i2cTargetAddress, const uint8_t data[], size_t dataLength)
 
LIGHTHOUSE_DLL_DECL void lh_set_integration_time (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_microseconds_t microseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_ip_address_assigned_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_ip_assign_mode_t mode)
 
LIGHTHOUSE_DLL_DECL void lh_set_lamp_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_led_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_manual_network_configuration (lh_device_id_t deviceID, lh_error_code_t *errorCode, struct lh_network_configuration_t configuration)
 
LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_response_read_delay (lh_milliseconds_t milliseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_response_read_retry (size_t retryCount)
 
LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_send_retry (size_t retryCount)
 
LIGHTHOUSE_DLL_DECL void lh_set_nonlinearity_correction_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_scans_to_average (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_scan_averaging_t scansToAverage)
 
LIGHTHOUSE_DLL_DECL void lh_set_sensor_gain_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t highGainState, enum lh_enable_state_t standardGainState)
 
LIGHTHOUSE_DLL_DECL void lh_set_serial_comm_threshold_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_serial_comms_mode_t thresholdMode)
 
LIGHTHOUSE_DLL_DECL void lh_set_shutter_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_open_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_delay (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_microseconds_t microseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_state (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_enable_state_t state)
 
LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_width (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_microseconds_t microseconds)
 
LIGHTHOUSE_DLL_DECL void lh_set_stored_dark_spectrum (lh_device_id_t deviceID, lh_error_code_t *errorCode, const float darkSpectrum[], size_t darkSpectrumLength)
 
LIGHTHOUSE_DLL_DECL void lh_set_tec_temperature_setpoint (lh_device_id_t deviceID, lh_error_code_t *errorCode, lh_celcius_t celsius)
 
LIGHTHOUSE_DLL_DECL void lh_set_trigger_mode (lh_device_id_t deviceID, lh_error_code_t *errorCode, enum lh_trigger_mode_t mode)
 
LIGHTHOUSE_DLL_DECL void lh_set_user_string (lh_device_id_t deviceID, lh_error_code_t *errorCode, const char buffer[], size_t bufferLength)
 
LIGHTHOUSE_DLL_DECL void lh_shutdown ()
 

Function Documentation

◆ lh_add_network_devices()

LIGHTHOUSE_DLL_DECL lh_device_id_t lh_add_network_devices ( const char ipAddressStr[],
const char deviceTypeStr[],
lh_error_code_t * errorCode )

.addNetworkDevices Manually create an instance of the network attached device and then open it using the openDevice() function. It is the responsiblitiy of the user to ensure that the device exists and is configured properly. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
ipAddressStrThe ip address of the device to be opened.
deviceTypeStrThe device type. This is case sensitive.
errorCodesee LHErrorCode
Returns
The device id of the device.

◆ lh_add_RS232_device_location()

LIGHTHOUSE_DLL_DECL void lh_add_RS232_device_location ( const char deviceTypeName[],
const char deviceBusPath[],
unsigned int baud,
lh_error_code_t * errorCode )

This specifies to the driver that a device of the given type might be found on a particular RS232 bus (e.g. a COM port). The driver will add the device type and location to the set of those that can be opened.

Parameters
deviceTypeNameThe name of a type of device. This can be one of the following: QE-PRO, STS.
deviceBusPathThe location of the device on the RS232 bus. This will be a platform-specific location. Under Windows, this may be COM1, COM2, etc. Under Linux, this might be /dev/ttyS0, /dev/ttyS1, etc.
baudBaud rate at which to open the device. This should be specified as the rate itself, e.g. 9600, 57600, or 115200.
errorCodesee LHErrorCode

◆ lh_boxcar_correct_spectrum()

LIGHTHOUSE_DLL_DECL void lh_boxcar_correct_spectrum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float illuminatedSpectrum[],
size_t illuminatedSpectrumLength,
lh_boxcar_width_t boxcarWidth,
float boxcarCorrectedSpectrum[],
size_t boxcarCorrectedSpectrumLength )

.boxcarCorrectSpectrum Apply a boxcar smoothing on the given illuminated spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumThe spectrum that will be boxcar corrected.
illuminatedSpectrumLengthThe actual size of the spectrum.
boxcarWidthThe boxcar width.
boxcarCorrectedSpectrumThe output spectrum that were boxcar corrected.
boxcarCorrectedSpectrumLengthThe actual size of the spectrum corrected buffer.

◆ lh_close_device()

LIGHTHOUSE_DLL_DECL void lh_close_device ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.closeDevice This will attempt to close the bus connection to the device with the given ID. The id becomes invalid after closing the device. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode

◆ lh_dark_correct_spectrum1()

LIGHTHOUSE_DLL_DECL size_t lh_dark_correct_spectrum1 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float illuminatedSpectrum[],
size_t illuminatedSpectrumLength,
float darkCorrectedSpectrum[],
size_t darkCorrectedSpectrumLength )

.darkCorrectSpectrum1 Dark correct a previously acquired illuminated spectrum using a stored dark spectrum.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
illuminatedSpectrumLengththe actual size of the illuminated spectrum buffer.
darkCorrectedSpectrumthe buffer that will receive the dark corrected spectrum.
darkCorrectedSpectrumLengththe actual size of the dark corrected buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_dark_correct_spectrum2()

LIGHTHOUSE_DLL_DECL size_t lh_dark_correct_spectrum2 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float darkSpectrum[],
size_t darkSpectrumLength,
const float illuminatedSpectrum[],
size_t illuminatedSpectrumLength,
float darkCorrectedSpectrum[],
size_t darkCorrectedSpectrumLength )

.darkCorrectSpectrum2 Dark correct a previously acquired illuminated spectrum using a previously acquired dark spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
darkSpectrumLengththe actual size of the dark spectrum buffer.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
illuminatedSpectrumLengththe actual size of the illuminated spectrum buffer.
darkCorrectedSpectrumthe buffer that will receive the dark corrected spectrum.
darkCorrectedSpectrumLengththe actual size of the dark corrected buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_get_accessory_board_available()

LIGHTHOUSE_DLL_DECL bool lh_get_accessory_board_available ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getAccessoryBoardAvailable Ping the I2C accessory board (where supported by the device).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
true if accessory is up and running, false otherwise or on error.

◆ lh_get_acquisition_delay()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getAcquisitionDelay Get the acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the acquisition delay period in microseconds or 0 on error.

◆ lh_get_acquisition_delay_increment()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_increment ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getAcquisitionDelayIncrement Get the acquisition delay period increment in microseconds. The increment is the minimum difference (in microseconds) between two adjacent, valid acquisition delay periods.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the acquisition delay period increment in microseconds or 0 on error.

◆ lh_get_acquisition_delay_maximum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_maximum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getAcquisitionDelayMaximum Get the maximum valid acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum acquisition delay period in microseconds or 0 on error.

◆ lh_get_acquisition_delay_minimum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_acquisition_delay_minimum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getAcquisitionDelayMinimum Get the minimum valid acquisition delay period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum acquisition delay period in microseconds or 0 on error.

◆ lh_get_active_pixel_count()

LIGHTHOUSE_DLL_DECL size_t lh_get_active_pixel_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getActivePixelCount Return the total number of active pixels in the device sensor. Active pixels are light sensitive and return the intensities of the measured spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the number of active pixels or 0 on error.

◆ lh_get_active_pixel_indices()

LIGHTHOUSE_DLL_DECL size_t lh_get_active_pixel_indices ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_pixel_index_t indices[],
size_t indicesSize )

.getActivePixelIndices Determine the indices of the active pixels in the device sensor.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
indicesthe array to receive the indices of the active pixels.
indicesSizethe actual size of the indices array.
Returns
the actual number of indices copied into the buffer or 0 on error.

◆ lh_get_api_version_numbers()

LIGHTHOUSE_DLL_DECL void lh_get_api_version_numbers ( uint32_t * major,
uint32_t * minor,
uint32_t * point )

.getAPIVersionNumber Return the major, minor and point API release version numbers.

Parameters
majorthe major software version number.
minorthe minor software version number.
pointthe point software version number.

◆ lh_get_autonull_baseline_level()

LIGHTHOUSE_DLL_DECL lh_autonull_baseline_t lh_get_autonull_baseline_level ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getBaselineLevel Return the baseline intensity value.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the baseline intensity value or 0 on error.

◆ lh_get_autonull_fpga_digital_gain()

LIGHTHOUSE_DLL_DECL lh_autonull_fpga_digital_t lh_get_autonull_fpga_digital_gain ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getFPGADigitalGain Return the fpga digital gain value.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the digital gain value or 0 on error.

◆ lh_get_autonull_fpga_digital_offset()

LIGHTHOUSE_DLL_DECL lh_autonull_fpga_digital_t lh_get_autonull_fpga_digital_offset ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getFPGADigitalOffset Return the fpga digital offset value.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the digital offset value or 0 on error.

◆ lh_get_autonull_maximum_adc_count()

LIGHTHOUSE_DLL_DECL lh_pixel_intensity_t lh_get_autonull_maximum_adc_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getMaximumADCCount Return the maximum value that can be returned by the analog to digital converter (ADC) on the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum ADC value or 0 on error.

◆ lh_get_autonull_saturation_level()

LIGHTHOUSE_DLL_DECL lh_autonull_saturation_t lh_get_autonull_saturation_level ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSaturationLevel Return the value at which the device is saturated.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the saturation value or 0 on error.

◆ lh_get_bad_pixel_indices()

LIGHTHOUSE_DLL_DECL size_t lh_get_bad_pixel_indices ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_pixel_index_t indices[],
size_t indicesSize )

.getBadPixelIndices Determine the indices of pixels that have been determined to be "bad" e.g. hot pixels.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
indicesthe array to receive the indices of the bad pixels.
indicesSizethe actual size of the indices array.
Returns
the actual number of indices copied int the buffer or 0 on error.

◆ lh_get_baud_rate()

LIGHTHOUSE_DLL_DECL enum lh_baud_rate_t lh_get_baud_rate ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getBaudRate Return the current baud rate of the serial port.

See also
setBaudRate()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current baud rate or 0 on error.

◆ lh_get_boxcar_width()

LIGHTHOUSE_DLL_DECL lh_boxcar_width_t lh_get_boxcar_width ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getBoxcarWidth Get the width of the boxcar smoothing to be applied to the returned spectrum. When this value has been set greater than 0, boxcar smoothing (a moving average) is applied to the spectrum returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). The width specified is the number of pixels either side of the central pixel of the average i.e. if the result of this function is n, the "full width" of the smoothing is 2*n+1.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the width of the smoothing to be applied per returned spectrum or 0 on error.

◆ lh_get_continuous_strobe_period()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getContinuousStrobePeriod Return the continuous strobe period in microseconds.

See also
setContinuousStrobePeriod()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the continuous strobe period in microseconds or 0 on error.

◆ lh_get_continuous_strobe_period_increment()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_increment ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getContinuousStrobePeriodIncrement Return the continuous strobe period increment in microseconds. The increment is the minimum value between two adjacent (valid) continuous strobe period values.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the continuous strobe period increment in microseconds or 0 on error.

◆ lh_get_continuous_strobe_period_maximum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_maximum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getContinuousStrobePeriodMaximum Return the maximum continuous strobe period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum continuous strobe period in microseconds or 0 on error.

◆ lh_get_continuous_strobe_period_minimum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_continuous_strobe_period_minimum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getContinuousStrobePeriodMinimum Return the minimum continuous strobe period in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum continuous strobe period in microseconds or 0 on error.

◆ lh_get_continuous_strobe_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_continuous_strobe_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getContinuousStrobeState Determine if continuous strobe is enabled or disabled on the device.

See also
setContinuousStrobeState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
state "on" if continuous strobe is enabled, "off" if continuous strobe is disabled or on error.

◆ lh_get_dark_corrected_spectrum1()

LIGHTHOUSE_DLL_DECL size_t lh_get_dark_corrected_spectrum1 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float darkCorrectedSpectrum[],
size_t darkCorrectedSpectrumLength )

.getDarkCorrectedSpectrum1 Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkCorrectedSpectrumthe buffer that will receive the dark corrected spectrum.
darkCorrectedSpectrumLengththe actual size of the dark corrected buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_get_dark_corrected_spectrum2()

LIGHTHOUSE_DLL_DECL size_t lh_get_dark_corrected_spectrum2 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float darkSpectrum[],
size_t darkSpectrumLength,
float darkCorrectedSpectrum[],
size_t darkCorrectedSpectrumLength )

.getDarkCorrectedSpectrum2 Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
darkSpectrumLengththe actual size of the dark spectrum buffer.
darkCorrectedSpectrumthe buffer that will receive the dark corrected spectrum.
darkCorrectedSpectrumLengththe actual size of the dark correction buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_get_device_alias()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_alias ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getDeviceAlias Determine the device alias of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the device alias.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_ids()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_ids ( lh_device_id_t ids[],
size_t idsLength )

.getDeviceIDs This provides a unique ID of each device that is detected or specified. The IDs are copied into the user-provided buffer. These IDs are weak references: attempting to access a device that no longer exists will cause an error value to be returned. A given ID will always refer to the same device until the device is closed or the shutdown method is called. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
idsthe buffer to receive the device IDs.
idsLengththe actual size of the array ids.
Returns
the number of device IDs actually copied into the array or 0 on error or if no devices have been found.

◆ lh_get_device_manufacturer_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_manufacturer_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getManufacturer Determine the current manufacturer stored string.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the current manufacturer string.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_model()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_model ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getModel Determine the current model stored string.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the current model string.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_model_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_model_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getModel Determine the current model stored string.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the current model string.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_original_manufacturer_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_original_manufacturer_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getOriginalManufacturer Determine the original manufacturer stored string.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the original manufacturer string.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_original_model_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_original_model_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getOriginalModel Determine the original model stored string.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the original model string.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_device_original_pid()

LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_original_pid ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getOriginalUsbPID Determine the original device USB Product ID.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the original USB Product ID or 0 on error.

◆ lh_get_device_original_vid()

LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_original_vid ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getOriginalUsbVID Determine the original device USB Vendor ID.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the original USB Vendor ID or 0 on error.

◆ lh_get_device_pid()

LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_pid ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getUsbPID Determine the current device USB Product ID.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current USB Product ID or 0 on error.

◆ lh_get_device_type()

LIGHTHOUSE_DLL_DECL size_t lh_get_device_type ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getDeviceType Get a string that describes the type of device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode
buffera character buffer to receive the device type string.
bufferLengththe length of the supplied buffer.
Returns
the actual length of the device type string returned on success or 0 on error.

◆ lh_get_device_vid()

LIGHTHOUSE_DLL_DECL lh_usb_identifier_t lh_get_device_vid ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getUsbVID Determine the current device USB Vendor ID.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current USB Vendor ID or 0 on error.

◆ lh_get_electric_dark_correction_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_electric_dark_correction_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getElectricDarkCorrectionState

Deprecated
Determine if automatic electric dark correction to the acquired spectra is on or off.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on." if automatic electric dark correction is turned on, "off" otherwise (or on error).

◆ lh_get_electric_dark_pixel_count()

LIGHTHOUSE_DLL_DECL size_t lh_get_electric_dark_pixel_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

Return the total number of optically dark pixels in the device sensor. Optically dark pixels are not light sensitive.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode
Returns
the number of optically dark pixels or 0 on error.

◆ lh_get_electric_dark_pixel_indices()

LIGHTHOUSE_DLL_DECL size_t lh_get_electric_dark_pixel_indices ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_pixel_index_t indices[],
size_t indicesLength )

Determine the indices of the optically dark pixels in the device sensor.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode
indicesthe array to receive the indices of the optically dark pixels.
indicesSizethe actual size of the indices array.
Returns
the actual number of indices copied int the buffer or 0 on error.

◆ lh_get_error_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_error_string ( lh_error_code_t errorCode,
char message[],
size_t messageLength )

.getErrorMessage Get error message associated with the given error code. If the error code is incorrect then the return message will be "Error. Undefined error".

Parameters
errorCodeThe error code.
messageThe output buffer.
messageLengthoutput buffer length.
Returns
The number of characters copied into the output buffer or 0 on error.

◆ lh_get_error_string_length()

LIGHTHOUSE_DLL_DECL size_t lh_get_error_string_length ( lh_error_code_t errorCode)

.getErrorMessageLength Get error message length associated with the given error code. If the error code is incorrect then the return message length will be 0.

Parameters
errorCodesee LHErrorCode.
Returns
the size of the error message associated with the supplied error code.

◆ lh_get_ethernet_addon_available()

LIGHTHOUSE_DLL_DECL bool lh_get_ethernet_addon_available ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getEthernetAddOnAvailable Determine if the device has an Ethernet add-on.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
true if the device has an Ethernet add-on, false otherwise.

◆ lh_get_ethernet_mac_address()

LIGHTHOUSE_DLL_DECL void lh_get_ethernet_mac_address ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_mac_address_array_t outMACAddress,
size_t outMACAddressSize )

.getEthernetMACAddress Get the MAC address of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
outMACAddressthe array where the retrieved MAC address will be stored.
outMACAddressSizethe size of the array outMACAddress (6).

◆ lh_get_flash_slot_data()

LIGHTHOUSE_DLL_DECL size_t lh_get_flash_slot_data ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t slotNumber,
uint8_t data[],
size_t dataLength )

.getFlashSlotData Read data from a non-volatile slot space.

See also
setFlashSlotData()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
slotNumberthe desired slot number to read from. Valid values range from 1 to 20 but may vary depending on FW version.
datathe buffer to receive the slot data
dataLengththe length of the supplied data buffer.
Returns
the number of bytes written to the data buffer.

◆ lh_get_gpio_output_state()

LIGHTHOUSE_DLL_DECL lh_gpio_directions_t lh_get_gpio_output_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getOutputState Return the direction (input or output) of the pins.

See also
setOutputState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
a value specifying the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin. A value of 0 will also be returned on error.

◆ lh_get_gpio_pin_count()

LIGHTHOUSE_DLL_DECL size_t lh_get_gpio_pin_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getNumberOfGPIO Return the total number of GPIO pins.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the total number of GPIO pins (input and output) or 0 on error.

◆ lh_get_gpio_value()

LIGHTHOUSE_DLL_DECL lh_gpio_values_t lh_get_gpio_value ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getValue Return the value of the pins.

See also
setValue()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the values of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin. A value of 0 will also be returned on error.

◆ lh_get_high_gain_mode()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_high_gain_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getHighGainMode Return the gain mode of the sensor (high or standard).

See also
setHighGainMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if high gain mode is enabled, "off" if standard gain mode is enabled or on error.

◆ lh_get_integration_time()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_integration_time ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getIntegrationTime Get the current device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current integration time in microseconds or 0 on error.

◆ lh_get_integration_time_increment()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_integration_time_increment ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getIntegrationTimeIncrement Get the device integration time increment in microseconds. Some devices may only allow the integration time to be changed in multiples of this increment value.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the integration time increment in microseconds or 0 on error.

◆ lh_get_ip_address_assigned_mode()

LIGHTHOUSE_DLL_DECL enum lh_ip_assign_mode_t lh_get_ip_address_assigned_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getIPAddressAssignedMode Read the IP address mode from the device.

See also
setIPAddressAssignedMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"manual" if the ip address was statically assigned, "automatic" if the ip address was generated via DHCP, or "manual" on error.

◆ lh_get_lamp_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_lamp_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getLampState Return the lamp enable pin state.

See also
setLampState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if the light source is turned on, "off" if the light source is turned off or on error.

◆ lh_get_led_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_led_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getLedState Return the LED state, "on" or "off".

See also
setLedState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if the LED is turned on, "off" if the LED is turned off or on error.

◆ lh_get_manual_network_configuration()

LIGHTHOUSE_DLL_DECL void lh_get_manual_network_configuration ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
struct lh_network_configuration_t * configuration )

.getManualNetworkConfiguration Get the (manually set) network configuration parameters for the device.

See also
setManualNetworkConfiguration()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
configurationthe network configuration parameters: ipv4Address 4 bytes (array) specifying the IP address; ipv4AddressSize the size of the array ipv4Address (4); subnetMask 4 bytes (array) specifying the subnet mask; subnetMaskSize the size of the array subnetMask (4); defaultGateway 4 bytes (array) specifying the default network gateway; defaultGatewaySize the size of the array defaultGateway (4); dnsServer 4 bytes (array) specifying the DNS server; dnsServerSize the size of the array dnsServer(4).

◆ lh_get_maximum_integration_time()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_maximum_integration_time ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getMaximumIntegrationTime Get maximum device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum integration time in microseconds, or 0 on error.

◆ lh_get_maximum_intensity()

LIGHTHOUSE_DLL_DECL lh_pixel_intensity_t lh_get_maximum_intensity ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getMaximumIntensity Get max intensity (in counts) that can be returned in any pixel.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum pixel intensity or 0 on error.

◆ lh_get_minimum_averaging_integration_time()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_minimum_averaging_integration_time ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getMinimumAveragingIntegrationTime Get minimum integration time in microseconds when averaging is enabled.

Note
some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is not enabled can be determined using getMinimumIntegrationTime.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum integration time in microseconds with averaging enabled, or 0 on error.

◆ lh_get_minimum_integration_time()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_minimum_integration_time ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getMinimumIntegrationTime Get minimum device integration time in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum integration time in microseconds for acquisition with no averaging or 0 on error.

◆ lh_get_network_configuration()

LIGHTHOUSE_DLL_DECL void lh_get_network_configuration ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
bool * outManualAssignment,
struct lh_network_configuration_t * configuration )

.getNetworkConfiguration Get the network configuration parameters for the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
outManualAssignmenttrue if the configuration was set manually, false otherwise.
configurationthe network configuration parameters: ipv4Address 4 bytes (array) specifying the IP address; ipv4AddressSize the size of the array ipv4Address (4); subnetMask 4 bytes (array) specifying the subnet mask; subnetMaskSize the size of the array subnetMask (4); defaultGateway 4 bytes (array) specifying the default network gateway; defaultGatewaySize the size of the array defaultGateway (4); dnsServer 4 bytes (array) specifying the DNS server; dnsServerSize the size of the array dnsServer(4).

◆ lh_get_network_device_ids()

LIGHTHOUSE_DLL_DECL size_t lh_get_network_device_ids ( lh_device_id_t ids[],
size_t idsLength )

.getNetworkDeviceIDs This provides a unique ID of each network attached device that is detected or manually specified. The IDs are copied into the user-provided buffer. These IDs are weak references: attempting to access a device that no longer exists will cause an error value to be returned. A given ID will always refer to the same device until the device is closed or the shutdown method is called. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
idsthe buffer to receive the device IDs.
idsLengththe actual size of the array ids.
Returns
the number of device IDs actually copied into the array or 0 on error.

◆ lh_get_nonlinearity_coefficients()

LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_coefficients ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float buffer[],
size_t bufferLength )

.getNonlinearityCoefficients Determine the current nonlinearity coefficients for the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferthe array to receive the current nonlinearity coefficients.
bufferLengththe size of the buffer that will receive the coefficients. The number of coefficients returned by the device is expected to be eight (8). If bufferLength is less than eight then the specified number (bufferlength) of coefficients will be returned. If bufferLength is greater than eight then only the first eight elements of buffer will be populated wth the returned coefficients.
Returns
the actual number of coefficients copied into the buffer or 0 on error.

◆ lh_get_nonlinearity_corrected_spectrum1()

LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_corrected_spectrum1 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float nonlinearityCorrectedSpectrum[],
size_t nonlinearityCorrectedSpectrumLength )

.getNonlinearityCorrectedSpectrum1 Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction followed by a nonlinearity correction then return the nonlinearity corrected spectrum.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
nonlinearityCorrectedSpectrumthe buffer that will receive the nonlinearity corrected spectrum.
nonlinearityCorrectedSpectrumLengththe actual size of the nonlinearity correction buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_get_nonlinearity_corrected_spectrum2()

LIGHTHOUSE_DLL_DECL size_t lh_get_nonlinearity_corrected_spectrum2 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float darkSpectrum[],
size_t darkSpectrumLength,
float nonlinearityCorrectedSpectrum[],
size_t nonlinearityCorrectedSpectrumLength )

.getNonlinearityCorrectedSpectrum2 Acquire a spectrum and use the supplied dark spectrum to perform a dark correction followed by the nonlinearity correction then return the nonlinearity corrected spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used for the dark correction.
darkSpectrumLengththe actual size of the dark spectrum buffer.
nonlinearityCorrectedSpectrumthe buffer that will receive the nonlinearity corrected spectrum.
nonlinearityCorrectedSpectrumLengththe actual size of the nonlinearity correction buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_get_nonlinearity_correction_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_nonlinearity_correction_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getNonLinearityCorrectionState

Deprecated
Determine if automatic nonlinearity correction is on or off.
See also
setNonLinearityCorrectionState
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if automatic nonlinearity correction is turned on, "off" otherwise (or on error).

◆ lh_get_number_of_device_ids()

LIGHTHOUSE_DLL_DECL size_t lh_get_number_of_device_ids ( )

.getNumberOfDeviceIDs This provides the total number of devices that have either been probed or manually specified. Devices are not opened automatically, but this can provide an upper bound for the number of IDs returned by getDeviceIDs(). Note that this should only be done by one thread at a time.

Returns
the total number of devices, both specified and probed.

◆ lh_get_pixel_count()

LIGHTHOUSE_DLL_DECL size_t lh_get_pixel_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTotalPixelCount Return the total number of pixels in the device sensor. Note: this is the total number; not all pixels will be "active".

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the total number of pixels or 0 on error.

◆ lh_get_rc_version_number()

LIGHTHOUSE_DLL_DECL void lh_get_rc_version_number ( uint32_t * candidate)

◆ lh_get_revision_firmware()

LIGHTHOUSE_DLL_DECL size_t lh_get_revision_firmware ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint8_t buffer[],
size_t bufferLength )

.getRevisionFirmware Determine the firmware version of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the firmware version numbers (major, minor, point).
bufferLengththe size of the buffer array.
Returns
the actual number of values copied into the buffer or 0 on error.

◆ lh_get_revision_fpga()

LIGHTHOUSE_DLL_DECL size_t lh_get_revision_fpga ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint8_t buffer[],
size_t bufferLength )

.getRevisionFPGA Determine the FPGA version of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the FPGA version numbers (major, minor, point).
bufferLengththe size of the buffer array.
Returns
the actual number of values copied into the buffer or 0 on error.

◆ lh_get_revision_system()

LIGHTHOUSE_DLL_DECL size_t lh_get_revision_system ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint8_t buffer[],
size_t bufferLength )

.getRevisionSystem Determine the Systen version of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the System version numbers (major, minor, point).
bufferLengththe size of the buffer array.
Returns
the actual number of values copied into the buffer or 0 on error.

◆ lh_get_scans_to_average()

LIGHTHOUSE_DLL_DECL lh_scan_averaging_t lh_get_scans_to_average ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getScansToAverage Get the number of spectra to be averaged per returned spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the number of spectra to be averaged per returned spectrum or 0 on error.

◆ lh_get_sensor_gain_hwstate()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_sensor_gain_hwstate ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSensorGainHWState Read the current sensor gain mode of the given device (where supported by the device).

See also
getHighGainModeState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"on" if high gain mode is currently enabled, "off" if standard gain mode is currently enabled.

◆ lh_get_sensor_gain_mode()

LIGHTHOUSE_DLL_DECL void lh_get_sensor_gain_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t * highGainState,
enum lh_enable_state_t * standardGainState )

.getSensorGainMode Read the sensor gain mode configuration of the given device. OceanNR - this device only supported one gain mode either standard gain or high gain. This function will return the calibration gain mode.

See also
setSensorGainMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
highGainState"on" if high gain mode support is enabled on the device, "off" otherwise.
standardGainState"on" if standard gain mode support is enabled on the device, "off" otherwise.

◆ lh_get_serial_comm_threshold_mode()

LIGHTHOUSE_DLL_DECL enum lh_serial_comms_mode_t lh_get_serial_comm_threshold_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSerialCommThresholdMode Get the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
setSerialCommThresholdMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
The threshold mode either 0x10 or 0x20.

◆ lh_get_serial_number()

LIGHTHOUSE_DLL_DECL size_t lh_get_serial_number ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getSerialNumber Determine the serial number of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferan array to receive the characters of the serial number.
bufferLengththe size of the buffer array.
Returns
the actual number of characters copied into the buffer or 0 on error.

◆ lh_get_serial_number_maximum_length()

LIGHTHOUSE_DLL_DECL size_t lh_get_serial_number_maximum_length ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSerialNumberMaximumLength Determine the maximum length of the serial number of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum size of the serial number or 0 on error.

◆ lh_get_shutter_state()

LIGHTHOUSE_DLL_DECL enum lh_open_state_t lh_get_shutter_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getShutterState Determine the current shutter state.

See also
setShutterState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
"open" if the shutter is open, "closed" if the shutter is closed, or on error.

◆ lh_get_single_strobe_delay()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeDelay Get the single strobe delay in microseconds.

See also
setSingleStrobeDelay()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current single strobe delay in microseconds or 0 on error.

◆ lh_get_single_strobe_delay_increment()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_increment ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeDelayIncrement Return the single strobe delay increment in microseconds. The increment is the minimum value between two adjacent (valid) single strobe delay values.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the single strobe delay increment in microseconds or 0 on error.

◆ lh_get_single_strobe_delay_maximum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_maximum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeDelayMaximum Get the maximum single strobe delay in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum single strobe delay in microseconds or 0 on error.

◆ lh_get_single_strobe_delay_minimum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_delay_minimum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeDelayMinimum Get the minimum single strobe delay in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum single strobe delay in microseconds or 0 on error.

◆ lh_get_single_strobe_state()

LIGHTHOUSE_DLL_DECL enum lh_enable_state_t lh_get_single_strobe_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeState Determine if single strobe is enabled or disabled on the device.

See also
setSingleStrobeState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
state "on" if single strobe is enabled, "off" if single strobe is disabled or on error.

◆ lh_get_single_strobe_width()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeWidth Get the single strobe width in microseconds.

See also
setSingleStrobeWidth()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current single strobe width in microseconds or 0 on error.

◆ lh_get_single_strobe_width_increment()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_increment ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeWidthIncrement Return the single strobe width increment in microseconds. The increment is the minimum value between two adjacent (valid) single strobe width values.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the single strobe width increment in microseconds or 0 on error.

◆ lh_get_single_strobe_width_maximum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_maximum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeWidthMaximum Get the maximum single strobe width in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the maximum single strobe width in microseconds or 0 on error.

◆ lh_get_single_strobe_width_minimum()

LIGHTHOUSE_DLL_DECL lh_microseconds_t lh_get_single_strobe_width_minimum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSingleStrobeWidthMinimum Get the minimum single strobe width in microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the minimum single strobe width in microseconds or 0 on error.

◆ lh_get_spectrum()

LIGHTHOUSE_DLL_DECL size_t lh_get_spectrum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float buffer[],
size_t bufferLength )

.getSpectrum Get a spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferthe buffer that will receive the spectrum.
bufferLengththe actual size of the buffer.
Returns
the actual number of pixels copied into buffer or 0 on error.

◆ lh_get_spectrum_length()

LIGHTHOUSE_DLL_DECL size_t lh_get_spectrum_length ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getSpectrumLength Get spectrum length i.e. the number of pixels in the spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the size of the spectrum or 0 on error.

◆ lh_get_spectrum_with_metadata()

LIGHTHOUSE_DLL_DECL void lh_get_spectrum_with_metadata ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
struct lh_spectrum_with_metadata_t * spectrum )

.getSpectrumWithMetadata Get spectrum with meta-data.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
spectrumthe buffer that will receive the formatted spectrum. Note: the buffer should have sufficient memory allocated to receive the number of pixels in the resulting spectrum; a smaller memory allocation will result in a partial spectrum being returned.
Returns
the actual number of pixels copied into buffer or 0 on error.

◆ lh_get_stored_dark_spectrum()

LIGHTHOUSE_DLL_DECL size_t lh_get_stored_dark_spectrum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float darkSpectrum[],
size_t darkSpectrumLength )

.getStoredDarkSpectrum Retrieve a previously stored dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.

See also
setStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be retrieved.
darkSpectrumLengththe actual size of the dark buffer.
Returns
the actual number of pixels copied into the buffer.

◆ lh_get_tec_stable()

LIGHTHOUSE_DLL_DECL bool lh_get_tec_stable ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTecStable Determine if the TEC temperature is stable (not changing).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
true if the TEC temperature is stable, false otherwise or on error.

◆ lh_get_tec_temperature()

LIGHTHOUSE_DLL_DECL lh_celcius_t lh_get_tec_temperature ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTecTemperature Get the current TEC temperature in Celcius.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the TEC temperature in Celcius, or 0.0 on error.

◆ lh_get_tec_temperature_setpoint()

LIGHTHOUSE_DLL_DECL lh_celcius_t lh_get_tec_temperature_setpoint ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTecTemperatureSetpoint Get the current TEC temperature setpoint in Celcius.

See also
setTecTemperatureSetpoint()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the TEC temperature setpoint in Celcius, or 0.0 on error.

◆ lh_get_transition_pixel_count()

LIGHTHOUSE_DLL_DECL size_t lh_get_transition_pixel_count ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTransitionPixelCount Return the total number of transition pixels in the device sensor. Transition pixels lie between the active and optically dark pixels so they may return intensities that appear to be plausible but cannot be relied upon.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the number of transition pixels or 0 on error.

◆ lh_get_transition_pixel_indices()

LIGHTHOUSE_DLL_DECL size_t lh_get_transition_pixel_indices ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_pixel_index_t indices[],
size_t indicesSize )

.getTransitionPixelIndices Determine the indices of the transition pixels in the device sensor. Transition pixels lie between the active and optically dark pixels so they may return intensities that appear to be plausible but cannot be relied upon.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
indicesthe array to receive the indices of the transition pixels.
indicesSizethe actual size of the indices array.
Returns
the actual number of indices copied into the buffer or 0 on error.

◆ lh_get_trigger_mode()

LIGHTHOUSE_DLL_DECL enum lh_trigger_mode_t lh_get_trigger_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.getTriggerMode Get the spectrometer trigger mode (software, edge or level).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
Returns
the current trigger mode being used by the device or "software" on error.

◆ lh_get_user_string()

LIGHTHOUSE_DLL_DECL size_t lh_get_user_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
char buffer[],
size_t bufferLength )

.getUserString Get the current stored string on the device.

See also
setUserString()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferthe character buffer to receive the resulting string.
bufferLengththe actual length of the supplied buffer.
Returns
the number of characters copied into the supplied buffer or 0 on error.

◆ lh_get_wavelength_coefficients()

LIGHTHOUSE_DLL_DECL size_t lh_get_wavelength_coefficients ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float coeff[],
size_t coeffLength )

.getWavelengthCoefficients Get the coefficients of the polynomial used to calculate the wavelengths.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
coeffan array to receive the coefficient values.
coeffLengththe actual length of the supplied coefficients array.
Returns
the actual number of coefficients copied into the coefficients array or 0 on error.

◆ lh_get_wavelengths()

LIGHTHOUSE_DLL_DECL size_t lh_get_wavelengths ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
float wavelengths[],
size_t wavelengthsLength )

.getWavelengths Get the wavelengths (in nanometres) for each pixel of the specified device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
wavelengthsan array to receive the wavelength values.
wavelengthsLengththe actual length of the supplied wavelengths array.
Returns
the actual number of wavelengths copied into the wavelengths array or 0 on error.

◆ lh_initialize()

LIGHTHOUSE_DLL_DECL void lh_initialize ( )

This is an interface to OceanDirect that allows the user to connect to devices over USB and other buses. This is intended as a usable and extensible API.

Note
Detailed method documentation is available in the analogous C functions in LighthouseAPI.h .initialize This should be called prior to any other lh_call. The API may recover gracefully if this is not called, but future releases may assume this is called first. This should be called synchronously – a single thread should call this.

◆ lh_nonlinearity_correct_spectrum1()

LIGHTHOUSE_DLL_DECL size_t lh_nonlinearity_correct_spectrum1 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float illuminatedSpectrum[],
size_t illuminatedSpectrumLength,
float nonlinearityCorrectedSpectrum[],
size_t nonlinearityCorrectedSpectrumLength )

.nonlinearityCorrectSpectrum1 Nonlinearity correct a previously acquired illuminated spectrum using a stored dark spectrum. This function performs a dark correction using a previously stored dark spectrum prior to performing the nonlinearity correction.

See also
setStoredDarkSpectrum
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
illuminatedSpectrumLengththe actual size of the illuminated spectrum buffer.
nonlinearityCorrectedSpectrumthe buffer that will receive the nonlinearity corrected spectrum.
nonlinearityCorrectedSpectrumLengththe actual size of the nonlinearity correction buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_nonlinearity_correct_spectrum2()

LIGHTHOUSE_DLL_DECL size_t lh_nonlinearity_correct_spectrum2 ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float darkSpectrum[],
size_t darkSpectrumLength,
const float illuminatedSpectrum[],
size_t illuminatedSpectrumLength,
float nonlinearityCorrectedSpectrum[],
size_t nonlinearityCorrectedSpectrumLength )

.nonlinearityCorrectSpectrum2 Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be used prior to the nonlinearity correction.
darkSpectrumLengththe actual size of the dark spectrum buffer.
illuminatedSpectrumthe buffer that contains the illuminated spectrum to be corrected.
illuminatedSpectrumLengththe actual size of the illuminated spectrum buffer.
nonlinearityCorrectedSpectrumthe buffer that will receive the nonlinearity corrected spectrum.
nonlinearityCorrectedSpectrumLengththe actual size of the nonlinearity correction buffer.
Returns
the size of the returned corrected spectrum on success, or 0 on error.

◆ lh_open_device()

LIGHTHOUSE_DLL_DECL void lh_open_device ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.openDevice This will attempt to open the bus connection to the device with the given ID. After the device is closed the id becomes invalid. You need to call either probeDevices()/addNetworkDevice()/detectNetworkDevices() and getDeviceIDs() in order to have a valid id before reopening the device again. For a network connected device this function may return an error code if the device is not yet ready to accept incoming connection or the device is unreachable. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode

◆ lh_probe_all_devices()

LIGHTHOUSE_DLL_DECL size_t lh_probe_all_devices ( )

.probeAllDevices Cause the driver to look for any device that can be found automatically (i.e. attached by USB and network devices). Until this method called then such devices will not be available for use. Before calling this function, you may want to adjust the multicast settings use for probing network devices. A subsequent call to getDeviceIDs is needed before a device can be "opened" and used. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

See also
probeUsbDevices()
probeNetworkDevices()
setMulticastMsgSendRetry()
setMulticastMsgResponseReadRetry()
setMulticastMsgResponseReadDelay()
Returns
the number of devices found.

◆ lh_probe_network_devices()

LIGHTHOUSE_DLL_DECL size_t lh_probe_network_devices ( )

.probeNetworkDevices This provides a way to find all Ethernet discoverable devices. Afterwards, a call to probeDevices is neccessary to grab the interface for opening and connecting to discovered device. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Returns
the number of detected network devices.

◆ lh_probe_usb_devices()

LIGHTHOUSE_DLL_DECL size_t lh_probe_usb_devices ( )

.probeUsbDevices Cause the driver to look for any device that can be found automatically i.e. attached by USB. Until this method called then such devices will not be available for use. A subsequent call to getDeviceIDs is needed before a device can be "opened" and used. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

See also
probeNetworkDevices()
Returns
the number of USB devices.

◆ lh_reset_device()

LIGHTHOUSE_DLL_DECL void lh_reset_device ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.resetDevice Trigger a software reset of the device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.

◆ lh_save_settings_to_flash()

LIGHTHOUSE_DLL_DECL void lh_save_settings_to_flash ( lh_device_id_t deviceID,
lh_error_code_t * errorCode )

.saveSettingsToFlash Save the current serial port settings to persistent memory.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.

◆ lh_set_acquisition_delay()

LIGHTHOUSE_DLL_DECL void lh_set_acquisition_delay ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_microseconds_t microseconds )

.setAcquisitionDelay Set the acquisition delay to the specified number of microseconds.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe acquisition delay period in microseconds.

◆ lh_set_baud_rate()

LIGHTHOUSE_DLL_DECL void lh_set_baud_rate ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_baud_rate_t baudRate )

.setBaudRate Set the current baud rate of the serial port.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
baudRatethe desired baud rate. An invalid argument error code will be returned if this is not one of: lh_baud_rate_t::B300 lh_baud_rate_t::B600 lh_baud_rate_t::B1200 lh_baud_rate_t::B2400 lh_baud_rate_t::B9600 lh_baud_rate_t::B14400 lh_baud_rate_t::B19200 lh_baud_rate_t::B38400 lh_baud_rate_t::B57600 lh_baud_rate_t::B115200

◆ lh_set_boxcar_width()

LIGHTHOUSE_DLL_DECL void lh_set_boxcar_width ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_boxcar_width_t boxcarWidth )

.setBoxcarWidth Set the width of the boxcar smoothing to be applied to the returned spectrum. When this value is set greater than 0, boxcar smoothing (a moving average) is applied to the spectrum returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). The width specified is the number of pixels either side of the central pixel of the average i.e. if the result of this function is n, the "full width" of the smoothing is 2*n+1. Setting this value to 0 turns off the boxcar smoothing.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
boxcarWidththe width of the smoothing to be applied, or zero if smoothing is to be turned off.

◆ lh_set_continuous_strobe_period()

LIGHTHOUSE_DLL_DECL void lh_set_continuous_strobe_period ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_microseconds_t microseconds )

.setContinuousStrobePeriod Set the continuous strobe period in microseconds.

See also
getContinuousStrobePeriod
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe desired continuous strobe period in microseconds.

◆ lh_set_continuous_strobe_state()

LIGHTHOUSE_DLL_DECL void lh_set_continuous_strobe_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setContinuousStrobeState Enable or disable continuous strobe on the device.

See also
getContinuousStrobeState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" to enable continuous strobe, "off" to disable continuous strobe.

◆ lh_set_electric_dark_correction_state()

LIGHTHOUSE_DLL_DECL void lh_set_electric_dark_correction_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setElectricDarkCorrectionState

Deprecated
Toggle the "automatic" electric dark correction on or off for an acquired spectrum. This correction is applied automatically to any acquired spectrum when the function is turned on.
See also
setStoredDarkSpectrum
getStoredDarkSpectrum
getDarkCorrectedSpectrum
Warning
if electric dark correction is enabled using this function then some of the newer dark correction functionality e.g. getDarkCorrectedSpectrum may not be used at the same time.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" if electric dark correction is to be used, "off" otherwise.

◆ lh_set_flash_slot_data()

LIGHTHOUSE_DLL_DECL void lh_set_flash_slot_data ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t slotNumber,
const uint8_t data[],
size_t dataLength )

.setFlashSlotData Write data into a non-volatile slot space. This function is only applied to OBP2 device.

See also
getFlashSlotData()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
slotNumberthe desired slot number to write to. Valid values range from 1 to 20 but may vary depending on FW version.
datathe buffer containing the slot data.
dataLengththe slot data size.

◆ lh_set_gpio_output_state()

LIGHTHOUSE_DLL_DECL void lh_set_gpio_output_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_gpio_directions_t direction,
lh_gpio_bitmask_t bitmask )

.setOutputState Set the direction (input or output) of the pins specified by the supplied bitmask.

See also
getOutputState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
directionthe bits of this value determine the direction of the corresponding pin i.e. bit "n" determines the direction of the nth GPIO pin. A bit value of 0 specifes an input pin; a bit value of 1 specifies an output pin.
bitmaskthe bitmask determines which values of the direction parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding direction bit will be applied, if the bit is 0 the corresponding direction bit will not be applied.

◆ lh_set_gpio_value()

LIGHTHOUSE_DLL_DECL void lh_set_gpio_value ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_gpio_values_t value,
lh_gpio_bitmask_t bitmask )

.setValue Set the value of the pins specified by the supplied bitmask.

See also
getValue()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
valuethe bits of this value determine the value of the corresponding pin i.e. bit "n" determines the value of the nth GPIO pin.
bitmaskthe bitmask determines which bits of the value parameter shall be used i.e. if the nth bit of the bitmask is 1 then the corresponding value bit will be applied, if the bit is 0 the corresponding value bit will not be applied.

◆ lh_set_high_gain_mode()

LIGHTHOUSE_DLL_DECL void lh_set_high_gain_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setHighGainMode Set the gain mode of the sensor (high or standard).

See also
getHighGainMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" enables high gain mode, "off" enables standard gain mode.

◆ lh_set_i2c_data()

LIGHTHOUSE_DLL_DECL void lh_set_i2c_data ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
uint32_t i2cBusIndex,
uint32_t i2cTargetAddress,
const uint8_t data[],
size_t dataLength )

.setI2CData Writes I2C data to the device. This function is only applied to OBP2 device.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
i2cBusIndexthe desired I2C bus index.
i2cTargetAddressthe desired I2C target address (device dependent).
datathe array containing the I2C data to write.
dataLengththe length of the I2C data array.

◆ lh_set_integration_time()

LIGHTHOUSE_DLL_DECL void lh_set_integration_time ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_microseconds_t microseconds )

.setIntegrationTime Set the current device integration time in microseconds.

Note
some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is enabled can be determined using getMinimumAveragingIntegrationTimeMicros.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe desired integration time in microseconds.

◆ lh_set_ip_address_assigned_mode()

LIGHTHOUSE_DLL_DECL void lh_set_ip_address_assigned_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_ip_assign_mode_t mode )

.setIPAddressAssignedMode Set the IP address mode for the device.

See also
getIPAddressAssignedMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
modeset to lh_ip_assign_mode_t::manual if the IP address is assigned manually or lh_ip_assign_mode_t::automatic if the address is assigned by DHCP.

◆ lh_set_lamp_state()

LIGHTHOUSE_DLL_DECL void lh_set_lamp_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setLampState Set the lamp enable pin to turn the connected light source on or off.

See also
getLampState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" to turn the light source on, "off" to turn the light source off.

◆ lh_set_led_state()

LIGHTHOUSE_DLL_DECL void lh_set_led_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setLedState Turn the LED on or off.

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" to turn the LED on, "off" to turn the LED off.

◆ lh_set_manual_network_configuration()

LIGHTHOUSE_DLL_DECL void lh_set_manual_network_configuration ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
struct lh_network_configuration_t configuration )

.setManualNetworkConfiguration Set the (manually set) network configuration parameters for the device.

See also
getManualNetworkConfiguration()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
configurationthe network configuration parameters: ipv4Address 4 bytes (array) specifying the IP address; ipv4AddressSize the size of the array ipv4Address (4); subnetMask 4 bytes (array) specifying the subnet mask; subnetMaskSize the size of the array subnetMask (4); defaultGateway 4 bytes (array) specifying the default network gateway; defaultGatewaySize the size of the array defaultGateway (4); dnsServer 4 bytes (array) specifying the DNS server; dnsServerSize the size of the array dnsServer(4).

◆ lh_set_multicast_msg_response_read_delay()

LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_response_read_delay ( lh_milliseconds_t milliseconds)

.setMulticastMsgResponseReadDelay Set the delay between reading multicast response. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
millisecondsThe delay in milliseconds before next read.

◆ lh_set_multicast_msg_response_read_retry()

LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_response_read_retry ( size_t retryCount)

.setMulticastMsgResponseReadRetry Set the number of times to read multicast message response. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
retryCountThe number of times to try reading multicast response messages.

◆ lh_set_multicast_msg_send_retry()

LIGHTHOUSE_DLL_DECL void lh_set_multicast_msg_send_retry ( size_t retryCount)

.setMulticastMsgSendRetry Set the number of times to send multicast message for dynamic probing. This must be called before probing network devices.

See also
detectNetworkDevices()
Parameters
retryCountThe number of times to send messages.

◆ lh_set_nonlinearity_correction_state()

LIGHTHOUSE_DLL_DECL void lh_set_nonlinearity_correction_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setNonLinearityCorrectionState

Deprecated
Toggle the "automatic" nonlinearity correction on or off for an acquired spectrum. This correction is applied automatically to any acquired spectrum when the function is turned on. If nonlinearity correction is turned on then electric dark correction is also turned on even if it was previously turned off.
See also
setStoredDarkSpectrum
getStoredDarkSpectrum
getNonlinearityCorrectedSpectrum
Warning
if nonlinearity correction is enabled using this function then some of the newer nonlinearity correction functionality e.g. getNonlinearityCorrectedSpectrum may not be used at tne same time.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" if nonlinearity correction is to be used, "off" otherwise.

◆ lh_set_scans_to_average()

LIGHTHOUSE_DLL_DECL void lh_set_scans_to_average ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_scan_averaging_t scansToAverage )

.setScansToAverage Set the number of spectra to be averaged per returned spectrum. When this value is set greater than 1 the specified number of spectra are averaged and the resulting average is returned by getFormattedSpectrum (or getRawSpectrumWithMetadata). NOTE: Some devices have a minimum integration time for averaging that is different to the minimum integration time for unaveraged acquisition (see your spectrometer documentation to determine if this is a requirement).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
scansToAveragethe number of scans to be averaged.

◆ lh_set_sensor_gain_mode()

LIGHTHOUSE_DLL_DECL void lh_set_sensor_gain_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t highGainState,
enum lh_enable_state_t standardGainState )

.setSensorGainMode Enables or disables support for the standard gain and high gain mode of the given device. The OceanNR unit only supported one gain mode either standard or high gain. Depending on the unit and firmware version enabling or disabling both high gain and standard gain together will return an error.

See also
getSensorGainMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
highGainState"on" to enable high gain mode support, "off" to disable standard gain mode support.
standardGainState"on" to enable standard gain mode support, "off" to disable high gain mode support.

◆ lh_set_serial_comm_threshold_mode()

LIGHTHOUSE_DLL_DECL void lh_set_serial_comm_threshold_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_serial_comms_mode_t thresholdMode )

.setSerialCommThresholdMode Set the threshold mode of serial communication. The valid supported values are 0x10(RS-232) and 0x20(UART).

See also
getSerialCommThresholdMode()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
thresholdModeThe threshold mode either 0x10 or 0x20.

◆ lh_set_shutter_state()

LIGHTHOUSE_DLL_DECL void lh_set_shutter_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_open_state_t state )

.setShutterState Set the shutter state to open or closed.

See also
getShutterState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"open" to open the shutter, "closed" to close the shutter.

◆ lh_set_single_strobe_delay()

LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_delay ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_microseconds_t microseconds )

.setSingleStrobeDelay Set the single strobe delay in microseconds.

See also
getSingleStrobeDelay()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe desired single strobe delay in microseconds.

◆ lh_set_single_strobe_state()

LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_state ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_enable_state_t state )

.setSingleStrobeState Enable or disable single strobe on the device.

See also
getSingleStrobeState()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
state"on" to enable single strobe, "off" to disable single strobe.

◆ lh_set_single_strobe_width()

LIGHTHOUSE_DLL_DECL void lh_set_single_strobe_width ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_microseconds_t microseconds )

.setSingleStrobeWidth Set the single strobe width in microseconds.

See also
getSingleStrobeWidth()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
microsecondsthe desired single strobe width in microseconds.

◆ lh_set_stored_dark_spectrum()

LIGHTHOUSE_DLL_DECL void lh_set_stored_dark_spectrum ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const float darkSpectrum[],
size_t darkSpectrumLength )

.setStoredDarkSpectrum Store a dark spectrum for use in subsequent corrections i.e. dark correction and nonlinearity correction.

See also
getStoredDarkSpectrum.
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
darkSpectrumthe buffer that contains the dark spectrum to be stored.
darkSpectrumLengththe actual size of the dark spectrum buffer.

◆ lh_set_tec_temperature_setpoint()

LIGHTHOUSE_DLL_DECL void lh_set_tec_temperature_setpoint ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
lh_celcius_t celsius )

.setTecTemperatureSetpoint Set the desired TEC temperature setpoint in Celcius.

See also
getTecTemperatureSetpoint()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
celsiusthe desired TEC temperature in Celcius.

◆ lh_set_trigger_mode()

LIGHTHOUSE_DLL_DECL void lh_set_trigger_mode ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
enum lh_trigger_mode_t mode )

.setTriggerMode Set the spectrometer trigger mode (software, edge or level).

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
modethe trigger mode to apply.

◆ lh_set_user_string()

LIGHTHOUSE_DLL_DECL void lh_set_user_string ( lh_device_id_t deviceID,
lh_error_code_t * errorCode,
const char buffer[],
size_t bufferLength )

.setUserString Set the stored string on the device.

See also
getUserString()
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodesee LHErrorCode.
bufferthe null terminated string containing the desired user string.
bufferLengththe actual length of the supplied buffer including the null terminating character.

◆ lh_shutdown()

LIGHTHOUSE_DLL_DECL void lh_shutdown ( )

.shutdown shutdown must be called when the API is no longer needed. It performs cleanup activities and releases resources claimed by the API. After this method has been called all devices that had been available will no longer be available unless a further call to to probe devices is made.