Files
TowerOptoSifAndSpectral/othersoft/calibration_console/Header_Files/ATPControl_Serial_QT.h
2022-01-14 14:26:03 +08:00

87 lines
2.4 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.

//////////////////////////////////////////////////////////////////////////
//ATP?à?è±??????¨???à
//////////////////////////////////////////////////////////////////////////
#pragma once
//#include "pch.h"
#include "ZZ_Types.h"
#include "ZZ_Math.h"
#include <QSerialPort>
#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, std::string ucPortNumber, std::string strDeviceName);
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();
};