OceanDirectLighthouseC++ 3.1.3
OceanDirect Lighthouse C++/C API
OceanDirectAPI.h File Reference
#include "api/DllDecl.h"
#include "api/FeatureIds.h"
#include "common/public/UsbEndpoint.h"
#include <vector>
#include <fstream>
#include <memory>
#include "common/devices/IDevice.h"
#include "api/advanced/Advance.h"
#include "common/public/SpectrumWithMetadata.h"

Go to the source code of this file.

Classes

class  oceandirect::api::OceanDirectAPI
 

Namespaces

namespace  oceandirect
 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.
 
namespace  oceandirect::api
 

Enumerations

enum  FeatureId {
  FEATURE_ID_SERIAL_NUMBER = oceandirect::api::serNo , FEATURE_ID_SPECTROMETER = oceandirect::api::spectrm , FEATURE_ID_THERMOELECTRIC = oceandirect::api::tec , FEATURE_ID_IRRADCAL = oceandirect::api::iirad ,
  FEATURE_ID_EEPROM = oceandirect::api::eeprom , FEATURE_ID_STROBE_LAMP = oceandirect::api::strobe , FEATURE_ID_WAVECAL = oceandirect::api::wavecal , FEATURE_ID_NONLINEARITYCAL = oceandirect::api::nonline ,
  FEATURE_ID_STRAYLIGHTCAL = oceandirect::api::stray , FEATURE_ID_RAW_BUS_ACCESS = oceandirect::api::raw , FEATURE_ID_CONTINUOUS_STROBE = oceandirect::api::contsrtb , FEATURE_ID_LIGHT_SOURCE = oceandirect::api::light ,
  FEATURE_ID_TEMPERATURE = oceandirect::api::temper , FEATURE_ID_OPTICAL_BENCH = oceandirect::api::optic , FEATURE_ID_REVISION = oceandirect::api::revise , FEATURE_ID_DATA_BUFFER = oceandirect::api::buffer ,
  FEATURE_ID_PIXEL_BINNING = oceandirect::api::binn , FEATURE_ID_GPIO = oceandirect::api::gpio , FEATURE_ID_SINGLE_STROBE = oceandirect::api::singlestrb , FEATURE_ID_QUERY_STATUS = oceandirect::api::status ,
  FEATURE_ID_BACK_TO_BACK = oceandirect::api::backToBack , FEATURE_ID_LED_ACTIVITY = oceandirect::api::activity , FEATURE_ID_TIME_META = oceandirect::api::time , FEATURE_ID_DHCP = oceandirect::api::dhcp ,
  FEATURE_ID_PIXEL = oceandirect::api::pixel , FEATURE_ID_AUTO_NULLING = oceandirect::api::autonulling , FEATURE_ID_IPV4_ADDRESS = oceandirect::api::ipv4address , FEATURE_ID_IPV4_USER_STRING = oceandirect::api::userstring ,
  FEATURE_ID_DEVICE_INFORMATION = oceandirect::api::deviceInformation , FEATURE_ID_DEVICE_ALIAS = oceandirect::api::deviceAlias , FEATURE_ID_SERIAL_PORT = oceandirect::api::serialPort , FEATURE_ID_SPECTRUM_ACQUISITION_CONTROL = oceandirect::api::spectrumAcquisitionControl ,
  FEATURE_ID_NETWORK_CONFIGURATION = oceandirect::api::networkConfiguration , FEATURE_ID_ETHERNET = oceandirect::api::ethernet , FEATURE_ID_SHUTTER = oceandirect::api::shutter , FEATURE_ID_HIGH_GAIN_MODE = oceandirect::api::highGainMode
}
 

Functions

DLL_DECL long odapi_add_network_devices (const char *ipAddressStr, const char *deviceTypeStr, int *error_code)
 
DLL_DECL void odapi_add_RS232_device_location (char *deviceTypeName, char *deviceBusPath, unsigned int baud, int *errorCode)
 
DLL_DECL void odapi_adv_abort_acquisition (long deviceID, int *error_code)
 Abort spectra acquisition.
 
DLL_DECL void odapi_adv_acquire_spectra_to_buffer (long deviceID, int *error_code)
 Starts acquiring spectra and put them into device memory.
 
DLL_DECL void odapi_adv_clear_data_buffer (long deviceID, int *error_code)
 Clear the data buffer.
 
DLL_DECL bool odapi_adv_ethernet_get_gigabit_enable_status (long deviceID, int *errorCode, unsigned int interfaceIndex)
 
DLL_DECL void odapi_adv_ethernet_get_mac_address (long deviceID, int *errorCode, unsigned int interfaceIndex, unsigned char *macAddress, int macAddressLength)
 
DLL_DECL void odapi_adv_ethernet_set_gigabit_enable_status (long deviceID, int *errorCode, unsigned int interfaceIndex, bool enable)
 
DLL_DECL void odapi_adv_ethernet_set_mac_address (long deviceID, int *errorCode, uint32_t interfaceIndex, unsigned char *macAddress, int macAddressLength)
 
