/* 资源类, 软件启动时加载软资源,保存资源(工单、工艺单、通用坐标系) */ #pragma once #include #include #include #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> GetStepMap(int productID); std::vector 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>> m_mapStep; //Bond的点位矩阵 CBondMatrix* m_pBondMatrix = nullptr; //点位数据1、多个华夫盒对象,每个华夫盒对应一套点位数据 2、固晶那里也对应点位数据 std::map m_mapPositionInfo;//Key为ID //坐标系 map m_vetModuleCoords;//模组坐标系 COORDSYS_STRUCT m_stGlobalCoord;//全局坐标系 };