主采集逻辑修改中,添加了部分写文件实现

This commit is contained in:
2021-12-02 18:07:29 +08:00
parent 95da780693
commit efbcde38d7
403 changed files with 26857 additions and 77 deletions

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file OBPAcquisitionDelayProtocol.h
* @date November 2015
* @author Ocean Optics, Inc.
*
* 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 OBPACQUISITIONDELAYPROTOCOL_H
#define OBPACQUISITIONDELAYPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/AcquisitionDelayProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPAcquisitionDelayProtocol : public AcquisitionDelayProtocolInterface {
public:
OBPAcquisitionDelayProtocol();
virtual ~OBPAcquisitionDelayProtocol();
virtual void setAcquisitionDelayMicroseconds(const Bus &bus,
const unsigned long delayMicros) throw (ProtocolException);
};
} /* end namespace oceanBinaryProtocol */
} /* end namespace seabreeze */
#endif /* OBPACQUISITIONDELAYPROTOCOL_H */

View File

@ -0,0 +1,60 @@
/***************************************************//**
* @file OBPContinuousStrobeProtocol.h
* @date February 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 OBPCONTINUOUS_STROBE_PROTOCOL_H
#define OBPCONTINUOUS_STROBE_PROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/obp/exchanges/OBPContinuousStrobePeriodExchange.h"
#include "vendors/OceanOptics/protocols/obp/exchanges/OBPContinuousStrobeEnableExchange.h"
#include "vendors/OceanOptics/protocols/interfaces/ContinuousStrobeProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPContinuousStrobeProtocol : public ContinuousStrobeProtocolInterface {
public:
OBPContinuousStrobeProtocol();
virtual ~OBPContinuousStrobeProtocol();
virtual void setContinuousStrobePeriodMicroseconds(const Bus &bus,
unsigned short strobe_id, unsigned long period_usec)
throw (ProtocolException);
virtual void setContinuousStrobeEnable(const Bus &bus,
unsigned short strobe_id, bool enable)
throw (ProtocolException);
protected:
OBPContinuousStrobePeriodExchange *setPeriodExchange;
OBPContinuousStrobeEnableExchange *setEnableExchange;
};
}
}
#endif /* OBPCONTINUOUS_STROBE_PROTOCOL_H */

View File

@ -0,0 +1,71 @@
/***************************************************//**
* @file OBPDataBufferProtocol.h
* @date October 2015
* @author Ocean Optics, Inc.
*
* 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 OBPDATABUFFERPROTOCOL_H
#define OBPDATABUFFERPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/DataBufferProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPDataBufferProtocol : public DataBufferProtocolInterface {
public:
OBPDataBufferProtocol();
virtual ~OBPDataBufferProtocol();
virtual void clearBuffer(const Bus &bus, unsigned char bufferIndex)
throw (ProtocolException);
virtual unsigned long getNumberOfElements(const Bus &bus,
unsigned char bufferIndex)
throw (ProtocolException);
virtual unsigned long getBufferCapacity(const Bus &bus,
unsigned char bufferIndex)
throw (ProtocolException);
virtual unsigned long getBufferCapacityMinimum(const Bus &bus,
unsigned char bufferIndex)
throw (ProtocolException);
virtual unsigned long getBufferCapacityMaximum(const Bus &bus,
unsigned char bufferIndex)
throw (ProtocolException);
virtual void setBufferCapacity(const Bus &bus,
unsigned char bufferIndex,
const unsigned long capacity)
throw (ProtocolException);
};
} /* end namespace oceanBinaryProtocol */
} /* end namespace seabreeze */
#endif /* OBPDATABUFFERPROTOCOL_H */

View File

@ -0,0 +1,63 @@
/***************************************************//**
* @file OBPIrradCalProtocol.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 OBPIRRADCALPROTOCOL_H
#define OBPIRRADCALPROTOCOL_H
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/IrradCalProtocolInterface.h"
#include "common/exceptions/ProtocolException.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPIrradCalProtocol : public IrradCalProtocolInterface {
public:
OBPIrradCalProtocol(int maximumNumberOfPixels);
virtual ~OBPIrradCalProtocol();
/* Inherited from IrradCalProtocolInterface */
virtual std::vector<float> *readIrradCal(const Bus &bus)
throw (ProtocolException);
virtual int writeIrradCal(const Bus &bus, const std::vector<float> &cal)
throw (ProtocolException);
virtual int hasCollectionArea(const Bus &bus);
virtual float readCollectionArea(const Bus &bus)
throw (ProtocolException);
virtual void writeCollectionArea(const Bus &bus, float area)
throw (ProtocolException);
private:
unsigned int pixelCountMaximum;
};
}
}
#endif /* OBPIRRADCALPROTOCOL_H */

