CWafflePackMatrix.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #pragma once
  2. #include "dt.h"
  3. #include <map>
  4. #include "CManageDB.h"
  5. #ifdef WAFFLE_PACK_EXPORTS
  6. #define WAFFLE_PACK_DLL_API __declspec(dllexport)
  7. #else
  8. #define WAFFLE_PACK_DLL_API //__declspec(dllimport)
  9. #endif
  10. using namespace ns_db;
  11. namespace ns_mat
  12. {
  13. typedef struct _WAFFLE_MATRIX_POINT_STRUCT
  14. {
  15. UINT nPackMatrixId; //华夫盒矩阵 Id 第个Id表示一种晶圆
  16. UINT nPackRow; //华夫盒矩阵行数
  17. UINT nPackCol; //华夫盒矩阵列数
  18. UINT nDieMatrixId; //晶圆矩阵Id
  19. UINT nDieRow; //固晶点在矩阵中所在行
  20. UINT nDieCol; //固晶点在矩阵中所在列
  21. UINT iDieIndex; //当前Point在pcb中的序号
  22. bool bDisable; //不可用晶片
  23. PICK_DIE_STATUS eStatus; //晶片状态
  24. XY_DOUBLE_STRUCT stPosition; //程序设置的位置
  25. } WAFFLE_MATRIX_POINT_STRUCT; //固晶点
  26. typedef struct _WAFFLE_MATRIX_INFO_STRUCT
  27. {
  28. UINT iCurrentBondIndex; //当前点
  29. UINT iBondAmount; //Die总数
  30. vector <WAFFLE_MATRIX_POINT_STRUCT> vetWaffleMatrix;
  31. } WAFFLE_MATRIX_INFO_STRUCT; //固晶点
  32. class WAFFLE_PACK_DLL_API CWafflePackMatrix
  33. {
  34. public:
  35. CWafflePackMatrix(INT iModuleId, string strModuleName);
  36. LONG LoadMatrix(MATRIX_SEARCH_DIR dir); //计算位置和index
  37. UINT GetCurrentIndex(UINT nMatrixId); //获取当前index
  38. LONG SetCurrentIndex(UINT nMatrixId,UINT nIndex); //设置当前index
  39. LONG GoNextIndex(UINT nMatrixId);
  40. LONG GetNextIndex(UINT nMatrixId, int& curIndex); //获取从当前点开始的下个点
  41. UINT GetPrevIndex(UINT nMatrixId); //获取从当前点开始的上个点
  42. UINT GetAmount(UINT nMatrixId); //获取总数
  43. //设置指定晶圆的状态
  44. LONG SetPintInfoStatus(UINT nMatrixId,UINT nPtIndex, PICK_DIE_STATUS eStatus);
  45. //获取指定晶圆的位置信息
  46. LONG GetPintInfoByIndex(UINT nMatrixId, UINT nPtIndex, WAFFLE_MATRIX_POINT_STRUCT& stPointInfo);
  47. LONG GetAllPintInfo(vector<WAFFLE_MATRIX_POINT_STRUCT>& stPointInfo);
  48. private:
  49. static std::mutex m_MatrixMutex;
  50. bool bIsInitSuccess;
  51. int m_nModuleType;
  52. string m_strModuleName;
  53. //UINT m_iCurrentBondIndex;
  54. //UINT m_iBondAmount;
  55. CProduct* m_pCProduct = nullptr; //产品数据库
  56. vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vetWaffleMatrix;
  57. map<int, WAFFLE_MATRIX_INFO_STRUCT> m_mapWaffleMatrixInfo;
  58. private:
  59. void SortDir_Z();
  60. void SortDir_S();
  61. };
  62. }