CWaferMatrix.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #pragma once
  2. #include "dt.h"
  3. #include <map>
  4. #include "CMatrixCommon.h"
  5. #include "CManageDB.h"
  6. #ifdef WAFER_MATRIX_EXPORTS
  7. #define WAFER_CMATRIX_DLL_API __declspec(dllexport)
  8. #else
  9. #define WAFER_CMATRIX_DLL_API //__declspec(dllimport)
  10. #endif
  11. using namespace ns_db;
  12. namespace ns_mat
  13. {
  14. typedef struct
  15. {
  16. UINT nDieMatrixId; //晶圆矩阵Id
  17. UINT nDieRow; //固晶点在矩阵中所在行
  18. UINT nDieCol; //固晶点在矩阵中所在列
  19. UINT iDieIndex; //所在Point点ID
  20. bool bDisable; //不可用点,等同于无效点
  21. PICK_DIE_STATUS eStatus; //晶片状态
  22. XY_DOUBLE_STRUCT stPosition; //程序设置的位置
  23. } WAFER_MATRIX_POINT_INFO_STRUCT;
  24. class WAFER_CMATRIX_DLL_API CWaferMatrix
  25. {
  26. public:
  27. CWaferMatrix(INT iModuleType, string strModuleName);
  28. LONG LoadMatrix(MATRIX_SEARCH_DIR dir); //计算位置和index
  29. UINT GetCurrentIndex(); //获取当前index
  30. LONG SetCurrentIndex(UINT nIndex); //设置当前index
  31. UINT GetNextIndex(); //获取从当前点开始的下个点
  32. UINT GetPrevIndex(); //获取从当前点开始的上个点
  33. UINT GetAmount(); //获取总数
  34. LONG SetPintInfoStatus(UINT nPtIndex, PICK_DIE_STATUS eStatus);
  35. //获取指定晶圆的位置信息
  36. LONG GetPintInfoByIndex(UINT nPtIndex, WAFER_MATRIX_POINT_INFO_STRUCT& stPointInfo);
  37. LONG GetAllPintInfo(vector<WAFER_MATRIX_POINT_INFO_STRUCT>& stPointInfo);
  38. private:
  39. static std::mutex m_MatrixMutex;
  40. bool bIsInitSuccess;
  41. int m_nModuleType;
  42. string m_strModuleName;
  43. //当前点
  44. UINT m_iCurrentBondIndex;
  45. //矩阵总数
  46. UINT m_iBondAmount;
  47. CProduct* m_pCProduct = nullptr;
  48. //vector<PROGRAM_DIE_MATRIX_STRUCT> m_vetDieMatrix;
  49. vector<PROGRAM_WAFER_MATRIX_STRUCT> m_vetWaferMatrix;
  50. map<int, WAFER_MATRIX_POINT_INFO_STRUCT> m_mapWaferMatrixInfo;
  51. private:
  52. void SortDir_Z();
  53. void SortDir_S();
  54. };
  55. }