#ifndef IVREYEDEVICE_H
#define IVREYEDEVICE_H

#include <iostream>
#include "VrEyeDevice_global.h"
#include "VZNL_Common.h"

class VREYEDEVICE_EXPORT IVrEyeDevice
{
public:
    virtual ~IVrEyeDevice() = default;

    // 初始化对象
    static int CreateObject(IVrEyeDevice** ppEyeDevice);

    /**
     *  初始化设备
     */
    virtual int InitDevice() = 0;

    /**
     * Open设备
     */
    virtual int OpenDevice(const char* sIP, VzNL_OnNotifyStatusCBEx fNotify, void *param) = 0;

    /**
     * 获取版本信息
     * @return 版本信息
     */
    virtual int GetVersion(SVzNLVersionInfo& sVersionInfo) = 0;

    /**
     * 获取设备信息
     * @return
     */
    virtual int GetDevInfo(SVzNLEyeDeviceInfoEx& sDeviceInfo) = 0;

    /**
     * Close设备
     */
    virtual int CloseDevice() = 0;

    /**
     * 开始自动检测
     * @return 错误代码 0表示成功
     */
    virtual int StartDetect(VzNL_AutoOutputLaserLineExCB fCallFunc, void *param) = 0;

    /**
     * 是否正在检测
     * @return
     */
    virtual bool IsDetectIng() = 0;

    /**
     * 停止自动检测
     * @return 错误代码 0表示成功
     */
    virtual int StopDetect() = 0;

    /**
     * ROI设置
     * @param leftROI
     * @param rightROI
     * @return
     */
    virtual int SetDetectROI(SVzNLRect& leftROI, SVzNLRect& rightROI) = 0;
    virtual int GetDetectROI(SVzNLRect& leftROI, SVzNLRect& rightROI) = 0;


    /**
     * 曝光设置&获取
     * @return
     */
    virtual int SetEyeExpose(unsigned int& exposeTime) = 0;
    virtual int GetEyeExpose(unsigned int& exposeTime) = 0;

    /**
     * 增益设置&获取
     * @param gain
     * @return
     */
    virtual int SetEyeGain(unsigned int& gain) = 0;
    virtual int GetEyeGain(unsigned int& gain) = 0;

    /**
     * 帧率设置&获取
     * @param frame
     * @return
     */
    virtual int SetFrame(int& frame) = 0;
    virtual int GetFrame(int& frame) = 0;

    /**
     * 是否支持RGBD
     * @return
     */
    virtual bool IsSupport() = 0;

    /**
     * 设置彩色Sensor期望值
     * @param value
     * @return
     */
    virtual int SetRGBDExposeThres(float& value) = 0;
    virtual int GetRGBDExposeThres(float& value) = 0;

    /**
     * 设置过滤高度
     * @param dHeight
     * @return
     */
    virtual int SetFilterHeight(double& dHeight) = 0;
    virtual int GetFilterHeight(double& dHeight) = 0;

    /**
     * 配置摆动机构速度
     * @return
     */
    virtual int GetSwingSpeed(float& fSpeed) = 0;
    virtual int SetSwingSpeed(float& fSpeed) = 0;

    /**
     * 设置工作角度
     * @param nMin
     * @param nMax
     * @return
     */
    virtual int SetSwingAngle(float& fMin, float& fMax) = 0;
    virtual int GetSwingAngle(float& fMin, float& fMax) = 0;

    /**
     * 设置工作距离
     * @param nMin
     * @param nMax
     * @return
     */
    virtual int SetWorkRange(double& dMin, double& dMax) = 0;
    virtual int GetWorkRange(double& dMin, double& dMax) = 0;
};

#endif // CVREYEDEVICE_H
