36 #ifndef SEABREEZE_WRAPPER_H 37 #define SEABREEZE_WRAPPER_H 39 #define SEABREEZE_API_VERSION "3.0.11" 40 #define SEABREEZE_MAX_DEVICES 32 64 static void shutdown();
67 int openSpectrometer (
int index,
int *errorCode);
68 int closeSpectrometer (
int index,
int *errorCode);
71 int getModel (
int index,
int *errorCode,
char *buf,
int len);
72 int getSerialNumber (
int index,
int *errorCode,
char *buf,
int len);
75 void setIntegrationTimeMicrosec(
int index,
int *errorCode,
unsigned long integration_time_micros);
76 int getWavelengths (
int index,
int *errorCode,
double *wavelengths,
int length);
77 int getFormattedSpectrum (
int index,
int *errorCode,
double* buffer,
int buffer_length);
78 int getUnformattedSpectrum (
int index,
int *errorCode,
unsigned char *buffer,
int buffer_length);
79 int getFormattedSpectrumLength(
int index,
int *errorCode);
80 int getUnformattedSpectrumLength(
int index,
int *errorCode);
81 long getMinIntegrationTimeMicrosec(
int index,
int *errorCode);
82 long getMaxIntegrationTimeMicrosec(
int index,
int *errorCode);
83 int getMaximumIntensity(
int index,
int *errorCode);
86 int getElectricDarkPixelIndices(
int index,
int *errorCode,
int *indices,
int length);
87 void setTriggerMode (
int index,
int *errorCode,
int mode);
88 void setStrobeEnable (
int index,
int *errorCode,
unsigned char strobe_enable);
89 void setShutterOpen (
int index,
int *errorCode,
unsigned char opened);
90 void setContinuousStrobePeriodMicrosec(
int index,
int *errorCode,
unsigned short strobe_id,
unsigned long period_usec);
91 void setAcquisitionDelayMicrosec(
int index,
int *errorCode,
unsigned long delay_usec);
94 void clearBuffer (
int index,
int *errorCode);
95 unsigned long getBufferElementCount(
int index,
int *errorCode);
96 unsigned long getBufferCapacity (
int index,
int *errorCode);
97 unsigned long getBufferCapacityMaximum(
int index,
int *errorCode);
98 unsigned long getBufferCapacityMinimum(
int index,
int *errorCode);
99 void setBufferCapacity (
int index,
int *errorCode,
unsigned long capacity);
102 int readEEPROMSlot (
int index,
int *errorCode,
int slot_number,
unsigned char *buffer,
int buffer_length);
103 int writeEEPROMSlot (
int index,
int *errorCode,
int slot_number,
unsigned char *buffer,
int buffer_length);
106 int readIrradCalibration (
int index,
int *errorCode,
float *buffer,
int buffer_length);
107 int writeIrradCalibration (
int index,
int *errorCode,
float *buffer,
int buffer_length);
108 int hasIrradCollectionArea (
int index,
int *errorCode);
109 float readIrradCollectionArea (
int index,
int *errorCode);
110 void writeIrradCollectionArea (
int index,
int *errorCode,
float area);
113 double readTECTemperature (
int index,
int *errorCode);
114 void setTECTemperature (
int index,
int *errorCode,
double temperature_degrees_celsius);
115 void setTECEnable (
int index,
int *errorCode,
unsigned char tec_enable);
116 void setTECFanEnable (
int index,
int *errorCode,
unsigned char tec_fan_enable);
119 void setVerbose (
bool flag);
120 void setLogfile (
char *path,
int length);
121 int getAPIVersionString (
char *buffer,
int length);
122 int getErrorString (
int errorCode,
char *buffer,
int buffer_length);
125 int writeUSB (
int index,
int *errorCode,
unsigned char endpoint,
unsigned char *buffer,
unsigned int length);
126 int readUSB (
int index,
int *errorCode,
unsigned char endpoint,
unsigned char *buffer,
unsigned int length);
127 int getUSBDescriptorString (
int index,
int *errorCode,
int id,
unsigned char *buffer,
int length);
130 int getLightSourceCount (
int index,
int *errorCode);
131 void setLightSourceEnable (
int index,
int *errorCode,
int lightIndex,
unsigned char enable);
132 void setLightSourceIntensity (
int index,
int *errorCode,
int lightIndex,
double intensity);
262 unsigned long integration_time_micros);
339 int light_index,
unsigned char enable);
364 int light_index,
double intensity);
488 double temperature_degrees_celsius);
533 unsigned char *buffer,
int buffer_length);
554 double* buffer,
int buffer_length);
632 int *indices,
int length);
717 seabreeze_write_usb(
int index,
int *errorCode,
unsigned char endpoint,
unsigned char* buffer,
unsigned int length);
742 seabreeze_read_usb(
int index,
int *errorCode,
unsigned char endpoint,
unsigned char* buffer,
unsigned int length);
779 unsigned short strobe_id,
unsigned long period_usec);
789 int *errorCode,
unsigned long delay_usec);
805 DLL_DECL
unsigned long 814 DLL_DECL
unsigned long 823 DLL_DECL
unsigned long 832 DLL_DECL
unsigned long DLL_DECL int seabreeze_get_unformatted_spectrum_length(int index, int *error_code)
This returns an integer denoting the length of a raw spectrum (as returned by get_unformatted_spectru...
DLL_DECL int seabreeze_get_serial_number(int index, 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...
DLL_DECL unsigned long seabreeze_get_buffer_capacity(int index, int *error_code)
Get the currently configured size of the data buffer (if equipped)
DLL_DECL void seabreeze_set_tec_enable(int index, int *error_code, unsigned char tec_enable)
This function enables the TEC feature on the spectrometer.
DLL_DECL int seabreeze_get_formatted_spectrum(int index, 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.
DLL_DECL int seabreeze_write_irrad_calibration(int index, int *error_code, float *buffer, int buffer_length)
This function writes an irradiance calibration to the spectrometer's internal memory if that feature ...
DLL_DECL int seabreeze_open_spectrometer(int index, int *error_code)
This function opens a device attached to the system.
DLL_DECL void seabreeze_set_strobe_enable(int index, int *error_code, unsigned char strobe_enable)
This function sets the strobe enable on the spectrometer. Note that this refers to a particular set o...
DLL_DECL void seabreeze_set_shutter_open(int index, int *error_code, unsigned char opened)
This function sets the shutter state on the spectrometer.
DLL_DECL unsigned long seabreeze_get_buffer_element_count(int index, int *error_code)
Get the number of spectra presently in the buffer (if equipped)
DLL_DECL int seabreeze_get_usb_descriptor_string(int index, int *errorCode, int id, unsigned char *buffer, int len)
Get a USB descriptor string by number.
Definition: SeaBreezeWrapper.h:57
DLL_DECL unsigned long seabreeze_get_buffer_capacity_minimum(int index, int *error_code)
Get the minimum possible configurable size for the data buffer (if equipped)
DLL_DECL void seabreeze_write_irrad_collection_area(int index, int *error_code, float area)
This function writes an irradiance collection area to the spectrometer's internal memory if that feat...
DLL_DECL void seabreeze_shutdown()
Shutdown SeaBreeze completely, releasing all resources and destroying any cached device handles...
DLL_DECL void seabreeze_set_acquisition_delay_microsec(int index, int *errorCode, unsigned long delay_usec)
Set the acquisition delay (trigger delay) in microseconds. This controls the amount of time between a...
DLL_DECL void seabreeze_set_continuous_strobe_period_microsec(int index, int *errorCode, unsigned short strobe_id, unsigned long period_usec)
Set the continuous strobe period in microseconds.
DLL_DECL int seabreeze_write_eeprom_slot(int index, int *error_code, int slot_number, unsigned char *buffer, int buffer_length)
This function writes a string to a spectrometer's EEPROM slot.
DLL_DECL void seabreeze_clear_buffer(int index, int *error_code)
Clear the spectrum buffer (if equipped)
DLL_DECL int seabreeze_get_unformatted_spectrum(int index, int *error_code, unsigned char *buffer, int buffer_length)
This acquires a spectrum and returns the answer in raw, unformatted bytes.
DLL_DECL void seabreeze_set_integration_time_microsec(int index, int *error_code, unsigned long integration_time_micros)
This function sets the integration time for the specified device.
DLL_DECL int seabreeze_get_light_source_count(int index, int *error_code)
This function gets the number of attached light sources that can be programmatically controlled...
DLL_DECL double seabreeze_read_tec_temperature(int index, int *error_code)
This function reads the value of the TEC and returns the value in degrees celsius.
DLL_DECL int seabreeze_get_model(int index, int *error_code, char *buffer, int buffer_length)
This function returns a string denoting the type of the device.
DLL_DECL int seabreeze_get_error_string(int error_code, char *buffer, int buffer_length)
This function returns a description of the error denoted by error_code.
DLL_DECL void seabreeze_set_light_source_intensity(int index, int *error_code, int light_index, double intensity)
This function sets the intensity of a connected light source.
DLL_DECL void seabreeze_set_verbose(int flag)
Programmatically enable debug outputs to stderr.
DLL_DECL float seabreeze_read_irrad_collection_area(int index, int *error_code)
This function reads an irradiance collection area from the spectrometer's internal memory if that fea...
DLL_DECL int seabreeze_read_usb(int index, int *errorCode, unsigned char endpoint, unsigned char *buffer, unsigned int length)
Read a raw array of bytes from a USB spectrometer.
DLL_DECL void seabreeze_set_light_source_enable(int index, int *error_code, int light_index, unsigned char enable)
This function sets the enable status on a connected light source.
DLL_DECL void seabreeze_set_trigger_mode(int index, int *error_code, int mode)
This function sets the trigger mode for the specified device.
DLL_DECL int seabreeze_read_eeprom_slot(int index, int *error_code, int slot_number, unsigned char *buffer, int buffer_length)
This function reads a string out of the spectrometer's EEPROM slot and returns the result...
DLL_DECL unsigned long seabreeze_get_buffer_capacity_maximum(int index, int *error_code)
Get the maximum possible configurable size for the data buffer (if equipped)
DLL_DECL void seabreeze_set_buffer_capacity(int index, int *error_code, unsigned long capacity)
Set the number of spectra that the buffer should keep.
DLL_DECL int seabreeze_get_wavelengths(int index, int *error_code, double *wavelengths, int length)
This computes the wavelengths for the spectrometer and fills in the provided array (up to the given l...
#define SEABREEZE_MAX_DEVICES
how many different spectrometer types we support
Definition: SeaBreezeWrapper.h:40
DLL_DECL int seabreeze_has_irrad_collection_area(int index, int *error_code)
This function checks for an irradiance collection area in the spectrometer's internal memory if that ...
DLL_DECL int seabreeze_get_electric_dark_pixel_indices(int index, 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 ele...
DLL_DECL int seabreeze_get_formatted_spectrum_length(int index, int *error_code)
This returns an integer denoting the number of pixels in a formatted spectrum (as returned by get_for...
Encapsulates all SeaBreeze classes.
Definition: DeviceFactory.h:42
DLL_DECL int seabreeze_write_usb(int index, int *errorCode, unsigned char endpoint, unsigned char *buffer, unsigned int length)
Write a raw array of bytes to a USB spectrometer.
DLL_DECL int seabreeze_close_spectrometer(int index, int *error_code)
This function closes the spectrometer attached to the system.
DLL_DECL int seabreeze_get_api_version_string(char *buffer, int len)
Get the SeaBreeze library's internal version identifier.
DLL_DECL void seabreeze_set_tec_temperature(int index, int *error_code, double temperature_degrees_celsius)
This function sets the TEC temperature.
DLL_DECL void seabreeze_set_tec_fan_enable(int index, int *error_code, unsigned char tec_fan_enable)
This function enables the TEC Fan on the spectrometer.
DLL_DECL void seabreeze_set_logfile(char *pathname, int len)
redirect verbose logging to named file
DLL_DECL int seabreeze_read_irrad_calibration(int index, int *error_code, float *buffer, int buffer_length)
This function reads out an irradiance calibration from the spectrometer's internal memory if that fea...
DLL_DECL long seabreeze_get_min_integration_time_microsec(int index, int *error_code)
This function returns the smallest integration time setting, in microseconds, that is valid for the s...