// MotionController_ADLINK_APS.h: interface for the CMotionController_ADLINK_APS class.
//
//////////////////////////////////////////////////////////////////////
#pragma once

#include <vector>

#include "MotionControllerBase.h"

#include "APS_Define.h"

class CMotionController_ADLINK_APS : public CMotionControllerBase
{
private:
    std::vector<int> m_cardIds;

    const std::vector<int> m_vec7856Type{ DEVICE_NAME_PCI_7856, DEVICE_NAME_PCIE_7856 }; // 7856 card types
    const std::vector<int> m_vecECATType{ DEVICE_NAME_PCIE_8338, DEVICE_NAME_PCIE_8334, DEVICE_NAME_PCIE_8332, DEVICE_NAME_EM_FA00, DEVICE_NAME_EM_0P00 }; // ECAT card types

public:
    CMotionController_ADLINK_APS(int index);
    virtual ~CMotionController_ADLINK_APS();

    BOOL Init(int& nNoOfMtr) override;
    void Close() override;

private:
    std::vector<int> BitsToCardIds(int cardIDBits);

    BOOL Init_7856(int nCardID, CHardwareCfgFactory& cfgFty, int nCfgMotionNumber, int nCfgCardNumber, int& nNoOfMtr);
    BOOL Init_ECAT(int nCardID, CHardwareCfgFactory& cfgFty, int nCfgMotionNumber, int nCfgCardNumber, int& nNoOfMtr);

};
