使用SeaBreezeWrapper.h完成海洋光学仪器控制类
This commit is contained in:
@ -1,53 +1,59 @@
|
||||
#ifndef OCEAN_LIB_LIBRARY_H
|
||||
#define OCEAN_LIB_LIBRARY_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <unistd.h>
|
||||
#include "api/SeaBreezeWrapper.h"
|
||||
|
||||
#include "IrisFiberSpectrometerBase.h"
|
||||
#include "api/seabreezeapi/SeaBreezeAPI.h"
|
||||
//#include "api/seabreezeapi/SeaBreezeAPI.h"
|
||||
|
||||
|
||||
//void hello();
|
||||
using namespace std;
|
||||
|
||||
class OceanOptics_lib:public CIrisFSBase
|
||||
{
|
||||
|
||||
private:
|
||||
int m_iSpectralmeterHandle;
|
||||
DeviceInfo m_deviceInfo;
|
||||
public:
|
||||
//初始化设备
|
||||
//此处string为指明连接哪个ocean光谱仪的参数,可自行更换为其他c/c++标准类型
|
||||
//0为无错误,不同错误请返回不同值
|
||||
int Initialize(bool bIsUSBMode,ZZ_U8 ucPortNumber,std::string strDeviceName);
|
||||
//
|
||||
// //关闭设备
|
||||
// void Close();
|
||||
//
|
||||
// //单次数据采集
|
||||
// int SingleShot(DataFrame &dfData);
|
||||
//
|
||||
// //设置曝光时间
|
||||
// int SetExposureTime(int iExposureTimeInMS);
|
||||
//
|
||||
// //获取曝光时间设置
|
||||
// int GetExposureTime(int &iExposureTimeInMS);
|
||||
//
|
||||
// //设置目标温度
|
||||
// int SetDeviceTemperature(float fTemperature);
|
||||
//
|
||||
// //获取温度设置
|
||||
// int GetDeviceTemperature(float &fTemperature);
|
||||
//
|
||||
// //获取设备信息
|
||||
// int GetDeviceInfo(DeviceInfo &Info);
|
||||
//
|
||||
// //获取设备特征数据
|
||||
// int GetDeviceAttribute(DeviceAttribute &Attr);
|
||||
|
||||
//关闭设备
|
||||
void Close();
|
||||
|
||||
//单次数据采集
|
||||
int SingleShot(DataFrame &dfData);
|
||||
|
||||
//设置曝光时间
|
||||
int SetExposureTime(int iExposureTimeInMS);
|
||||
|
||||
//获取曝光时间设置
|
||||
int GetExposureTime(int &iExposureTimeInMS);
|
||||
|
||||
//设置目标温度
|
||||
int SetDeviceTemperature(float fTemperature);
|
||||
|
||||
//获取温度设置
|
||||
int GetDeviceTemperature(float &fTemperature);
|
||||
|
||||
//获取设备信息
|
||||
int GetDeviceInfo(DeviceInfo &Info);//ok
|
||||
|
||||
//获取设备特征数据
|
||||
int GetDeviceAttribute(DeviceAttribute &Attr);
|
||||
|
||||
//tc
|
||||
static const char* get_error_string(int error);
|
||||
void read_serial_number_test(int index);
|
||||
string GetSerialNumber(int index);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user