123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #pragma once
- #include "dt.h"
- #include <map>
- #include "CManageDB.h"
- #ifdef WAFFLE_PACK_EXPORTS
- #define WAFFLE_PACK_DLL_API __declspec(dllexport)
- #else
- #define WAFFLE_PACK_DLL_API
- #endif
- using namespace ns_db;
- namespace ns_mat
- {
- typedef struct _WAFFLE_MATRIX_POINT_STRUCT
- {
- UINT nPackMatrixId;
- UINT nPackRow;
- UINT nPackCol;
- UINT nDieMatrixId;
- UINT nDieRow;
- UINT nDieCol;
- UINT iDieIndex;
- bool bDisable;
- PICK_DIE_STATUS eStatus;
- XY_DOUBLE_STRUCT stPosition;
- } WAFFLE_MATRIX_POINT_STRUCT;
- typedef struct _WAFFLE_MATRIX_INFO_STRUCT
- {
- UINT iCurrentBondIndex;
- UINT iBondAmount;
- vector <WAFFLE_MATRIX_POINT_STRUCT> vetWaffleMatrix;
- } WAFFLE_MATRIX_INFO_STRUCT;
- class WAFFLE_PACK_DLL_API CWafflePackMatrix
- {
- public:
- CWafflePackMatrix(INT iModuleId, string strModuleName);
- LONG LoadMatrix(MATRIX_SEARCH_DIR dir);
- UINT GetCurrentIndex(UINT nMatrixId);
- LONG SetCurrentIndex(UINT nMatrixId,UINT nIndex);
- 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<WAFFLE_MATRIX_POINT_STRUCT>& stPointInfo);
- private:
- static std::mutex m_MatrixMutex;
- bool bIsInitSuccess;
- int m_nModuleType;
- string m_strModuleName;
-
-
-
-
- CProduct* m_pCProduct = nullptr;
- vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vetWaffleMatrix;
- map<int, WAFFLE_MATRIX_INFO_STRUCT> m_mapWaffleMatrixInfo;
- private:
- void SortDir_Z();
- void SortDir_S();
- };
- }
|