#pragma once #include "dt.h" #include #include "CMatrixCommon.h" #include "CManageDB.h" #ifdef HEAD_TABLE_MATRIX_EXPORTS #define HEAD_TABLE_CMATRIX_DLL_API __declspec(dllexport) #else #define HEAD_TABLE_CMATRIX_DLL_API //__declspec(dllimport) #endif using namespace ns_db; namespace ns_mat { typedef struct { UINT iHeadIndex; //所在点ID bool bDisable; //不可用点 XY_DOUBLE_STRUCT stPosition; //程序设置的位置 } HEAD_TABLE_MATRIX_POINT_INFO_STRUCT; class HEAD_TABLE_CMATRIX_DLL_API CHeadTableMatrix { public: CHeadTableMatrix(INT iModuleType, string strModuleName); LONG LoadMatrix(); //计算位置和index UINT GetCurrentIndex(); //获取当前index LONG SetCurrentIndex(UINT nIndex); //设置当前index UINT GetIndexPosition(UINT nIndex, XY_DOUBLE_STRUCT& stPos); //获取Index点对应位置 UINT GetAmount(); //获取总数 //获取指定晶圆的位置信息 LONG GetPintInfoByIndex(UINT nPtIndex, HEAD_TABLE_MATRIX_POINT_INFO_STRUCT& stPointInfo); private: static std::mutex m_MatrixMutex; bool bIsInitSuccess; int m_nModuleType; string m_strModuleName; //当前点 UINT m_iCurrentHeadIndex; //矩阵总数 UINT m_iHeadAmount; CProduct* m_pCProduct = nullptr; //vector m_vetDieMatrix; PROGRAM_HEAD_TABLE_MATRIX_STRUCT m_vetHeadTableMatrix; map m_mapHeadTableMatrixInfo; private: void SortDir_Z(); }; }