#pragma once
#include "../OTSControl/OTSScanBase.h"
#include "OTSOxfordImpl.h"
namespace OTSController
{
const long RESOLUTION_OXFORD_ID_MIN = 0;
const long RESOLUTION_OXFORD_ID_MAX = 6;
// DWELL_TIME of OXFORD
const long DWELLTIME_OXFORD_ID_MIN = 0;
const long DWELLTIME_OXFORD_ID_MAX = 10;
const long DWELLTIME_OXFORD_ID_DEFAULT = 4;
const long DWELLTIME_OXFORD_VALUES[DWELLTIME_OXFORD_ID_MAX + 1] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 };
const CString DWELLTIME_OXFORD_STRINGS[DWELLTIME_OXFORD_ID_MAX + 1] = { _T("1¦Ěs"), _T("2¦Ěs"), _T("4¦Ěs"), _T("8¦Ěs"), _T("16¦Ěs"),
_T("32¦Ěs"), _T("64¦Ěs"), _T("128¦Ěs"), _T("256¦Ěs"), _T("512¦Ěs"), _T("1024¦Ěs") };
class COTSScanOxford :public COTSScanBase
{
public:
///
/// Creates a new IADOxford instance.
///
COTSScanOxford();
virtual ~COTSScanOxford();
// initialization
virtual BOOL Init() override;
virtual ScanController::SCANNER_ID GetType() override { return ScanController::SCANNER_ID::OXFORD; }
// Get matrix Size
virtual CSize GetMatrixSize(int a_nMatrixIndex) override;
// move beam to point
virtual BOOL MoveBeamTo(CPoint& a_beamPos) override;
// Set point Scan
virtual BOOL SetPointScan(int /*a_nMatrixIndex*/) override { return true; }
// Start Scan Table
virtual BOOL StartScanTable(int a_nMatrixIndex, unsigned int nP, int* pnx, int* pny) override;
// set Image Size
virtual BOOL SetImageSize(long nImageSize,long nHeight) override;
/// set dwell time
virtual BOOL SetDwellTime(long nDwellTime) override;
virtual CBSEImgPtr AcquireBSEImage(int a_nMatrixIndex, int nReads, int nDwell) override;
virtual long GetDwellTimeByIndex(const long a_nIndex) override;
virtual BOOL SetDwellTimeByIndex(const long a_nIndex) override;
virtual BOOL SetScanFieldSize(const int a_nWidth, const int a_nHeight) override;
virtual BOOL SetEMPosition(const int a_nPosX, const int a_nPosY) override;
private:
std::shared_ptr m_oxfordImpl;
};
}