TipMatrix.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "OneDimMatrix.h"
  3. #define FIRST_TIP_MATRIX_INDEX 1
  4. namespace ns_mat
  5. {
  6. struct NozzleParam
  7. {
  8. XY_DOUBLE_STRUCT position{ 0,0 };
  9. NozzleCalibParam calibParam;
  10. };
  11. class __declspec(dllexport) TipMatrix
  12. {
  13. public:
  14. static TipMatrix* GetInstance();
  15. LONG LoadMatrixParam();
  16. LONG GetNozzlePosition(int index, XY_DOUBLE_STRUCT& position);
  17. std::map<int, MatrixPointInfo> GetNozzleInfo();
  18. LONG GetBHRCalibTempID(int nozzleIndex, int& tempID);
  19. LONG SetBHRCalibTempID(int nozzleIndex, int tempID);
  20. LONG GetWHCTDNozzleTempID(int nozzleIndex, int& tempID);
  21. LONG SetWHCTDNozzleTempID(int nozzleIndex, int tempID);
  22. LONG GetBHRotCenter(int index, XY_DOUBLE_STRUCT& center);
  23. LONG SetNozzleRotCenter(int index, XY_DOUBLE_STRUCT center);
  24. LONG GetBHHighCameraToNozzle(int index, XY_DOUBLE_STRUCT& dis);
  25. LONG SetBHHighCameraToNozzle(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  26. LONG GetBHLowCameraToNozzle(int index, XY_DOUBLE_STRUCT& dis);
  27. LONG SetBHLowCameraToNozzle(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  28. LONG GetBHLowNozzleToCamera(int index, XY_DOUBLE_STRUCT& dis);
  29. LONG SetBHLowNozzleToCamera(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  30. LONG GetWHCameraToNozzle(int index, XY_DOUBLE_STRUCT& cameraToNozzle);
  31. LONG SetWHCameraToNozzle(int index, XY_DOUBLE_STRUCT cameraToNozzle);
  32. private:
  33. TipMatrix();
  34. ~TipMatrix();
  35. void DataChangNotice(string strDbName, string strTableName);
  36. void SetParam();
  37. private:
  38. OneDimMatrix* m_pPosMatrix = nullptr;
  39. //key ÊÇÎü×ìºÅ
  40. std::map<int, NozzleParam> m_mapNozzleParam;
  41. CMachineCalibration* m_pCalibrationDB = nullptr;
  42. CProduct* m_pProduct = nullptr;
  43. CManageDB* m_pCManageDB = nullptr;
  44. int m_nMatrixID = 1;
  45. std::string m_sName = "TipMatrix";
  46. };
  47. }