View File

@ -0,0 +1,86 @@
/***************************************************//**
* @file OBPLightSourceProtocol.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 SEABREEZE_OBPLIGHTSOURCEPROTOCOL_H
#define SEABREEZE_OBPLIGHTSOURCEPROTOCOL_H
#include "vendors/OceanOptics/protocols/interfaces/LightSourceProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPLightSourceProtocol : public LightSourceProtocolInterface {
public:
OBPLightSourceProtocol();
virtual ~OBPLightSourceProtocol();
/* Required by LightSourceProtocolInterface */
virtual bool isLightSourceEnabled(const Bus &bus, int moduleIndex,
int lightSourceIndex) throw (ProtocolException);
virtual void setLightSourceEnable(const Bus &bus, int moduleIndex,
int lightSourceIndex, bool enable) throw (ProtocolException);
protected:
virtual int getModuleCount() = 0;
virtual int getLightSourceCount(int moduleIndex) = 0;
};
class OBPLightSourceProtocol_NormalizedIntensity : public OBPLightSourceProtocol,
public LightSourceProtocolInterface_NormalizedIntensity {
public:
OBPLightSourceProtocol_NormalizedIntensity();
virtual ~OBPLightSourceProtocol_NormalizedIntensity();
virtual double getIntensity(const Bus &bus, int moduleIndex,
int lightSourceIndex) throw (ProtocolException);
virtual void setIntensity(const Bus &bus, int moduleIndex,
int lightSourceIndex, double intensity) throw (ProtocolException);
};
class OBPLightSourceProtocol_Counts : public OBPLightSourceProtocol,
public LightSourceProtocolInterface_Counts {
public:
OBPLightSourceProtocol_Counts();
virtual ~OBPLightSourceProtocol_Counts();
virtual int getIntensityCounts(const Bus &bus, int moduleIndex,
int lightSourceIndex) throw (ProtocolException);
virtual void setIntensityCounts(const Bus &bus, int moduleIndex,
int lightSourceIndex, int counts) throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,66 @@
/***************************************************//**
* @file OBPLightSourceProtocol_Ventana.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 SEABREEZE_OBPLIGHTSOURCEPROTOCOL_VENTANA_H
#define SEABREEZE_OBPLIGHTSOURCEPROTOCOL_VENTANA_H
#include "vendors/OceanOptics/protocols/obp/impls/OBPLightSourceProtocol.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPLightSourceProtocol_Ventana
: public OBPLightSourceProtocol_NormalizedIntensity {
public:
OBPLightSourceProtocol_Ventana();
virtual ~OBPLightSourceProtocol_Ventana();
/* Required by OBPLightSourceProtocol */
virtual int getModuleCount();
virtual int getLightSourceCount(int moduleIndex);
/* Required by LightSourceProtocolInterface */
virtual bool hasLightSourceEnable(const Bus &bus, int moduleIndex,
int lightSourceIndex) throw (ProtocolException);
virtual bool hasVariableIntensity(const Bus &bus, int moduleIndex,
int lightSourceIndex) throw (ProtocolException);
/* Required by LightSourceProtocolInterface_NormalizedIntensity */
virtual double getIntensityMinimum(const Bus &bus, int moduleIndex,
int lightSourceIndex);
virtual double getIntensityMaximum(const Bus &bus, int moduleIndex,
int lightSourceIndex);
};
}
}
#endif

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file OBPNonlinearityCoeffsProtocol.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 SEABREEZE_OBP_NONLINEARITYCOEFFSPROTOCOL_H
#define SEABREEZE_OBP_NONLINEARITYCOEFFSPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/NonlinearityCoeffsProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPNonlinearityCoeffsProtocol : public NonlinearityCoeffsProtocolInterface {
public:
OBPNonlinearityCoeffsProtocol();
virtual ~OBPNonlinearityCoeffsProtocol();
virtual std::vector<double> *readNonlinearityCoeffs(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,63 @@
/***************************************************//**
* @file OBPOpticalBenchProtocol.h
* @date January 2015
* @author Kirk Clendinning, Heliospectra
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc, Heliospectra AB
*
* 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_OBP_OPTICAL_BENCHROTOCOL_H
#define SEABREEZE_OBP_OPTICAL_BENCHROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/OpticalBenchProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPOpticalBenchProtocol : public OpticalBenchProtocolInterface {
public:
OBPOpticalBenchProtocol();
virtual ~OBPOpticalBenchProtocol();
virtual unsigned short int readOpticalBenchSlitWidthMicrons(const Bus &bus)
throw (ProtocolException);
virtual unsigned short int readOpticalBenchFiberDiameterMicrons(const Bus &bus)
throw (ProtocolException);
virtual std::string *readOpticalBenchID(const Bus &bus)
throw (ProtocolException);
virtual std::string *readOpticalBenchSerialNumber(const Bus &bus)
throw (ProtocolException);
virtual std::string *readOpticalBenchCoating(const Bus &bus)
throw (ProtocolException);
virtual std::string *readOpticalBenchFilter(const Bus &bus)
throw (ProtocolException);
virtual std::string *readOpticalBenchGrating(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,84 @@
/***************************************************//**
* @file OBPPixelBinningProtocol.h
* @date October 2015
* @author Ocean Optics, Inc.
*
* 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 OBPPIXELBINNINGPROTOCOL_H
#define OBPPIXELBINNINGPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/PixelBinningProtocolInterface.h"
#include <string>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPPixelBinningProtocol : public PixelBinningProtocolInterface {
public:
OBPPixelBinningProtocol();
virtual ~OBPPixelBinningProtocol();
/**
* Get the pixel binning factor of the device.
*/
virtual unsigned char readPixelBinningFactor(const Bus &bus)
throw (ProtocolException);
/**
* Set the pixel binning factor on the device.
*/
virtual void writePixelBinningFactor(const Bus &bus, const unsigned char binningFactor)
throw (ProtocolException);
/**
* Get the default pixel binning factor of the device.
*/
virtual unsigned char readDefaultPixelBinningFactor(const Bus &bus)
throw (ProtocolException);
/**
* Set the default pixel binning factor on the device.
*/
virtual void writeDefaultPixelBinningFactor(const Bus &bus, const unsigned char binningFactor)
throw (ProtocolException);
/**
* 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);
/**
* Get the maximum pixel binning factor of the device.
*/
virtual unsigned char readMaxPixelBinningFactor(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif /* OBPPIXELBINNINGPROTOCOL_H */

View File

@ -0,0 +1,53 @@
/***************************************************//**
* @file OBPProgrammableSaturationProtocol.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 OBPPROGRAMMABLESATURATIONPROTOCOL_H
#define OBPPROGRAMMABLESATURATIONPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/ProgrammableSaturationProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPProgrammableSaturationProtocol
: public ProgrammableSaturationProtocolInterface {
public:
OBPProgrammableSaturationProtocol();
virtual ~OBPProgrammableSaturationProtocol();
/* Inherited from ProgrammableSaturationProtocolInterface */
virtual unsigned int getSaturation(const Bus &bus)
throw (ProtocolException);
};
} /* end namespace oceanBinaryProtocol */
} /* end namespace seabreeze */
#endif /* OBPPROGRAMMABLESATURATIONPROTOCOL_H */

