#pragma once #include "dt.h" #include #include "CMatrixCommon.h" #include "CManageDB.h" #ifdef WAFER_MATRIX_EXPORTS #define WAFER_CMATRIX_DLL_API __declspec(dllexport) #else #define WAFER_CMATRIX_DLL_API //__declspec(dllimport) #endif using namespace ns_db; namespace ns_mat { typedef struct { UINT nDieMatrixId; //晶圆矩阵Id UINT nDieRow; //固晶点在矩阵中所在行 UINT nDieCol; //固晶点在矩阵中所在列 UINT iDieIndex; //所在Point点ID bool bDisable; //不可用点,等同于无效点 PICK_DIE_STATUS eStatus; //晶片状态 XY_DOUBLE_STRUCT stPosition; //程序设置的位置 } WAFER_MATRIX_POINT_INFO_STRUCT; class WAFER_CMATRIX_DLL_API CWaferMatrix { public: CWaferMatrix(INT iModuleType, string strModuleName); LONG LoadMatrix(MATRIX_SEARCH_DIR dir); //计算位置和index UINT GetCurrentIndex(); //获取当前index LONG SetCurrentIndex(UINT nIndex); //设置当前index UINT GetNextIndex(); //获取从当前点开始的下个点 UINT GetPrevIndex(); //获取从当前点开始的上个点 UINT GetAmount(); //获取总数 LONG SetPintInfoStatus(UINT nPtIndex, PICK_DIE_STATUS eStatus); //获取指定晶圆的位置信息 LONG GetPintInfoByIndex(UINT nPtIndex, WAFER_MATRIX_POINT_INFO_STRUCT& stPointInfo); LONG GetAllPintInfo(vector& stPointInfo); private: static std::mutex m_MatrixMutex; bool bIsInitSuccess; int m_nModuleType; string m_strModuleName; //当前点 UINT m_iCurrentBondIndex; //矩阵总数 UINT m_iBondAmount; CProduct* m_pCProduct = nullptr; //vector m_vetDieMatrix; vector m_vetWaferMatrix; map m_mapWaferMatrixInfo; private: void SortDir_Z(); void SortDir_S(); }; }