Files
TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/library.h
tangchao aaeba1360e (1)将atp光谱仪的控制类更新到卓哥最新版,解决连接atp的问题;
(2)将读取OceanOptics的非线性校正文件  集成到定标程序中;
2025-03-10 10:02:51 +08:00

72 lines
1.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef OCEAN_LIB_LIBRARY_H
#define OCEAN_LIB_LIBRARY_H
#include <cstdio>
#include <cstdlib>
#include <ctime>
//#include <unistd.h>
#include <chrono>
#include "api/SeaBreezeWrapper.h"
#include "IrisFiberSpectrometerBase.h"
#include "api/seabreezeapi/SeaBreezeAPI.h"
#include "api/seabreezeapi/NonlinearityCoeffsFeatureAdapter.h"
using namespace std;
class OceanOptics_lib :public CIrisFSBase
{
public:
OceanOptics_lib();
virtual ~OceanOptics_lib();
public:
//初始化设备
//此处string为指明连接哪个ocean光谱仪的参数可自行更换为其他c/c++标准类型
//0为无错误不同错误请返回不同值(不能确定当不成功时SeaBreeze返回的错误代码error不为0 → 不敢将error直接返回)
int Initialize(bool bIsUSBMode, std::string ucPortNumber, std::string strDeviceName);//ok
int Initialize();//ok
//关闭设备
void Close();//ok
//单次数据采集
int SingleShot(DataFrame &dfData);
//设置曝光时间
int SetExposureTime(int iExposureTimeInMS);//ok
//获取曝光时间设置
int GetExposureTime(int &iExposureTimeInMS);//ok
//设置目标温度
int SetDeviceTemperature(float fTemperature);//ok
//获取温度设置
int GetDeviceTemperature(float &fTemperature);//ok
//获取设备信息
int GetDeviceInfo(DeviceInfo &Info);//ok
//获取设备特征数据
int GetDeviceAttribute(DeviceAttribute &Attr);//ok
//tc
static const char* get_error_string(int error);
void test_nonlinearity_coeffs_feature();
private:
int m_iSpectralmeterHandle;
DeviceInfo m_deviceInfo;
int m_iExposureTime;
bool isSuccess(char* resultStr);
string GetDeviceType(int index);
string GetSerialNumber(int index);
};
#endif //OCEAN_LIB_LIBRARY_H