View File

@ -0,0 +1,54 @@
/***************************************************//**
* @file OBPRevisionProtocol.h
* @date January 2015
* @author Kirk Clendinning, Heliospectra
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc, Heliospectra AB
*
* 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_OBP_REVISIONPROTOCOL_H
#define SEABREEZE_OBP_REVISIONPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/RevisionProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPRevisionProtocol : public RevisionProtocolInterface {
public:
OBPRevisionProtocol();
virtual ~OBPRevisionProtocol();
virtual unsigned char readHardwareRevision(const Bus &bus)
throw (ProtocolException);
virtual unsigned short int readFirmwareRevision(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,53 @@
/***************************************************//**
* @file OBPSerialNumberProtocol.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 OBPSERIALNUMBERPROTOCOL_H
#define OBPSERIALNUMBERPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/SerialNumberProtocolInterface.h"
#include <string>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPSerialNumberProtocol : public SerialNumberProtocolInterface {
public:
OBPSerialNumberProtocol();
virtual ~OBPSerialNumberProtocol();
virtual std::string *readSerialNumber(const Bus &bus)
throw (ProtocolException);
virtual unsigned char readSerialNumberMaximumLength(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif /* OBPSERIALNUMBERPROTOCOL_H */

View File

@ -0,0 +1,54 @@
/***************************************************//**
* @file OBPShutterProtocol.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 OBPSHUTTERPROTOCOL_H
#define OBPSHUTTERPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/obp/exchanges/OBPShutterExchange.h"
#include "vendors/OceanOptics/protocols/interfaces/ShutterProtocolInterface.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPShutterProtocol : public ShutterProtocolInterface {
public:
OBPShutterProtocol();
virtual ~OBPShutterProtocol();
virtual void setShutterOpen(const Bus &bus, bool opened)
throw (ProtocolException);
protected:
OBPShutterExchange *shutterExchange;
};
}
}
#endif /* OBPSHUTTERPROTOCOL_H */

