1.air部署,细节待修改
This commit is contained in:
64
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/AcquisitionDelayProtocolInterface.h
vendored
Normal file
64
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/AcquisitionDelayProtocolInterface.h
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/***************************************************//**
|
||||
* @file AcquisitionDelayProtocolInterface.h
|
||||
* @date November 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into thermoelectric functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 ACQUISITION_DELAY_PROTOCOL_INTERFACE_H
|
||||
#define ACQUISITION_DELAY_PROTOCOL_INTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class AcquisitionDelayProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
AcquisitionDelayProtocolInterface(Protocol *protocol);
|
||||
virtual ~AcquisitionDelayProtocolInterface();
|
||||
|
||||
virtual void setAcquisitionDelayMicroseconds(const Bus &bus,
|
||||
const unsigned long delayMicros) throw (ProtocolException) = 0;
|
||||
|
||||
/* At this point, the supported devices don't have protocol
|
||||
* messages to get the current delay or the range of valid
|
||||
* settings. Later, such functions could be added here if
|
||||
* they are needed, but for now the protocol interface is
|
||||
* being kept to a minimum.
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* ACQUISITION_DELAY_PROTOCOL_INTERFACE_H */
|
||||
|
58
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ContinuousStrobeProtocolInterface.h
vendored
Normal file
58
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ContinuousStrobeProtocolInterface.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/***************************************************//**
|
||||
* @file ContinuousStrobeProtocolInterface.h
|
||||
* @date October 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into lamp functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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_PROTOCOL_INTERFACE_H
|
||||
#define SEABREEZE_CONTINUOUS_STROBE_PROTOCOL_INTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class ContinuousStrobeProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
ContinuousStrobeProtocolInterface(Protocol *proto);
|
||||
virtual ~ContinuousStrobeProtocolInterface();
|
||||
virtual void setContinuousStrobePeriodMicroseconds(const Bus &bus,
|
||||
unsigned short strobe_id, unsigned long period_usec)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual void setContinuousStrobeEnable(const Bus &bus,
|
||||
unsigned short strobe_id, bool enable)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
77
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/DataBufferProtocolInterface.h
vendored
Normal file
77
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/DataBufferProtocolInterface.h
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/***************************************************//**
|
||||
* @file DataBufferProtocolInterface.h
|
||||
* @date October 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into thermoelectric functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 DATABUFFERPROTOCOLINTERFACE_H
|
||||
#define DATABUFFERPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class DataBufferProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
DataBufferProtocolInterface(Protocol *protocol);
|
||||
virtual ~DataBufferProtocolInterface();
|
||||
|
||||
virtual void clearBuffer(const Bus &bus, unsigned char bufferIndex)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual unsigned long getNumberOfElements(const Bus &bus,
|
||||
unsigned char bufferIndex)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual unsigned long getBufferCapacity(const Bus &bus,
|
||||
unsigned char bufferIndex)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual unsigned long getBufferCapacityMinimum(const Bus &bus,
|
||||
unsigned char bufferIndex)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual unsigned long getBufferCapacityMaximum(const Bus &bus,
|
||||
unsigned char bufferIndex)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual void setBufferCapacity(const Bus &bus,
|
||||
unsigned char bufferIndex,
|
||||
const unsigned long capacity)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
} /* end namespace */
|
||||
|
||||
#endif /* DATABUFFERPROTOCOLINTERFACE_H */
|
||||
|
63
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/EEPROMProtocolInterface.h
vendored
Normal file
63
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/EEPROMProtocolInterface.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/***************************************************//**
|
||||
* @file EEPROMProtocolInterface.h
|
||||
* @date February 2009
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* an EEPROM slot on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 EEPROMPROTOCOLINTERFACE_H
|
||||
#define EEPROMPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class EEPROMProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
EEPROMProtocolInterface(Protocol *protocol);
|
||||
virtual ~EEPROMProtocolInterface();
|
||||
virtual std::vector<byte> *readEEPROMSlot(const Bus &bus, int slot)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual int writeEEPROMSlot(const Bus &bus, int slot,
|
||||
const std::vector<byte> &data) throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* EEPROMPROTOCOLINTERFACE_H */
|
62
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/FPGARegisterProtocolInterface.h
vendored
Normal file
62
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/FPGARegisterProtocolInterface.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************//**
|
||||
* @file FPGARegisterProtocolInterface.h
|
||||
* @date October 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* an FPGARegister slot on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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_FPGA_REGISTER_PROTOCOL_INTERFACE_H
|
||||
#define SEABREEZE_FPGA_REGISTER_PROTOCOL_INTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class FPGARegisterProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
FPGARegisterProtocolInterface(Protocol *protocol);
|
||||
virtual ~FPGARegisterProtocolInterface();
|
||||
virtual unsigned int readRegister(const Bus &bus, byte address)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual void writeRegister(const Bus &bus, byte address,
|
||||
unsigned int value) throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
82
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/IrradCalProtocolInterface.h
vendored
Normal file
82
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/IrradCalProtocolInterface.h
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
/***************************************************//**
|
||||
* @file IrradCalProtocolInterface.h
|
||||
* @date March 2010
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into irradiance calibration
|
||||
* storage functionality at the protocol level, agnostic to
|
||||
* any particular protocol. Each Protocol offering this
|
||||
* functionality should implement this interface.
|
||||
*
|
||||
* 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 IRRADCALPROTOCOLINTERFACE_H
|
||||
#define IRRADCALPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class IrradCalProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
IrradCalProtocolInterface(Protocol *protocol);
|
||||
virtual ~IrradCalProtocolInterface();
|
||||
|
||||
/**
|
||||
* Get the irradiance calibration from the device.
|
||||
*/
|
||||
virtual std::vector<float> *readIrradCal(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
/**
|
||||
* Write a new irradiance calibration to the device.
|
||||
*/
|
||||
virtual int writeIrradCal(const Bus &bus, const std::vector<float> &cal)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Determine whether the device has a stored irradiance collection area.
|
||||
* This will trap any exceptions so it is always safe to call.
|
||||
*/
|
||||
virtual int hasCollectionArea(const Bus &bus) = 0;
|
||||
|
||||
/**
|
||||
* Get the irradiance collection area from the device.
|
||||
*/
|
||||
virtual float readCollectionArea(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Write a new irradiance collection area to the device.
|
||||
*/
|
||||
virtual void writeCollectionArea(const Bus &bus, float area)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* IRRADCALPROTOCOLINTERFACE_H */
|
95
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/LightSourceProtocolInterface.h
vendored
Normal file
95
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/LightSourceProtocolInterface.h
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
/***************************************************//**
|
||||
* @file LightSourceProtocolInterface.h
|
||||
* @date April 2013
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* 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 LIGHTSOURCEPROTOCOLINTERFACE_H
|
||||
#define LIGHTSOURCEPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class LightSourceProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
LightSourceProtocolInterface(Protocol *proto);
|
||||
virtual ~LightSourceProtocolInterface();
|
||||
|
||||
virtual bool hasLightSourceEnable(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual bool isLightSourceEnabled(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual bool hasVariableIntensity(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual void setLightSourceEnable(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex, bool enable) throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
class LightSourceProtocolInterface_NormalizedIntensity {
|
||||
public:
|
||||
LightSourceProtocolInterface_NormalizedIntensity();
|
||||
virtual ~LightSourceProtocolInterface_NormalizedIntensity();
|
||||
|
||||
virtual double getIntensity(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual void setIntensity(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex, double intensity) throw (ProtocolException) = 0;
|
||||
|
||||
virtual double getIntensityMinimum(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) = 0;
|
||||
|
||||
virtual double getIntensityMaximum(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) = 0;
|
||||
};
|
||||
|
||||
class LightSourceProtocolInterface_Counts {
|
||||
public:
|
||||
LightSourceProtocolInterface_Counts();
|
||||
virtual ~LightSourceProtocolInterface_Counts();
|
||||
|
||||
virtual int getIntensityCounts(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual int getIntensityMinimumCounts(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual int getIntensityMaximumCounts(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex) throw (ProtocolException) = 0;
|
||||
|
||||
virtual void setIntensityCounts(const Bus &bus, int moduleIndex,
|
||||
int lightSourceIndex, int counts) throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* LIGHTSOURCEPROTOCOLINTERFACE_H */
|
@ -0,0 +1,61 @@
|
||||
/***************************************************//**
|
||||
* @file NonlinearityCoeffsProtocolInterface.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* nonlinearity calibrations on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 NONLINEARITYCOEFFSPROTOCOLINTERFACE_H
|
||||
#define NONLINEARITYCOEFFSPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class NonlinearityCoeffsProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
NonlinearityCoeffsProtocolInterface(Protocol *protocol);
|
||||
virtual ~NonlinearityCoeffsProtocolInterface();
|
||||
virtual std::vector<double> *readNonlinearityCoeffs(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* NONLINEARITYCOEFFSPROTOCOLINTERFACE_H */
|
73
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/OpticalBenchProtocolInterface.h
vendored
Normal file
73
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/OpticalBenchProtocolInterface.h
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/***************************************************//**
|
||||
* @file OpticalBenchProtocolInterface.h
|
||||
* @date Janaure 2015
|
||||
* @author Ocean Optics, Inc., Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* Optical Bench Parameters on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise read involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for readting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 OPTICALBENCHPROTOCOLINTERFACE_H
|
||||
#define OPTICALBENCHPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class OpticalBenchProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
OpticalBenchProtocolInterface(Protocol *protocol);
|
||||
virtual ~OpticalBenchProtocolInterface();
|
||||
virtual std::string *readOpticalBenchID(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::string *readOpticalBenchSerialNumber(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual unsigned short int readOpticalBenchSlitWidthMicrons(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual unsigned short int readOpticalBenchFiberDiameterMicrons(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::string *readOpticalBenchGrating(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::string *readOpticalBenchFilter(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::string *readOpticalBenchCoating(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* OPTICALBENCHPROTOCOLINTERFACE_H */
|
87
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/PixelBinningProtocolInterface.h
vendored
Normal file
87
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/PixelBinningProtocolInterface.h
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
/***************************************************//**
|
||||
* @file PixelBinningProtocolInterface.h
|
||||
* @date October 2015
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into thermoelectric functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 PIXELBINNINGPROTOCOLINTERFACE_H
|
||||
#define PIXELBINNINGPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class PixelBinningProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
PixelBinningProtocolInterface(Protocol *protocol);
|
||||
virtual ~PixelBinningProtocolInterface();
|
||||
|
||||
/**
|
||||
* Get the pixel binning factor of the device.
|
||||
*/
|
||||
virtual unsigned char readPixelBinningFactor(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Set the pixel binning factor on the device.
|
||||
*/
|
||||
virtual void writePixelBinningFactor(const Bus &bus, const unsigned char binningFactor)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Get the default pixel binning factor of the device.
|
||||
*/
|
||||
virtual unsigned char readDefaultPixelBinningFactor(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Set the default pixel binning factor on the device.
|
||||
*/
|
||||
virtual void writeDefaultPixelBinningFactor(const Bus &bus, const unsigned char binningFactor)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Reset the default pixel binning factor on the device. This will reinstate the factory default of 0.
|
||||
*/
|
||||
virtual void writeDefaultPixelBinningFactor(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Get the maximum pixel binning factor of the device.
|
||||
*/
|
||||
virtual unsigned char readMaxPixelBinningFactor(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* PIXELBINNINGPROTOCOLINTERFACE_H */
|
@ -0,0 +1,50 @@
|
||||
/***************************************************//**
|
||||
* @file ProgrammableSaturationProtocolInterface.h
|
||||
* @date March 2016
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* LICENSE:
|
||||
*
|
||||
* SeaBreeze Copyright (C) 2016, 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 PROGRAMMABLESATURATIONPROTOCOLINTERFACE_H
|
||||
#define PROGRAMMABLESATURATIONPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class ProgrammableSaturationProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
ProgrammableSaturationProtocolInterface(Protocol *protocol);
|
||||
virtual ~ProgrammableSaturationProtocolInterface();
|
||||
|
||||
virtual unsigned int getSaturation(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* PROGRAMMABLESATURATIONPROTOCOLINTERFACE_H */
|
65
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/RevisionProtocolInterface.h
vendored
Normal file
65
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/RevisionProtocolInterface.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/***************************************************//**
|
||||
* @file RevisionProtocolInterface.h
|
||||
* @date Janaure 2015
|
||||
* @author Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* temperature sensors on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 REVISIONPROTOCOLINTERFACE_H
|
||||
#define REVISIONPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class RevisionProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
RevisionProtocolInterface(Protocol *protocol);
|
||||
virtual ~RevisionProtocolInterface();
|
||||
|
||||
virtual unsigned char readHardwareRevision(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
virtual unsigned short int readFirmwareRevision(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* REVISIONPROTOCOLINTERFACE_H */
|
63
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/SerialNumberProtocolInterface.h
vendored
Normal file
63
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/SerialNumberProtocolInterface.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/***************************************************//**
|
||||
* @file SerialNumberProtocolInterface.h
|
||||
* @date February 2011
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* serial numbers on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 SERIALNUMBERPROTOCOLINTERFACE_H
|
||||
#define SERIALNUMBERPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class SerialNumberProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
SerialNumberProtocolInterface(Protocol *protocol);
|
||||
virtual ~SerialNumberProtocolInterface();
|
||||
virtual std::string *readSerialNumber(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual unsigned char readSerialNumberMaximumLength(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SERIALNUMBERPROTOCOLINTERFACE_H */
|
60
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ShutterProtocolInterface.h
vendored
Normal file
60
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ShutterProtocolInterface.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/***************************************************//**
|
||||
* @file ShutterProtocolInterface.h
|
||||
* @date January 2011
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* a built-in shutter on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 SHUTTERPROTOCOLINTERFACE_H
|
||||
#define SHUTTERPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class ShutterProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
ShutterProtocolInterface(Protocol *protocol);
|
||||
virtual ~ShutterProtocolInterface();
|
||||
virtual void setShutterOpen(const Bus &bus, bool opened)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SHUTTERPROTOCOLINTERFACE_H */
|
64
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/SpectrometerProtocolInterface.h
vendored
Normal file
64
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/SpectrometerProtocolInterface.h
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/***************************************************//**
|
||||
* @file SpectrometerProtocolInterface.h
|
||||
* @date February 2009
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into spectrometer functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 SPECTROMETERPROTOCOLINTERFACE_H
|
||||
#define SPECTROMETERPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
#include "vendors/OceanOptics/features/spectrometer/SpectrometerTriggerMode.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class SpectrometerProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
SpectrometerProtocolInterface(Protocol *protocol);
|
||||
virtual ~SpectrometerProtocolInterface();
|
||||
virtual std::vector<byte> *readUnformattedSpectrum(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::vector<double> *readSpectrum(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual void requestSpectrum(const Bus &bus) throw (ProtocolException) = 0;
|
||||
virtual void setIntegrationTimeMicros(const Bus &bus,
|
||||
unsigned long time_usec) throw (ProtocolException) = 0;
|
||||
virtual void setTriggerMode(const Bus &bus,
|
||||
SpectrometerTriggerMode &mode) throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SPECTROMETERPROTOCOLINTERFACE_H */
|
@ -0,0 +1,67 @@
|
||||
/***************************************************//**
|
||||
* @file SpectrumProcessingProtocolInterface.h
|
||||
* @date February 2015
|
||||
* @author Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* spectrum processing features on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 SPECTRUMPROCESSINGPROTOCOLINTERFACE_H
|
||||
#define SPECTRUMPROCESSINGPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class SpectrumProcessingProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
SpectrumProcessingProtocolInterface(Protocol *protocol);
|
||||
virtual ~SpectrumProcessingProtocolInterface();
|
||||
virtual unsigned char readSpectrumProcessingBoxcarWidth(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual unsigned short int readSpectrumProcessingScansToAverage(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual void writeSpectrumProcessingBoxcarWidth(const Bus &bus, unsigned char boxcarWidth)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual void writeSpectrumProcessingScansToAverage(const Bus &bus, unsigned short int scansToAverage)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SPECTRUMPROCESSINGPROTOCOLINTERFACE_H */
|
61
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/StrayLightCoeffsProtocolInterface.h
vendored
Normal file
61
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/StrayLightCoeffsProtocolInterface.h
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/***************************************************//**
|
||||
* @file StrayLightCoeffsProtocolInterface.h
|
||||
* @date February 2012
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* stray light calibrations on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 STRAYLIGHTCOEFFSPROTOCOLINTERFACE_H
|
||||
#define STRAYLIGHTCOEFFSPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class StrayLightCoeffsProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
StrayLightCoeffsProtocolInterface(Protocol *protocol);
|
||||
virtual ~StrayLightCoeffsProtocolInterface();
|
||||
virtual std::vector<double> *readStrayLightCoeffs(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* STRAYLIGHTCOEFFSPROTOCOLINTERFACE_H */
|
54
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/StrobeLampProtocolInterface.h
vendored
Normal file
54
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/StrobeLampProtocolInterface.h
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/***************************************************//**
|
||||
* @file StrobeLampProtocolInterface.h
|
||||
* @date February 2009
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into lamp functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 STROBELAMPPROTOCOLINTERFACE_H
|
||||
#define STROBELAMPPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class StrobeLampProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
StrobeLampProtocolInterface(Protocol *proto);
|
||||
virtual ~StrobeLampProtocolInterface();
|
||||
virtual void setStrobeLampEnable(const Bus &bus, bool enable)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* LAMPPROTOCOLINTERFACE_H */
|
65
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/TemperatureProtocolInterface.h
vendored
Normal file
65
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/TemperatureProtocolInterface.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/***************************************************//**
|
||||
* @file TemperatureProtocolInterface.h
|
||||
* @date Janaure 2015
|
||||
* @author Kirk Clendinning, Heliospectra
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* temperature sensors on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 TEMPERATUREPROTOCOLINTERFACE_H
|
||||
#define TEMPERATUREPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class TemperatureProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
TemperatureProtocolInterface(Protocol *protocol);
|
||||
virtual ~TemperatureProtocolInterface();
|
||||
virtual unsigned char readTemperatureCount(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual double readTemperature(const Bus &bus, int index)
|
||||
throw (ProtocolException) = 0;
|
||||
virtual std::vector<double> *readAllTemperatures(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* TEMPERATUREPROTOCOLINTERFACE_H */
|
73
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ThermoElectricProtocolInterface.h
vendored
Normal file
73
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/ThermoElectricProtocolInterface.h
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/***************************************************//**
|
||||
* @file ThermoElectricProtocolInterface.h
|
||||
* @date February 2009
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a generic interface into thermoelectric functionality
|
||||
* at the protocol level, agnostic to any particular protocol.
|
||||
* Each Protocol offering this functionality should implement
|
||||
* this interface.
|
||||
*
|
||||
* 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 THERMOELECTRICPROTOCOLINTERFACE_H
|
||||
#define THERMOELECTRICPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class ThermoElectricProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
ThermoElectricProtocolInterface(Protocol *protocol);
|
||||
virtual ~ThermoElectricProtocolInterface();
|
||||
|
||||
/**
|
||||
* Get the temperature of the thermoelectric device.
|
||||
*/
|
||||
virtual double readThermoElectricTemperatureCelsius(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Enable the thermoelectric unit on the device.
|
||||
*/
|
||||
virtual void writeThermoElectricEnable(const Bus &bus, bool enable)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
/**
|
||||
* Set the target temperature for the thermoelectric in degrees
|
||||
* Celsius. The actual temperature that the device
|
||||
* can reach may be a function of ambient temperature.
|
||||
*/
|
||||
virtual void writeThermoElectricSetPointCelsius(const Bus &bus, double degreesC)
|
||||
throw (ProtocolException) = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* THERMOELECTRICPROTOCOLINTERFACE_H */
|
62
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/WaveCalProtocolInterface.h
vendored
Normal file
62
Source/OSIF/include/vendors/OceanOptics/protocols/interfaces/WaveCalProtocolInterface.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************//**
|
||||
* @file WaveCalProtocolInterface.h
|
||||
* @date January 2011
|
||||
* @author Ocean Optics, Inc.
|
||||
*
|
||||
* This is a simple interface for any protocol to implement
|
||||
* that provides a protocol-agnostic mechanism for accessing
|
||||
* wavelength calibrations on an Ocean Optics device.
|
||||
*
|
||||
* This does not extend Protocol or otherwise get involved
|
||||
* in that hierarchy because it might interfere with the
|
||||
* lookup process for getting a Protocol object to delegate
|
||||
* these methods to. Worse, it could end up inheriting
|
||||
* twice from the same base class, which is just messy.
|
||||
*
|
||||
* 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 WAVECALPROTOCOLINTERFACE_H
|
||||
#define WAVECALPROTOCOLINTERFACE_H
|
||||
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/ProtocolException.h"
|
||||
#include "common/protocols/ProtocolHelper.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class WaveCalProtocolInterface : public ProtocolHelper {
|
||||
public:
|
||||
WaveCalProtocolInterface(Protocol *protocol);
|
||||
virtual ~WaveCalProtocolInterface();
|
||||
virtual std::vector<double> *readWavelengthCoeffs(const Bus &bus)
|
||||
throw (ProtocolException) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* WAVECALPROTOCOLINTERFACE_H */
|
||||
|
Reference in New Issue
Block a user