mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-19 03:49:42 +08:00
添加了位置定标程序 及位置移动相关程序源码
This commit is contained in:
@ -0,0 +1,63 @@
|
||||
/***************************************************//**
|
||||
* @file AcquisitionDelayFeatureAdapter.h
|
||||
* @date November 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows access to SeaBreeze
|
||||
* DataBufferFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_ACQUISITION_DELAY_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_ACQUISITION_DELAY_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/acquisition_delay/AcquisitionDelayFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class AcquisitionDelayFeatureAdapter
|
||||
: public FeatureAdapterTemplate<AcquisitionDelayFeatureInterface> {
|
||||
public:
|
||||
AcquisitionDelayFeatureAdapter(AcquisitionDelayFeatureInterface *intf,
|
||||
const FeatureFamily &f, Protocol *p, Bus *b,
|
||||
unsigned short instanceIndex);
|
||||
|
||||
virtual ~AcquisitionDelayFeatureAdapter();
|
||||
|
||||
/* Acquisition delay functions */
|
||||
unsigned long getAcquisitionDelayIncrementMicroseconds(int *errorCode);
|
||||
unsigned long getAcquisitionDelayMaximumMicroseconds(int *errorCode);
|
||||
unsigned long getAcquisitionDelayMinimumMicroseconds(int *errorCode);
|
||||
unsigned long getAcquisitionDelayMicroseconds(int *errorCode);
|
||||
void setAcquisitionDelayMicroseconds(int *errorCode, const unsigned long delay_usec);
|
||||
};
|
||||
|
||||
} /* end namespace api */
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SEABREEZE_ACQUISITION_DELAY_FEATURE_ADAPTER_H */
|
||||
|
@ -0,0 +1,56 @@
|
||||
/***************************************************//**
|
||||
* @file ContinuousStrobeFeatureAdapter.h
|
||||
* @date October 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows access to SeaBreeze
|
||||
* ContinuousStrobeFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_CONTINUOUS_STROBE_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_CONTINUOUS_STROBE_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/continuous_strobe/ContinuousStrobeFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class ContinuousStrobeFeatureAdapter
|
||||
: public FeatureAdapterTemplate<ContinuousStrobeFeatureInterface> {
|
||||
public:
|
||||
ContinuousStrobeFeatureAdapter(ContinuousStrobeFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~ContinuousStrobeFeatureAdapter();
|
||||
|
||||
void setContinuousStrobePeriodMicroseconds(int *errorCode, unsigned long period_usec);
|
||||
void setContinuousStrobeEnable(int *errorCode, bool enable);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,63 @@
|
||||
/***************************************************//**
|
||||
* @file DataBufferFeatureAdapter.h
|
||||
* @date October 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows access to SeaBreeze
|
||||
* DataBufferFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_DATA_BUFFER_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_DATA_BUFFER_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/data_buffer/DataBufferFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class DataBufferFeatureAdapter
|
||||
: public FeatureAdapterTemplate<DataBufferFeatureInterface> {
|
||||
public:
|
||||
DataBufferFeatureAdapter(DataBufferFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~DataBufferFeatureAdapter();
|
||||
|
||||
/* Data buffer functions */
|
||||
void clearBuffer(int *errorCode);
|
||||
unsigned long getNumberOfElements(int *errorCode);
|
||||
unsigned long getBufferCapacity(int *errorCode);
|
||||
unsigned long getBufferCapacityMaximum(int *errorCode);
|
||||
unsigned long getBufferCapacityMinimum(int *errorCode);
|
||||
void setBufferCapacity(int *errorCode, unsigned long capacity);
|
||||
};
|
||||
|
||||
} /* end namespace api */
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SEABREEZE_DATA_BUFFER_FEATURE_ADAPTER_H */
|
||||
|
@ -0,0 +1,308 @@
|
||||
/***************************************************//**
|
||||
* @file DeviceAdapter.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze Device instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
#ifndef DEVICEADAPTER_H
|
||||
#define DEVICEADAPTER_H
|
||||
|
||||
/* Includes */
|
||||
#include "common/devices/Device.h"
|
||||
#include "common/buses/DeviceLocatorInterface.h"
|
||||
#include "api/seabreezeapi/EEPROMFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/IrradCalFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/RawUSBBusAccessFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/NonlinearityCoeffsFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/TemperatureFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/RevisionFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/OpticalBenchFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/SpectrumProcessingFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/SerialNumberFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/ShutterFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/SpectrometerFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/StrayLightCoeffsFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/StrobeLampFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/ContinuousStrobeFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/ThermoElectricCoolerFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/LightSourceFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/PixelBinningFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/DataBufferFeatureAdapter.h"
|
||||
#include "api/seabreezeapi/AcquisitionDelayFeatureAdapter.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class DeviceAdapter {
|
||||
public:
|
||||
DeviceAdapter(Device *dev, unsigned long id);
|
||||
~DeviceAdapter();
|
||||
|
||||
int open(int *errorCode);
|
||||
void close();
|
||||
|
||||
DeviceLocatorInterface *getLocation();
|
||||
|
||||
/* An for weak association to this object */
|
||||
unsigned long getID();
|
||||
|
||||
/* Get a string that describes the type of device */
|
||||
int getDeviceType(int *errorCode, char *buffer, unsigned int maxLength);
|
||||
|
||||
/* Get a usb endpoint for the device according to the enumerator */
|
||||
/* endpointType. A 0 is returned if the endpoint requested is not in use. */
|
||||
unsigned char getDeviceEndpoint(int *errorCode, usbEndpointType anEndpointType);
|
||||
|
||||
/* Get one or more raw USB access features */
|
||||
int getNumberOfRawUSBBusAccessFeatures();
|
||||
int getRawUSBBusAccessFeatures(long *buffer, int maxFeatures);
|
||||
int rawUSBBusAccessRead(long featureID,
|
||||
int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char endpoint);
|
||||
int rawUSBBusAccessWrite(long featureID,
|
||||
int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char endpoint);
|
||||
|
||||
/* Get one or more serial number features */
|
||||
int getNumberOfSerialNumberFeatures();
|
||||
int getSerialNumberFeatures(long *buffer, int maxFeatures);
|
||||
int getSerialNumber(long featureID, int *errorCode,
|
||||
char *buffer, int bufferLength);
|
||||
unsigned char getSerialNumberMaximumLength(long featureID, int *errorCode);
|
||||
|
||||
/* Get one or more spectrometer acquisition features */
|
||||
int getNumberOfSpectrometerFeatures();
|
||||
int getSpectrometerFeatures(long *buffer, int maxFeatures);
|
||||
void spectrometerSetTriggerMode(long spectrometerFeatureID, int *errorCode, int mode);
|
||||
void spectrometerSetIntegrationTimeMicros(long spectrometerFeatureID, int *errorCode,
|
||||
unsigned long integrationTimeMicros);
|
||||
unsigned long spectrometerGetMinimumIntegrationTimeMicros(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
unsigned long spectrometerGetMaximumIntegrationTimeMicros(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
double spectrometerGetMaximumIntensity(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
int spectrometerGetUnformattedSpectrumLength(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
int spectrometerGetUnformattedSpectrum(long spectrometerFeatureID,
|
||||
int *errorCode, unsigned char *buffer, int bufferLength);
|
||||
int spectrometerGetFormattedSpectrumLength(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
int spectrometerGetFormattedSpectrum(long spectrometerFeatureID, int *errorCode,
|
||||
double *buffer, int bufferLength);
|
||||
int spectrometerGetWavelengths(long spectrometerFeatureID, int *errorCode,
|
||||
double *wavelengths, int length);
|
||||
int spectrometerGetElectricDarkPixelCount(
|
||||
long spectrometerFeatureID, int *errorCode);
|
||||
int spectrometerGetElectricDarkPixelIndices(
|
||||
long spectrometerFeatureID, int *errorCode, int *indices, int length);
|
||||
|
||||
|
||||
/* Get one or more pixel binning features */
|
||||
int getNumberOfPixelBinningFeatures();
|
||||
int getPixelBinningFeatures(long *buffer, int maxFeatures);
|
||||
void binningSetPixelBinningFactor(long spectrometerFeatureID, int *errorCode, const unsigned char binningFactor);
|
||||
unsigned char binningGetPixelBinningFactor(long spectrometerFeatureID, int *errorCode);
|
||||
void binningSetDefaultPixelBinningFactor(long spectrometerFeatureID, int *errorCode, const unsigned char binningFactor);
|
||||
void binningSetDefaultPixelBinningFactor(long spectrometerFeatureID, int *errorCode);
|
||||
unsigned char binningGetDefaultPixelBinningFactor(long spectrometerFeatureID, int *errorCode);
|
||||
unsigned char binningGetMaxPixelBinningFactor(long spectrometerFeatureID, int *errorCode);
|
||||
|
||||
/* Get one or more TEC features */
|
||||
int getNumberOfThermoElectricFeatures();
|
||||
int getThermoElectricFeatures(long *buffer, int maxFeatures);
|
||||
double tecReadTemperatureDegreesC(long featureID, int *errorCode);
|
||||
void tecSetTemperatureSetpointDegreesC(long featureID, int *errorCode,
|
||||
double temperatureDegreesCelsius);
|
||||
void tecSetEnable(long featureID, int *errorCode, bool tecEnable);
|
||||
|
||||
/* Get one or more irradiance calibration features */
|
||||
int getNumberOfIrradCalFeatures();
|
||||
int getIrradCalFeatures(long *buffer, int maxFeatures);
|
||||
int irradCalibrationRead(long featureID,
|
||||
int *errorCode, float *buffer, int bufferLength);
|
||||
int irradCalibrationWrite(long featureID,
|
||||
int *errorCode, float *buffer, int bufferLength);
|
||||
int irradCalibrationHasCollectionArea(long featureID, int *errorCode);
|
||||
float irradCalibrationReadCollectionArea(long featureID, int *errorCode);
|
||||
void irradCalibrationWriteCollectionArea(long featureID,
|
||||
int *errorCode, float area);
|
||||
|
||||
/* Get one or more EEPROM features */
|
||||
int getNumberOfEEPROMFeatures();
|
||||
int getEEPROMFeatures(long *buffer, int maxFeatures);
|
||||
int eepromReadSlot(long featureID, int *errorCode, int slotNumber,
|
||||
unsigned char *buffer, int length);
|
||||
|
||||
/* Get one or more light source features */
|
||||
int getNumberOfLightSourceFeatures();
|
||||
int getLightSourceFeatures(long *buffer, int maxFeatures);
|
||||
int lightSourceGetCount(long featureID, int *errorCode);
|
||||
bool lightSourceHasEnable(long featureID, int *errorCode,
|
||||
int lightSourceIndex);
|
||||
bool lightSourceIsEnabled(long featureID, int *errorCode,
|
||||
int lightSourceIndex);
|
||||
void lightSourceSetEnable(long featureID, int *errorCode,
|
||||
int lightSourceIndex, bool enable);
|
||||
bool lightSourceHasVariableIntensity(long featureID, int *errorCode,
|
||||
int lightSourceIndex);
|
||||
double lightSourceGetIntensity(long featureID, int *errorCode,
|
||||
int lightSourceIndex);
|
||||
void lightSourceSetIntensity(long featureID, int *errorCode,
|
||||
int lightSourceIndex, double intensity);
|
||||
|
||||
/* Get one or more strobe lamp enable features */
|
||||
int getNumberOfStrobeLampFeatures();
|
||||
int getStrobeLampFeatures(long *buffer, int maxFeatures);
|
||||
void lampSetStrobeEnable(long featureID, int *errorCode, bool strobeEnable);
|
||||
|
||||
/* Get one or more continuous strobe features */
|
||||
int getNumberOfContinuousStrobeFeatures();
|
||||
int getContinuousStrobeFeatures(long *buffer, int maxFeatures);
|
||||
void continuousStrobeSetPeriodMicroseconds(long featureID, int *errorCode,
|
||||
unsigned long period_usec);
|
||||
void continuousStrobeSetEnable(long featureID, int *errorCode, bool enable);
|
||||
|
||||
/* Get one or more shutter features */
|
||||
int getNumberOfShutterFeatures();
|
||||
int getShutterFeatures(long *buffer, int maxFeatures);
|
||||
void shutterSetShutterOpen(long featureID, int *errorCode, bool opened);
|
||||
|
||||
/* Get one or more nonlinearity coefficients features */
|
||||
int getNumberOfNonlinearityCoeffsFeatures();
|
||||
int getNonlinearityCoeffsFeatures(long *buffer, int maxFeatures);
|
||||
int nonlinearityCoeffsGet(long featureID, int *errorCode,
|
||||
double *buffer, int bufferLength);
|
||||
|
||||
/* Get one or more temperature features */
|
||||
int getNumberOfTemperatureFeatures();
|
||||
int getTemperatureFeatures(long *buffer, int maxFeatures);
|
||||
unsigned char temperatureCountGet(long temperatureFeatureID, int *errorCode);
|
||||
double temperatureGet(long temperatureFeatureID, int *errorCode, int index);
|
||||
int temperatureGetAll(long temperatureFeatureID, int *errorCode,
|
||||
double *buffer, int bufferLength);
|
||||
|
||||
/* Get one or more revision features */
|
||||
int getNumberOfRevisionFeatures();
|
||||
int getRevisionFeatures(long *buffer, int maxFeatures);
|
||||
unsigned char revisionHardwareGet(long revisionFeatureID, int *errorCode);
|
||||
unsigned short int revisionFirmwareGet(long revisionFeatureID, int *errorCode);
|
||||
|
||||
/* Get one or more spectrum processing features */
|
||||
int getNumberOfSpectrumProcessingFeatures();
|
||||
int getSpectrumProcessingFeatures(long *buffer, int maxFeatures);
|
||||
unsigned short int spectrumProcessingScansToAverageGet(long spectrumProcessingFeatureID, int *errorCode);
|
||||
unsigned char spectrumProcessingBoxcarWidthGet(long spectrumProcessingFeatureID, int *errorCode);
|
||||
void spectrumProcessingBoxcarWidthSet(long featureID, int *errorCode, unsigned char boxcarWidth);
|
||||
void spectrumProcessingScansToAverageSet(long featureID, int *errorCode, unsigned short int scansToAverage);
|
||||
|
||||
/* Get one or more optical bench features */
|
||||
int getNumberOfOpticalBenchFeatures();
|
||||
int getOpticalBenchFeatures(long *buffer, int maxFeatures);
|
||||
unsigned short int opticalBenchGetFiberDiameterMicrons(long opticalBenchFeatureID, int *errorCode);
|
||||
unsigned short int opticalBenchGetSlitWidthMicrons(long opticalBenchFeatureID, int *errorCode);
|
||||
int opticalBenchGetID(long opticalBenchFeatureID, int *errorCode, char *buffer, int bufferLength);
|
||||
int opticalBenchGetSerialNumber(long opticalBenchFeatureID, int *errorCode, char *buffer, int bufferLength);
|
||||
int opticalBenchGetCoating(long opticalBenchFeatureID, int *errorCode, char *buffer, int bufferLength);
|
||||
int opticalBenchGetFilter(long opticalBenchFeatureID, int *errorCode, char *buffer, int bufferLength);
|
||||
int opticalBenchGetGrating(long opticalBenchFeatureID, int *errorCode, char *buffer, int bufferLength);
|
||||
|
||||
|
||||
/* Get one or more stray light coefficients features */
|
||||
int getNumberOfStrayLightCoeffsFeatures();
|
||||
int getStrayLightCoeffsFeatures(long *buffer, int maxFeatures);
|
||||
int strayLightCoeffsGet(long featureID, int *errorCode,
|
||||
double *buffer, int bufferLength);
|
||||
|
||||
/* Get one or more data buffer features */
|
||||
int getNumberOfDataBufferFeatures();
|
||||
int getDataBufferFeatures(long *buffer, int maxFeatures);
|
||||
void dataBufferClear(long featureID, int *errorCode);
|
||||
unsigned long dataBufferGetNumberOfElements(long featureID, int *errorCode);
|
||||
unsigned long dataBufferGetBufferCapacity(long featureID, int *errorCode);
|
||||
unsigned long dataBufferGetBufferCapacityMaximum(long featureID, int *errorCode);
|
||||
unsigned long dataBufferGetBufferCapacityMinimum(long featureID, int *errorCode);
|
||||
void dataBufferSetBufferCapacity(long featureID, int *errorCode, unsigned long capacity);
|
||||
|
||||
/* Get one or more acquisition delay features */
|
||||
int getNumberOfAcquisitionDelayFeatures();
|
||||
int getAcquisitionDelayFeatures(long *buffer, int maxFeatures);
|
||||
void acquisitionDelaySetDelayMicroseconds(long featureID, int *errorCode,
|
||||
unsigned long delay_usec);
|
||||
unsigned long acquisitionDelayGetDelayMicroseconds(long featureID, int *errorCode);
|
||||
unsigned long acquisitionDelayGetDelayIncrementMicroseconds(long featureID, int *errorCode);
|
||||
unsigned long acquisitionDelayGetDelayMaximumMicroseconds(long featureID, int *errorCode);
|
||||
unsigned long acquisitionDelayGetDelayMinimumMicroseconds(long featureID, int *errorCode);
|
||||
|
||||
protected:
|
||||
unsigned long instanceID;
|
||||
seabreeze::Device *device;
|
||||
std::vector<RawUSBBusAccessFeatureAdapter *> rawUSBBusAccessFeatures;
|
||||
std::vector<SerialNumberFeatureAdapter *> serialNumberFeatures;
|
||||
std::vector<SpectrometerFeatureAdapter *> spectrometerFeatures;
|
||||
std::vector<ThermoElectricCoolerFeatureAdapter *> tecFeatures;
|
||||
std::vector<IrradCalFeatureAdapter *> irradCalFeatures;
|
||||
std::vector<EEPROMFeatureAdapter *> eepromFeatures;
|
||||
std::vector<LightSourceFeatureAdapter *> lightSourceFeatures;
|
||||
std::vector<StrobeLampFeatureAdapter *> strobeLampFeatures;
|
||||
std::vector<ContinuousStrobeFeatureAdapter *> continuousStrobeFeatures;
|
||||
std::vector<ShutterFeatureAdapter *> shutterFeatures;
|
||||
std::vector<NonlinearityCoeffsFeatureAdapter *> nonlinearityFeatures;
|
||||
std::vector<TemperatureFeatureAdapter *> temperatureFeatures;
|
||||
std::vector<RevisionFeatureAdapter *> revisionFeatures;
|
||||
std::vector<OpticalBenchFeatureAdapter *> opticalBenchFeatures;
|
||||
std::vector<SpectrumProcessingFeatureAdapter *> spectrumProcessingFeatures;
|
||||
std::vector<StrayLightCoeffsFeatureAdapter *> strayLightFeatures;
|
||||
std::vector<PixelBinningFeatureAdapter *> pixelBinningFeatures;
|
||||
std::vector<DataBufferFeatureAdapter *> dataBufferFeatures;
|
||||
std::vector<AcquisitionDelayFeatureAdapter *> acquisitionDelayFeatures;
|
||||
|
||||
RawUSBBusAccessFeatureAdapter *getRawUSBBusAccessFeatureByID(long featureID);
|
||||
SerialNumberFeatureAdapter *getSerialNumberFeatureByID(long featureID);
|
||||
SpectrometerFeatureAdapter *getSpectrometerFeatureByID(long featureID);
|
||||
ThermoElectricCoolerFeatureAdapter *getTECFeatureByID(long featureID);
|
||||
IrradCalFeatureAdapter *getIrradCalFeatureByID(long featureID);
|
||||
EEPROMFeatureAdapter *getEEPROMFeatureByID(long featureID);
|
||||
LightSourceFeatureAdapter *getLightSourceFeatureByID(long featureID);
|
||||
StrobeLampFeatureAdapter *getStrobeLampFeatureByID(long featureID);
|
||||
ContinuousStrobeFeatureAdapter *getContinuousStrobeFeatureByID(long featureID);
|
||||
ShutterFeatureAdapter *getShutterFeatureByID(long featureID);
|
||||
NonlinearityCoeffsFeatureAdapter *getNonlinearityCoeffsFeatureByID(long featureID);
|
||||
TemperatureFeatureAdapter *getTemperatureFeatureByID(long featureID);
|
||||
RevisionFeatureAdapter *getRevisionFeatureByID(long featureID);
|
||||
OpticalBenchFeatureAdapter *getOpticalBenchFeatureByID(long featureID);
|
||||
SpectrumProcessingFeatureAdapter *getSpectrumProcessingFeatureByID(long featureID);
|
||||
StrayLightCoeffsFeatureAdapter *getStrayLightCoeffsFeatureByID(long featureID);
|
||||
PixelBinningFeatureAdapter *getPixelBinningFeatureByID(long featureID);
|
||||
DataBufferFeatureAdapter *getDataBufferFeatureByID(long featureID);
|
||||
AcquisitionDelayFeatureAdapter *getAcquisitionDelayFeatureByID(long featureID);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file EEPROMFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze EEPROMFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_EEPROMFEATUREADAPTER_H
|
||||
#define SEABREEZE_EEPROMFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class EEPROMFeatureAdapter
|
||||
: public FeatureAdapterTemplate<EEPROMSlotFeatureInterface> {
|
||||
public:
|
||||
EEPROMFeatureAdapter(EEPROMSlotFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~EEPROMFeatureAdapter();
|
||||
|
||||
/* EEPROM functions */
|
||||
int readEEPROMSlot(int *errorCode, int slotNumber,
|
||||
unsigned char *buffer, int bufferLength);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file FeatureAdapterInterface.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This interface allows device features to be treated
|
||||
* consistently regardless of the actual capabilities.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_FEATUREADAPTERINTERFACE_H
|
||||
#define SEABREEZE_FEATUREADAPTERINTERFACE_H
|
||||
|
||||
#include "common/features/FeatureFamily.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class FeatureAdapterInterface {
|
||||
public:
|
||||
virtual ~FeatureAdapterInterface() = 0;
|
||||
|
||||
/* This gets a semi-unique integer ID for this feature instance */
|
||||
virtual long getID() = 0;
|
||||
|
||||
/* Gets the general category of the feature, if any */
|
||||
virtual FeatureFamily &getFeatureFamily() = 0;
|
||||
};
|
||||
|
||||
/* Default empty destructor for otherwise abstract class */
|
||||
inline FeatureAdapterInterface::~FeatureAdapterInterface() { }
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,87 @@
|
||||
/***************************************************//**
|
||||
* @file FeatureAdapterTemplate.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a templated wrapper around SeaBreeze Feature
|
||||
* instances. This should make it easier to obtain a
|
||||
* particular Feature to call methods against.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef FEATUREADAPTERTEMPLATE_H
|
||||
#define FEATUREADAPTERTEMPLATE_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterInterface.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/IllegalArgumentException.h"
|
||||
#include "common/features/FeatureFamily.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include <string>
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
template <class T> class FeatureAdapterTemplate
|
||||
: public FeatureAdapterInterface {
|
||||
public:
|
||||
FeatureAdapterTemplate(T *featureInterface, const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex) {
|
||||
this->feature = featureInterface;
|
||||
this->family = f;
|
||||
this->protocol = p;
|
||||
this->bus = b;
|
||||
this->index = instanceIndex;
|
||||
|
||||
/* Create a unique ID based on the feature type and index. This
|
||||
* might be expanded in the future to use one of the bytes for
|
||||
* the feature type or index as a module number.
|
||||
*/
|
||||
this->ID = (family.getType() << 16) | (instanceIndex & 0x00FFFF);
|
||||
|
||||
if(0 == this->feature || 0 == this->protocol || 0 == this->bus) {
|
||||
std::string error("Null feature interface, protocol, or bus is not allowed.");
|
||||
throw IllegalArgumentException(error);
|
||||
}
|
||||
}
|
||||
virtual ~FeatureAdapterTemplate() { /* Do nothing -- others delete feature */ }
|
||||
T *getFeature() { return this->feature; }
|
||||
|
||||
virtual FeatureFamily &getFeatureFamily() { return this->family; }
|
||||
|
||||
virtual long getID() { return this->ID; }
|
||||
|
||||
protected:
|
||||
T *feature;
|
||||
FeatureFamily family;
|
||||
Protocol *protocol;
|
||||
Bus *bus;
|
||||
unsigned short index;
|
||||
unsigned long ID;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,200 @@
|
||||
/***************************************************//**
|
||||
* @file FeatureFamilies.h
|
||||
* @date February 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This provides a way to get references to different kinds
|
||||
* of features (e.g. spectrometer, TEC) generically.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_FEATUREFAMILIES_H
|
||||
#define SEABREEZE_FEATUREFAMILIES_H
|
||||
|
||||
#include "common/features/FeatureFamily.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class UndefinedFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
UndefinedFeatureFamily();
|
||||
virtual ~UndefinedFeatureFamily();
|
||||
};
|
||||
|
||||
class SerialNumberFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
SerialNumberFeatureFamily();
|
||||
virtual ~SerialNumberFeatureFamily();
|
||||
};
|
||||
|
||||
class SpectrometerFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
SpectrometerFeatureFamily();
|
||||
virtual ~SpectrometerFeatureFamily();
|
||||
};
|
||||
|
||||
class ThermoElectricFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
ThermoElectricFeatureFamily();
|
||||
virtual ~ThermoElectricFeatureFamily();
|
||||
};
|
||||
|
||||
class IrradCalFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
IrradCalFeatureFamily();
|
||||
virtual ~IrradCalFeatureFamily();
|
||||
};
|
||||
|
||||
class EEPROMFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
EEPROMFeatureFamily();
|
||||
virtual ~EEPROMFeatureFamily();
|
||||
};
|
||||
|
||||
class LightSourceFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
LightSourceFeatureFamily();
|
||||
virtual ~LightSourceFeatureFamily();
|
||||
};
|
||||
|
||||
class StrobeLampFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
StrobeLampFeatureFamily();
|
||||
virtual ~StrobeLampFeatureFamily();
|
||||
};
|
||||
|
||||
class ContinuousStrobeFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
ContinuousStrobeFeatureFamily();
|
||||
virtual ~ContinuousStrobeFeatureFamily();
|
||||
};
|
||||
|
||||
class ShutterFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
ShutterFeatureFamily();
|
||||
virtual ~ShutterFeatureFamily();
|
||||
};
|
||||
|
||||
class WaveCalFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
WaveCalFeatureFamily();
|
||||
virtual ~WaveCalFeatureFamily();
|
||||
};
|
||||
|
||||
class NonlinearityCoeffsFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
NonlinearityCoeffsFeatureFamily();
|
||||
virtual ~NonlinearityCoeffsFeatureFamily();
|
||||
};
|
||||
|
||||
class TemperatureFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
TemperatureFeatureFamily();
|
||||
virtual ~TemperatureFeatureFamily();
|
||||
};
|
||||
|
||||
class RevisionFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
RevisionFeatureFamily();
|
||||
virtual ~RevisionFeatureFamily();
|
||||
};
|
||||
|
||||
class OpticalBenchFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
OpticalBenchFeatureFamily();
|
||||
virtual ~OpticalBenchFeatureFamily();
|
||||
};
|
||||
|
||||
class SpectrumProcessingFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
SpectrumProcessingFeatureFamily();
|
||||
virtual ~SpectrumProcessingFeatureFamily();
|
||||
};
|
||||
|
||||
class StrayLightCoeffsFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
StrayLightCoeffsFeatureFamily();
|
||||
virtual ~StrayLightCoeffsFeatureFamily();
|
||||
};
|
||||
|
||||
class RawUSBBusAccessFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
RawUSBBusAccessFeatureFamily();
|
||||
virtual ~RawUSBBusAccessFeatureFamily();
|
||||
};
|
||||
|
||||
class DataBufferFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
DataBufferFeatureFamily();
|
||||
virtual ~DataBufferFeatureFamily();
|
||||
};
|
||||
|
||||
class AcquisitionDelayFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
AcquisitionDelayFeatureFamily();
|
||||
virtual ~AcquisitionDelayFeatureFamily();
|
||||
};
|
||||
|
||||
class PixelBinningFeatureFamily : public FeatureFamily {
|
||||
public:
|
||||
PixelBinningFeatureFamily();
|
||||
virtual ~PixelBinningFeatureFamily();
|
||||
};
|
||||
|
||||
class FeatureFamilies {
|
||||
public:
|
||||
const UndefinedFeatureFamily UNDEFINED;
|
||||
const SerialNumberFeatureFamily SERIAL_NUMBER;
|
||||
const SpectrometerFeatureFamily SPECTROMETER;
|
||||
const ThermoElectricFeatureFamily THERMOELECTRIC;
|
||||
const IrradCalFeatureFamily IRRAD_CAL;
|
||||
const EEPROMFeatureFamily EEPROM;
|
||||
const LightSourceFeatureFamily LIGHT_SOURCE;
|
||||
const StrobeLampFeatureFamily STROBE_LAMP_ENABLE;
|
||||
const ContinuousStrobeFeatureFamily CONTINUOUS_STROBE;
|
||||
const ShutterFeatureFamily SHUTTER;
|
||||
const WaveCalFeatureFamily WAVELENGTH_CAL;
|
||||
const NonlinearityCoeffsFeatureFamily NONLINEARITY_COEFFS;
|
||||
const TemperatureFeatureFamily TEMPERATURE;
|
||||
const RevisionFeatureFamily REVISION;
|
||||
const OpticalBenchFeatureFamily OPTICAL_BENCH;
|
||||
const SpectrumProcessingFeatureFamily SPECTRUM_PROCESSING;
|
||||
const StrayLightCoeffsFeatureFamily STRAY_LIGHT_COEFFS;
|
||||
const RawUSBBusAccessFeatureFamily RAW_USB_BUS_ACCESS;
|
||||
const DataBufferFeatureFamily DATA_BUFFER;
|
||||
const AcquisitionDelayFeatureFamily ACQUISITION_DELAY;
|
||||
const PixelBinningFeatureFamily PIXEL_BINNING;
|
||||
|
||||
FeatureFamilies();
|
||||
~FeatureFamilies();
|
||||
std::vector<FeatureFamily *> getAllFeatureFamilies();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,62 @@
|
||||
/***************************************************//**
|
||||
* @file IrradCalFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze IrradCalFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_IRRADCALFEATUREADAPTER_H
|
||||
#define SEABREEZE_IRRADCALFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/irradcal/IrradCalFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class IrradCalFeatureAdapter
|
||||
: public FeatureAdapterTemplate<IrradCalFeatureInterface> {
|
||||
public:
|
||||
IrradCalFeatureAdapter(IrradCalFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~IrradCalFeatureAdapter();
|
||||
|
||||
int readIrradCalibration(int *errorCode, float *buffer,
|
||||
int bufferLength);
|
||||
int writeIrradCalibration(int *errorCode, float *buffer,
|
||||
int bufferLength);
|
||||
int hasIrradCollectionArea(int *errorCode);
|
||||
float readIrradCollectionArea(int *errorCode);
|
||||
void writeIrradCollectionArea(int *errorCode, float area);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,69 @@
|
||||
/***************************************************//**
|
||||
* @file LightSourceFeatureAdapter.h
|
||||
* @date May 2013
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze LightSourceFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_LIGHTSOURCEFEATUREADAPTER_H
|
||||
#define SEABREEZE_LIGHTSOURCEFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/light_source/LightSourceFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class LightSourceFeatureAdapter
|
||||
: public FeatureAdapterTemplate<LightSourceFeatureInterface> {
|
||||
public:
|
||||
LightSourceFeatureAdapter(LightSourceFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~LightSourceFeatureAdapter();
|
||||
|
||||
int getLightSourceCount(int *errorCode);
|
||||
|
||||
bool hasLightSourceEnable(int *errorCode, int lightSourceIndex);
|
||||
bool isLightSourceEnabled(int *errorCode, int lightSourceIndex);
|
||||
void setLightSourceEnable(int *errorCode, int lightSourceIndex,
|
||||
bool enable);
|
||||
|
||||
/* The intensity is normalized over the range [0, 1] where 0 is
|
||||
* the minimum programmable intensity and 1 is the maximum
|
||||
*/
|
||||
bool hasVariableIntensity(int *errorCode, int lightSourceIndex);
|
||||
double getLightSourceIntensity(int *errorCode, int lightSourceIndex);
|
||||
void setLightSourceIntensity(int *errorCode, int lightSourceIndex,
|
||||
double intensity);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file NonlinearityCoeffsFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze NonlinearityCoeffFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_NONLINEARITYCOEFFSFEATUREADAPTER_H
|
||||
#define SEABREEZE_NONLINEARITYCOEFFSFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/nonlinearity/NonlinearityCoeffsFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class NonlinearityCoeffsFeatureAdapter
|
||||
: public FeatureAdapterTemplate<NonlinearityCoeffsFeatureInterface> {
|
||||
public:
|
||||
NonlinearityCoeffsFeatureAdapter(NonlinearityCoeffsFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~NonlinearityCoeffsFeatureAdapter();
|
||||
|
||||
int readNonlinearityCoeffs(int *errorCode, double *buffer,
|
||||
int bufferLength);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,62 @@
|
||||
/***************************************************//**
|
||||
* @file OpticalBenchFeatureAdapter.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze TemperatureFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_OPTICALBENCHFEATUREADAPTER_H
|
||||
#define SEABREEZE_OPTICALBENCHFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/optical_bench/OpticalBenchFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class OpticalBenchFeatureAdapter
|
||||
: public FeatureAdapterTemplate<OpticalBenchFeatureInterface> {
|
||||
public:
|
||||
OpticalBenchFeatureAdapter(OpticalBenchFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~OpticalBenchFeatureAdapter();
|
||||
|
||||
unsigned short int readOpticalBenchFiberDiameterMicrons(int *errorCode);
|
||||
unsigned short int readOpticalBenchSlitWidthMicrons(int *errorCode);
|
||||
int readOpticalBenchID(int *errorCode, char *buffer, int buffer_length);
|
||||
int readOpticalBenchSerialNumber(int *errorCode, char *buffer, int buffer_length);
|
||||
int readOpticalBenchCoating(int *errorCode, char *buffer, int buffer_length);
|
||||
int readOpticalBenchFilter(int *errorCode, char *buffer, int buffer_length);
|
||||
int readOpticalBenchGrating(int *errorCode, char *buffer, int buffer_length);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,68 @@
|
||||
/***************************************************//**
|
||||
* @file PixelBinningFeatureAdapter.h
|
||||
* @date October 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows access to SeaBreeze
|
||||
* TECFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_PIXEL_BINNING_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_PIXEL_BINNING_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/pixel_binning/PixelBinningFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class PixelBinningFeatureAdapter
|
||||
: public FeatureAdapterTemplate<PixelBinningFeatureInterface> {
|
||||
public:
|
||||
PixelBinningFeatureAdapter(PixelBinningFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~PixelBinningFeatureAdapter();
|
||||
|
||||
/* Thermoelectric cooler functions */
|
||||
unsigned char getPixelBinningFactor(int *errorCode);
|
||||
|
||||
void setPixelBinningFactor(int *errorCode,
|
||||
const unsigned char binningFactor);
|
||||
|
||||
unsigned char getDefaultPixelBinningFactor(int *errorCode);
|
||||
|
||||
void setDefaultPixelBinningFactor(int *errorCode,
|
||||
const unsigned char binningFactor);
|
||||
|
||||
void setDefaultPixelBinningFactor(int *errorCode);
|
||||
|
||||
unsigned char getMaxPixelBinningFactor(int *errorCode);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,87 @@
|
||||
/***************************************************//**
|
||||
* @file ProtocolFamilies.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This provides a way to describe different kinds
|
||||
* protocols (e.g. OOI, OBP) generically.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_PROTOCOLFAMILIES_H
|
||||
#define SEABREEZE_PROTOCOLFAMILIES_H
|
||||
|
||||
#include "common/protocols/ProtocolFamily.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class UndefinedProtocolFamily : public ProtocolFamily {
|
||||
public:
|
||||
UndefinedProtocolFamily();
|
||||
virtual ~UndefinedProtocolFamily();
|
||||
};
|
||||
|
||||
class OOIProtocolFamily : public ProtocolFamily {
|
||||
public:
|
||||
OOIProtocolFamily();
|
||||
virtual ~OOIProtocolFamily();
|
||||
};
|
||||
|
||||
class OceanBinaryProtocolFamily : public ProtocolFamily {
|
||||
public:
|
||||
OceanBinaryProtocolFamily();
|
||||
virtual ~OceanBinaryProtocolFamily();
|
||||
};
|
||||
|
||||
class JazMessagingProtocolFamily : public ProtocolFamily {
|
||||
public:
|
||||
JazMessagingProtocolFamily();
|
||||
virtual ~JazMessagingProtocolFamily();
|
||||
};
|
||||
|
||||
class VirtualProtocolFamily : public ProtocolFamily {
|
||||
public:
|
||||
VirtualProtocolFamily();
|
||||
virtual ~VirtualProtocolFamily();
|
||||
};
|
||||
|
||||
class ProtocolFamilies {
|
||||
public:
|
||||
const UndefinedProtocolFamily UNDEFINED_PROTOCOL;
|
||||
const OOIProtocolFamily OOI_PROTOCOL;
|
||||
const OceanBinaryProtocolFamily OCEAN_BINARY_PROTOCOL;
|
||||
const JazMessagingProtocolFamily JAZ_MESSAGING_PROTOCOL;
|
||||
const VirtualProtocolFamily VIRTUAL_PROTOCOL;
|
||||
|
||||
ProtocolFamilies();
|
||||
~ProtocolFamilies();
|
||||
std::vector<ProtocolFamily *> getAllProtocolFamilies();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file RawUSBBusAccessFeatureAdapter.h
|
||||
* @date February 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze RawUSBBusAccessFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_RAWUSBBUSACCESSFEATUREADAPTER_H
|
||||
#define SEABREEZE_RAWUSBBUSACCESSFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/raw_bus_access/RawUSBBusAccessFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class RawUSBBusAccessFeatureAdapter
|
||||
: public FeatureAdapterTemplate<RawUSBBusAccessFeatureInterface> {
|
||||
public:
|
||||
RawUSBBusAccessFeatureAdapter(RawUSBBusAccessFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~RawUSBBusAccessFeatureAdapter();
|
||||
|
||||
int readUSB(int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char usbEndpoint);
|
||||
int writeUSB(int *errorCode, unsigned char *buffer, unsigned int bufferLength, unsigned char usbEndpoint);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,58 @@
|
||||
/***************************************************//**
|
||||
* @file RevisionFeatureAdapter.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze RevisionFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_REVISIONFEATUREADAPTER_H
|
||||
#define SEABREEZE_REVISIONFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/revision/RevisionFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class RevisionFeatureAdapter
|
||||
: public FeatureAdapterTemplate<RevisionFeatureInterface> {
|
||||
public:
|
||||
RevisionFeatureAdapter(RevisionFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~RevisionFeatureAdapter();
|
||||
|
||||
unsigned char readHardwareRevision(int *errorCode);
|
||||
unsigned short int readFirmwareRevision(int *errorCode);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@
|
||||
/***************************************************//**
|
||||
* @file SeaBreezeAPIConstants.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This file defines constants for use with SeaBreeze API
|
||||
* implementations.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
#ifndef SEABREEZEAPICONSTANTS_H
|
||||
#define SEABREEZEAPICONSTANTS_H
|
||||
|
||||
/* Macros and constants */
|
||||
#define SET_ERROR_CODE(code) do { if(NULL != errorCode) { *errorCode = code; } } while(0)
|
||||
|
||||
#ifdef ERROR_SUCCESS
|
||||
#undef ERROR_SUCCESS
|
||||
#endif
|
||||
|
||||
/* Constants */
|
||||
#define ERROR_SUCCESS 0
|
||||
#define ERROR_INVALID_ERROR 1
|
||||
#define ERROR_NO_DEVICE 2
|
||||
#define ERROR_FAILED_TO_CLOSE 3
|
||||
#define ERROR_NOT_IMPLEMENTED 4
|
||||
#define ERROR_FEATURE_NOT_FOUND 5
|
||||
#define ERROR_TRANSFER_ERROR 6
|
||||
#define ERROR_BAD_USER_BUFFER 7
|
||||
#define ERROR_INPUT_OUT_OF_BOUNDS 8
|
||||
#define ERROR_SPECTROMETER_SATURATED 9
|
||||
#define ERROR_VALUE_NOT_FOUND 10
|
||||
|
||||
#endif /* SEABREEZEAPICONSTANTS_H */
|
@ -0,0 +1,58 @@
|
||||
/***************************************************//**
|
||||
* @file SerialNumberFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze SerialNumberFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_SERIALNUMBERFEATUREADAPTER_H
|
||||
#define SEABREEZE_SERIALNUMBERFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/serial_number/SerialNumberFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class SerialNumberFeatureAdapter
|
||||
: public FeatureAdapterTemplate<SerialNumberFeatureInterface> {
|
||||
public:
|
||||
SerialNumberFeatureAdapter(SerialNumberFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~SerialNumberFeatureAdapter();
|
||||
|
||||
int getSerialNumber(int *errorCode, char *buffer, int buffer_length);
|
||||
unsigned char getSerialNumberMaximumLength(int *errorCode);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,56 @@
|
||||
/***************************************************//**
|
||||
* @file ShutterFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze ShutterFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_SHUTTERFEATUREADAPTER_H
|
||||
#define SEABREEZE_SHUTTERFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/shutter/ShutterFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class ShutterFeatureAdapter
|
||||
: public FeatureAdapterTemplate<ShutterFeatureInterface> {
|
||||
public:
|
||||
ShutterFeatureAdapter(ShutterFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~ShutterFeatureAdapter();
|
||||
|
||||
void setShutterOpen(int *errorCode, bool open);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,74 @@
|
||||
/***************************************************//**
|
||||
* @file SpectrometerFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze OOISpectrometerFeature instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_SPECTROMETER_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_SPECTROMETER_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "vendors/OceanOptics/features/spectrometer/OOISpectrometerFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class SpectrometerFeatureAdapter : public FeatureAdapterTemplate<OOISpectrometerFeatureInterface> {
|
||||
public:
|
||||
SpectrometerFeatureAdapter(
|
||||
OOISpectrometerFeatureInterface *spec,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~SpectrometerFeatureAdapter();
|
||||
|
||||
/* Spectrometer commands */
|
||||
int getUnformattedSpectrum(int *errorCode,
|
||||
unsigned char *buffer, int bufferLength);
|
||||
int getFormattedSpectrum(int *errorCode,
|
||||
double* buffer, int bufferLength);
|
||||
int getUnformattedSpectrumLength(int *errorCode);
|
||||
int getFormattedSpectrumLength(int *errorCode);
|
||||
void setTriggerMode(int *errorCode, int mode);
|
||||
int getWavelengths(int *errorCode, double *wavelengths, int length);
|
||||
int getElectricDarkPixelCount(int *errorCode);
|
||||
int getElectricDarkPixelIndices(int *errorCode,
|
||||
int *indices, int length);
|
||||
void setIntegrationTimeMicros(int *errorCode,
|
||||
unsigned long integrationTimeMicros);
|
||||
long getMinimumIntegrationTimeMicros(int *errorCode);
|
||||
long getMaximumIntegrationTimeMicros(int *errorCode);
|
||||
double getMaximumIntensity(int *errorCode);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,60 @@
|
||||
/***************************************************//**
|
||||
* @file SpectrumProcessingFeatureAdapter.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze SpectrumProcessingFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_SPECTRUMPROCESSINGFEATUREADAPTER_H
|
||||
#define SEABREEZE_SPECTRUMPROCESSINGFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/spectrum_processing/SpectrumProcessingFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class SpectrumProcessingFeatureAdapter
|
||||
: public FeatureAdapterTemplate<SpectrumProcessingFeatureInterface> {
|
||||
public:
|
||||
SpectrumProcessingFeatureAdapter(SpectrumProcessingFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~SpectrumProcessingFeatureAdapter();
|
||||
|
||||
unsigned char readSpectrumProcessingBoxcarWidth(int *errorCode);
|
||||
unsigned short int readSpectrumProcessingScansToAverage(int *errorCode);
|
||||
void writeSpectrumProcessingBoxcarWidth(int *errorCode, unsigned char boxcarWidth);
|
||||
void writeSpectrumProcessingScansToAverage(int *errorCode, unsigned short int scansToAverage);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file StrayLightCoeffsFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze StrayLightCoeffFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_STRAYLIGHTCOEFFSFEATUREADAPTER_H
|
||||
#define SEABREEZE_STRAYLIGHTCOEFFSFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/stray_light/StrayLightCoeffsFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class StrayLightCoeffsFeatureAdapter
|
||||
: public FeatureAdapterTemplate<StrayLightCoeffsFeatureInterface> {
|
||||
public:
|
||||
StrayLightCoeffsFeatureAdapter(StrayLightCoeffsFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~StrayLightCoeffsFeatureAdapter();
|
||||
|
||||
int readStrayLightCoeffs(int *errorCode, double *buffer,
|
||||
int bufferLength);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,56 @@
|
||||
/***************************************************//**
|
||||
* @file StrobeLampFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze StrobeLampFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_STROBELAMPFEATUREADAPTER_H
|
||||
#define SEABREEZE_STROBELAMPFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/light_source/StrobeLampFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class StrobeLampFeatureAdapter
|
||||
: public FeatureAdapterTemplate<StrobeLampFeatureInterface> {
|
||||
public:
|
||||
StrobeLampFeatureAdapter(StrobeLampFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~StrobeLampFeatureAdapter();
|
||||
|
||||
void setStrobeLampEnable(int *errorCode, bool enable);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,58 @@
|
||||
/***************************************************//**
|
||||
* @file TemperatureFeatureAdapter.h
|
||||
* @date January 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a wrapper that allows
|
||||
* access to SeaBreeze TemperatureFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_TEMPERATUREFEATUREADAPTER_H
|
||||
#define SEABREEZE_TEMPERATUREFEATUREADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/temperature/TemperatureFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class TemperatureFeatureAdapter
|
||||
: public FeatureAdapterTemplate<TemperatureFeatureInterface> {
|
||||
public:
|
||||
TemperatureFeatureAdapter(TemperatureFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~TemperatureFeatureAdapter();
|
||||
|
||||
unsigned char readTemperatureCount(int *errorCode);
|
||||
double readTemperature(int *errorCode, int index);
|
||||
int readAllTemperatures(int *errorCode, double *buffer, int bufferLength);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,61 @@
|
||||
/***************************************************//**
|
||||
* @file ThermoElectricCoolerFeatureAdapter.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a wrapper that allows access to SeaBreeze
|
||||
* TECFeatureInterface instances.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2014, Ocean Optics Inc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject
|
||||
* to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*******************************************************/
|
||||
|
||||
#ifndef SEABREEZE_THERMO_ELECTRIC_COOLER_FEATURE_ADAPTER_H
|
||||
#define SEABREEZE_THERMO_ELECTRIC_COOLER_FEATURE_ADAPTER_H
|
||||
|
||||
#include "api/seabreezeapi/FeatureAdapterTemplate.h"
|
||||
#include "vendors/OceanOptics/features/thermoelectric/ThermoElectricFeatureInterface.h"
|
||||
|
||||
namespace seabreeze {
|
||||
namespace api {
|
||||
|
||||
class ThermoElectricCoolerFeatureAdapter
|
||||
: public FeatureAdapterTemplate<ThermoElectricFeatureInterface> {
|
||||
public:
|
||||
ThermoElectricCoolerFeatureAdapter(ThermoElectricFeatureInterface *intf,
|
||||
const FeatureFamily &f,
|
||||
Protocol *p, Bus *b, unsigned short instanceIndex);
|
||||
virtual ~ThermoElectricCoolerFeatureAdapter();
|
||||
|
||||
/* Thermoelectric cooler functions */
|
||||
double readTECTemperature(int *errorCode);
|
||||
void setTECTemperature(int *errorCode,
|
||||
double temperature_degrees_celsius);
|
||||
void setTECEnable(int *errorCode, bool tecEnable);
|
||||
void setTECFanEnable(int *errorCode, bool tecFanEnable);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user