View File

@ -0,0 +1,79 @@
/***************************************************//**
* @file OBPSpectrometerProtocol.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 OBPSPECTROMETERPROTOCOL_H
#define OBPSPECTROMETERPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/protocols/Transfer.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/obp/exchanges/OBPIntegrationTimeExchange.h"
#include "vendors/OceanOptics/protocols/obp/exchanges/OBPTriggerModeExchange.h"
#include "vendors/OceanOptics/protocols/interfaces/SpectrometerProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPSpectrometerProtocol : public SpectrometerProtocolInterface {
public:
OBPSpectrometerProtocol(
OBPIntegrationTimeExchange *integrationTimeExchange,
Transfer *requestSpectrumExchange,
Transfer *unformattedSpectrumExchange,
Transfer *spectrumTransferExchange,
OBPTriggerModeExchange *triggerMode);
virtual ~OBPSpectrometerProtocol();
/* FIXME: instead of returning primitive vectors, should this return Data* so that
* metadata (units, etc.) can also be attached?
*/
virtual std::vector<byte> *readUnformattedSpectrum(const Bus &bus)
throw (ProtocolException);
virtual std::vector<double> *readSpectrum(const Bus &bus)
throw (ProtocolException);
virtual void requestSpectrum(const Bus &bus) throw (ProtocolException);
virtual void setIntegrationTimeMicros(const Bus &bus,
unsigned long time_usec) throw (ProtocolException);
virtual void setTriggerMode(const Bus &bus,
SpectrometerTriggerMode &mode) throw (ProtocolException);
private:
OBPIntegrationTimeExchange *integrationTimeExchange;
/* These are Transfers instead of Exchanges so that we can call getHints() on them.
* if getHints is promoted up to the level of Exchange, then these can revert back.
*/
Transfer *unformattedSpectrumExchange;
Transfer *requestSpectrumExchange;
Transfer *spectrumTransferExchange;
OBPTriggerModeExchange *triggerModeExchange;
};
}
}
#endif /* OBPSPECTROMETERPROTOCOL_H */

View File

@ -0,0 +1,57 @@
/***************************************************//**
* @file OBPSpectrumProcessingProtocol.h
* @date February 2015
* @author Kirk Clendinning, Heliospectra
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc, Heliospectra AB
*
* 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_OBP_SPECTRUMPROCESSINGPROTOCOL_H
#define SEABREEZE_OBP_SPECTRUMPROCESSINGPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/SpectrumProcessingProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPSpectrumProcessingProtocol : public SpectrumProcessingProtocolInterface {
public:
OBPSpectrumProcessingProtocol();
virtual ~OBPSpectrumProcessingProtocol();
virtual unsigned short int readSpectrumProcessingScansToAverage(const Bus &bus)
throw (ProtocolException);
virtual unsigned char readSpectrumProcessingBoxcarWidth(const Bus &bus)
throw (ProtocolException);
virtual void writeSpectrumProcessingScansToAverage(const Bus &bus, unsigned short int scansToAverage)
throw (ProtocolException);
virtual void writeSpectrumProcessingBoxcarWidth(const Bus &bus, unsigned char boxcarWidth)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file OBPStrayLightCoeffsProtocol.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 SEABREEZE_OBP_STRAYLIGHTCOEFFSPROTOCOL_H
#define SEABREEZE_OBP_STRAYLIGHTCOEFFSPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/StrayLightCoeffsProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPStrayLightCoeffsProtocol : public StrayLightCoeffsProtocolInterface {
public:
OBPStrayLightCoeffsProtocol();
virtual ~OBPStrayLightCoeffsProtocol();
virtual std::vector<double> *readStrayLightCoeffs(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file OBPStrobeLampProtocol.cpp
* @date February 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 OBPSTROBELAMPPROTOCOL_H
#define OBPSTROBELAMPPROTOCOL_H
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/StrobeLampProtocolInterface.h"
#include "common/exceptions/ProtocolException.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPStrobeLampProtocol : public StrobeLampProtocolInterface {
public:
OBPStrobeLampProtocol();
virtual ~OBPStrobeLampProtocol();
virtual void setStrobeLampEnable(const Bus &bus, bool enable)
throw (ProtocolException);
};
}
}
#endif /* OBPSTROBELAMPPROTOCOL_H */

