mirror of
http://172.16.0.230/r/SIF/TowerOptoSifAndSpectral.git
synced 2025-10-18 03:19:43 +08:00
84 lines
2.1 KiB
C++
84 lines
2.1 KiB
C++
//////////////////////////////////////////////////////////////////////////
|
|
//ATP类设备串口通信类
|
|
//////////////////////////////////////////////////////////////////////////
|
|
#pragma once
|
|
#include "pch.h"
|
|
#include "ZZ_Types.h"
|
|
#include "IrisFiberSpectrometerBase.h"
|
|
|
|
using namespace ZZ_MISCDEF;
|
|
using namespace ZZ_MISCDEF::ATP;
|
|
using namespace ZZ_MISCDEF::IRIS::FS;
|
|
|
|
class ZZ_ATPControl_Serial_Qt:public CIrisFSBase
|
|
{
|
|
//Q_OBJECT
|
|
public:
|
|
ZZ_ATPControl_Serial_Qt();
|
|
virtual ~ZZ_ATPControl_Serial_Qt();
|
|
|
|
public:
|
|
//设置波特率
|
|
//int SetBaudRate(int iBaud);
|
|
//初始化设备
|
|
int Initialize(bool bIsUSBMode, ZZ_U8 ucPortNumber, std::string strDeviceName);
|
|
//关闭设备
|
|
void Close();
|
|
|
|
//单次测试采集 用以确认设备像素数
|
|
int SingleShot(int &iPixels);
|
|
|
|
//单次数据采集
|
|
int SingleShot(DataFrame &dfData);
|
|
|
|
//单次暗背景采集
|
|
//int SingleShotDark(ATPDataFrame &dfData);
|
|
|
|
//int SingleShotDeducted(ATPDataFrame &dfData);
|
|
//设置曝光时间
|
|
int SetExposureTime(int iExposureTimeInMS);
|
|
|
|
//获取曝光时间设置
|
|
int GetExposureTime(int &iExposureTimeInMS);
|
|
|
|
//int GetWaveLength(float *pfWaveLength);
|
|
|
|
//获取设备信息
|
|
int GetDeviceInfo(DeviceInfo &Info);
|
|
|
|
//获取设备特征数据
|
|
int GetDeviceAttribute(DeviceAttribute &Attr);
|
|
|
|
//int GetDeviceListInfo(); //use type name to enum
|
|
|
|
//设置温度
|
|
int SetDeviceTemperature(float fTemperature);
|
|
|
|
//获取温度
|
|
int GetDeviceTemperature(float &fTemperature);
|
|
|
|
//自动曝光
|
|
int PerformAutoExposure(float fMinScaleFactor, float fMaxScaleFactor, float &fPredictedExposureTime);
|
|
|
|
#ifdef _DEBUG
|
|
public:
|
|
#else //
|
|
private:
|
|
#endif
|
|
//port
|
|
int m_iBaudRate;
|
|
QSerialPort *m_pSerialPort;
|
|
|
|
//ATP
|
|
DeviceInfo m_diDeviceInfo;
|
|
DeviceAttribute m_daDeviceAttr;
|
|
|
|
//////////////////////////////////////////////////////////////////////////shutter control stub code s
|
|
//int SetExtShutter(int iShutterUP0, int iShutterDOWN1,int iShutterDOWN2,int iShutterDOWN3); //0:close 1:open
|
|
//////////////////////////////////////////////////////////////////////////shutter control stub code e
|
|
int SendCommand(QByteArray qbCommand);
|
|
int RecvData(QByteArray &qbData);
|
|
int ParseData(QByteArray &qbData);
|
|
//private slots :
|
|
//void ReadMessage();
|
|
}; |