29 #ifndef DEVICE_ADAPTER_H
30 #define DEVICE_ADAPTER_H
34 #include "api/OceanProcess.h"
35 #include "common/public/SpectrumWithMetadata.h"
36 #include "common/devices/Device.h"
42 class DeviceLocatorInterface;
46 class RawBusAccessFeatureAdapter;
47 class SerialNumberFeatureAdapter;
48 class SpectrometerFeatureAdapter;
49 class ThermoElectricCoolerFeatureAdapter;
50 class IrradCalFeatureAdapter;
51 class EEPROMFeatureAdapter;
52 class LightSourceFeatureAdapter;
53 class StrobeLampFeatureAdapter;
54 class ContinuousStrobeFeatureAdapter;
55 class SingleStrobeFeatureAdapter;
56 class GpioFeatureAdapter;
57 class NonlinearityCoeffsFeatureAdapter;
58 class TemperatureFeatureAdapter;
59 class RevisionFeatureAdapter;
60 class OpticalBenchFeatureAdapter;
61 class StrayLightCoeffsFeatureAdapter;
62 class PixelBinningFeatureAdapter;
63 class DataBufferFeatureAdapter;
64 class BackToBackFeatureAdapter;
65 class AcquisitionDelayFeatureAdapter;
66 class QueryStatusFeatureAdapter;
67 class LedActivityFeatureAdapter;
68 class TimeFeatureAdapter;
69 class AnalogInFeatureAdapter;
70 class AnalogOutFeatureAdapter;
71 class DHCPServerConfigurationFeatureAdapter;
72 class PixelFeatureAdapter;
73 class AutoNullingFeatureAdapter;
74 class UserStringFeatureAdapter;
75 class DeviceInformationFeatureAdapter;
76 class DeviceAliasFeatureAdapter;
77 class SerialPortFeatureAdapter;
78 class Ipv4AddressFeatureAdapter;
79 class SpectrumAcquisitionControlFeatureAdapter;
86 int open(
int *errorCode);
89 DeviceLocatorInterface *getLocation();
93 std::string spectrometerSerialNumber;
94 std::string spectrometerType;
95 bool initialized =
false;
100 int firstActivePixel = 0;
101 int lastActivePixel = 0;
102 double maximumIntensity = 65535.0;
103 unsigned long currentIntegrationTime = 0;
104 unsigned long minIntegrationTime = 1000;
105 unsigned long maxIntegrationTime = 60000;
106 std::vector<int> elecDarkLoc;
108 std::vector<int> electricDarkPixelIndices;
110 std::vector<double> nonlinCoeffs;
112 std::vector<double> wavelengths;
113 std::vector<double> irradCalFile;
114 double irradCalCollectionArea = 1.0;
116 int smoothFactor = 0;
117 bool stabilityScanNeeded =
false;
121 unsigned long getID();
126 int getDeviceType(
int *errorCode,
char *buffer,
unsigned int maxLength);
130 unsigned char getDeviceEndpoint(
int *errorCode, usbEndpointType anEndpointType);
133 int checkArrayForSaturation(std::vector<double> arrayToCheck,
int *errorCode);
136 int getDeviceConfiguration(
int *errorCode);
137 int GetDeviceConfigNumPixels();
138 const std::vector<int>& GetDeviceConfigElecDarkPixels();
139 int ApplyDeviceConfigElecDarkPixels(
int *errorCode,
double *sample,
int sampleSize);
140 const std::vector<double>& GetDeviceConfigNonlinearityCoeffs();
141 int ApplyDeviceConfigNonlinearityCoeffs(
int *errorCode,
double *sample,
int sampleSize);
142 void ApplyDeviceConfigBoxcarWidth(
int* errorCode,
double* sample,
int sampleSize);
143 std::vector<double> GetDeviceConfigWavelengths();
144 std::vector<double> GetDeviceConfigIrradCalFile();
145 double GetDeviceConfigIrradCollectionArea();
148 int GetDeviceConfigSmoothFactor();
149 unsigned long GetDeviceConfigMinIntegrationTime();
150 unsigned long GetDeviceConfigMaxIntegrationTime();
153 int getNumberOfRawBusAccessFeatures();
154 int getRawBusAccessFeatures(
long *buffer,
int maxFeatures);
155 std::string getStringDescriptor(
long featureID,
int *errorCode,
int index);
156 int rawBusAccessRead(
long featureID,
int *errorCode,
unsigned char *buffer,
unsigned int bufferLength,
unsigned char endpoint);
157 int rawBusAccessWrite(
long featureID,
int *errorCode,
unsigned char *buffer,
unsigned int bufferLength,
unsigned char endpoint);
158 int rawBusAccessRead(
long featureID,
int *errorCode,
unsigned char *buffer,
unsigned int bufferLength);
159 int rawBusAccessWrite(
long featureID,
int *errorCode,
unsigned char *buffer,
unsigned int bufferLength);
162 int getNumberOfSerialNumberFeatures();
163 int getSerialNumberFeatures(
long *buffer,
int maxFeatures);
164 int getSerialNumber(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
165 void setSerialNumber(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
166 unsigned char getSerialNumberMaximumLength(
long featureID,
int *errorCode);
169 long long int getTime(
long featureID,
int *errorCode);
170 void setTime(
long featureID,
int *errorCode,
long long int timeInMicroseconds);
173 int getNumberOfSpectrometerFeatures();
174 int getSpectrometerFeatures(
long *buffer,
int maxFeatures);
175 void spectrometerSetTriggerMode(
long featureID,
int *errorCode,
int mode);
176 int spectrometerGetTriggerMode(
long featureID,
int *errorCode);
177 void spectrometerSetDelayMicroseconds(
long featureID,
int* errorCode,
unsigned long delayMicroseconds);
178 unsigned long spectrometerGetDelayMicroseconds(
long featureID,
int* errorCode);
179 unsigned long spectrometerGetDelayIncrementMicroseconds(
long featureID,
int* errorCode);
180 unsigned long spectrometerGetDelayMaximumMicroseconds(
long featureID,
int* errorCode);
181 unsigned long spectrometerGetDelayMinimumMicroseconds(
long featureID,
int* errorCode);
183 void spectrometerSetIntegrationTimeMicros(
long spectrometerFeatureID,
int *errorCode,
unsigned long integrationTimeMicros);
184 unsigned long spectrometerGetIntegrationTimeMicros(
long spectrometerFeatureID,
int *errorCode);
186 unsigned long spectrometerGetMinimumIntegrationTimeMicros(
long spectrometerFeatureID,
int *errorCode);
187 unsigned long spectrometerGetMinimumAveragingIntegrationTimeMicros(
long spectrometerFeatureID,
int* errorCode);
188 unsigned long spectrometerGetMaximumIntegrationTimeMicros(
long spectrometerFeatureID,
int *errorCode);
189 double spectrometerGetMaximumIntensity(
long spectrometerFeatureID,
int *errorCode);
190 int spectrometerGetUnformattedSpectrumLength(
long spectrometerFeatureID,
int *errorCode);
191 int spectrometerGetUnformattedSpectrum(
long spectrometerFeatureID,
int *errorCode,
unsigned char *buffer,
int bufferLength);
192 int spectrometerGetFormattedSpectrumLength(
long spectrometerFeatureID,
int *errorCode);
193 int spectrometerGetFormattedSpectrum(
long spectrometerFeatureID,
int *errorCode,
double *buffer,
int bufferLength);
194 int spectrometerGetFormattedSpectrumWithMetadata(
long spectrometerFeatureID,
int *errorCode, SpectrumWithMetadata *buffer,
int bufferLength,
bool apply_ec =
true);
196 void spectrometerSetStoredDarkSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength);
197 int spectrometerGetStoredDarkSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength);
198 int spectrometerGetDarkCorrectedSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength,
199 double* darkCorrectedSpectrum,
int darkCorrectedSpectrumLength);
200 int spectrometerDarkCorrectSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* illuminatedSpectrum,
int illuminatedSpectrumLength,
201 double* darkCorrectedSpectrum,
int darkCorrectedSpectrumLength);
202 int spectrometerGetDarkCorrectedSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkCorrectedSpectrum,
int darkCorrectedSpectrumLength);
203 int spectrometerDarkCorrectSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength,
double* illuminatedSpectrum,
204 int illuminatedSpectrumLength,
double* darkCorrectedSpectrum,
int darkCorrectedSpectrumLength);
206 int spectrometerGetNonlinearityCorrectedSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength,
207 double* nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength);
208 int spectrometerNonlinearityCorrectSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* illuminatedSpectrum,
209 int illuminatedSpectrumLength,
double* nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength);
210 int spectrometerGetNonlinearityCorrectedSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* nonlinearityCorrectedSpectrum,
211 int nonlinearityCorrectedSpectrumLength);
212 int spectrometerNonlinearityCorrectSpectrum(
long spectrometerFeatureID,
int* errorCode,
double* darkSpectrum,
int darkSpectrumLength,
double* illuminatedSpectrum,
213 int illuminatedSpectrumLength,
double* nonlinearityCorrectedSpectrum,
int nonlinearityCorrectedSpectrumLength);
215 int spectrometerGetWavelengths(
long spectrometerFeatureID,
int *errorCode,
double *wavelengths,
int length);
216 int spectrometerGetWavelengthCoefficients(
long spectrometerFeatureID,
int *errorCode,
double *coeff,
int length);
217 void spectrometerSetWavelengthCoefficients(
long spectrometerFeatureID,
int *errorCode,
double *coeff,
int length);
218 int spectrometerGetElectricDarkPixelCount(
long spectrometerFeatureID,
int *errorCode);
219 int spectrometerGetElectricDarkPixelIndices(
long spectrometerFeatureID,
int *errorCode,
int *indices,
int length);
220 unsigned short int spectrometerGetScansToAverage(
long spectrometerFeatureID,
int* errorCode);
221 unsigned short int spectrometerGetBoxcarWidth(
long spectrometerFeatureID,
int* errorCode);
222 void spectrometerSetBoxcarWidth(
long spectrometerFeatureID,
int* errorCode,
unsigned short int newBoxcarWidth);
223 void spectrometerSetScansToAverage(
long spectrometerFeatureID,
int* errorCode,
unsigned short int newScansToAverage);
226 int getNumberOfStatusFeatures();
227 int getStatusFeatures(
long *buffer,
int maxFeatures);
228 int statusReadStatus(
long statusFeatureId,
int *errorCode,
unsigned char *buffer,
int bufferLength);
229 unsigned long statusGetIntegrationTime(
long statusFeatureID,
int *errorCode);
232 int getNumberOfPixelBinningFeatures();
233 int getPixelBinningFeatures(
long *buffer,
int maxFeatures);
234 void binningSetPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode,
const unsigned char binningFactor);
235 unsigned char binningGetPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode);
236 void binningSetDefaultPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode,
const unsigned char binningFactor);
237 void binningSetDefaultPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode);
238 unsigned char binningGetDefaultPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode);
239 unsigned char binningGetMaxPixelBinningFactor(
long spectrometerFeatureID,
int *errorCode);
242 int getNumberOfThermoElectricFeatures();
243 int getThermoElectricFeatures(
long *buffer,
int maxFeatures);
244 double tecReadTemperatureDegreesC(
long featureID,
int *errorCode);
245 void tecSetTemperatureSetpointDegreesC(
long featureID,
int *errorCode,
double temperatureDegreesCelsius);
246 void tecSetEnable(
long featureID,
int *errorCode,
bool tecEnable);
247 bool tecGetEnable(
long featureID,
int *errorCode);
248 float tecGetSetpoint(
long featureID,
int *errorCode);
249 bool tecGetStable(
long featureID,
int *errorCode);
250 bool tecGetFanEnable(
long featureID,
int *errorCode);
251 void tecSetFanEnable(
long featureID,
int *errorCode,
bool enable);
254 int getNumberOfIrradCalFeatures();
255 int getIrradCalFeatures(
long *buffer,
int maxFeatures);
256 int irradCalibrationRead(
long featureID,
int *errorCode,
float *buffer,
int bufferLength);
257 int irradCalibrationSizeRead(
long featureID,
int *errorCode);
258 int irradCalibrationWrite(
long featureID,
int *errorCode,
float *buffer,
int bufferLength);
259 bool irradCalibrationHasCollectionArea(
long featureID,
int *errorCode);
260 float irradCalibrationReadCollectionArea(
long featureID,
int *errorCode);
261 void irradCalibrationWriteCollectionArea(
long featureID,
int *errorCode,
float area);
264 int getNumberOfEEPROMFeatures();
265 int getEEPROMFeatures(
long *buffer,
int maxFeatures);
266 int eepromReadSlot(
long featureID,
int *errorCode,
int slotNumber,
267 unsigned char *buffer,
int length);
270 int getNumberOfLightSourceFeatures();
271 int getLightSourceFeatures(
long *buffer,
int maxFeatures);
272 int lightSourceGetCount(
long featureID,
int *errorCode);
273 bool lightSourceHasEnable(
long featureID,
int *errorCode,
int lightSourceIndex);
274 bool lightSourceIsEnabled(
long featureID,
int *errorCode,
int lightSourceIndex);
275 void lightSourceSetEnable(
long featureID,
int *errorCode,
int lightSourceIndex,
bool enable);
276 bool lightSourceHasVariableIntensity(
long featureID,
int *errorCode,
int lightSourceIndex);
277 double lightSourceGetIntensity(
long featureID,
int *errorCode,
int lightSourceIndex);
278 void lightSourceSetIntensity(
long featureID,
int *errorCode,
int lightSourceIndex,
double intensity);
281 int getNumberOfStrobeLampFeatures();
282 int getStrobeLampFeatures(
long *buffer,
int maxFeatures);
283 void lampSetStrobeEnable(
long featureID,
int *errorCode,
bool strobeEnable);
284 bool lampGetStrobeEnable(
long featureID,
int *errorCode);
287 int getNumberOfContinuousStrobeFeatures();
288 int getContinuousStrobeFeatures(
long *buffer,
int maxFeatures);
289 unsigned long continuousStrobeGetPeriodMicroseconds(
long featureID,
int *errorCode);
290 bool continuousStrobeGetEnable(
long featureID,
int *errorCode);
291 unsigned long continuousStrobeGetPeriodMinimumMicroseconds(
long featureID,
int *errorCode);
292 unsigned long continuousStrobeGetPeriodMaximumMicroseconds(
long featureID,
int *errorCode);
293 unsigned long continuousStrobeGetPeriodIncrementMicroseconds(
long featureID,
int *errorCode);
294 unsigned long continuousStrobeGetWidthMicroseconds(
long featureID,
int *errorCode);
295 void continuousStrobeSetPeriodMicroseconds(
long featureID,
int *errorCode,
unsigned long period_usec);
296 void continuousStrobeSetEnable(
long featureID,
int *errorCode,
bool enable);
297 void continuousStrobeSetWidthMicroseconds(
long featureID,
int *errorCode,
unsigned long strobeWidthMicroseconds);
300 int getNumberOfGpioFeatures();
301 int getGpioFeatures(
long *buffer,
int maxFeatures);
302 int getGpioCount(
long featureID,
int *errorCode);
303 void gpioSetOutputEnable(
long featureID,
int *errorCode, std::uint32_t bitPosition,
bool isOutput);
304 void gpioSetOutputEnable(
long featureID,
int *errorCode, std::uint32_t bits, std::uint32_t bitmask);
305 bool gpioGetOutputEnable(
long featureID,
int *errorCode,
int bit);
306 uint32_t gpioGetOutputEnable(
long featureID,
int *errorCode);
307 void gpioSetValue(
long featureID,
int *errorCode, std::uint32_t bitPosition,
bool value);
308 void gpioSetValue(
long featureID,
int *errorCode, uint32_t bitmask);
309 void gpioSetValue(
long featureID,
int *errorCode, uint32_t bits, uint32_t bitmask);
310 bool gpioGetValue(
long featureID,
int *errorCode,
int bit);
311 uint32_t gpioGetValue(
long featureID,
int *errorCode);
312 void gpioSetOutputAlternate(
long featureID,
int *errorCode,
int bit,
bool isAlternate);
313 void gpioSetOutputAlternate(
long featureID,
int *errorCode, uint32_t bitMask);
314 bool gpioGetOutputAlternate(
long featureID,
int *errorCode,
int bit);
315 uint32_t gpioGetOutputAlternate(
long featureID,
int *errorCode);
318 int getNumberOfNonlinearityCoeffsFeatures();
319 int getNonlinearityCoeffsFeatures(
long *buffer,
int maxFeatures);
321 int getNonlinearityCoeffsCount(
long featureID,
int *errorCode);
322 double getNonlinearityCoeffs(
long featureID,
int *errorCode,
int index);
323 void setNonlinearityCoeffs(
long featureID,
int *errorCode,
int index,
double coefficient);
324 int nonlinearityCoeffsGet(
long featureID,
int *errorCode,
double *buffer,
int bufferLength);
325 int nonlinearityCoeffsSet(
long featureID,
int *errorCode,
double *buffer,
int bufferLength);
328 int getNumberOfTemperatureFeatures();
329 int getTemperatureFeatures(
long *buffer,
int maxFeatures);
330 int temperatureCountGet(
long temperatureFeatureID,
int *errorCode);
331 double temperatureGet(
long temperatureFeatureID,
int *errorCode,
int index);
332 double getTemperatureExtreme(
long temperatureFeatureID,
int *errorCode);
333 int getAllTemperatures(
long temperatureFeatureID,
int *errorCode,
double *buffer,
int max_length);
336 int getNumberOfRevisionFeatures();
337 int getRevisionFeatures(
long *buffer,
int maxFeatures);
338 int revisionHardwareGet(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
339 int revisionFirmwareGet(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
340 int revisionFPGAGet(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
343 int getNumberOfOpticalBenchFeatures();
344 int getOpticalBenchFeatures(
long *buffer,
int maxFeatures);
345 int opticalBenchGetArrayWavelength(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
346 unsigned short int opticalBenchGetSlitWidthMicrons(
long opticalBenchFeatureID,
int *errorCode);
347 void opticalBenchSetSlitWidthMicrons(
long opticalBenchFeatureID,
int *errorCode,
unsigned short int widthMicrons);
348 int opticalBenchGetSerialNumber(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
349 void opticalBenchSetSerialNumber(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
350 int opticalBenchGetId(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
351 void opticalBenchSetId(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
352 unsigned short int opticalBenchGetFiberDiameter(
long opticalBenchFeatureID,
int *errorCode);
353 void opticalBenchSetFiberDiameter(
long opticalBenchFeatureID,
int *errorCode,
unsigned short int diameterMicrons);
354 int opticalBenchGetCoating(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
355 void opticalBenchSetCoating(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
356 int opticalBenchGetFilter(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
357 void opticalBenchSetFilter(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
358 int opticalBenchGetGrating(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
359 void opticalBenchSetGrating(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
360 int opticalBenchLensInstalled(
long opticalBenchFeatureID,
int *errorCode,
char *buffer,
int bufferLength);
363 int getNumberOfStrayLightCoeffsFeatures();
364 int getStrayLightCoeffsFeatures(
long *buffer,
int maxFeatures);
365 int strayLightCoeffsGet(
long featureID,
int *errorCode,
double *buffer,
int bufferLength);
368 int getNumberOfDataBufferFeatures();
369 int getDataBufferFeatures(
long *buffer,
int maxFeatures);
370 void dataBufferClear(
long featureID,
int *errorCode);
371 unsigned long dataBufferGetNumberOfElements(
long featureID,
int *errorCode);
372 unsigned long dataBufferGetBufferCapacity(
long featureID,
int *errorCode);
373 unsigned long dataBufferGetBufferCapacityMaximum(
long featureID,
int *errorCode);
374 unsigned long dataBufferGetBufferCapacityMinimum(
long featureID,
int *errorCode);
375 void dataBufferSetBufferCapacity(
long featureID,
int *errorCode,
unsigned long capacity);
376 void dataBufferSetBufferEnabled(
long featureID,
int *errorCode,
bool enabled);
377 bool dataBufferGetBufferEnabled(
long featureID,
int *errorCode);
380 void abortAcquisition(
long featureID,
int *errorCode);
381 void acquireSpectraToBuffer(
long featureID,
int *errorCode);
382 bool getDeviceIdleState(
long featureID,
int *errorCode);
385 int getNumberOfBackToBackFeatures();
386 int getBackToBackFeatures(
long *buffer,
int maxFeatures);
387 unsigned long backToBackGetNumScans(
long featureID,
int *errorCode);
388 void backToBackSetNumScans(
long featureID,
int *errorCode,
unsigned long numScans);
391 int getNumberOfAcquisitionDelayFeatures();
392 int getAcquisitionDelayFeatures(
long *buffer,
int maxFeatures);
393 void acquisitionDelaySetDelayMicroseconds(
long featureID,
int *errorCode,
unsigned long delay_usec);
394 unsigned long acquisitionDelayGetDelayMicroseconds(
long featureID,
int *errorCode);
395 unsigned long acquisitionDelayGetDelayIncrementMicroseconds(
long featureID,
int *errorCode);
396 unsigned long acquisitionDelayGetDelayMaximumMicroseconds(
long featureID,
int *errorCode);
397 unsigned long acquisitionDelayGetDelayMinimumMicroseconds(
long featureID,
int *errorCode);
400 int getSingleStrobeFeatures(
long *buffer,
int maxFeatures);
401 void singleStrobeSetDelayMicroseconds(
long featureID,
int *errorCode,
unsigned long period_usec);
402 void singleStrobeSetWidthMicroseconds(
long featureID,
int *errorCode,
unsigned long period_usec);
403 void singleStrobeSetEnable(
long featureID,
int *errorCode,
bool enable);
404 unsigned long singleStrobeGetDelayMicroseconds(
long featureID,
int *errorCode);
405 unsigned long singleStrobeGetWidthMicroseconds(
long featureID,
int *errorCode);
406 bool singleStrobeGetEnable(
long featureID,
int *errorCode);
407 unsigned long getSingleStrobeDelayMinimumMicroseconds(
long featureID,
int *errorCode);
408 unsigned long getSingleStrobeDelayMaximumMicroseconds(
long featureID,
int *errorCode);
409 unsigned long getSingleStrobeWidthMinimumMicroseconds(
long featureID,
int *errorCode);
410 unsigned long getSingleStrobeWidthMaximumMicroseconds(
long featureID,
int *errorCode);
411 unsigned long getSingleStrobeCycleMaximumMicroseconds(
long featureID,
int *errorCode);
412 unsigned long getSingleStrobeDelayIncrementMicroseconds(
long featureID,
int *errorCode);
413 unsigned long getSingleStrobeWidthIncrementMicroseconds(
long featureID,
int *errorCode);
416 int getNumberOfActivityFeatures();
417 int getActivityFeatures(
long *buffer,
int maxFeatures);
418 bool ledActivityGetEnable(
long featureID,
int *errorCode);
419 void ledActivitySetEnable(
long featureID,
int *errorCode,
bool enable);
422 int getNumberOfAnalogInFeatures();
423 int getAnalogInFeatures(
long *buffer,
int maxFeatures);
424 int analogInGetNumberOfInputs(
long featureID,
int *errorCode);
425 double analogInGetMinimumVolts(
long featureID,
int *errorCode);
426 double analogInGetMaximumVolts(
long featureID,
int *errorCode);
427 double analogInGetVoltAtPin(
long featureID,
int *errorCode,
int pin);
428 void analogInSetAltPins(
long featureID,
int *errorCode,
int pinNumber,
int pinType);
431 int getNumberOfAnalogOutFeatures();
432 int getAnalogOutFeatures(
long *buffer,
int maxFeatures);
433 int analogOutGetNumberOfOutputs(
long featureID,
int *errorCode);
434 double analogOutGetMinimumVolts(
long featureID,
int *errorCode);
435 double analogOutGetMaximumVolts(
long featureID,
int *errorCode);
436 void analogOutSetAltPins(
long featureID,
int *errorCode,
int pinNumber,
int pinType);
437 void analogOutSetDCVoltsAtPin(
long featureID,
int *errorCode,
int pin,
double voltage);
440 int getDHCPServerFeatures(
long *buffer,
int maxFeatures);
441 bool isDHCPServerEnabled(
long featureID,
int *errorCode,
unsigned char ifNum);
442 void setDHCPServerEnable(
long featureID,
int *errorCode,
unsigned char ifNum,
bool enable);
443 void getDHCPServerAddressRange(
long featureID,
int *errorCode,
unsigned char ifNum,
444 unsigned int *outBaseIpAddress,
unsigned int ipAddressArraySize,
unsigned int *outNetmask);
445 void setDHCPServerAddressRange(
long featureID,
int *errorCode,
unsigned char ifNum,
446 const unsigned int *baseIpAddress,
unsigned int ipAddressArraySize,
unsigned int netmask);
449 int getNumberOfIpv4Features();
450 int getIpv4AddressFeatures(
long *buffer,
int maxFeatures);
451 bool isDHCPEnabled(
long featureID,
int *errorCode,
unsigned char ifNum);
452 void setDHCPEnable(
long featureID,
int *errorCode,
unsigned char ifNum,
unsigned char enabled);
453 int getNumberOfIpAddresses(
long featureID,
int *errorCode,
unsigned char ifNum);
454 void readIpAddress(
long featureID,
int *errorCode,
unsigned char ifNum,
unsigned char addressIndex,
455 unsigned char *ipAddress,
int ipAddressLength,
unsigned int *netmask);
456 void addStaticIpAddress(
long featureID,
int* errorCode,
unsigned char ifNum,
457 unsigned char *ipAddress,
int ipAddressLength,
unsigned int netmask);
458 void deleteStaticIpAddress(
long featureID,
int* errorCode,
unsigned char ifNum,
unsigned char addressIndex);
462 int getPixelCount(
long deviceID,
int *error_code);
463 int getActivePixelRange(
long deviceID,
int *error_code,
int *range,
int rangeSize);
464 int getOpticalDarkPixelRange(
long deviceID,
int *error_code,
int *range,
int rangeSize);
465 int getTransitionPixelRange(
long deviceID,
int *error_code,
int *range,
int rangeSize);
466 int getBadPixelIndices(
long deviceID,
int *error_code,
int *baxPixelIndices,
int baxPixelSize);
467 void setBadPixelIndices(
long deviceID,
int *error_code,
int *baxPixelIndices,
int baxPixelSize);
470 int getMaximumADCCount(
long deviceID,
int *error_code);
471 int getSaturationLevel(
long deviceID,
int *error_code);
472 void setSaturationLevel(
long deviceID,
int *error_code,
int level);
473 int getBaselineLevel(
long deviceID,
int *error_code);
474 void setBaselineLevel(
long deviceID,
int *error_code,
int level);
477 int getUserString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
478 void setUserString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
479 int getUserStringCount(
long featureID,
int *errorCode);
480 int getUserString(
long featureID,
int *errorCode,
int index,
char *buffer,
int bufferLength);
481 void setUserString(
long featureID,
int *errorCode,
int index,
char *buffer,
int bufferLength);
484 int getDeviceAlias(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
485 void setDeviceAlias(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
488 void resetDevice(
long featureID,
int *errorCode);
489 std::uint16_t getOriginalVID(
long featureID,
int *errorCode);
490 std::uint16_t getOriginalPID(
long featureID,
int *errorCode);
491 std::uint16_t getVID(
long featureID,
int *errorCode);
492 void setVID(
long featureID,
int *errorCode, std::uint16_t vid);
493 std::uint16_t getPID(
long featureID,
int *errorCode);
494 void setPID(
long featureID,
int *errorCode, std::uint16_t pid);
495 int getOriginalManufacturerString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
496 int getOriginalModelString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
497 int getManufacturerString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
498 void setManufacturerString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
499 int getModelString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
500 void setModelString(
long featureID,
int *errorCode,
char *buffer,
int bufferLength);
503 int getCommandList(
long featureID,
int *errorCode,
unsigned int *commands,
int length);
504 std::uint32_t getIntegrationTimeStepSize(
long featureID,
int *errorCode);
507 int getBaudRate(
long featureID,
int *errorCode);
508 void setBaudRate(
long featureID,
int *errorCode,
int baudRate);
509 void saveSettingsToFlash(
long featureID,
int *errorCode);
512 std::vector<int> emptyDummyIntVar;
513 std::vector<double> emptyDummyDoubleVar;
514 std::vector<double> correctedSpectra;
517 unsigned long instanceID;
518 oceandirect::Device *device;
522 std::vector<RawBusAccessFeatureAdapter *> rawBusAccessFeatures;
523 std::vector<SerialNumberFeatureAdapter *> serialNumberFeatures;
524 std::vector<SpectrometerFeatureAdapter *> spectrometerFeatures;
525 std::vector<ThermoElectricCoolerFeatureAdapter *> tecFeatures;
526 std::vector<IrradCalFeatureAdapter *> irradCalFeatures;
527 std::vector<EEPROMFeatureAdapter *> eepromFeatures;
528 std::vector<LightSourceFeatureAdapter *> lightSourceFeatures;
529 std::vector<StrobeLampFeatureAdapter *> strobeLampFeatures;
530 std::vector<ContinuousStrobeFeatureAdapter *> continuousStrobeFeatures;
531 std::vector<SingleStrobeFeatureAdapter *> singleStrobeFeatures;
532 std::vector<GpioFeatureAdapter *> gpioFeatures;
533 std::vector<NonlinearityCoeffsFeatureAdapter *> nonlinearityFeatures;
534 std::vector<TemperatureFeatureAdapter *> temperatureFeatures;
535 std::vector<RevisionFeatureAdapter *> revisionFeatures;
536 std::vector<OpticalBenchFeatureAdapter *> opticalBenchFeatures;
537 std::vector<StrayLightCoeffsFeatureAdapter *> strayLightFeatures;
538 std::vector<PixelBinningFeatureAdapter *> pixelBinningFeatures;
539 std::vector<DataBufferFeatureAdapter *> dataBufferFeatures;
540 std::vector<BackToBackFeatureAdapter *> backToBackFeatures;
541 std::vector<AcquisitionDelayFeatureAdapter *> acquisitionDelayFeatures;
542 std::vector<QueryStatusFeatureAdapter*> queryStatusFeatures;
543 std::vector<LedActivityFeatureAdapter *> ledActivityFeatures;
544 std::vector<TimeFeatureAdapter *> timeFeatures;
545 std::vector<AnalogInFeatureAdapter *> analogInFeatures;
546 std::vector<AnalogOutFeatureAdapter *> analogOutFeatures;
547 std::vector<DHCPServerConfigurationFeatureAdapter *> dhcpFeatures;
548 std::vector<PixelFeatureAdapter *> pixelFeatures;
549 std::vector<AutoNullingFeatureAdapter *> autoNullingFeatures;
550 std::vector<UserStringFeatureAdapter *> userStringFeatures;
551 std::vector<DeviceInformationFeatureAdapter *> deviceInformationFeatures;
552 std::vector<DeviceAliasFeatureAdapter *> deviceAliasFeatures;
553 std::vector<SerialPortFeatureAdapter *> serialPortFeatures;
554 std::vector<Ipv4AddressFeatureAdapter *> ipv4AddressFeatures;
555 std::vector<SpectrumAcquisitionControlFeatureAdapter *> spectrumAcquisitionControlFeatures;
594 enum class featureId {
631 spectrumAcquisitionControl
Definition: AcquisitionDelayFeatureAdapter.h:39
Definition: AnalogInFeatureAdapter.h:37
Definition: AnalogOutFeatureAdapter.h:37
Definition: AutoNullingFeatureAdapter.h:38
Definition: BackToBackFeatureAdapter.h:39
Definition: ContinuousStrobeFeatureAdapter.h:39
Definition: DHCPServerConfigurationFeatureAdapter.h:38
Definition: DataBufferFeatureAdapter.h:38
Definition: DeviceAdapter.h:90
Definition: DeviceAdapter.h:81
Definition: DeviceAliasFeatureAdapter.h:38
Definition: EEPROMFeatureAdapter.h:39
Definition: GpioFeatureAdapter.h:38
Definition: Ipv4AddressFeatureAdapter.h:38
Definition: IrradCalFeatureAdapter.h:39
Definition: LedActivityFeatureAdapter.h:39
Definition: LightSourceFeatureAdapter.h:39
Definition: NonlinearityCoeffsFeatureAdapter.h:39
Definition: OpticalBenchFeatureAdapter.h:38
Definition: PixelBinningFeatureAdapter.h:39
Definition: PixelFeatureAdapter.h:39
Definition: QueryStatusFeatureAdapter.h:38
Definition: RawBusAccessFeatureAdapter.h:38
Definition: RevisionFeatureAdapter.h:39
Definition: SerialNumberFeatureAdapter.h:39
Definition: SerialPortFeatureAdapter.h:38
Definition: SingleStrobeFeatureAdapter.h:39
Definition: SpectrometerFeatureAdapter.h:42
Definition: SpectrumAcquisitionControlFeatureAdapter.h:38
Definition: StrayLightCoeffsFeatureAdapter.h:39
Definition: StrobeLampFeatureAdapter.h:39
Definition: TemperatureFeatureAdapter.h:39
Definition: ThermoElectricCoolerFeatureAdapter.h:39
Definition: TimeFeatureAdapter.h:38
Definition: UserStringFeatureAdapter.h:39
This is an interface to Advance features of OceanDirect that allow access to less common controls....
Definition: AcquisitionDelayFeatureAdapter.h:35