//
// Created by tangchao on 2022/1/11.
//

#ifndef OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H
#define OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H


#include "ZZ_Types.h"

using namespace ZZ_MISCDEF;
using namespace ZZ_MISCDEF::IRIS::FS;

class FiberSpectrometerOperationBase
{

public:
//    FiberSpectrometerOperationBase();
//    ~FiberSpectrometerOperationBase();

    virtual void connectFiberSpectrometer(QString& sn, QString& pixelCount, QString& wavelengthInfo) = 0;
    virtual void disconnectFiberSpectrometer() = 0;
    virtual void getDeviceAttribute(DeviceAttribute& deviceAttribute) = 0;
    virtual void getDeviceInfo(DeviceInfo& deviceInfo) = 0;

    virtual void setExposureTime(int iExposureTimeInMS) = 0;

    virtual void getExposureTime(int &iExposureTimeInMS) = 0;
    virtual void getDeviceTemperature(float &fTemperature) = 0;

    virtual void singleShot(DataFrame &dfData) = 0;

//    typedef struct coeffs
//    {
//        ZZ_U32    coeffsCounter;
//        double    coeffs[100];
//    }coeffsFrame;
    virtual void getNonlinearityCoeffs(coeffsFrame &coeffs) = 0;


//    ZZ_S32 GetMaxValue(ZZ_S32 * dark, int number) = 0;

    DataFrame m_IntegratingSphereData;
    DataFrame m_DarkData;
protected:
    ZZ_U32 m_MaxValueOfFiberSpectrometer;
private:



public slots:
    virtual void recordDark(QString path) = 0;
    virtual void recordTarget(int recordTimes, QString path) = 0;
    virtual void autoExpose() = 0;

    signals:
    void sendExposureTimeSignal(int exposureTime);

};

#endif //OCEAN_OPTICS_CALIBRATION_CONSOLE_FIBERSPECTROMETEROPERATIONBASE_H
