1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- /*
- 资源类,
- 软件启动时加载软资源,保存资源(工单、工艺单、通用坐标系)
- */
- #pragma once
- #include <vector>
- #include <string>
- #include <map>
- #include "CBondMatrix.h"
- #include "CPRStrategy.h"
- #include "CWaferMatrix.h"
- using namespace std;
- using namespace ns_mat;
- using namespace ns_pr;
- #pragma region 坐标系
- typedef struct _COORDSYS_STRUCT
- {
- double OriginPtX;
- double OriginPtY;
- int DirectX;
- int DierctY;
- int DierectZ;
- }COORDSYS_STRUCT;
- #pragma endregion
- #ifdef DB_RESCOURCES_EXPORTS
- #define DB_RESCOURCES_DLL_API __declspec(dllexport)
- #else
- #define DB_RESCOURCES_DLL_API //__declspec(dllimport)
- #endif
- class DB_RESCOURCES_DLL_API CResources
- {
- private:
- CResources();
- ~CResources();
- public:
- static CResources* GetInstance();
- static void releaseInstance();
- void GetParam();
- void SetParam();
- //工艺单
- std::map<int, std::vector<int>> GetStepMap(int productID);
- std::vector<int> GetStepList(int productID,int StepListID);
- void SaveStepMap();
- //工单,每个step对应的参数
- //STEP_PARAM GetStepParamByID(int id);
- //点位数据,
- CBondMatrix* GetBondMatrix();
-
- //PR,视觉库存模板,只需将模块使用模板和PRID对应起来。
- CPRStrategy* GetPRStrategyByID(int ModuleID);
- //坐标系
- //将位置转换为全局坐标系
- XY_DOUBLE_STRUCT ToGlobalCoord(int moduleID, XY_DOUBLE_STRUCT point);
- X_Y_Z_STRUCT ToGlobalCoord(int moduleID, X_Y_Z_STRUCT point);
- //将全局坐标系转换位模组坐标系
- XY_DOUBLE_STRUCT ToLocalCoord(int moduleID, XY_DOUBLE_STRUCT point);
- X_Y_Z_STRUCT ToLocalCoord(int moduleID, X_Y_Z_STRUCT point);
- private:
- static CResources* m_instance;
- //最外层productID,第二层不同的StepListID,第三层StepID排序
- std::map<int,std::map<int, std::vector<int>>> m_mapStep;
- //Bond的点位矩阵
- CBondMatrix* m_pBondMatrix = nullptr;
- //点位数据1、多个华夫盒对象,每个华夫盒对应一套点位数据 2、固晶那里也对应点位数据
- std::map<int, CBondMatrix*> m_mapPositionInfo;//Key为ID
- //坐标系
- map<int,COORDSYS_STRUCT> m_vetModuleCoords;//模组坐标系
- COORDSYS_STRUCT m_stGlobalCoord;//全局坐标系
- };
|