OceanDirectLighthouseC++ 3.1.3
OceanDirect Lighthouse C++/C API
|
#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 () |
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.
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.
ipAddressStr | The ip address as string (ex: "10.20.30.100" ) of the device to be opened. |
deviceTypeStr | The device type could be OceanFX or OceanHDX. This is case sensitive. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; |
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.
deviceTypeName | The name of a type of device. This can be one of the following: QE-PRO, STS. |
deviceBusPath | The 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. |
baud | Baud rate at which to open the device. This should be specified as the rate itself, e.g. 9600, 57600, or 115200. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_CODE_INVALID_ARGUMENT if the device cannot be created. |
DLL_DECL void odapi_adv_abort_acquisition | ( | long | deviceID, |
int * | error_code ) |
Abort spectra acquisition.
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. |
DLL_DECL void odapi_adv_acquire_spectra_to_buffer | ( | long | deviceID, |
int * | error_code ) |
Starts acquiring spectra and put them into device memory.
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. |
DLL_DECL void odapi_adv_clear_data_buffer | ( | long | deviceID, |
int * | error_code ) |
Clear the data buffer.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The ethernet interface to look at. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The ethernet interface to look at. |
macAddress | The output buffer for mac address. |
macAddressLength | The buffer length must be at least 6-bytes long. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The ethernet interface to look at. |
enable | True will enable gigabit ethernet. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The ethernet interface to look at. |
macAddress | The new mac address. |
macAddressLength | The mac address length must be 6-bytes long. |
DLL_DECL int odapi_adv_get_autonull_baseline_level | ( | long | deviceID, |
int * | error_code ) |
Read the baseline level.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceId | the device ID for the device to be configured. |
errorCode | 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; |
minDAC | minimum offset DAC value. |
maxDAC | maximum offset DAC value. |
minVolts | minimum offset volt value. |
maxVolts | maximum offset volt value. |
DLL_DECL int odapi_adv_get_autonull_fpga_digital_gain | ( | long | deviceID, |
int * | error_code ) |
Read the FPGA digital gain.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL int odapi_adv_get_autonull_fpga_digital_offset | ( | long | deviceID, |
int * | error_code ) |
Read the FPGA digital offset.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL int odapi_adv_get_autonull_maximum_adc_count | ( | long | deviceID, |
int * | error_code ) |
Read the maximum ADC counts.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL int odapi_adv_get_autonull_saturation_level | ( | long | deviceID, |
int * | error_code ) |
Read the saturation level. Most devices returns 65535.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceId | the device ID for the device to be configured. |
errorCode | 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; |
minDAC | minimum saturation DAC value. |
maxDAC | maximum saturation DAC value. |
minVolts | minimum saturation volt value. |
maxVolts | maximum saturation volt value. |
DLL_DECL int odapi_adv_get_baud_rate | ( | long | deviceID, |
int * | error_code ) |
Read the device RS-232 baud rate.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
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. |
This function gets the continuous strobe state on the device whether its enabled or not.
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. |
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.
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. |
This function gets the continuous strobe increment on the device.
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. |
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.
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. |
This function gets the maximum continuous strobe period on the device.
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. |
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.
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. |
This function gets the continuous strobe period on the device.
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. |
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.
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. |
This function gets the minimum continuous strobe period on the device.
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. |
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.
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. |
This function gets the continuous strobe width on the device.
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. |
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().
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. |
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.
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. |
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.
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. |
DLL_DECL bool odapi_adv_get_data_buffer_enable | ( | long | deviceID, |
int * | error_code ) |
Return true if data buffering is enabled.
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. |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer for the device alias. |
buffer_length | The minimum buffer size is 16. |
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).
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer for the manufacturer string. |
buffer_length | The minimum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer for the model string. |
buffer_length | The minimum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer containing a manufacturer string. |
buffer_length | The minimum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer for the model string. |
buffer_length | The minimum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL int odapi_adv_get_gpio_pin_count | ( | long | deviceID, |
int * | errorCode ) |
Return the number of GPIO pins.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
DLL_DECL unsigned char odapi_adv_get_ip_address_assigned_mode | ( | long | deviceID, |
int * | errorCode ) |
Read the IP address mode from the OBP2 device.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
DLL_DECL bool odapi_adv_get_lamp_enable | ( | long | deviceID, |
int * | error_code ) |
This function returns the strobe enable state of the spectrometer.
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. |
DLL_DECL bool odapi_adv_get_led_enable | ( | long | deviceID, |
int * | error_code ) |
This function gets the exterior LED state on the device.
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. |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on 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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on 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. |
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.
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 |
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.
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. |
index | The nonlinearity coefficient index. |
return | The nonlinearity coefficient. |
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.
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. |
return | The nonlinearity coefficient counts. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
DLL_DECL bool odapi_adv_get_shutter_state | ( | long | deviceID, |
int * | error_code ) |
This function returns the shutter state of the spectrometer.
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. |
DLL_DECL unsigned long odapi_adv_get_single_strobe_cycle_maximum | ( | long | deviceID, |
int * | error_code ) |
Return the single strobe cycle maximum.
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. |
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.
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. |
DLL_DECL unsigned long odapi_adv_get_single_strobe_delay_increment | ( | long | deviceID, |
int * | error_code ) |
This function gets the single strobe delay increment.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
DLL_DECL unsigned long odapi_adv_get_single_strobe_width_increment | ( | long | deviceID, |
int * | error_code ) |
Return the single strobe width increment.
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. |
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.
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. |
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.
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. |
DLL_DECL int odapi_adv_get_trigger_mode | ( | long | deviceID, |
int * | error_code ) |
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) |
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.
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | Which GPIO bit or pin to query. |
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.
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
DLL_DECL bool odapi_adv_gpio_get_output_enable1 | ( | long | deviceID, |
int * | errorCode, | ||
int | bit ) |
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to query. |
DLL_DECL uint32_t odapi_adv_gpio_get_output_enable2 | ( | long | deviceID, |
int * | errorCode ) |
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
DLL_DECL bool odapi_adv_gpio_get_value1 | ( | long | deviceID, |
int * | errorCode, | ||
int | bit ) |
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to query. |
DLL_DECL uint32_t odapi_adv_gpio_get_value2 | ( | long | deviceID, |
int * | errorCode ) |
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
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.
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | Which GPIO bit or pin to set |
isAlternate | set true to enable the alternate functionality for the pin, false otherwise (pin is a GPIO pin). |
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.
deviceID | The ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitMask | with bit set to 1 to set enable the alternate functionality, 0 otherwise (pin is a GPIO pin). |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to set. |
isOutput | set to true to make the pin output, false to make the pin input. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitmask | a bitmask specifying the pin directions i.e. the nth bit set to 1 sets the nth pin to output. |
DLL_DECL void odapi_adv_gpio_set_value1 | ( | long | deviceID, |
int * | errorCode, | ||
int | bit, | ||
bool | isHigh ) |
Set the logic value for a spcified pin.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bit | the GPIO pin to set. |
isHigh | set true to set the logic level high, set false to set the logic level low. |
DLL_DECL void odapi_adv_gpio_set_value2 | ( | long | deviceID, |
int * | errorCode, | ||
uint32_t | bitmask ) |
Set the logic value for all GPIO pins.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
bitmask | the bitmask specifying the logic level of each GPIO pin. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
ipAddress | the static IP address to be added. |
netmask | the netmask specifying the subnet of the network the device is on. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
addressIndex | the index of the address to be deleted. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
outIpAddress | contains the default gateway IP address. |
ipAddressLength | the ip address buffer length. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
addressIndex | the index of the address to be retrieved. |
ipAddress | a pointer to the array that will receive the IP address. |
ipAddressLength | the size of the array ipAddress. |
netmask | a pointer to the netmask specifying the subnet of the network the device is on. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
ipAddress | the default gateway IP address to be added. |
ipAddressLength | the ip address length. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
enabled | a value of 0 turns the DHCP client off, a value greater than 0 turns the DHCP client on. |
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.
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 |
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).
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 |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The interface to look at. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The interface to look at. |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The interface to save to. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on exit this contains zero on success, nonzero otherwise. |
interfaceIndex | The interface to look at. |
enable | True will enable the interface. False will disable it. |
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.
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. |
DLL_DECL void odapi_adv_reset_device | ( | long | deviceID, |
int * | error_code ) |
Restarts the device.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL void odapi_adv_save_settings_to_flash | ( | long | deviceID, |
int * | error_code ) |
Save settings to flash.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
baudRate | The new port baud rate. |
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.
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. |
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.
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 |
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.
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 |
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()".
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(). |
DLL_DECL void odapi_adv_set_data_buffer_enable | ( | long | deviceID, |
int * | error_code, | ||
unsigned char | flag ) |
Enable or disable data buffering.
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. |
flag | True enable the buffer. False disable the buffer |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The new model string. |
buffer_length | The maximum buffer size is 16. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The new manufacturer string. |
buffer_length | The maximum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The new model string. |
buffer_length | The maximum buffer size is 24. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
int | The new PID for the device. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
int | The new VID for the device. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on 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. |
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.
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. |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | on 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. |
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()".
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. |
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.
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. |
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.
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. |
microseconds | The delay, in microseconds, that the single strobe should wait before the pulse begins. |
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.
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 | Whether to enable the single strobe function |
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.
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. |
microseconds | The duration, in microseconds, of the single strobe pulse after the rising edge occurs. Once this duration elapses, a falling edge will be generated. |
DLL_DECL void odapi_adv_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.
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) |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
DLL_DECL void odapi_apply_electric_dark_correction_usage | ( | long | deviceID, |
int * | error_code, | ||
unsigned char | enable ) |
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | A 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. |
enable | True(1) enable electric dark correction otherwise it's false(0). |
DLL_DECL void odapi_apply_nonlinearity_correct_usage | ( | long | deviceID, |
int * | error_code, | ||
bool | use ) |
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. |
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.
[in] | deviceID | The identifier of the device as returned by getDeviceIDs. |
[out] | errorCode | Set 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] | boxcarWidth | The boxcar width. |
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.
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. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found. |
illuminatedSpectrum | the buffer that contains the illuminated spectrum to be corrected. |
illuminatedSpectrumLength | the actual size of the illuminated spectrum buffer. |
darkCorrectedSpectrum | the buffer that will receive the dark corrected spectrum. |
darkCorrectedSpectrumLength | the actual size of the dark corrected buffer. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; |
darkSpectrum | the buffer that contains the dark spectrum to be used for the dark correction. |
darkSpectrumLength | the actual size of the dark spectrum buffer. |
illuminatedSpectrum | the buffer that contains the illuminated spectrum to be corrected. |
illuminatedSpectrumLength | the actual size of the illuminated spectrum buffer. |
darkCorrectedSpectrum | the buffer that will receive the dark corrected spectrum. |
darkCorrectedSpectrumLength | the actual size of the dark corrected buffer. |
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.
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.
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. |
DLL_DECL unsigned long odapi_get_acquisition_delay_maximum_microseconds | ( | long | deviceID, |
int * | errorCode ) |
Get the maximum allowed acquisition delay in microseconds.
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. |
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.
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. |
DLL_DECL unsigned long odapi_get_acquisition_delay_minimum_microseconds | ( | long | deviceID, |
int * | errorCode ) |
Get the minimum allowed acquisition delay in microseconds.
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. |
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.
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set 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] | range | The output buffer for active pixel range indices. |
[in] | rangeSize | The output buffer size. |
DLL_DECL double odapi_get_api_version | ( | ) |
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)
major | the major software version number. |
minor | the minor software version number. |
point | the point software version number. |
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.
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set 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] | badPixelIndices | The output buffer for bad pixel indices. |
[in] | badPixelIndices | The output buffer size. |
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.
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. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
darkSpectrum | the buffer that contains the dark spectrum to be used for the dark correction. |
darkSpectrumLength | the actual size of the dark spectrum buffer. |
darkCorrectedSpectrum | the buffer that will receive the dark corrected spectrum. |
darkCorrectedSpectrumLength | the actual size of the dark correction buffer. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
darkCorrectedSpectrum | the buffer that will receive the dark corrected spectrum. |
darkCorrectedSpectrumLength | the actual size of the dark correction buffer. |
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.
ids | an 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_ids | the maximum number of IDs that may be written to the array |
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.
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 |
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.
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 |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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. |
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.
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.
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. |
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.
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) |
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.
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). |
DLL_DECL int odapi_get_error_string_length | ( | int | error_code | ) |
Get the length of the error string associated with the specified error code.
error_code | the error code used to determine the length of the error string. |
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.
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 |
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(...)).
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. |
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.
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) |
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.
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. |
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.
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. |
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.
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. |
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.
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 |
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.
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. |
DLL_DECL double odapi_get_maximum_intensity | ( | long | deviceID, |
int * | error_code ) |
This function returns the maximum pixel intensity for the spectrometer.
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. |
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.
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. |
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.
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. |
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.
ids | an 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_ids | the maximum number of IDs that may be written to the array |
DLL_DECL bool odapi_get_nonlinearity_correct_usage | ( | long | deviceID, |
int * | error_code ) |
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. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
darkSpectrum | the buffer that contains the dark spectrum to be used for the dark correction. |
darkSpectrumLength | the actual size of the dark spectrum buffer. |
nonlinearityCorrectedSpectrum | the buffer that will receive the nonlinearity corrected spectrum. |
nonlinearityCorrectedSpectrumLength | the actual size of the nonlinearity correction buffer. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
nonlinearityCorrectedSpectrum | the buffer that will receive the nonlinearity corrected spectrum. |
nonlinearityCorrectedSpectrumLength | the actual size of the nonlinearity correction buffer. |
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.
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.
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set 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] | range | The output buffer for optical dark pixel range indices. |
[in] | rangeSize | The output buffer size. |
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.
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set 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 |
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()".
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. |
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 ) |
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).
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. |
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.
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) |
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
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. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
darkSpectrum | the buffer that contains the dark spectrum to be retrieved. |
darkSpectrumLength | the actual size of the dark buffer. |
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.
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. |
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.
[in] | deviceID | the device ID for the device to be configured (from OceanDirect::findDevices()) |
[out] | errorCode | set 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] | range | The output buffer for transition pixel range indices. |
[in] | rangeSize | The output buffer size. |
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.
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. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The output buffer containing user string. |
buffer_length | The buffer size should be at least 16. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
index | The user string index. |
buffer | The output buffer for user string. |
buffer_length | The maximum buffer size is 16. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
DLL_DECL int odapi_get_wavelength_coeffs | ( | long | deviceID, |
int * | error_code, | ||
double * | coeff, | ||
int | length ) |
Return wavelengths coefficients stored in the device.
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) |
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.
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) |
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.
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.
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. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_VALUE_NOT_FOUND no stored dark spectrum was found. |
illuminatedSpectrum | the buffer that contains the illuminated spectrum to be corrected. |
illuminatedSpectrumLength | the actual size of the illuminated spectrum buffer. |
nonlinearityCorrectedSpectrum | the buffer that will receive the nonlinearity corrected spectrum. |
nonlinearityCorrectedSpectrumLength | the actual size of the nonlinearity corrected buffer. |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; |
darkSpectrum | the buffer that contains the dark spectrum to be used prior to the nonlinearity correction. |
darkSpectrumLength | the actual size of the dark spectrum buffer. |
illuminatedSpectrum | the buffer that contains the illuminated spectrum to be corrected. |
illuminatedSpectrumLength | the actual size of the illuminated spectrum buffer. |
nonlinearityCorrectedSpectrum | the buffer that will receive the nonlinearity corrected spectrum. |
nonlinearityCorrectedSpectrumLength | the actual size of the nonlinearity corrected buffer. |
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.
id | The 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_code | A 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. |
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.
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.
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 |
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 ) |
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.
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. |
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.
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 |
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.
delayMs | The delay in milliseconds before next read. |
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.
retryCount | The number of times to try reading multicast response messages. |
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.
retryCount | The number of times to send messages. |
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).
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 |
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.
deviceID | the identifier of the device as returned by getDeviceIDs. |
errorCode | a 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. |
darkSpectrum | the buffer that contains the dark spectrum to be stored. |
darkSpectrumLength | the actual size of the dark spectrum buffer. |
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.
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. |
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.
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) |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
buffer | The buffer containing a user string. |
buffer_length | The maximum buffer size is 16. |
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.
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | 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. |
index | The user string index. |
buffer | The new user string. |
buffer_length | The maximum buffer size is 16. |
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.