View File

@ -0,0 +1,56 @@
/***************************************************//**
* @file OBPTemperatureProtocol.h
* @date January 2015
* @author Kirk Clendinning, Heliospectra
*
* LICENSE:
*
* SeaBreeze Copyright (C) 2015, Ocean Optics Inc, Heliospectra AB
*
* 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_OBP_TEMPERATUREPROTOCOL_H
#define SEABREEZE_OBP_TEMPERATUREPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/TemperatureProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPTemperatureProtocol : public TemperatureProtocolInterface {
public:
OBPTemperatureProtocol();
virtual ~OBPTemperatureProtocol();
virtual unsigned char readTemperatureCount(const Bus &bus)
throw (ProtocolException);
virtual double readTemperature(const Bus &bus, int index)
throw (ProtocolException);
virtual std::vector<double> *readAllTemperatures(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif

View File

@ -0,0 +1,57 @@
/***************************************************//**
* @file OBPThermoElectricProtocol.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 OBPTHERMOELECTRICPROTOCOL_H
#define OBPTHERMOELECTRICPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/ThermoElectricProtocolInterface.h"
#include <string>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPThermoElectricProtocol : public ThermoElectricProtocolInterface {
public:
OBPThermoElectricProtocol();
virtual ~OBPThermoElectricProtocol();
virtual double readThermoElectricTemperatureCelsius(const Bus &bus)
throw (ProtocolException);
virtual void writeThermoElectricEnable(const Bus &bus, bool enable)
throw (ProtocolException);
virtual void writeThermoElectricSetPointCelsius(const Bus &bus,
double degreesC) throw (ProtocolException);
};
}
}
#endif /* OBPTHERMOELECTRICPROTOCOL_H */

View File

@ -0,0 +1,52 @@
/***************************************************//**
* @file OBPWaveCalProtocol.h
* @date January 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 OBPWAVECALPROTOCOL_H
#define OBPWAVECALPROTOCOL_H
#include "common/SeaBreeze.h"
#include "common/buses/Bus.h"
#include "vendors/OceanOptics/protocols/interfaces/WaveCalProtocolInterface.h"
#include <vector>
namespace seabreeze {
namespace oceanBinaryProtocol {
class OBPWaveCalProtocol : public WaveCalProtocolInterface {
public:
OBPWaveCalProtocol();
virtual ~OBPWaveCalProtocol();
virtual std::vector<double> *readWavelengthCoeffs(const Bus &bus)
throw (ProtocolException);
};
}
}
#endif /* OBPWAVECALPROTOCOL_H */

View File

@ -0,0 +1,51 @@
/***************************************************//**
* @file OceanBinaryProtocol.h
* @date January 2011
* @author Ocean Optics, Inc.
*
* This provides a singleton object that identifies the
* Ocean Binary Protocol command set.
*
* 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 OCEANBINARYPROTOCOL_H
#define OCEANBINARYPROTOCOL_H
#include "common/protocols/Protocol.h"
namespace seabreeze {
namespace oceanBinaryProtocol {
class OceanBinaryProtocol : public Protocol {
public:
OceanBinaryProtocol();
virtual ~OceanBinaryProtocol();
/* Must be overridden from Protocol */
virtual ProtocolFamily getProtocolFamily();
};
}
}
#endif /* OCEANBINARYPROTOCOL_H */