mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-20 03:49:43 +08:00
主采集逻辑修改中,添加了部分写文件实现
This commit is contained in:
62
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeature.h
vendored
Normal file
62
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/***************************************************//**
|
||||
* @file EEPROMSlotFeature.h
|
||||
* @date February 2009
|
||||
* @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 EEPROMSLOTFEATURE_H
|
||||
#define EEPROMSLOTFEATURE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureInterface.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class EEPROMSlotFeature : public EEPROMSlotFeatureBase, public EEPROMSlotFeatureInterface {
|
||||
public:
|
||||
EEPROMSlotFeature(unsigned int numberOfSlots);
|
||||
virtual ~EEPROMSlotFeature();
|
||||
virtual std::vector< std::vector<byte> * > *readAllEEPROMSlots(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException);
|
||||
|
||||
/* Overriding this to change its visibility */
|
||||
virtual std::vector<byte> *readEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot) throw (FeatureException, IllegalArgumentException);
|
||||
virtual int writeEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot, const std::vector<byte> &data)
|
||||
throw (FeatureException, IllegalArgumentException);
|
||||
|
||||
/* Overriding from Feature */
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
|
||||
private:
|
||||
unsigned int numberOfSlots;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* EEPROMSLOTFEATURE_H */
|
75
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h
vendored
Normal file
75
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/***************************************************//**
|
||||
* @file EEPROMSlotFeatureBase.h
|
||||
* @date February 2009
|
||||
* @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 EEPROMSLOTFEATUREBASE_H
|
||||
#define EEPROMSLOTFEATUREBASE_H
|
||||
|
||||
#include "common/features/FeatureImpl.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/SeaBreeze.h"
|
||||
#include "common/exceptions/FeatureException.h"
|
||||
#include "common/exceptions/NumberFormatException.h"
|
||||
#include "common/exceptions/IllegalArgumentException.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class EEPROMSlotFeatureBase : public FeatureImpl {
|
||||
/* Keeping most of this class protected to force use of the derived
|
||||
* classes, e.g. EEPROMSlotFeature, which can provide better control
|
||||
* over which slots are accessed.
|
||||
*/
|
||||
|
||||
protected:
|
||||
|
||||
EEPROMSlotFeatureBase();
|
||||
virtual ~EEPROMSlotFeatureBase();
|
||||
virtual std::vector<byte> *readEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot) throw (FeatureException, IllegalArgumentException);
|
||||
virtual int writeEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot, const std::vector<byte> &data)
|
||||
throw (FeatureException, IllegalArgumentException);
|
||||
|
||||
/* This is a utility function that reads out the given EEPROM slot and
|
||||
* parses it into a double value. If for some reason the parse fails,
|
||||
* this will throw a NumberFormatException.
|
||||
*/
|
||||
double readDouble(const Protocol &protocol, const Bus &bus,
|
||||
unsigned int slot) throw (FeatureException, NumberFormatException);
|
||||
|
||||
/* As with readDouble(), this will read a slot and parse into an integer */
|
||||
long readLong(const Protocol &protocol, const Bus &bus,
|
||||
unsigned int slot) throw (FeatureException, NumberFormatException);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* EEPROMSLOTFEATUREBASE_H */
|
60
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureInterface.h
vendored
Normal file
60
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureInterface.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/***************************************************//**
|
||||
* @file EEPROMSlotFeature.h
|
||||
* @date February 2011
|
||||
* @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 EEPROMSLOTFEATUREINTERFACE_H
|
||||
#define EEPROMSLOTFEATUREINTERFACE_H
|
||||
|
||||
#include <vector>
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include "common/exceptions/FeatureException.h"
|
||||
#include "common/exceptions/IllegalArgumentException.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class EEPROMSlotFeatureInterface {
|
||||
public:
|
||||
virtual ~EEPROMSlotFeatureInterface() = 0;
|
||||
virtual std::vector< std::vector<byte> * > *readAllEEPROMSlots(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException) = 0;
|
||||
|
||||
virtual std::vector<byte> *readEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot) throw (FeatureException, IllegalArgumentException) = 0;
|
||||
virtual int writeEEPROMSlot(const Protocol &protocol,
|
||||
const Bus &bus, unsigned int slot, const std::vector<byte> &data)
|
||||
throw (FeatureException, IllegalArgumentException) = 0;
|
||||
};
|
||||
|
||||
/* Default implementation for (otherwise) pure virtual destructor */
|
||||
inline EEPROMSlotFeatureInterface::~EEPROMSlotFeatureInterface() {}
|
||||
|
||||
}
|
||||
|
||||
#endif /* EEPROMSLOTFEATUREINTERFACE_H */
|
||||
|
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/NonlinearityEEPROMSlotFeature.h
vendored
Normal file
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/NonlinearityEEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/***************************************************//**
|
||||
* @file NonlinearityEEPROMSlotFeature.h
|
||||
* @date February 2009
|
||||
* @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 NONLINEARITYEEPROMSLOTFEATURE_H
|
||||
#define NONLINEARITYEEPROMSLOTFEATURE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/nonlinearity/NonlinearityCoeffsFeatureInterface.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class NonlinearityEEPROMSlotFeature
|
||||
: public NonlinearityCoeffsFeatureInterface, public EEPROMSlotFeatureBase {
|
||||
public:
|
||||
NonlinearityEEPROMSlotFeature();
|
||||
virtual ~NonlinearityEEPROMSlotFeature();
|
||||
std::vector<double> *readNonlinearityCoefficients(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
|
||||
/* Overriding from Feature */
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* NONLINEARITYEEPROMSLOTFEATURE_H */
|
59
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeature.h
vendored
Normal file
59
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/***************************************************//**
|
||||
* @file SaturationEEPROMSlotFeature_EEPROM.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 SATURATIONEEPROMSLOTFEATURE_EEPROM_H
|
||||
#define SATURATIONEEPROMSLOTFEATURE_EEPROM_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeatureBase.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
/* This class is intended for most devices that store their saturation level
|
||||
* in EEPROM in the so-called "autonulling" configuration. Note that the
|
||||
* NIRQuest, MayaPro, Apex and some others do not do things quite the same
|
||||
* way, so they should not use this class.
|
||||
*/
|
||||
class SaturationEEPROMSlotFeature
|
||||
: public SaturationEEPROMSlotFeatureBase {
|
||||
public:
|
||||
SaturationEEPROMSlotFeature(int slot);
|
||||
virtual ~SaturationEEPROMSlotFeature();
|
||||
|
||||
protected:
|
||||
/* Inherited from SaturationEEPROMSlotFeatureBase */
|
||||
virtual unsigned int getSaturation(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException);
|
||||
|
||||
private:
|
||||
int autonullingSlot;
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SATURATIONEEPROMSLOTFEATURE_EEPROM_H */
|
67
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeatureBase.h
vendored
Normal file
67
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeatureBase.h
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
/***************************************************//**
|
||||
* @file SaturationEEPROMSlotFeatureBase.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 SATURATIONEEPROMSLOTFEATUREBASE_H
|
||||
#define SATURATIONEEPROMSLOTFEATUREBASE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/spectrometer/ProgrammableSaturationFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class SaturationEEPROMSlotFeatureBase
|
||||
: public EEPROMSlotFeatureBase, public ProgrammableSaturationFeatureBase {
|
||||
public:
|
||||
SaturationEEPROMSlotFeatureBase();
|
||||
virtual ~SaturationEEPROMSlotFeatureBase();
|
||||
|
||||
/* Inherited from ProgrammableSaturationFeature */
|
||||
virtual unsigned int getSaturation() throw (FeatureException);
|
||||
|
||||
/* Inherited from Feature */
|
||||
virtual bool initialize(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
|
||||
protected:
|
||||
/* Derived classes must implement this in whatever way is appropriate
|
||||
* to get the saturation level for the device.
|
||||
*/
|
||||
virtual unsigned int getSaturation(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException) = 0;
|
||||
|
||||
private:
|
||||
unsigned int saturation;
|
||||
bool valid;
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SATURATIONEEPROMSLOTFEATUREBASE_H */
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file SaturationEEPROMSlotFeature_MayaPro.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 SATURATIONEEPROMSLOTFEATURE_MAYAPRO_H
|
||||
#define SATURATIONEEPROMSLOTFEATURE_MAYAPRO_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeatureBase.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
/* This class is intended specifically for getting the saturation level
|
||||
* from a MayaPro or devices that are closely related to it.
|
||||
*/
|
||||
class SaturationEEPROMSlotFeature_MayaPro
|
||||
: public SaturationEEPROMSlotFeatureBase {
|
||||
public:
|
||||
SaturationEEPROMSlotFeature_MayaPro(int slot);
|
||||
virtual ~SaturationEEPROMSlotFeature_MayaPro();
|
||||
|
||||
protected:
|
||||
/* Inherited from SaturationEEPROMSlotFeatureBase */
|
||||
virtual unsigned int getSaturation(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException);
|
||||
|
||||
private:
|
||||
int saturationSlot;
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SATURATIONEEPROMSLOTFEATURE_MAYAPRO_H */
|
@ -0,0 +1,57 @@
|
||||
/***************************************************//**
|
||||
* @file SaturationEEPROMSlotFeature_NIRQuest.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 SATURATIONEEPROMSLOTFEATURE_NIRQUEST_H
|
||||
#define SATURATIONEEPROMSLOTFEATURE_NIRQUEST_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/SaturationEEPROMSlotFeatureBase.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
/* This class is intended specifically for getting the saturation level
|
||||
* from a NIRQuest256/512. No other devices should use this class.
|
||||
*/
|
||||
class SaturationEEPROMSlotFeature_NIRQuest
|
||||
: public SaturationEEPROMSlotFeatureBase {
|
||||
public:
|
||||
SaturationEEPROMSlotFeature_NIRQuest(int slot);
|
||||
virtual ~SaturationEEPROMSlotFeature_NIRQuest();
|
||||
|
||||
protected:
|
||||
/* Inherited from SaturationEEPROMSlotFeatureBase */
|
||||
virtual unsigned int getSaturation(const Protocol &protocol,
|
||||
const Bus &bus) throw (FeatureException);
|
||||
|
||||
private:
|
||||
int saturationSlot;
|
||||
};
|
||||
|
||||
} /* end namespace seabreeze */
|
||||
|
||||
#endif /* SATURATIONEEPROMSLOTFEATURE_NIRQUEST_H */
|
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SerialNumberEEPROMSlotFeature.h
vendored
Normal file
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/SerialNumberEEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/***************************************************//**
|
||||
* @file SerialNumberEEPROMSlotFeature.h
|
||||
* @date February 2009
|
||||
* @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 SERIALNUMBEREEPROMSLOTFEATURE_H
|
||||
#define SERIALNUMBEREEPROMSLOTFEATURE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/serial_number/SerialNumberFeatureInterface.h"
|
||||
#include <string>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class SerialNumberEEPROMSlotFeature
|
||||
: public EEPROMSlotFeatureBase, public SerialNumberFeatureInterface {
|
||||
public:
|
||||
SerialNumberEEPROMSlotFeature();
|
||||
virtual ~SerialNumberEEPROMSlotFeature();
|
||||
std::string *readSerialNumber(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
unsigned char readSerialNumberMaximumLength(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
|
||||
/* Overriding from Feature */
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SERIALNUMBEREEPROMSLOTFEATURE_H */
|
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/StrayLightEEPROMSlotFeature.h
vendored
Normal file
55
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/StrayLightEEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/***************************************************//**
|
||||
* @file StrayLightEEPROMSlotFeature.h
|
||||
* @date February 2012
|
||||
* @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 STRAYLIGHTEEPROMSLOTFEATURE_H
|
||||
#define STRAYLIGHTEEPROMSLOTFEATURE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/stray_light/StrayLightCoeffsFeatureInterface.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class StrayLightEEPROMSlotFeature
|
||||
: public StrayLightCoeffsFeatureInterface, public EEPROMSlotFeatureBase {
|
||||
public:
|
||||
StrayLightEEPROMSlotFeature();
|
||||
virtual ~StrayLightEEPROMSlotFeature();
|
||||
std::vector<double> *readStrayLightCoefficients(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
|
||||
/* Overriding from Feature */
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* STRAYLIGHTEEPROMSLOTFEATURE_H */
|
61
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/WavelengthEEPROMSlotFeature.h
vendored
Normal file
61
source/OSIF/include/vendors/OceanOptics/features/eeprom_slots/WavelengthEEPROMSlotFeature.h
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
/***************************************************//**
|
||||
* @file WavelengthEEPROMSlotFeature.h
|
||||
* @date February 2009
|
||||
* @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 WAVELENGTHEEPROMSLOTFEATURE_H
|
||||
#define WAVELENGTHEEPROMSLOTFEATURE_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/EEPROMSlotFeatureBase.h"
|
||||
#include "vendors/OceanOptics/features/wavecal/WaveCalFeatureInterface.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class WavelengthEEPROMSlotFeature
|
||||
: public WaveCalFeatureInterface, public EEPROMSlotFeatureBase {
|
||||
public:
|
||||
WavelengthEEPROMSlotFeature(unsigned int numberOfPixels);
|
||||
virtual ~WavelengthEEPROMSlotFeature();
|
||||
std::vector<double> *readWavelengths(const Protocol &protocol, const Bus &bus)
|
||||
throw (FeatureException);
|
||||
|
||||
/* Overriding from Feature */
|
||||
virtual FeatureFamily getFeatureFamily();
|
||||
|
||||
protected:
|
||||
virtual std::vector<double> *computeWavelengths(
|
||||
double polynomial[], int length);
|
||||
unsigned int numberOfPixels;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* WAVELENGTHEEPROMSLOTFEATURE_H */
|
||||
|
@ -0,0 +1,54 @@
|
||||
/***************************************************//**
|
||||
* @file WavelengthEEPROMSlotFeature_QE65000.h
|
||||
* @date March 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 WAVELENGTHEEPROMSLOTFEATUREQE65000_H
|
||||
#define WAVELENGTHEEPROMSLOTFEATUREQE65000_H
|
||||
|
||||
#include "vendors/OceanOptics/features/eeprom_slots/WavelengthEEPROMSlotFeature.h"
|
||||
#include "common/protocols/Protocol.h"
|
||||
#include "common/buses/Bus.h"
|
||||
#include <vector>
|
||||
|
||||
namespace seabreeze {
|
||||
|
||||
class WavelengthEEPROMSlotFeature_QE65000
|
||||
: public WavelengthEEPROMSlotFeature {
|
||||
public:
|
||||
WavelengthEEPROMSlotFeature_QE65000(unsigned int numberOfPixels);
|
||||
virtual ~WavelengthEEPROMSlotFeature_QE65000();
|
||||
|
||||
protected:
|
||||
/* Overriding from WavelengthEEPROMSlotFeature */
|
||||
virtual std::vector<double> *computeWavelengths(double polynomial[],
|
||||
int length);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* WAVELENGTHEEPROMSLOTFEATUREQE65000_H */
|
Reference in New Issue
Block a user