#pragma once #include "dt.h" #include #include "CManageDB.h" #ifdef WAFFLE_PACK_EXPORTS #define WAFFLE_PACK_DLL_API __declspec(dllexport) #else #define WAFFLE_PACK_DLL_API //__declspec(dllimport) #endif using namespace ns_db; namespace ns_mat { typedef struct _WAFFLE_MATRIX_POINT_STRUCT { UINT nPackMatrixId; //华夫盒矩阵 Id 第个Id表示一种晶圆 UINT nPackRow; //华夫盒矩阵行数 UINT nPackCol; //华夫盒矩阵列数 UINT nDieMatrixId; //晶圆矩阵Id UINT nDieRow; //固晶点在矩阵中所在行 UINT nDieCol; //固晶点在矩阵中所在列 UINT iDieIndex; //当前Point在pcb中的序号 bool bDisable; //不可用晶片 PICK_DIE_STATUS eStatus; //晶片状态 XY_DOUBLE_STRUCT stPosition; //程序设置的位置 } WAFFLE_MATRIX_POINT_STRUCT; //固晶点 typedef struct _WAFFLE_MATRIX_INFO_STRUCT { UINT iCurrentBondIndex; //当前点 UINT iBondAmount; //Die总数 vector vetWaffleMatrix; } WAFFLE_MATRIX_INFO_STRUCT; //固晶点 class WAFFLE_PACK_DLL_API CWafflePackMatrix { public: CWafflePackMatrix(INT iModuleId, string strModuleName); LONG LoadMatrix(MATRIX_SEARCH_DIR dir); //计算位置和index UINT GetCurrentIndex(UINT nMatrixId); //获取当前index LONG SetCurrentIndex(UINT nMatrixId,UINT nIndex); //设置当前index LONG GoNextIndex(UINT nMatrixId); LONG GetNextIndex(UINT nMatrixId, int& curIndex); //获取从当前点开始的下个点 UINT GetPrevIndex(UINT nMatrixId); //获取从当前点开始的上个点 UINT GetAmount(UINT nMatrixId); //获取总数 //设置指定晶圆的状态 LONG SetPintInfoStatus(UINT nMatrixId,UINT nPtIndex, PICK_DIE_STATUS eStatus); //获取指定晶圆的位置信息 LONG GetPintInfoByIndex(UINT nMatrixId, UINT nPtIndex, WAFFLE_MATRIX_POINT_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_vetWaffleMatrix; map m_mapWaffleMatrixInfo; private: void SortDir_Z(); void SortDir_S(); }; }