DLL_DECL int odapi_adv_get_autonull_baseline_level (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_get_autonull_baseline_level_constraints (long deviceID, int *error_code, unsigned int *minDAC, unsigned int *maxDAC, float *minVolts, float *maxVolts)
 
DLL_DECL int odapi_adv_get_autonull_fpga_digital_gain (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_autonull_fpga_digital_offset (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_autonull_maximum_adc_count (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_autonull_saturation_level (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_get_autonull_saturation_level_constraints (long deviceID, int *error_code, unsigned int *minDAC, unsigned int *maxDAC, float *minVolts, float *maxVolts)
 
DLL_DECL int odapi_adv_get_baud_rate (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_get_continuous_strobe_enable (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_increment_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_maximum_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_minimum_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_continuous_strobe_width_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity (long deviceID, int *error_code)
 Get the present limit of how many data elements will be retained by the buffer. This value can be changed with odapi_adv_set_buffer_capacity().
 
DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity_maximum (long deviceID, int *error_code)
 Get the maximum possible configurable size for the data buffer.
 
DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity_minimum (long deviceID, int *error_code)
 Get the minimum possible configurable size for the data buffer.
 
DLL_DECL bool odapi_adv_get_data_buffer_enable (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_data_buffer_number_of_elements (long deviceID, int *error_code)
 Get the number of data elements currently in the buffer.
 
DLL_DECL int odapi_adv_get_device_alias (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL bool odapi_adv_get_device_idle_state (long deviceID, int *error_code)
 Get the device idle state. It returns 1(true) if device is idle otherwise it's 0(false).
 
DLL_DECL int odapi_adv_get_device_manufacturer_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL int odapi_adv_get_device_model_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL int odapi_adv_get_device_original_manufacturer_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL int odapi_adv_get_device_original_model_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL int odapi_adv_get_device_original_pid (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_device_original_vid (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_device_pid (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_device_vid (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_gpio_pin_count (long deviceID, int *errorCode)
 
DLL_DECL unsigned char odapi_adv_get_ip_address_assigned_mode (long deviceID, int *errorCode)
 
DLL_DECL bool odapi_adv_get_lamp_enable (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_get_led_enable (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_light_source_count (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_get_manual_network_configuration (long deviceID, int *errorCode, unsigned char *outIpv4Address, unsigned int ipv4AddressSize, unsigned char *outSubnetMask, unsigned int subnetMaskSize, unsigned char *outDefaultGateway, unsigned int defaultGatewaySize, unsigned char *outDNSServer, unsigned int dnsServerSize)
 
DLL_DECL void odapi_adv_get_network_configuration (long deviceID, int *errorCode, unsigned char *outIpAddressAssignment, unsigned char *outIpv4Address, unsigned int ipv4AddressSize, unsigned char *outSubnetMask, unsigned int subnetMaskSize, unsigned char *outDefaultGateway, unsigned int defaultGatewaySize, unsigned char *outDNSServer, unsigned int dnsServerSize)
 
DLL_DECL int odapi_adv_get_nonlinearity_coeffs (long deviceID, int *error_code, double *buffer, int max_length)
 
DLL_DECL double odapi_adv_get_nonlinearity_coeffs1 (long deviceID, int *error_code, int index)
 
DLL_DECL int odapi_adv_get_nonlinearity_coeffs_count1 (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_number_of_backtoback_scans (long deviceID, int *error_code)
 
DLL_DECL unsigned short int odapi_adv_get_revision_firmware (long deviceID, int *error_code, char *buffer, int length)
 
DLL_DECL unsigned short int odapi_adv_get_revision_fpga (long deviceID, int *error_code, char *buffer, int length)
 
DLL_DECL unsigned short int odapi_adv_get_revision_system (long deviceID, int *error_code, char *buffer, int length)
 
DLL_DECL bool odapi_adv_get_shutter_state (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_cycle_maximum (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_delay (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_increment (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_maximum (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_minimum (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_get_single_strobe_enable (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_width (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_width_increment (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_width_maximum (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_adv_get_single_strobe_width_minimum (long deviceID, int *error_code)
 
DLL_DECL int odapi_adv_get_trigger_mode (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_gpio_get_output_alternate1 (long deviceID, int *errorCode, int bit)
 
DLL_DECL uint32_t odapi_adv_gpio_get_output_alternate2 (long deviceID, int *errorCode)
 
DLL_DECL bool odapi_adv_gpio_get_output_enable1 (long deviceID, int *errorCode, int bit)
 
DLL_DECL uint32_t odapi_adv_gpio_get_output_enable2 (long deviceID, int *errorCode)
 
DLL_DECL bool odapi_adv_gpio_get_value1 (long deviceID, int *errorCode, int bit)
 
DLL_DECL uint32_t odapi_adv_gpio_get_value2 (long deviceID, int *errorCode)
 
DLL_DECL void odapi_adv_gpio_set_output_alternate1 (long deviceID, int *errorCode, int bit, bool isAlternate)
 
DLL_DECL void odapi_adv_gpio_set_output_alternate2 (long deviceID, int *errorCode, uint32_t bitMask)
 
DLL_DECL void odapi_adv_gpio_set_output_enable1 (long deviceID, int *errorCode, int bit, bool isOutput)
 
DLL_DECL void odapi_adv_gpio_set_output_enable2 (long deviceID, int *errorCode, uint32_t bitmask)
 
DLL_DECL void odapi_adv_gpio_set_value1 (long deviceID, int *errorCode, int bit, bool isHigh)
 
DLL_DECL void odapi_adv_gpio_set_value2 (long deviceID, int *errorCode, uint32_t bitmask)
 
DLL_DECL void odapi_adv_ipv4_add_static_ip_address (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength, unsigned int netmask)
 
DLL_DECL void odapi_adv_ipv4_delete_static_ip_address (long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex)
 
DLL_DECL void odapi_adv_ipv4_get_default_gateway_ip_address (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *outIpAddress, int ipAddressLength)
 
DLL_DECL int odapi_adv_ipv4_get_number_of_ip_addresses (long deviceID, int *errorCode, unsigned char ifNum)
 
DLL_DECL bool odapi_adv_ipv4_is_dhcp_enabled (long deviceID, int *errorCode, unsigned char ifNum)
 
DLL_DECL void odapi_adv_ipv4_read_ip_address (long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex, unsigned char *ipAddress, int ipAddressLength, unsigned int *netmask)
 
DLL_DECL void odapi_adv_ipv4_set_default_gateway_ip_address (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength)
 
DLL_DECL void odapi_adv_ipv4_set_dhcp_enable (long deviceID, int *errorCode, unsigned char ifNum, unsigned char enabled)
 
DLL_DECL unsigned char odapi_adv_light_source_has_enable (long deviceID, int *error_code, int light_source_index)
 
DLL_DECL unsigned char odapi_adv_light_source_is_enabled (long deviceID, int *error_code, int light_source_index)
 
DLL_DECL void odapi_adv_light_source_set_enable (long deviceID, int *error_code, int light_source_index, unsigned char enable)
 
DLL_DECL uint32_t odapi_adv_network_conf_get_interface_count (long deviceID, int *errorCode)
 
DLL_DECL bool odapi_adv_network_conf_get_interface_status (long deviceID, int *errorCode, unsigned int interfaceIndex)
 
DLL_DECL uint32_t odapi_adv_network_conf_get_interface_type (long deviceID, int *errorCode, unsigned int interfaceIndex)
 
DLL_DECL bool odapi_adv_network_conf_get_multicast_group_enabled (long deviceID, int *errorCode, unsigned int interfaceIndex)
 
DLL_DECL void odapi_adv_network_conf_save_interface_setting (long deviceID, int *errorCode, unsigned int interfaceIndex)
 
DLL_DECL void odapi_adv_network_conf_set_interface_status (long deviceID, int *errorCode, unsigned int interfaceIndex, bool enable)
 
DLL_DECL void odapi_adv_network_conf_set_multicast_group_enabled (long deviceID, int *errorCode, unsigned int interfaceIndex, bool enable)
 
DLL_DECL void odapi_adv_reset_device (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_save_settings_to_flash (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_set_baud_rate (long deviceID, int *error_code, int baudRate)
 
DLL_DECL void odapi_adv_set_continuous_strobe_enable (long deviceID, int *error_code, unsigned char enable)
 
DLL_DECL void odapi_adv_set_continuous_strobe_period_micros (long deviceID, int *error_code, unsigned long period_micros)
 
DLL_DECL void odapi_adv_set_continuous_strobe_width_micros (long deviceID, int *error_code, unsigned long width_micros)
 
DLL_DECL void odapi_adv_set_data_buffer_capacity (long deviceID, int *error_code, unsigned long capacity)
 
DLL_DECL void odapi_adv_set_data_buffer_enable (long deviceID, int *error_code, unsigned char flag)
 
DLL_DECL void odapi_adv_set_device_alias (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL void odapi_adv_set_device_manufacturer_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL void odapi_adv_set_device_model_string (long deviceID, int *error_code, char *buffer, int bufferLength)
 
DLL_DECL void odapi_adv_set_device_pid (long deviceID, int *error_code, int pid)
 
DLL_DECL void odapi_adv_set_device_vid (long deviceID, int *error_code, int vid)
 
DLL_DECL void odapi_adv_set_ip_address_assigned_mode (long deviceID, int *errorCode, unsigned char useDHCP)
 
DLL_DECL void odapi_adv_set_lamp_enable (long deviceID, int *error_code, unsigned char lamp_enable)
 
DLL_DECL void odapi_adv_set_led_enable (long deviceID, int *error_code, bool led_enable)
 
DLL_DECL void odapi_adv_set_manual_network_configuration (long deviceID, int *errorCode, unsigned char *ipv4Address, unsigned int ipv4AddressSize, unsigned char *subnetMask, unsigned int subnetMaskSize, unsigned char *defaultGateway, unsigned int defaultGatewaySize, unsigned char *dnsServer, unsigned int dnsServerSize)
 
DLL_DECL void odapi_adv_set_number_of_backtoback_scans (long deviceID, int *error_code, unsigned long numScans)
 
DLL_DECL void odapi_adv_set_shutter_open (long deviceID, int *error_code, unsigned char shutter_state)
 
DLL_DECL void odapi_adv_set_single_strobe_delay (long deviceID, int *error_code, unsigned long delay_micros)
 
DLL_DECL void odapi_adv_set_single_strobe_enable (long deviceID, int *error_code, unsigned char enable)
 
DLL_DECL void odapi_adv_set_single_strobe_width (long deviceID, int *error_code, unsigned long width_micros)
 
DLL_DECL void odapi_adv_set_trigger_mode (long deviceID, int *error_code, int mode)
 
DLL_DECL bool odapi_adv_tec_get_enable (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_tec_get_fan_enable (long deviceID, int *error_code)
 
DLL_DECL bool odapi_adv_tec_get_stable (long deviceID, int *error_code)
 
DLL_DECL double odapi_adv_tec_get_temperature_degrees_C (long deviceID, int *error_code)
 
DLL_DECL float odapi_adv_tec_get_temperature_setpoint_degrees_C (long deviceID, int *error_code)
 
DLL_DECL void odapi_adv_tec_set_enable (long deviceID, int *error_code, unsigned char tec_enable)
 
DLL_DECL void odapi_adv_tec_set_temperature_setpoint_degrees_C (long deviceID, int *error_code, double temperature_degrees_celsius)
 
DLL_DECL void odapi_apply_electric_dark_correction_usage (long deviceID, int *error_code, unsigned char enable)
 
DLL_DECL void odapi_apply_nonlinearity_correct_usage (long deviceID, int *error_code, bool use)
 
DLL_DECL void odapi_boxcar_correct_spectrum (long deviceID, int *errorCode, double *illuminatedSpectrum, unsigned int illuminatedSpectrumLength, unsigned int boxcarWidth, double *boxcarCorrectedSpectrum, unsigned int boxcarCorrectedSpectrumLength)
 
DLL_DECL void odapi_close_device (long id, int *error_code)
 
DLL_DECL int odapi_dark_correct_spectrum1 (long deviceID, int *errorCode, double *illuminatedSpectrum, int illuminatedSpectrumLength, double *darkCorrectedSpectrum, int darkCorrectedSpectrumLength)
 
DLL_DECL int odapi_dark_correct_spectrum2 (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength, double *illuminatedSpectrum, int illuminatedSpectrumLength, double *darkCorrectedSpectrum, int darkCorrectedSpectrumLength)
 
DLL_DECL int odapi_detect_network_devices ()
 
DLL_DECL unsigned long odapi_get_acquisition_delay_increment_microseconds (long deviceID, int *errorCode)
 
DLL_DECL unsigned long odapi_get_acquisition_delay_maximum_microseconds (long deviceID, int *errorCode)
 
DLL_DECL unsigned long odapi_get_acquisition_delay_microseconds (long deviceID, int *errorCode)
 
DLL_DECL unsigned long odapi_get_acquisition_delay_minimum_microseconds (long deviceID, int *errorCode)
 
DLL_DECL int odapi_get_active_pixel_range (long deviceID, int *error_code, int *range, int rangeSize)
 
DLL_DECL double odapi_get_api_version ()
 
DLL_DECL void odapi_get_api_version_numbers (unsigned int *major, unsigned int *minor, unsigned int *point)
 
DLL_DECL int odapi_get_bad_pixel_indices (long deviceID, int *error_code, int *badPixelsIndices, int badPixelSize)
 
DLL_DECL unsigned short int odapi_get_boxcar_width (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_dark_corrected_spectrum1 (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength, double *darkCorrectedSpectrum, int darkCorrectedSpectrumLength)
 
DLL_DECL int odapi_get_dark_corrected_spectrum2 (long deviceID, int *errorCode, double *darkCorrectedSpectrum, int darkCorrectedSpectrumLength)
 
DLL_DECL int odapi_get_device_ids (long *ids, unsigned int max_ids)
 
DLL_DECL int odapi_get_device_name (long id, int *error_code, char *buffer, unsigned int length)
 
DLL_DECL int odapi_get_device_type (long id, int *error_code, char *buffer, unsigned int length)
 
DLL_DECL unsigned char odapi_get_device_usb_endpoint_primary_in (long id, int *error_code)
 
DLL_DECL unsigned char odapi_get_device_usb_endpoint_primary_out (long id, int *error_code)
 
DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_in (long id, int *error_code)
 
DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_in2 (long id, int *error_code)
 
DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_out (long id, int *error_code)
 
DLL_DECL bool odapi_get_electric_dark_correction_usage (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_electric_dark_pixel_count (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_electric_dark_pixel_indices (long deviceID, int *error_code, int *indices, int length)
 
DLL_DECL int odapi_get_error_string (int error_code, char *error_string, int length)
 
DLL_DECL int odapi_get_error_string_length (int error_code)
 
DLL_DECL int odapi_get_formatted_spectrum (long deviceID, int *error_code, double *buffer, int buffer_length)
 
DLL_DECL int odapi_get_formatted_spectrum_length (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_index_at_wavelength (long deviceID, int *error_code, double *wavelength, double approxWavelength)
 
DLL_DECL int odapi_get_indices_at_wavelength_range (long deviceID, int *error_code, int *indices, int indicesLength, double *wavelength, int wavelengthLength, double lo, double hi)
 
DLL_DECL int odapi_get_indices_at_wavelengths (long deviceID, int *error_code, int *indices, int indicesLength, double *wavelength, int wavelengthLength)
 
DLL_DECL unsigned long odapi_get_integration_time_increment_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_get_integration_time_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_get_maximum_integration_time_micros (long deviceID, int *error_code)
 
DLL_DECL double odapi_get_maximum_intensity (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_get_minimum_averaging_integration_time_micros (long deviceID, int *error_code)
 
DLL_DECL unsigned long odapi_get_minimum_integration_time_micros (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_network_device_ids (long *ids, unsigned int max_ids)
 
DLL_DECL bool odapi_get_nonlinearity_correct_usage (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_nonlinearity_corrected_spectrum1 (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength, double *nonlinearityCorrectedSpectrum, int nonlinearityCorrectedSpectrumLength)
 
DLL_DECL int odapi_get_nonlinearity_corrected_spectrum2 (long deviceID, int *errorCode, double *nonlinearityCorrectedSpectrum, int nonlinearityCorrectedSpectrumLength)
 
DLL_DECL int odapi_get_number_of_device_ids ()
 
DLL_DECL int odapi_get_optical_dark_pixel_range (long deviceID, int *error_code, int *range, int rangeSize)
 
DLL_DECL int odapi_get_pixel_count (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_raw_spectrum_with_metadata (long deviceID, int *error_code, double *buffer[], int buffer_row_size, int buffer_column_size, long long int *tick_count, int tick_count_size)
 
DLL_DECL void odapi_get_rc_version_number (unsigned int *candidate)
 
DLL_DECL unsigned int odapi_get_scans_to_average (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_serial_number (long deviceID, int *error_code, char *buffer, int buffer_length)
 
DLL_DECL unsigned char odapi_get_serial_number_maximum_length (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_stored_dark_spectrum (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength)
 
DLL_DECL long long int odapi_get_time (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_transition_pixel_range (long deviceID, int *error_code, int *range, int rangeSize)
 
DLL_DECL int odapi_get_trigger_mode (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_user_string (long deviceID, int *error_code, char *buffer, int buffer_length)
 
DLL_DECL int odapi_get_user_string1 (long deviceID, int *error_code, int index, char *buffer, int buffer_length)
 
DLL_DECL int odapi_get_user_string_count1 (long deviceID, int *error_code)
 
DLL_DECL int odapi_get_wavelength_coeffs (long deviceID, int *error_code, double *coeff, int length)
 
DLL_DECL int odapi_get_wavelengths (long deviceID, int *error_code, double *wavelengths, int length)
 
DLL_DECL void odapi_initialize ()
 
DLL_DECL bool odapi_is_feature_enabled (long deviceID, int *errorCode, enum FeatureId featureID)
 
DLL_DECL int odapi_nonlinearity_correct_spectrum1 (long deviceID, int *errorCode, double *illuminatedSpectrum, int illuminatedSpectrumLength, double *nonlinearityCorrectedSpectrum, int nonlinearityCorrectedSpectrumLength)
 
DLL_DECL int odapi_nonlinearity_correct_spectrum2 (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength, double *illuminatedSpectrum, int illuminatedSpectrumLength, double *nonlinearityCorrectedSpectrum, int nonlinearityCorrectedSpectrumLength)
 
DLL_DECL void odapi_open_device (long id, int *error_code)
 
DLL_DECL int odapi_probe_devices ()
 
DLL_DECL void odapi_set_acquisition_delay_microseconds (long deviceID, int *errorCode, unsigned long delay_usec)
 
DLL_DECL void odapi_set_bad_pixel_indices (long deviceID, int *error_code, int *badPixelsIndices, int badPixelSize)
 
DLL_DECL void odapi_set_boxcar_width (long deviceID, int *error_code, unsigned short int boxcarWidth)
 
DLL_DECL void odapi_set_integration_time_micros (long deviceID, int *error_code, unsigned long integration_time_micros)
 
DLL_DECL void odapi_set_multicast_msg_response_read_delay (unsigned int delayMs)
 
DLL_DECL void odapi_set_multicast_msg_response_read_retry (unsigned int retryCount)
 
DLL_DECL void odapi_set_multicast_msg_send_retry (unsigned int retryCount)
 
DLL_DECL void odapi_set_scans_to_average (long deviceID, int *error_code, unsigned int scansToAverage)
 
DLL_DECL void odapi_set_stored_dark_spectrum (long deviceID, int *errorCode, double *darkSpectrum, int darkSpectrumLength)
 
DLL_DECL void odapi_set_time (long deviceID, int *error_code, long long int time_in_microsecond)
 
DLL_DECL void odapi_set_trigger_mode (long deviceID, int *error_code, int mode)
 
DLL_DECL void odapi_set_user_string (long deviceID, int *error_code, char *buffer, int buffer_length)
 
DLL_DECL void odapi_set_user_string1 (long deviceID, int *error_code, int index, char *buffer, int buffer_length)
 
DLL_DECL void odapi_shutdown ()
 

Enumeration Type Documentation

◆ FeatureId

enum FeatureId

Redeclaration of the features enum with "friendlier" names for the public API. Use this with isFeatureEnabled to determine if a spectrometer has a give feature. Give it C linkage so it can be used by the C API.

Enumerator
FEATURE_ID_SERIAL_NUMBER 
FEATURE_ID_SPECTROMETER 
FEATURE_ID_THERMOELECTRIC 
FEATURE_ID_IRRADCAL 
FEATURE_ID_EEPROM 
FEATURE_ID_STROBE_LAMP 
FEATURE_ID_WAVECAL 
FEATURE_ID_NONLINEARITYCAL 
FEATURE_ID_STRAYLIGHTCAL 
FEATURE_ID_RAW_BUS_ACCESS 
FEATURE_ID_CONTINUOUS_STROBE 
FEATURE_ID_LIGHT_SOURCE 
FEATURE_ID_TEMPERATURE 
FEATURE_ID_OPTICAL_BENCH 
FEATURE_ID_REVISION 
FEATURE_ID_DATA_BUFFER 
FEATURE_ID_PIXEL_BINNING 
FEATURE_ID_GPIO 
FEATURE_ID_SINGLE_STROBE 
FEATURE_ID_QUERY_STATUS 
FEATURE_ID_BACK_TO_BACK 
FEATURE_ID_LED_ACTIVITY 
FEATURE_ID_TIME_META 
FEATURE_ID_DHCP 
FEATURE_ID_PIXEL 
FEATURE_ID_AUTO_NULLING 
FEATURE_ID_IPV4_ADDRESS 
FEATURE_ID_IPV4_USER_STRING 
FEATURE_ID_DEVICE_INFORMATION 
FEATURE_ID_DEVICE_ALIAS 
FEATURE_ID_SERIAL_PORT 
FEATURE_ID_SPECTRUM_ACQUISITION_CONTROL 
FEATURE_ID_NETWORK_CONFIGURATION 
FEATURE_ID_ETHERNET 
FEATURE_ID_SHUTTER 
FEATURE_ID_HIGH_GAIN_MODE 

Function Documentation

◆ odapi_add_network_devices()

DLL_DECL long odapi_add_network_devices ( const char * ipAddressStr,
const char * deviceTypeStr,
int * error_code )

Manually create an instance of the network attached device and then open it using the openDevice() function. It is the responsibility of the user to ensure that the device exist and 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 as string (ex: "10.20.30.100" ) of the device to be opened.
deviceTypeStrThe device type could be OceanFX or OceanHDX. This is case sensitive.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist;
Returns
The device id or -1 if an error occured.

◆ odapi_add_RS232_device_location()

DLL_DECL void odapi_add_RS232_device_location ( char * deviceTypeName,
char * deviceBusPath,
unsigned int baud,
int * 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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_CODE_INVALID_ARGUMENT if the device cannot be created.

◆ odapi_adv_abort_acquisition()

DLL_DECL void odapi_adv_abort_acquisition ( long deviceID,
int * error_code )

Abort spectra acquisition.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.

◆ odapi_adv_acquire_spectra_to_buffer()

DLL_DECL void odapi_adv_acquire_spectra_to_buffer ( long deviceID,
int * error_code )

Starts acquiring spectra and put them into device memory.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.

◆ odapi_adv_clear_data_buffer()

DLL_DECL void odapi_adv_clear_data_buffer ( long deviceID,
int * error_code )

Clear the data buffer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.

◆ odapi_adv_ethernet_get_gigabit_enable_status()

DLL_DECL bool odapi_adv_ethernet_get_gigabit_enable_status ( long deviceID,
int * errorCode,
unsigned int interfaceIndex )

Return the status on whether the gigabit ethernet is enabled or not. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe ethernet interface to look at.
Returns
The interface status.

◆ odapi_adv_ethernet_get_mac_address()

DLL_DECL void odapi_adv_ethernet_get_mac_address ( long deviceID,
int * errorCode,
unsigned int interfaceIndex,
unsigned char * macAddress,
int macAddressLength )

Read the ethernet 6-byte mac address from the spectrometer. This function only applies to HDX/FX devices.

Attention
For devices with a single interface, the interfaceIndex parameter is ignored.
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe ethernet interface to look at.
macAddressThe output buffer for mac address.
macAddressLengthThe buffer length must be at least 6-bytes long.

◆ odapi_adv_ethernet_set_gigabit_enable_status()

DLL_DECL void odapi_adv_ethernet_set_gigabit_enable_status ( long deviceID,
int * errorCode,
unsigned int interfaceIndex,
bool enable )

Enable or disable the gigabit ethernet the status. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe ethernet interface to look at.
enableTrue will enable gigabit ethernet.

◆ odapi_adv_ethernet_set_mac_address()

DLL_DECL void odapi_adv_ethernet_set_mac_address ( long deviceID,
int * errorCode,
uint32_t interfaceIndex,
unsigned char * macAddress,
int macAddressLength )

Writes a new ethernet 6-byte mac address into the spectrometer. This function only applies to HDX/FX devices.

Attention
For devices with a single interface, the interfaceIndex parameter is ignored.
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe ethernet interface to look at.
macAddressThe new mac address.
macAddressLengthThe mac address length must be 6-bytes long.

◆ odapi_adv_get_autonull_baseline_level()

DLL_DECL int odapi_adv_get_autonull_baseline_level ( long deviceID,
int * error_code )

Read the baseline level.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The baseline level.

◆ odapi_adv_get_autonull_baseline_level_constraints()

DLL_DECL void odapi_adv_get_autonull_baseline_level_constraints ( long deviceID,
int * error_code,
unsigned int * minDAC,
unsigned int * maxDAC,
float * minVolts,
float * maxVolts )

Read autonulling constraints value for baseline settings. This command only applies to Ocean FX/HDX units.

Parameters
deviceIdthe device ID for the device to be configured.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found;
minDACminimum offset DAC value.
maxDACmaximum offset DAC value.
minVoltsminimum offset volt value.
maxVoltsmaximum offset volt value.

◆ odapi_adv_get_autonull_fpga_digital_gain()

DLL_DECL int odapi_adv_get_autonull_fpga_digital_gain ( long deviceID,
int * error_code )

Read the FPGA digital gain.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The gain value.

◆ odapi_adv_get_autonull_fpga_digital_offset()

DLL_DECL int odapi_adv_get_autonull_fpga_digital_offset ( long deviceID,
int * error_code )

Read the FPGA digital offset.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The offset value.

◆ odapi_adv_get_autonull_maximum_adc_count()

DLL_DECL int odapi_adv_get_autonull_maximum_adc_count ( long deviceID,
int * error_code )

Read the maximum ADC counts.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The maximum ADC counts.

◆ odapi_adv_get_autonull_saturation_level()

DLL_DECL int odapi_adv_get_autonull_saturation_level ( long deviceID,
int * error_code )

Read the saturation level. Most devices returns 65535.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The saturation level.

◆ odapi_adv_get_autonull_saturation_level_constraints()

DLL_DECL void odapi_adv_get_autonull_saturation_level_constraints ( long deviceID,
int * error_code,
unsigned int * minDAC,
unsigned int * maxDAC,
float * minVolts,
float * maxVolts )

Read autonulling constraints value for saturation settings. This command only applies to Ocean FX/HDX units.

Parameters
deviceIdthe device ID for the device to be configured.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found;
minDACminimum saturation DAC value.
maxDACmaximum saturation DAC value.
minVoltsminimum saturation volt value.
maxVoltsmaximum saturation volt value.

◆ odapi_adv_get_baud_rate()

DLL_DECL int odapi_adv_get_baud_rate ( long deviceID,
int * error_code )

Read the device RS-232 baud rate.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The port baud rate.

◆ odapi_adv_get_continuous_strobe_enable()

DLL_DECL bool odapi_adv_get_continuous_strobe_enable ( long deviceID,
int * error_code )

This function gets the continuous strobe state (enabled or disabled) of the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if continuous strobe is enabled, false otherwise.

This function gets the continuous strobe state on the device whether its enabled or not.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if the continuous strobed is enable. Otherwise its false.

◆ odapi_adv_get_continuous_strobe_period_increment_micros()

DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_increment_micros ( long deviceID,
int * error_code )

This function gets the current size of the strobe period increment of the device in microseconds. The increment is dependent on the strobe period. Small strobe periods i.e. less than about 1ms will have a small increment, typically 1 microsecond. Larger strobe periods will have larger increments, typically 1ms.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The current strobe period increment in microseconds.

This function gets the continuous strobe increment on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The strobe increment.

◆ odapi_adv_get_continuous_strobe_period_maximum_micros()

DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_maximum_micros ( long deviceID,
int * error_code )

This function gets the maximum continuous strobe period of the device in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The maximum strobe period in microseconds.

This function gets the maximum continuous strobe period on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The maximum strobe period.

◆ odapi_adv_get_continuous_strobe_period_micros()

DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_micros ( long deviceID,
int * error_code )

This function gets the continuous strobe period of the device in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The period in microseconds.

This function gets the continuous strobe period on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The period, in microseconds.

◆ odapi_adv_get_continuous_strobe_period_minimum_micros()

DLL_DECL unsigned long odapi_adv_get_continuous_strobe_period_minimum_micros ( long deviceID,
int * error_code )

This function gets the minimum continuous strobe period of the device in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The minimum strobe period, in microseconds.

This function gets the minimum continuous strobe period on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The minimum strobe period.

◆ odapi_adv_get_continuous_strobe_width_micros()

DLL_DECL unsigned long odapi_adv_get_continuous_strobe_width_micros ( long deviceID,
int * error_code )

This function gets the strobe width of the device in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
The current strobe width in microseconds.

This function gets the continuous strobe width on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
The width, in microseconds.

◆ odapi_adv_get_data_buffer_capacity()

DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity ( long deviceID,
int * error_code )

Get the present limit of how many data elements will be retained by the buffer. This value can be changed with odapi_adv_set_buffer_capacity().

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
A count of how many items the buffer will store before data may be lost

◆ odapi_adv_get_data_buffer_capacity_maximum()

DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity_maximum ( long deviceID,
int * error_code )

Get the maximum possible configurable size for the data buffer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The largest value that may be set with odapi_adv_set_buffer_capacity().

◆ odapi_adv_get_data_buffer_capacity_minimum()

DLL_DECL unsigned long odapi_adv_get_data_buffer_capacity_minimum ( long deviceID,
int * error_code )

Get the minimum possible configurable size for the data buffer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The smallest value that may be set with odapi_adv_set_buffer_capacity().

◆ odapi_adv_get_data_buffer_enable()

DLL_DECL bool odapi_adv_get_data_buffer_enable ( long deviceID,
int * error_code )

Return true if data buffering is enabled.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
True for enable data buffering otherwise it's false.

◆ odapi_adv_get_data_buffer_number_of_elements()

DLL_DECL unsigned long odapi_adv_get_data_buffer_number_of_elements ( long deviceID,
int * error_code )

Get the number of data elements currently in the buffer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
A count of how many items are available for retrieval from the buffer

◆ odapi_adv_get_device_alias()

DLL_DECL int odapi_adv_get_device_alias ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Read the device alias from the device. If this field in the device is not yet populated then a non-zero(6) code will be returned.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer for the device alias.
buffer_lengthThe minimum buffer size is 16.
Returns
The device alias string length.

◆ odapi_adv_get_device_idle_state()

DLL_DECL bool odapi_adv_get_device_idle_state ( long deviceID,
int * error_code )

Get the device idle state. It returns 1(true) if device is idle otherwise it's 0(false).

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if the device is idle, false otherwise.

◆ odapi_adv_get_device_manufacturer_string()

DLL_DECL int odapi_adv_get_device_manufacturer_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Read the manufacturer string from the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer for the manufacturer string.
buffer_lengthThe minimum buffer size is 24.
Returns
The manufacturer string length.

◆ odapi_adv_get_device_model_string()

DLL_DECL int odapi_adv_get_device_model_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Read the current model string from the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer for the model string.
buffer_lengthThe minimum buffer size is 24.
Returns
The model string length.

◆ odapi_adv_get_device_original_manufacturer_string()

DLL_DECL int odapi_adv_get_device_original_manufacturer_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Read the original manufacturer string from the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer containing a manufacturer string.
buffer_lengthThe minimum buffer size is 24.
Returns
The original manufacturer string length.

◆ odapi_adv_get_device_original_model_string()

DLL_DECL int odapi_adv_get_device_original_model_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Read the original model string from the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer for the model string.
buffer_lengthThe minimum buffer size is 24.
Returns
The original model string length.

◆ odapi_adv_get_device_original_pid()

DLL_DECL int odapi_adv_get_device_original_pid ( long deviceID,
int * error_code )

Read the original product id (PID) from the device. This is an Ocean Insight product specific PID.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The original PID.

◆ odapi_adv_get_device_original_vid()

DLL_DECL int odapi_adv_get_device_original_vid ( long deviceID,
int * error_code )

Read the original vendor id (VID) from the device. This is an Ocean Insight VID.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The original VID.

◆ odapi_adv_get_device_pid()

DLL_DECL int odapi_adv_get_device_pid ( long deviceID,
int * error_code )

Read the PID from the device. This could be identical to the original PID or a customer assigned PID.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The device PID.

◆ odapi_adv_get_device_vid()

DLL_DECL int odapi_adv_get_device_vid ( long deviceID,
int * error_code )

Read the vendor id (VID) from the device. This could be identical to the original VID or a customer assigned VID.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The device VID.

◆ odapi_adv_get_gpio_pin_count()

DLL_DECL int odapi_adv_get_gpio_pin_count ( long deviceID,
int * errorCode )

Return the number of GPIO pins.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
the number of GPIO pins provided by the device.

◆ odapi_adv_get_ip_address_assigned_mode()

DLL_DECL unsigned char odapi_adv_get_ip_address_assigned_mode ( long deviceID,
int * errorCode )

Read the IP address mode from the OBP2 device.

See also
odapi_adv_set_ip_address_assigned_mode()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
True if the ip address was generated via DHCP. False if the ip address was statically assigned.

◆ odapi_adv_get_lamp_enable()

DLL_DECL bool odapi_adv_get_lamp_enable ( long deviceID,
int * error_code )

This function returns the strobe enable state of the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if the lamp is enabled otherwise return false.

◆ odapi_adv_get_led_enable()

DLL_DECL bool odapi_adv_get_led_enable ( long deviceID,
int * error_code )

This function gets the exterior LED state on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if the LED is enabled, false otherwise.

◆ odapi_adv_get_light_source_count()

DLL_DECL int odapi_adv_get_light_source_count ( long deviceID,
int * error_code )

This function gets the number of light sources that are represented by the given featureID. Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the number of light sources (e.g. bulbs) in the indicated feature

◆ odapi_adv_get_manual_network_configuration()

DLL_DECL void odapi_adv_get_manual_network_configuration ( long deviceID,
int * errorCode,
unsigned char * outIpv4Address,
unsigned int ipv4AddressSize,
unsigned char * outSubnetMask,
unsigned int subnetMaskSize,
unsigned char * outDefaultGateway,
unsigned int defaultGatewaySize,
unsigned char * outDNSServer,
unsigned int dnsServerSize )

Read the network configuration parameters (static ip address) from an OBP2 enabled device.

See also
odapi_adv_set_manual_network_configuration()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
outIpv4Address[out]Output buffer for the IPv4 address.
ipv4AddressSize[in]The ipv4 address buffer size.
outSubnetMask[out]Output buffer for the subnet mask.
subnetMaskSize[in]The subnet mask buffer size.
outDefaultGateway[out]Output buffer for the default gateway
defaultGatewaySize[in]The default gateway buffer size.
outDNSServer[out]Output buffer for the DNS server.
dnsServerSize[in]The dns server buffer size.

◆ odapi_adv_get_network_configuration()

DLL_DECL void odapi_adv_get_network_configuration ( long deviceID,
int * errorCode,
unsigned char * outIpAddressAssignment,
unsigned char * outIpv4Address,
unsigned int ipv4AddressSize,
unsigned char * outSubnetMask,
unsigned int subnetMaskSize,
unsigned char * outDefaultGateway,
unsigned int defaultGatewaySize,
unsigned char * outDNSServer,
unsigned int dnsServerSize )

Read the network configuration parameters from an OBP2 enabled device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
outIpAddressAssignment[out]True if the IPv4 address is DHCP generated otherwise it's False.
outIpv4Address[out]Output buffer for the IPv4 address.
ipv4AddressSize[in]The ipv4 address buffer size.
outSubnetMask[out]Output buffer for the subnet mask.
subnetMaskSize[in]The subnet mask buffer size.
outDefaultGateway[out]Output buffer for the default gateway
defaultGatewaySize[in]The default gateway buffer size.
outDNSServer[out]Output buffer for the DNS server.
dnsServerSize[in]The dns server buffer size.

◆ odapi_adv_get_nonlinearity_coeffs()

DLL_DECL int odapi_adv_get_nonlinearity_coeffs ( long deviceID,
int * error_code,
double * buffer,
int max_length )

This function reads out nonlinearity coefficients from the device's internal memory if that feature is supported.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_VALUE_NOT_FOUND no values are stored on the device; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) preallocated buffer to store NLC coefficients
max_length(Input) size of preallocated buffer
Returns
the number of doubles read from the device into the buffer

◆ odapi_adv_get_nonlinearity_coeffs1()

DLL_DECL double odapi_adv_get_nonlinearity_coeffs1 ( long deviceID,
int * error_code,
int index )

This function read the nonlinearity coefficient of the given index.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_VALUE_NOT_FOUND no values are stored on the device; ERROR_NO_DEVICE if the device does not exist.
indexThe nonlinearity coefficient index.
returnThe nonlinearity coefficient.

◆ odapi_adv_get_nonlinearity_coeffs_count1()

DLL_DECL int odapi_adv_get_nonlinearity_coeffs_count1 ( long deviceID,
int * error_code )

This function read out the number of nonlinearity coefficients from the device's internal memory if that feature is supported.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_VALUE_NOT_FOUND no values are stored on the device; ERROR_NO_DEVICE if the device does not exist.
returnThe nonlinearity coefficient counts.

◆ odapi_adv_get_number_of_backtoback_scans()

DLL_DECL unsigned long odapi_adv_get_number_of_backtoback_scans ( long deviceID,
int * error_code )

Return the number of spectra that the device will capture per trigger event.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The back-to-back scan value.

◆ odapi_adv_get_revision_firmware()

DLL_DECL unsigned short int odapi_adv_get_revision_firmware ( long deviceID,
int * error_code,
char * buffer,
int length )

This function reads out the firmware revision from the device's internal memory if that feature is supported.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
the firmware revision as two unsigned short int bytes (Note that both Ocean View and SpectraSuite display the hex value.)

◆ odapi_adv_get_revision_fpga()

DLL_DECL unsigned short int odapi_adv_get_revision_fpga ( long deviceID,
int * error_code,
char * buffer,
int length )

This function reads out the FPGA revision from the device's internal memory if that feature is supported.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
the FPGA revision as two unsigned short int bytes (Note that both Ocean View and SpectraSuite display the hex value.)

◆ odapi_adv_get_revision_system()

DLL_DECL unsigned short int odapi_adv_get_revision_system ( long deviceID,
int * error_code,
char * buffer,
int length )

This function reads out the System revision from the device's internal memory if that feature is supported.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
the FPGA revision as two unsigned short int bytes (Note that both Ocean View and SpectraSuite display the hex value.)

◆ odapi_adv_get_shutter_state()

DLL_DECL bool odapi_adv_get_shutter_state ( long deviceID,
int * error_code )

This function returns the shutter state of the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
true if the shutter is opened otherwise return false.

◆ odapi_adv_get_single_strobe_cycle_maximum()

DLL_DECL unsigned long odapi_adv_get_single_strobe_cycle_maximum ( long deviceID,
int * error_code )

Return the single strobe cycle maximum.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The strobe maximum cycle, in microseconds.

◆ odapi_adv_get_single_strobe_delay()

DLL_DECL unsigned long odapi_adv_get_single_strobe_delay ( long deviceID,
int * error_code )

Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The delay, in microseconds.

◆ odapi_adv_get_single_strobe_delay_increment()

DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_increment ( long deviceID,
int * error_code )

This function gets the single strobe delay increment.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The delay increment, in microseconds.

◆ odapi_adv_get_single_strobe_delay_maximum()

DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_maximum ( long deviceID,
int * error_code )

Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The delay, in microseconds.

◆ odapi_adv_get_single_strobe_delay_minimum()

DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_minimum ( long deviceID,
int * error_code )

Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The delay, in microseconds.

◆ odapi_adv_get_single_strobe_enable()

DLL_DECL bool odapi_adv_get_single_strobe_enable ( long deviceID,
int * error_code )

Get the enable status of the single strobe signal. Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
false if not enabled, true if available.

◆ odapi_adv_get_single_strobe_width()

DLL_DECL unsigned long odapi_adv_get_single_strobe_width ( long deviceID,
int * error_code )

Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The width, in microseconds.

◆ odapi_adv_get_single_strobe_width_increment()

DLL_DECL unsigned long odapi_adv_get_single_strobe_width_increment ( long deviceID,
int * error_code )

Return the single strobe width increment.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The width increment, in microseconds.

◆ odapi_adv_get_single_strobe_width_maximum()

DLL_DECL unsigned long odapi_adv_get_single_strobe_width_maximum ( long deviceID,
int * error_code )

Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The maximum width, in microseconds.

◆ odapi_adv_get_single_strobe_width_minimum()

DLL_DECL unsigned long odapi_adv_get_single_strobe_width_minimum ( long deviceID,
int * error_code )

Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The minimum width, in microseconds.

◆ odapi_adv_get_trigger_mode()

DLL_DECL int odapi_adv_get_trigger_mode ( long deviceID,
int * error_code )
Deprecated
this function has now been replaced by odapi_get_trigger_mode. This function gets the trigger mode for the specified device. Note that requesting an unsupported mode will result in an error.
Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
mode(Input) a trigger mode (0 = normal, 1 = software, 2 = synchronization, 3 = external hardware, etc - check your particular spectrometer's Data Sheet)

◆ odapi_adv_gpio_get_output_alternate1()

DLL_DECL bool odapi_adv_gpio_get_output_alternate1 ( long deviceID,
int * errorCode,
int bit )

Get the setting for alternate functionality on the specified bit (pin). Not all spectrometers support this functionality.

Deprecated
This function is deprecated starting with release 2.1 and will be removed in the future release.
Parameters
deviceIDThe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitWhich GPIO bit or pin to query.
Returns
true if the pin is set to alternate functionality, false otherwise (pin is a GPIO pin).

◆ odapi_adv_gpio_get_output_alternate2()

DLL_DECL uint32_t odapi_adv_gpio_get_output_alternate2 ( long deviceID,
int * errorCode )

Get the settings for alternate functionality on the GPIO pins. Not all spectrometers support this functionality.

Deprecated
This function is deprecated starting with release 2.1 and will be removed in the future release.
Parameters
deviceIDThe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
a bitmask with value 1 where the corresponding pin is set to alternate functionality, 0 otherwise (pin is a GPIO pin).

◆ odapi_adv_gpio_get_output_enable1()

DLL_DECL bool odapi_adv_gpio_get_output_enable1 ( long deviceID,
int * errorCode,
int bit )
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitthe GPIO pin to query.
Returns
true if the pin is an output pin, false if the pin is an input pin.

◆ odapi_adv_gpio_get_output_enable2()

DLL_DECL uint32_t odapi_adv_gpio_get_output_enable2 ( long deviceID,
int * errorCode )
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
the bitmask specifying the direction of each GPIO pin.

◆ odapi_adv_gpio_get_value1()

DLL_DECL bool odapi_adv_gpio_get_value1 ( long deviceID,
int * errorCode,
int bit )
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitthe GPIO pin to query.
Returns
true if the specified pin is set to logic level hig, false if the specified pin is set to logic level low.

◆ odapi_adv_gpio_get_value2()

DLL_DECL uint32_t odapi_adv_gpio_get_value2 ( long deviceID,
int * errorCode )
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
the bitmask specifying the logic level of each GPIO pin.

◆ odapi_adv_gpio_set_output_alternate1()

DLL_DECL void odapi_adv_gpio_set_output_alternate1 ( long deviceID,
int * errorCode,
int bit,
bool isAlternate )

Set the alternate functionality for the specified pin (bit) number. Not all spectrometers support this functionality.

Deprecated
This function is deprecated starting with release 2.1 and will be removed in the future release.
Parameters
deviceIDThe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitWhich GPIO bit or pin to set
isAlternateset true to enable the alternate functionality for the pin, false otherwise (pin is a GPIO pin).

◆ odapi_adv_gpio_set_output_alternate2()

DLL_DECL void odapi_adv_gpio_set_output_alternate2 ( long deviceID,
int * errorCode,
uint32_t bitMask )

Set the alternate functionality for the specified pins (bits). Not all spectrometers support this functionality.

Deprecated
This function is deprecated starting with release 2.1 and will be removed in the future release.
Parameters
deviceIDThe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitMaskwith bit set to 1 to set enable the alternate functionality, 0 otherwise (pin is a GPIO pin).

◆ odapi_adv_gpio_set_output_enable1()

DLL_DECL void odapi_adv_gpio_set_output_enable1 ( long deviceID,
int * errorCode,
int bit,
bool isOutput )

Set the direction (input/output) of a specified GPIO pin.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitthe GPIO pin to set.
isOutputset to true to make the pin output, false to make the pin input.

◆ odapi_adv_gpio_set_output_enable2()

DLL_DECL void odapi_adv_gpio_set_output_enable2 ( long deviceID,
int * errorCode,
uint32_t bitmask )

Set the direction (input/output) of the GPIO pins.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitmaska bitmask specifying the pin directions i.e. the nth bit set to 1 sets the nth pin to output.

◆ odapi_adv_gpio_set_value1()

DLL_DECL void odapi_adv_gpio_set_value1 ( long deviceID,
int * errorCode,
int bit,
bool isHigh )

Set the logic value for a spcified pin.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitthe GPIO pin to set.
isHighset true to set the logic level high, set false to set the logic level low.

◆ odapi_adv_gpio_set_value2()

DLL_DECL void odapi_adv_gpio_set_value2 ( long deviceID,
int * errorCode,
uint32_t bitmask )

Set the logic value for all GPIO pins.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
bitmaskthe bitmask specifying the logic level of each GPIO pin.

◆ odapi_adv_ipv4_add_static_ip_address()

DLL_DECL void odapi_adv_ipv4_add_static_ip_address ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char * ipAddress,
int ipAddressLength,
unsigned int netmask )

Add a static IP address to the specified interface. The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressthe static IP address to be added.
netmaskthe netmask specifying the subnet of the network the device is on.

◆ odapi_adv_ipv4_delete_static_ip_address()

DLL_DECL void odapi_adv_ipv4_delete_static_ip_address ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char addressIndex )

Delete a static IP address on the specified interface.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
addressIndexthe index of the address to be deleted.

◆ odapi_adv_ipv4_get_default_gateway_ip_address()

DLL_DECL void odapi_adv_ipv4_get_default_gateway_ip_address ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char * outIpAddress,
int ipAddressLength )

Get the default gateway IP address to the specified interface. The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
outIpAddresscontains the default gateway IP address.
ipAddressLengththe ip address buffer length.

◆ odapi_adv_ipv4_get_number_of_ip_addresses()

DLL_DECL int odapi_adv_ipv4_get_number_of_ip_addresses ( long deviceID,
int * errorCode,
unsigned char ifNum )

Get the number of IP addresses available on the specified interface. If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
the number of IP addresses on the specified interface.

◆ odapi_adv_ipv4_is_dhcp_enabled()

DLL_DECL bool odapi_adv_ipv4_is_dhcp_enabled ( long deviceID,
int * errorCode,
unsigned char ifNum )

Check to see if DHCP (client) is enabled on the specified interface. If DHCP is enabled then the device will be able to receive and IP address from a DHCP server oin the network it is connected to.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
true if DHCP is enabled on the specified interface, false otherwise.

◆ odapi_adv_ipv4_read_ip_address()

DLL_DECL void odapi_adv_ipv4_read_ip_address ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char addressIndex,
unsigned char * ipAddress,
int ipAddressLength,
unsigned int * netmask )

Retrieve the IP address and netmask on the specified interface. If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses. The IP address is returned as 4 bytes into a user supplied array. The leading part of the IP address will be in the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
addressIndexthe index of the address to be retrieved.
ipAddressa pointer to the array that will receive the IP address.
ipAddressLengththe size of the array ipAddress.
netmaska pointer to the netmask specifying the subnet of the network the device is on.

◆ odapi_adv_ipv4_set_default_gateway_ip_address()

DLL_DECL void odapi_adv_ipv4_set_default_gateway_ip_address ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char * ipAddress,
int ipAddressLength )

Set the default gateway IP address to the specified interface. The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressthe default gateway IP address to be added.
ipAddressLengththe ip address length.

◆ odapi_adv_ipv4_set_dhcp_enable()

DLL_DECL void odapi_adv_ipv4_set_dhcp_enable ( long deviceID,
int * errorCode,
unsigned char ifNum,
unsigned char enabled )

Turn the DHCP client on or off for the device on the specified interface.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
enableda value of 0 turns the DHCP client off, a value greater than 0 turns the DHCP client on.

◆ odapi_adv_light_source_has_enable()

DLL_DECL unsigned char odapi_adv_light_source_has_enable ( long deviceID,
int * error_code,
int light_source_index )

Queries whether the indicated light source within the given feature instance has a usable enable/disable control. If this returns 0 (meaning no enable available) then calling odapi_light_source_set_enable() or odapi_light_source_is_enabled() is likely to result in an error.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Ouput) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
light_source_index(Input) Which of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
Returns
0 to indicate specified light source cannot be enabled/disabled, 1 to indicate specified light source can be enabled/disabled with odapi_adv_light_source_set_enable()

◆ odapi_adv_light_source_is_enabled()

DLL_DECL unsigned char odapi_adv_light_source_is_enabled ( long deviceID,
int * error_code,
int light_source_index )

Queries whether the indicated light source within the given feature instance is enabled (energized).

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
light_source_index(Input) Which of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
Returns
0 to indicate specified light source is disabled (should emit no light), 1 to indicate specified light source is enabled (should emit light depending on configured intensity setting)

◆ odapi_adv_light_source_set_enable()

DLL_DECL void odapi_adv_light_source_set_enable ( long deviceID,
int * error_code,
int light_source_index,
unsigned char enable )

Attempts to enable or disable the indicated light source within the given feature instance. Not all light sources have an enable/disable control, and this capability can be queried with odapi_adv_light_source_has_enable(). Note that an enabled light source should emit light according to its last (or default) intensity setting which might be the minimum; in this case, the light source might appear to remain off.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
light_source_index(Input) Which of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
enable(Input) Whether to enable the light source. A value of zero will attempt to disable the light source, and any other value will enable it.

◆ odapi_adv_network_conf_get_interface_count()

DLL_DECL uint32_t odapi_adv_network_conf_get_interface_count ( long deviceID,
int * errorCode )

Read the number of supported communication interface. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
Returns
The number of interface.

◆ odapi_adv_network_conf_get_interface_status()

DLL_DECL bool odapi_adv_network_conf_get_interface_status ( long deviceID,
int * errorCode,
unsigned int interfaceIndex )

Return true if the interface is enabled otherwise it's false. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe interface to look at.
Returns
True if the interface if enabled otherwise it's False.

◆ odapi_adv_network_conf_get_interface_type()

DLL_DECL uint32_t odapi_adv_network_conf_get_interface_type ( long deviceID,
int * errorCode,
unsigned int interfaceIndex )

Return the interface type of the given interface index. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe interface to look at.
Returns
The interface type which could be one 0(Loopback), 1(wired ethernet), 2 (WIFI), and 3 (USB - CDC Ethernet).

◆ odapi_adv_network_conf_get_multicast_group_enabled()

DLL_DECL bool odapi_adv_network_conf_get_multicast_group_enabled ( long deviceID,
int * errorCode,
unsigned int interfaceIndex )

Return true if the multicast group message is enabled otherwise it's false. This function only applies to HDX/FX devices.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
interfaceIndex[in]The interface to look at.
Returns
True if it's enabled otherwise it's False.

◆ odapi_adv_network_conf_save_interface_setting()

DLL_DECL void odapi_adv_network_conf_save_interface_setting ( long deviceID,
int * errorCode,
unsigned int interfaceIndex )

Save the network interface settings to the device. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe interface to save to.

◆ odapi_adv_network_conf_set_interface_status()

DLL_DECL void odapi_adv_network_conf_set_interface_status ( long deviceID,
int * errorCode,
unsigned int interfaceIndex,
bool enable )

Enable or disable the interface. This function only applies to HDX/FX devices.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
interfaceIndexThe interface to look at.
enableTrue will enable the interface. False will disable it.

◆ odapi_adv_network_conf_set_multicast_group_enabled()

DLL_DECL void odapi_adv_network_conf_set_multicast_group_enabled ( long deviceID,
int * errorCode,
unsigned int interfaceIndex,
bool enable )

Enable or disable the multicast message group. This function only applies to HDX/FX devices.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
interfaceIndex[in]The interface to look at.
enable[in]True will enable the multicast group message. False will disable it.

◆ odapi_adv_reset_device()

DLL_DECL void odapi_adv_reset_device ( long deviceID,
int * error_code )

Restarts the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.

◆ odapi_adv_save_settings_to_flash()

DLL_DECL void odapi_adv_save_settings_to_flash ( long deviceID,
int * error_code )

Save settings to flash.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.

◆ odapi_adv_set_baud_rate()

DLL_DECL void odapi_adv_set_baud_rate ( long deviceID,
int * error_code,
int baudRate )

Set a new baud rate for the RS-232 port.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
baudRateThe new port baud rate.

◆ odapi_adv_set_continuous_strobe_enable()

DLL_DECL void odapi_adv_set_continuous_strobe_enable ( long deviceID,
int * error_code,
unsigned char enable )

This function sets the continuous strobe enable state on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
enable(Input) A boolean used for denoting the desired state (on/off) of the continuous strobe generator. If the value of enable is nonzero, then the continuous strobe will operate. If the value of enable is zero, then the continuous strobe will stop. Note that on some devices the continuous strobe enable is tied to other enables (such as lamp enable or single strobe enable) which may cause side effects.

◆ odapi_adv_set_continuous_strobe_period_micros()

DLL_DECL void odapi_adv_set_continuous_strobe_period_micros ( long deviceID,
int * error_code,
unsigned long period_micros )

This function sets the continuous strobe period on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
period_micros(Input) The new period of the continous strobe measured in microseconds

◆ odapi_adv_set_continuous_strobe_width_micros()

DLL_DECL void odapi_adv_set_continuous_strobe_width_micros ( long deviceID,
int * error_code,
unsigned long width_micros )

This function sets the continuous strobe width on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
period_micros(Input) The new width of the continous strobe measured in microseconds

◆ odapi_adv_set_data_buffer_capacity()

DLL_DECL void odapi_adv_set_data_buffer_capacity ( long deviceID,
int * error_code,
unsigned long capacity )

Set the number of data elements that the buffer should retain. This function must be used with "odapi_adv_set_number_of_backtoback_scans()".

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
capacity(Input) Limit on the number of data elements to store. This is bounded by what is returned by odapi_adv_get_buffer_capacity_minimum() and odapi_adv_get_buffer_capacity_maximum().

◆ odapi_adv_set_data_buffer_enable()

DLL_DECL void odapi_adv_set_data_buffer_enable ( long deviceID,
int * error_code,
unsigned char flag )

Enable or disable data buffering.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
flagTrue enable the buffer. False disable the buffer

◆ odapi_adv_set_device_alias()

DLL_DECL void odapi_adv_set_device_alias ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Set a new device alias to the device.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe new model string.
buffer_lengthThe maximum buffer size is 16.

◆ odapi_adv_set_device_manufacturer_string()

DLL_DECL void odapi_adv_set_device_manufacturer_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Set a new manufacturer string to the device. After writing new value, you need to unplug the device before reading again the new value.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe new manufacturer string.
buffer_lengthThe maximum buffer size is 24.

◆ odapi_adv_set_device_model_string()

DLL_DECL void odapi_adv_set_device_model_string ( long deviceID,
int * error_code,
char * buffer,
int bufferLength )

Set a new model string to the device. After writing new value, you need to unplug the device before reading again the new value.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe new model string.
buffer_lengthThe maximum buffer size is 24.

◆ odapi_adv_set_device_pid()

DLL_DECL void odapi_adv_set_device_pid ( long deviceID,
int * error_code,
int pid )

Set a new product id (PID) to the device. After writing new value, you need to unplug the device before reading again the new value.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
intThe new PID for the device.

◆ odapi_adv_set_device_vid()

DLL_DECL void odapi_adv_set_device_vid ( long deviceID,
int * error_code,
int vid )

Write a new vendor id (VID) to the device. After writing new value, you need to unplug the device before reading again the new value.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
intThe new VID for the device.

◆ odapi_adv_set_ip_address_assigned_mode()

DLL_DECL void odapi_adv_set_ip_address_assigned_mode ( long deviceID,
int * errorCode,
unsigned char useDHCP )

Set the IP address mode to the OBP2 device.

See also
odapi_adv_set_ip_address_assigned_mode()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
useDHCP[in]True will use DHCP server for ip assignment. False will use statically assigned IP address.

◆ odapi_adv_set_lamp_enable()

DLL_DECL void odapi_adv_set_lamp_enable ( long deviceID,
int * error_code,
unsigned char lamp_enable )

This function sets the strobe enable on the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
lamp_enable(Input) A character used for denoting the desired value (high/low) of the strobe-enable pin. If the value of strobe_enable is zero, then the pin should be set low. If the value of strobe_enable is non-zero, then the pin should be set high.

◆ odapi_adv_set_led_enable()

DLL_DECL void odapi_adv_set_led_enable ( long deviceID,
int * error_code,
bool led_enable )

This function sets the exterior blinking LED on the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
led_enable(Input) A character used for denoting the desired value (high/low) of the LED enable pin. If the value of led_enable is false, then the pin should be set off. If the value of led_enable is true, then the pin should be blinking.

◆ odapi_adv_set_manual_network_configuration()

DLL_DECL void odapi_adv_set_manual_network_configuration ( long deviceID,
int * errorCode,
unsigned char * ipv4Address,
unsigned int ipv4AddressSize,
unsigned char * subnetMask,
unsigned int subnetMaskSize,
unsigned char * defaultGateway,
unsigned int defaultGatewaySize,
unsigned char * dnsServer,
unsigned int dnsServerSize )

Write the network configuration parameters (static ip address) on OBP2 enabled device.

See also
odapi_adv_get_manual_network_configuration()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeon exit this contains zero on success, nonzero otherwise.
ipv4Address[in]The IPv4 address.
ipv4AddressSize[in]The ipv4 address buffer size.
subnetMask[in]The subnet mask.
subnetMaskSize[in]The subnet mask buffer size.
defaultGateway[in]The default gateway
defaultGatewaySize[in]The default gateway buffer size.
dnsServer[in]The DNS server.
dnsServerSize[in]The dns server buffer size.

◆ odapi_adv_set_number_of_backtoback_scans()

DLL_DECL void odapi_adv_set_number_of_backtoback_scans ( long deviceID,
int * error_code,
unsigned long numScans )

Set the number of spectra that the device will capture per trigger event. This function requires data buffer to be enabled. See "odapi_adv_set_data_buffer_enable()".

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
numScans(Input) The back-to-back scan value.

◆ odapi_adv_set_shutter_open()

DLL_DECL void odapi_adv_set_shutter_open ( long deviceID,
int * error_code,
unsigned char shutter_state )

This function will open or close the shutter on the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
shutter_state(Input) True(1) will open the shutter. False(0) will close the shutter.

◆ odapi_adv_set_single_strobe_delay()

DLL_DECL void odapi_adv_set_single_strobe_delay ( long deviceID,
int * error_code,
unsigned long delay_micros )

Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
microsecondsThe delay, in microseconds, that the single strobe should wait before the pulse begins.

◆ odapi_adv_set_single_strobe_enable()

DLL_DECL void odapi_adv_set_single_strobe_enable ( long deviceID,
int * error_code,
unsigned char enable )

Set the enable status of the single strobe signal. Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
enableWhether to enable the single strobe function

◆ odapi_adv_set_single_strobe_width()

DLL_DECL void odapi_adv_set_single_strobe_width ( long deviceID,
int * error_code,
unsigned long width_micros )

Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
microsecondsThe duration, in microseconds, of the single strobe pulse after the rising edge occurs. Once this duration elapses, a falling edge will be generated.

◆ odapi_adv_set_trigger_mode()

DLL_DECL void odapi_adv_set_trigger_mode ( long deviceID,
int * error_code,
int mode )
Deprecated
this function has now been replaced by odapi_set_trigger_mode.

This function sets the trigger mode for the specified device. Note that requesting an unsupported mode will result in an error.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
mode(Input) a trigger mode (0 = normal, 1 = software, 2 = synchronization, 3 = external hardware, etc - check your particular spectrometer's Data Sheet)

◆ odapi_adv_tec_get_enable()

DLL_DECL bool odapi_adv_tec_get_enable ( long deviceID,
int * error_code )

This function returns true if the attached thermo electric cooler is enabled.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
bool True if the TEC is enabled otherwise it's false.

◆ odapi_adv_tec_get_fan_enable()

DLL_DECL bool odapi_adv_tec_get_fan_enable ( long deviceID,
int * error_code )

This function returns the thermo electric cooler fan state whether it's enabled or not.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
bool True if the TEC fan is enabled.

◆ odapi_adv_tec_get_stable()

DLL_DECL bool odapi_adv_tec_get_stable ( long deviceID,
int * error_code )

This function returns true if the thermo electric cooler temperature has reaches a stable setpoint temperature.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
bool True if the TEC temperature is stable otherwise it's false.

◆ odapi_adv_tec_get_temperature_degrees_C()

DLL_DECL double odapi_adv_tec_get_temperature_degrees_C ( long deviceID,
int * error_code )

This function reads the actual temperature of the TEC and returns the value in degrees celsius.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
The TEC temperature in degrees celsius.

◆ odapi_adv_tec_get_temperature_setpoint_degrees_C()

DLL_DECL float odapi_adv_tec_get_temperature_setpoint_degrees_C ( long deviceID,
int * error_code )

This function returns the thermo electric cooler setpoint temperature.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
Returns
float Returns temperature value in celcius.

◆ odapi_adv_tec_set_enable()

DLL_DECL void odapi_adv_tec_set_enable ( long deviceID,
int * error_code,
unsigned char tec_enable )

This function enables the TEC feature on the device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
tec_enable(Input) A character that denotes the desired TEC enable state. If the value of tec_enable is zero, the TEC should be disabled. If the value of tec_enable is non-zero, the TEC should be enabled.

◆ odapi_adv_tec_set_temperature_setpoint_degrees_C()

DLL_DECL void odapi_adv_tec_set_temperature_setpoint_degrees_C ( long deviceID,
int * error_code,
double temperature_degrees_celsius )

This function sets the target (setpoint) TEC temperature.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device; ERROR_NO_DEVICE if the device does not exist.
temperature_degrees_celsius(Input) desired temperature, in degrees celsius.

◆ odapi_apply_electric_dark_correction_usage()

DLL_DECL void odapi_apply_electric_dark_correction_usage ( long deviceID,
int * error_code,
unsigned char enable )
Deprecated
Enable or disable electric dark correction.
See also
odapi_set_stored_dark_spectrum
odapi_get_stored_dark_spectrum
odapi_get_dark_corrected_spectrum1
odapi_get_dark_corrected_spectrum2
Warning
if electric dark correction is enabled using this function then some of the newer dark correction functionality e.g. odapi_get_dark_corrected_spectrum1 may not be used.
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodeA code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
enableTrue(1) enable electric dark correction otherwise it's false(0).

◆ odapi_apply_nonlinearity_correct_usage()

DLL_DECL void odapi_apply_nonlinearity_correct_usage ( long deviceID,
int * error_code,
bool use )
Deprecated
This function sets the nonlinearity correction mode for the specified device. Note that requesting an unsupported mode will result in an error.
See also
odapi_set_stored_dark_spectrum
odapi_get_stored_dark_spectrum
odapi_get_nonlinearity_corrected_spectrum1
odapi_get_nonlinearity_corrected_spectrum2
Warning
if nonlinearity correction is enabled using this function then some of the newer nonlinearity correction functionality e.g. odapi_get_nonlinearity_corrected_spectrum1 may not be used.
Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
mode(Input) a bool value of true to use or false to not use.

◆ odapi_boxcar_correct_spectrum()

DLL_DECL void odapi_boxcar_correct_spectrum ( long deviceID,
int * errorCode,
double * illuminatedSpectrum,
unsigned int illuminatedSpectrumLength,
unsigned int boxcarWidth,
double * boxcarCorrectedSpectrum,
unsigned int boxcarCorrectedSpectrumLength )

Apply a boxcar correction on the given illuminated spectrum.

Parameters
[in]deviceIDThe identifier of the device as returned by getDeviceIDs.
[out]errorCodeSet to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_TRANSFER_ERROR if a communication error occurred ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_COMMAND_NOT_SUPPORTED if device does not support this command.
[in/out]illuminatedSpectrum The spectrum that will be boxcar corrected.
[in]boxcarWidthThe boxcar width.

◆ odapi_close_device()

DLL_DECL void odapi_close_device ( long id,
int * error_code )

This function closes the spectrometer attached to the system. 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
id(Input) The location ID of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.

◆ odapi_dark_correct_spectrum1()

DLL_DECL int odapi_dark_correct_spectrum1 ( long deviceID,
int * errorCode,
double * illuminatedSpectrum,
int illuminatedSpectrumLength,
double * darkCorrectedSpectrum,
int darkCorrectedSpectrumLength )

Dark correct a previously acquired illuminated spectrum and a stored dark spectrum.

See also
setStoredDarkSpectrum
Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found.
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, zero otherwise.

◆ odapi_dark_correct_spectrum2()

DLL_DECL int odapi_dark_correct_spectrum2 ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength,
double * illuminatedSpectrum,
int illuminatedSpectrumLength,
double * darkCorrectedSpectrum,
int darkCorrectedSpectrumLength )

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

Parameters
deviceIDthe identifier of the device as returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success;
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, zero otherwise.

◆ odapi_detect_network_devices()

DLL_DECL int odapi_detect_network_devices ( )

Get the number of network connected devices. 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 network detected devices connected.

◆ odapi_get_acquisition_delay_increment_microseconds()

DLL_DECL unsigned long odapi_get_acquisition_delay_increment_microseconds ( long deviceID,
int * errorCode )

Get the allowed step size for the acquisition delay in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The acquisition delay step size in microseconds

◆ odapi_get_acquisition_delay_maximum_microseconds()

DLL_DECL unsigned long odapi_get_acquisition_delay_maximum_microseconds ( long deviceID,
int * errorCode )

Get the maximum allowed acquisition delay in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The maximum acquisition delay in microseconds

◆ odapi_get_acquisition_delay_microseconds()

DLL_DECL unsigned long odapi_get_acquisition_delay_microseconds ( long deviceID,
int * errorCode )

Get the acquisition delay in microseconds. This may also be referred to as the trigger delay. In any event, it is the time between some event (such as a request for data, or an external trigger pulse) and when data acquisition begins.

Note that not all devices support reading this value back. In these cases, the returned value will be the last value sent to odapi_adv_set_acquisition_delay_microseconds(). If no value has been set and the value cannot be read back, this function will indicate an error.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_COMMAND_NOT_SUPPORTED if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The acquisition delay in microseconds

◆ odapi_get_acquisition_delay_minimum_microseconds()

DLL_DECL unsigned long odapi_get_acquisition_delay_minimum_microseconds ( long deviceID,
int * errorCode )

Get the minimum allowed acquisition delay in microseconds.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
The minimum acquisition delay in microseconds

◆ odapi_get_active_pixel_range()

DLL_DECL int odapi_get_active_pixel_range ( long deviceID,
int * error_code,
int * range,
int rangeSize )

Read the active pixel range from the sensor pixel array.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails
[out]rangeThe output buffer for active pixel range indices.
[in]rangeSizeThe output buffer size.
Returns
Number of elements copied into the output buffer.

◆ odapi_get_api_version()

DLL_DECL double odapi_get_api_version ( )
Deprecated
Returns the OceanDirect SDK version number
See also
odapi_get_api_version_numbers
Returns
double version number

◆ odapi_get_api_version_numbers()

DLL_DECL void odapi_get_api_version_numbers ( unsigned int * major,
unsigned int * minor,
unsigned int * point )

Returns the OceanDirect SDK version numbers (major.minor.point)

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

◆ odapi_get_bad_pixel_indices()

DLL_DECL int odapi_get_bad_pixel_indices ( long deviceID,
int * error_code,
int * badPixelsIndices,
int badPixelSize )

Read bad pixel indices from the sensor pixel array.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails
[out]badPixelIndicesThe output buffer for bad pixel indices.
[in]badPixelIndicesThe output buffer size.
Returns
Number of elements copied into the output buffer.

◆ odapi_get_boxcar_width()

DLL_DECL unsigned short int odapi_get_boxcar_width ( long deviceID,
int * error_code )

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 odapi_get_formatted_spectrum (or odapi_get_raw_spectrum_with_metadata). 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
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the width of the boxcar filter an unsigned char (values typically 0-15)

◆ odapi_get_dark_corrected_spectrum1()

DLL_DECL int odapi_get_dark_corrected_spectrum1 ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength,
double * darkCorrectedSpectrum,
int darkCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
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, zero otherwise.

◆ odapi_get_dark_corrected_spectrum2()

DLL_DECL int odapi_get_dark_corrected_spectrum2 ( long deviceID,
int * errorCode,
double * darkCorrectedSpectrum,
int darkCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found. ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
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, zero otherwise.

◆ odapi_get_device_ids()

DLL_DECL int odapi_get_device_ids ( long * ids,
unsigned int max_ids )

This will populate the provided buffer with up to max_ids of device references. These references must be used as the first parameter to most of the other odapi_ calls. Each uniquely identifies a single device instance. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
idsan array of long integers that will be overwritten with the unique IDs of each known device. Note that these devices will not be open by default.
max_idsthe maximum number of IDs that may be written to the array
Returns
The total number of device IDs that were written to the array. This may be zero on error.

◆ odapi_get_device_name()

DLL_DECL int odapi_get_device_name ( long id,
int * error_code,
char * buffer,
unsigned int length )

This function determines the correct spectrometer model name assigned. It is not based on VID or PID of device.

Parameters
id(Input) The location ID of a device previously opened with odapi_get_device_locations().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are:
buffer(Output) Pointer to a user buffer that the name will be stored into.
length(Input) Maximum number of bytes that may be written to the buffer
Returns
integral number of bytes actually written to the user buffer

◆ odapi_get_device_type()

DLL_DECL int odapi_get_device_type ( long id,
int * error_code,
char * buffer,
unsigned int length )

This function copies a string denoting the type of the device into the provided buffer.

Parameters
id(Input) The location ID of a device previously opened with odapi_get_device_locations().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_BAD_USER_BUFFER if the pointer to the buffer is null or the supplied buffer length is 0; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) Pointer to a user buffer that the name will be stored into.
length(Input) Maximum number of bytes that may be written to the buffer
Returns
integral number of bytes actually written to the user buffer

◆ odapi_get_device_usb_endpoint_primary_in()

DLL_DECL unsigned char odapi_get_device_usb_endpoint_primary_in ( long id,
int * error_code )

This function returns the usb endpoint for the primary input. If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
the usb endpoint address of the primary input endpoint.

◆ odapi_get_device_usb_endpoint_primary_out()

DLL_DECL unsigned char odapi_get_device_usb_endpoint_primary_out ( long id,
int * error_code )

This function returns the usb endpoint for the primary output. If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
the usb endpoint address of the primary output endpoint.

◆ odapi_get_device_usb_endpoint_secondary_in()

DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_in ( long id,
int * error_code )

This function returns the usb endpoint for the type secondary input. If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
the usb endpoint address of the secondary input endpoint.

◆ odapi_get_device_usb_endpoint_secondary_in2()

DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_in2 ( long id,
int * error_code )

This function returns the usb endpoint for the secondary input. If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
the usb endpoint address of ths secondary input.

◆ odapi_get_device_usb_endpoint_secondary_out()

DLL_DECL unsigned char odapi_get_device_usb_endpoint_secondary_out ( long id,
int * error_code )

This function returns the usb endpoint for the secondary output. If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
the usb endpoint address of the secondary output endpoint.

◆ odapi_get_electric_dark_correction_usage()

DLL_DECL bool odapi_get_electric_dark_correction_usage ( long deviceID,
int * error_code )
   @deprecated This function returns the usage state of electric dark correction.
   @see odapi_set_stored_dark_spectrum
   @see odapi_get_stored_dark_spectrum
   @see odapi_get_dark_corrected_spectrum1
   @see odapi_get_dark_corrected_spectrum2

   @param deviceID (Input) The index of a device previously opened with
        odapi_open_device().
   @param error_code (Output) A pointer to an integer that can be used
        for storing error codes. This may be NULL in which case no error code is returned.
        The error codes returned by this function are:
                    ERROR_SUCCESS on success;
                    ERROR_COMMAND_NOT_SUPPORTED if the device does not support
                                     electric dark correction;

| * ERROR_NO_DEVICE if the device does not exist.

Returns
Returns usage state true/false.

◆ odapi_get_electric_dark_pixel_count()

DLL_DECL int odapi_get_electric_dark_pixel_count ( long deviceID,
int * error_code )

This returns the number of pixels that are electrically active but optically masked (a.k.a. electric dark pixels). Note that not all detectors have optically masked pixels; in that case, this function will return zero.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; ERROR_NO_DEVICE if the device does not exist.
Returns
the number of pixels that can be retrieved by the odapi_spectrometer_get_electric_dark_pixel_indices() function.

◆ odapi_get_electric_dark_pixel_indices()

DLL_DECL int odapi_get_electric_dark_pixel_indices ( long deviceID,
int * error_code,
int * indices,
int length )

This fills in the provided array (up to the given length) with the indices of the pixels that are electrically active but optically masked (a.k.a. electric dark pixels). Note that not all detectors have optically masked pixels; in that case, this function will return zero.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_COMMAND_NOT_SUPPORTED if the device does not support electric dark correction; ERROR_NO_DEVICE if the device does not exist.
indices(Output) A pre-allocated array of ints that the pixel indices will be copied into
length(Input) The number of values to copy into the indices array (this should be no larger than the number of ints allocated in the indices array)
Returns
the number of indices written into the indices buffer

◆ odapi_get_error_string()

DLL_DECL int odapi_get_error_string ( int error_code,
char * error_string,
int length )

This function returns a description of the error denoted by error_code.

Parameters
error_code(Input) The integer error code to look up. Error codes may not be zero, but can be any non-zero integer (positive or negative).
Returns
char *: A description in the form of a string that describes what the error was or "Undefined error" if the error code is not known.

◆ odapi_get_error_string_length()

DLL_DECL int odapi_get_error_string_length ( int error_code)

Get the length of the error string associated with the specified error code.

Parameters
error_codethe error code used to determine the length of the error string.
Returns
the length of the error string associated with the specified error code if the error code is a known error code, otherwise the length of the "unknown" error code string.

◆ odapi_get_formatted_spectrum()

DLL_DECL int odapi_get_formatted_spectrum ( long deviceID,
int * error_code,
double * buffer,
int buffer_length )

This acquires a spectrum and returns the answer in formatted floats. In this mode, auto-nulling should be automatically performed for devices that support it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_NOT_ENOUGH_BUFFER_SPACE if the size of the buffer is smaller than the formatted spectrum length; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A buffer (with memory already allocated) to hold the spectral data
buffer_length(Input) The length of the buffer
Returns
the number of floats read into the buffer

◆ odapi_get_formatted_spectrum_length()

DLL_DECL int odapi_get_formatted_spectrum_length ( long deviceID,
int * error_code )

This returns an integer denoting the number of pixels in a formatted spectrum (as returned by get_formatted_spectrum(...)).

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the length of a formatted spectrum.

◆ odapi_get_index_at_wavelength()

DLL_DECL int odapi_get_index_at_wavelength ( long deviceID,
int * error_code,
double * wavelength,
double approxWavelength )

This finds a single x-axis index corresponding to an approximate single wavelength.

Parameters
deviceID(Input) The index of a device previously opened with open_spectrometer().
error_code(Ouput) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_CODE_ARRAY_INDEX_OUT_OF_BOUNDS the specified wavelengths is not within the device's wavelength range; ERROR_NO_DEVICE if the device does not exist.
wavelength(Output) A doubles that contains the actual wavelength.
approxWavelength(Input) A double value containing a best guess or approximate (this should be within bounds of the entire wavelength array or an error is generated)
Returns
the index used for the entire wavelength array from (odapi_get_wavelengths()) method.

◆ odapi_get_indices_at_wavelength_range()

DLL_DECL int odapi_get_indices_at_wavelength_range ( long deviceID,
int * error_code,
int * indices,
int indicesLength,
double * wavelength,
int wavelengthLength,
double lo,
double hi )

This finds a continuous range of x-axis indices corresponding to a low and high wavelength parameter given.

Parameters
deviceID(Input) The index of a device previously opened with open_spectrometer().
error_code(Ouput) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_CODE_ARRAY_INDEX_OUT_OF_BOUNDS the lower or upper bound specified is not within the device's wavelength range; ERROR_NO_DEVICE if the device does not exist.
indices(Output) A double array that contains indices of actual wavelengths.
indicesLength(input) The indices buffer size.
wavelength(Output) A double array that contains the actual wavelengths.
wavelengthLength(Input) The wavelength buffer size.
lo(Input) low estimated wavelength for start of range.
hi(Input) high estimated wavelength for end of range.
Returns
the length of both the wavelength and indices array.

◆ odapi_get_indices_at_wavelengths()

DLL_DECL int odapi_get_indices_at_wavelengths ( long deviceID,
int * error_code,
int * indices,
int indicesLength,
double * wavelength,
int wavelengthLength )

This finds one or multiple x-axis indices corresponding to one or multilpe estimated wavelengths.

Parameters
deviceID(Input) The index of a device previously opened with open_spectrometer().
error_code(Ouput) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_CODE_ARRAY_INDEX_OUT_OF_BOUNDS one or more of the specified wavelengths is not within the device's wavelength range; ERROR_NO_DEVICE if the device does not exist.
indices(Output) A double array that contains indices of actual wavelengths.
indicesLength(Input) The indices buffer size.
wavelength(Output) A double array that contains the actual wavelengths.
wavelengthLength(Input) The wavelength buffer size.
Returns
the length of both the wavelength and indices array.

◆ odapi_get_integration_time_increment_micros()

DLL_DECL unsigned long odapi_get_integration_time_increment_micros ( long deviceID,
int * error_code )

This function returns the integration time increment setting, in microseconds, that is valid for the spectrometer. Most spectrometer returns 1.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns the integration time increment in microseconds.

◆ odapi_get_integration_time_micros()

DLL_DECL unsigned long odapi_get_integration_time_micros ( long deviceID,
int * error_code )

This function gets the integration time from the specified device. This function should not be responsible for performing stability scans.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_INPUT_OUT_OF_BOUNDS if an invalid integration time is supplied; ERROR_NO_DEVICE if the device does not exist.
integration_time_micros(Input) The new integration time in units of microseconds

◆ odapi_get_maximum_integration_time_micros()

DLL_DECL unsigned long odapi_get_maximum_integration_time_micros ( long deviceID,
int * error_code )

This function returns the largest integration time setting, in microseconds, that is valid for the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns minimum legal integration time in microseconds if > 0. On error, returns 0 and error_code will be set accordingly.

◆ odapi_get_maximum_intensity()

DLL_DECL double odapi_get_maximum_intensity ( long deviceID,
int * error_code )

This function returns the maximum pixel intensity for the spectrometer.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns maximum pixel intensity if > 0. On error, returns -1 and error_code will be set accordingly.

◆ odapi_get_minimum_averaging_integration_time_micros()

DLL_DECL unsigned long odapi_get_minimum_averaging_integration_time_micros ( long deviceID,
int * error_code )

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 odapi_get_minimum_integration_time_micros.
Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns minimum legal integration time in microseconds if > 0. On error, returns 0 and error_code will be set accordingly.

◆ odapi_get_minimum_integration_time_micros()

DLL_DECL unsigned long odapi_get_minimum_integration_time_micros ( long deviceID,
int * error_code )

This function returns the smallest integration time setting, in microseconds, that is valid for the spectrometer.

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 odapi_get_minimum_averaging_integration_time_micros.
Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns minimum legal integration time in microseconds if > 0. On error, returns 0 and error_code will be set accordingly.

◆ odapi_get_network_device_ids()

DLL_DECL int odapi_get_network_device_ids ( long * ids,
unsigned int max_ids )

This will populate the provided buffer with up to max_ids of network device references. These references must be used as the first parameter to most of the other odapi_ calls. Each uniquely identifies a single device instance. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.

Parameters
idsan array of long integers that will be overwritten with the unique IDs of each known device. Note that these devices will not be open by default.
max_idsthe maximum number of IDs that may be written to the array
Returns
The total number of device IDs that were written to the array. This may be zero on error.

◆ odapi_get_nonlinearity_correct_usage()

DLL_DECL bool odapi_get_nonlinearity_correct_usage ( long deviceID,
int * error_code )
Deprecated
This function returns the usage state of nonlinearity correction.
See also
odapi_set_stored_dark_spectrum
odapi_get_stored_dark_spectrum
odapi_get_nonlinearity_corrected_spectrum1
odapi_get_nonlinearity_corrected_spectrum2
Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
Returns
Returns usage state true/false.

◆ odapi_get_nonlinearity_corrected_spectrum1()

DLL_DECL int odapi_get_nonlinearity_corrected_spectrum1 ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength,
double * nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
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, zero otherwise.

◆ odapi_get_nonlinearity_corrected_spectrum2()

DLL_DECL int odapi_get_nonlinearity_corrected_spectrum2 ( long deviceID,
int * errorCode,
double * nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_DARK_NONLINEARITY_CORRECTION_CONFLICT legacy correction functionality has been enabled using either applyElectricDarkCorrection or applyNonLinearityCorrection or both; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
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, zero otherwise.

◆ odapi_get_number_of_device_ids()

DLL_DECL int odapi_get_number_of_device_ids ( )

This returns the total number of devices that are known either because they have been specified with odapi_add_RS232_device_location or because they were probed on some bus. This can be used to bound the number of device references that can be gotten with odapi_get_device_ids(). Note that this should only be done by one thread at a time.

Returns
the total number of devices references that are available through odapi_get_device_ids().

◆ odapi_get_optical_dark_pixel_range()

DLL_DECL int odapi_get_optical_dark_pixel_range ( long deviceID,
int * error_code,
int * range,
int rangeSize )

Read the optical dark pixel range from the sensor pixel array.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails
[out]rangeThe output buffer for optical dark pixel range indices.
[in]rangeSizeThe output buffer size.
Returns
Number of elements copied into the output buffer.

◆ odapi_get_pixel_count()

DLL_DECL int odapi_get_pixel_count ( long deviceID,
int * error_code )

Return the pixel count. The pixel count refers to all the pixels from the spectra we received from the device.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails
Returns
The pixel count.

◆ odapi_get_raw_spectrum_with_metadata()

DLL_DECL int odapi_get_raw_spectrum_with_metadata ( long deviceID,
int * error_code,
double * buffer[],
int buffer_row_size,
int buffer_column_size,
long long int * tick_count,
int tick_count_size )

Read a maximum of 15 spectra from the data buffer. This function requires that both back to back scans and data buffer be enabled. See "odapi_adv_set_data_buffer_enable()" and "odapi_adv_set_number_of_backtoback_scans()".

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_CODE_INVALID_ARGUMENT if either buffer or tick_count are a null pointer; ERROR_NOT_ENOUGH_BUFFER_SPACE if the buffer space size or the tick count size are not = 15; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) An array of pointer for storing spectra.
buffer_row_size(Input) The buffer array size must be 15. This is the maximum value that can be return by this function.
buffer_column_size(Input) The data size of each element of the "buffer".
tick_count(Output) The timestamp of each spectra.
tick_count_size(Input) The "tick_count" array size must be 15. This is the maximum value that can be return by this function.
Returns
Returns the number of spectra read. It can be zero.

◆ odapi_get_rc_version_number()

DLL_DECL void odapi_get_rc_version_number ( unsigned int * candidate)

◆ odapi_get_scans_to_average()

DLL_DECL unsigned int odapi_get_scans_to_average ( long deviceID,
int * error_code )

Get the number of spectra to be averaged per returned spectrum. When this value has been set greater than 1 the specified number of spectra are averaged and the resulting average is returned by odapi_get_formatted_spectrum (or odapi_get_raw_spectrum_with_metadata).

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the number of scans to average as an unsigned short integer

◆ odapi_get_serial_number()

DLL_DECL int odapi_get_serial_number ( long deviceID,
int * error_code,
char * buffer,
int buffer_length )

This reads the device's serial number and fills the provided array (up to the given length) with it.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
buffer(Output) A pre-allocated array of characters that the serial number will be copied into
buffer_length(Input) The number of values to copy into the buffer (this should be no larger than the number of chars allocated in the buffer)
Returns
the number of bytes written into the buffer

◆ odapi_get_serial_number_maximum_length()

DLL_DECL unsigned char odapi_get_serial_number_maximum_length ( long deviceID,
int * error_code )

This reads the possible maximum length of the device's serial number

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the length of the serial number in an unsigned character byte

◆ odapi_get_stored_dark_spectrum()

DLL_DECL int odapi_get_stored_dark_spectrum ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_NO_DEVICE if the device does not exist.
darkSpectrumthe buffer that contains the dark spectrum to be retrieved.
darkSpectrumLengththe actual size of the dark buffer.
Returns
the size of the stored dark spectrum on success, zero otherwise.

◆ odapi_get_time()

DLL_DECL long long int odapi_get_time ( long deviceID,
int * error_code )

This reads the current system time from the device. Currently only FX device supports this. The time is returned as an integer representing the number of microseconds since January 1 1970 based on the current device system clock.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
Returns
the time since 1 January 1970 in microseconds.

◆ odapi_get_transition_pixel_range()

DLL_DECL int odapi_get_transition_pixel_range ( long deviceID,
int * error_code,
int * range,
int rangeSize )

Read the transition pixel range from the sensor pixel array.

Parameters
[in]deviceIDthe device ID for the device to be configured (from OceanDirect::findDevices())
[out]errorCodeset to 0 if successful, an OceanDirect error code (nonzero) otherwise ERROR_NO_DEVICE if deviceID is not a valid and open deviceID ERROR_FEATURE_NOT_FOUND if device does not support this feature ERROR_TRANSFER_ERROR if data transfer to/from device fails
[out]rangeThe output buffer for transition pixel range indices.
[in]rangeSizeThe output buffer size.
Returns
Number of elements copied into the output buffer.

◆ odapi_get_trigger_mode()

DLL_DECL int odapi_get_trigger_mode ( long deviceID,
int * error_code )

This function gets the trigger mode for the specified device. Note that requesting an unsupported mode will result in an error.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist. ERROR_NO_DEVICE if the device does not exist. ERROR_COMMAND_NOT_SUPPORTED device don't support this command.
Returns
the trigger mode (0 = normal, 1 = software, 2 = synchronization, 3 = external hardware, etc - check your particular spectrometer's Data Sheet)

◆ odapi_get_user_string()

DLL_DECL int odapi_get_user_string ( long deviceID,
int * error_code,
char * buffer,
int buffer_length )

Read the user string from the device. If this field in the device is not yet populated then a non-zero(6) code will be returned.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe output buffer containing user string.
buffer_lengthThe buffer size should be at least 16.
Returns
The user string lengnth.

◆ odapi_get_user_string1()

DLL_DECL int odapi_get_user_string1 ( long deviceID,
int * error_code,
int index,
char * buffer,
int buffer_length )

Read the user string from the device. The maximum string length is 16. If this field in the device is not yet populated then a non-zero(6) code will be returned. If the device don't support this command then a non-zero error code will be returned.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
indexThe user string index.
bufferThe output buffer for user string.
buffer_lengthThe maximum buffer size is 16.

◆ odapi_get_user_string_count1()

DLL_DECL int odapi_get_user_string_count1 ( long deviceID,
int * error_code )

Read the total user string count from the device. If the device don't support this command then a non-zero error code will be returned.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
Returns
The total user string count.

◆ odapi_get_wavelength_coeffs()

DLL_DECL int odapi_get_wavelength_coeffs ( long deviceID,
int * error_code,
double * coeff,
int length )

Return wavelengths coefficients stored in the device.

Parameters
deviceID(Input) The index of a device previously opened with open_spectrometer().
error_code(Ouput) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
coeff(Output) A pre-allocated array of doubles that the coefficients will be copied into
length(Input) The number of values to copy into the coefficients array (this should be no larger than the number of doubles allocated in the coefficients array)
Returns
the number of coefficients copied to the output buffer.

◆ odapi_get_wavelengths()

DLL_DECL int odapi_get_wavelengths ( long deviceID,
int * error_code,
double * wavelengths,
int length )

This computes the wavelengths for the spectrometer and fills in the provided array (up to the given length) with those values.

Parameters
deviceID(Input) The index of a device previously opened with open_spectrometer().
error_code(Ouput) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
wavelengths(Output) A pre-allocated array of doubles that the wavelengths will be copied into
length(Input) The number of values to copy into the wavelength array (this should be no larger than the number of doubles allocated in the wavelengths array)
Returns
the number of wavelengths written into the wavelength buffer

◆ odapi_initialize()

DLL_DECL void odapi_initialize ( )

This should be called prior to any other odapi_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.

◆ odapi_is_feature_enabled()

DLL_DECL bool odapi_is_feature_enabled ( long deviceID,
int * errorCode,
enum FeatureId featureID )

This function checks if a feature is enabled for a specified device.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.
featureID(Input) One of the feature enum constants.
Returns
true if the feature is enabled for the specified device, false otherwise.

◆ odapi_nonlinearity_correct_spectrum1()

DLL_DECL int odapi_nonlinearity_correct_spectrum1 ( long deviceID,
int * errorCode,
double * illuminatedSpectrum,
int illuminatedSpectrumLength,
double * nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found.
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 corrected buffer.
Returns
the size of the returned corrected spectrum on success, zero otherwise.

◆ odapi_nonlinearity_correct_spectrum2()

DLL_DECL int odapi_nonlinearity_correct_spectrum2 ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength,
double * illuminatedSpectrum,
int illuminatedSpectrumLength,
double * nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success;
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 corrected buffer.
Returns
the size of the returned corrected spectrum on success, zero otherwise.

◆ odapi_open_device()

DLL_DECL void odapi_open_device ( long id,
int * error_code )

This function opens a device attached to the system. The device must be provided as a location ID from the odapi_get_device_ids() function. Such locations can either be specified or probed using the other methods in this interface. After the device is closed the id becomes invalid. You need to call either odapi_probe_devices()/odapi_add_network_devices()/odapi_detect_network_devices() and odapi_get_device_ids() 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
idThe location ID of a device to try to open. Only IDs that have been returned by a previous call to oceandirect_get_device_ids() are valid.
error_codeA pointer to an integer that can be used for storing error codes: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist.

◆ odapi_probe_devices()

DLL_DECL int odapi_probe_devices ( )

This causes a search for known devices on all buses that support autodetection. This does NOT automatically open any device – that must still be done with the odapi_open_device() function. Note that this should only be done by one thread at a time, and it is recommended that other threads avoid calling odapi_get_number_of_device_ids() or odapi_get_device_ids() while this is executing. Ideally, a single thread should be designated for all device discovery/get actions, and separate worker threads can be used for each device discovered.

Returns
the total number of devices that have been found automatically. If called repeatedly, this will always return the number of devices most recently found, even if they have been found or opened previously.

◆ odapi_set_acquisition_delay_microseconds()

DLL_DECL void odapi_set_acquisition_delay_microseconds ( long deviceID,
int * errorCode,
unsigned long delay_usec )

Set the acquisition delay in microseconds. This may also be referred to as the trigger delay. In any event, it is the time between some event (such as a request for data, or an external trigger pulse) and when data acquisition begins.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
delay_usec(Input) The new delay to use in microseconds

◆ odapi_set_bad_pixel_indices()

DLL_DECL void odapi_set_bad_pixel_indices ( long deviceID,
int * error_code,
int * badPixelsIndices,
int badPixelSize )

◆ odapi_set_boxcar_width()

DLL_DECL void odapi_set_boxcar_width ( long deviceID,
int * error_code,
unsigned short int boxcarWidth )

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 odapi_get_formatted_spectrum (or odapi_get_raw_spectrum_with_metadata). 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
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_INPUT_OUT_OF_BOUNDS an invalid value for boxcar width has been supplied; ERROR_NO_DEVICE if the device does not exist.
boxcarWidth(Input) The width of the boxcar smoothing function to be used. Values are typically 1 to 15.

◆ odapi_set_integration_time_micros()

DLL_DECL void odapi_set_integration_time_micros ( long deviceID,
int * error_code,
unsigned long integration_time_micros )

This function sets the integration time for the specified device. This function should not be responsible for performing stability scans. 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
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_INPUT_OUT_OF_BOUNDS if an invalid integration time is supplied; ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN if averaging is enabled and the specified integration time is below the minimum required for averaging (see odapi_get_minimum_averaging_integration_time_micros); ERROR_NO_DEVICE if the device does not exist.
integration_time_micros(Input) The new integration time in units of microseconds

◆ odapi_set_multicast_msg_response_read_delay()

DLL_DECL void odapi_set_multicast_msg_response_read_delay ( unsigned int delayMs)

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

See also
odapi_detect_network_devices()
Parameters
delayMsThe delay in milliseconds before next read.

◆ odapi_set_multicast_msg_response_read_retry()

DLL_DECL void odapi_set_multicast_msg_response_read_retry ( unsigned int retryCount)

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

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

◆ odapi_set_multicast_msg_send_retry()

DLL_DECL void odapi_set_multicast_msg_send_retry ( unsigned int retryCount)

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

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

◆ odapi_set_scans_to_average()

DLL_DECL void odapi_set_scans_to_average ( long deviceID,
int * error_code,
unsigned int scansToAverage )

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 odapi_get_formatted_spectrum (or odapi_get_raw_spectrum_with_metadata).

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
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) A pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_INTEGRATION_TIME_BELOW_AVERAGING_MIN if the current integration time is below the minimum required for averaging it will not be possible to enable averaging (see odapi_get_minimum_averaging_integration_time_micros); ERROR_INPUT_OUT_OF_BOUNDS an invalid value for scans to average has been supplied; ERROR_NO_DEVICE if the device does not exist.
scansToAverage(Input) The number of spectrum scans used to generate a less noisy spectrum due to averaging
Returns
void

◆ odapi_set_stored_dark_spectrum()

DLL_DECL void odapi_set_stored_dark_spectrum ( long deviceID,
int * errorCode,
double * darkSpectrum,
int darkSpectrumLength )

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.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the spectrometer feature is not available; ERROR_NO_DEVICE if the device does not exist.
darkSpectrumthe buffer that contains the dark spectrum to be stored.
darkSpectrumLengththe actual size of the dark spectrum buffer.

◆ odapi_set_time()

DLL_DECL void odapi_set_time ( long deviceID,
int * error_code,
long long int time_in_microsecond )

This sets a new time to the device. Currently only FX device supports this. The time must be sepcified as the integer number of microseconds since 1 January 1970.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
time_in_microsecond(input) a time since 1 January 1970 in microseconds.

◆ odapi_set_trigger_mode()

DLL_DECL void odapi_set_trigger_mode ( long deviceID,
int * error_code,
int mode )

This function sets the trigger mode for the specified device. Note that requesting an unsupported mode will result in an error.

Parameters
deviceID(Input) The index of a device previously opened with odapi_open_device().
error_code(Output) pointer to an integer that can be used for storing error codes. This may be NULL in which case no error code is returned. The error codes returned by this function are: ERROR_SUCCESS on success; ERROR_FEATURE_NOT_FOUND if the feature does not exist; ERROR_TRANSFER_ERROR if a communication error occurred; ERROR_NO_DEVICE if the device does not exist.
mode(Input) a trigger mode (0 = normal, 1 = software, 2 = synchronization, 3 = external hardware, etc - check your particular spectrometer's Data Sheet)

◆ odapi_set_user_string()

DLL_DECL void odapi_set_user_string ( long deviceID,
int * error_code,
char * buffer,
int buffer_length )

Write the user string to the device. The maximum string length is 16.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
bufferThe buffer containing a user string.
buffer_lengthThe maximum buffer size is 16.

◆ odapi_set_user_string1()

DLL_DECL void odapi_set_user_string1 ( long deviceID,
int * error_code,
int index,
char * buffer,
int buffer_length )

Write the user string to the device. The maximum string length is 16. If the device don't support this command then a non-zero error code will be returned.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1.
indexThe user string index.
bufferThe new user string.
buffer_lengthThe maximum buffer size is 16.

◆ odapi_shutdown()

DLL_DECL void odapi_shutdown ( )

This may be called to free up any allocated memory being held by the driver interface. After this is called by any thread, odapi_initialize should be called again before any other odapi_ functions are used.