TipMatrix.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. // double dNozzleHeigh = 0; //在固定位置进行标定
  11. // int nMaxAllowUseNum = 10000;
  12. // int nUsedNum = 0;
  13. //};
  14. class __declspec(dllexport) TipMatrix
  15. {
  16. public:
  17. static TipMatrix* GetInstance();
  18. LONG LoadMatrixParam();
  19. LONG GetNozzlePosition(int index, XY_DOUBLE_STRUCT& position);
  20. std::map<int, MatrixPointInfo> GetNozzleInfo();
  21. LONG GetBHRCalibTempID(int nozzleIndex, int& tempID);
  22. LONG SetBHRCalibTempID(int nozzleIndex, int tempID);
  23. LONG GetWHCTDNozzleTempID(int nozzleIndex, int& tempID);
  24. LONG SetWHCTDNozzleTempID(int nozzleIndex, int tempID);
  25. LONG GetBHRotCenter(int index, XY_DOUBLE_STRUCT& center);
  26. LONG SetNozzleRotCenter(int index, XY_DOUBLE_STRUCT center);
  27. LONG GetBHHighCameraToNozzle(int index, XY_DOUBLE_STRUCT& dis);
  28. LONG SetBHHighCameraToNozzle(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  29. LONG GetBHLowCameraToNozzle(int index, XY_DOUBLE_STRUCT& dis);
  30. LONG SetBHLowCameraToNozzle(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  31. LONG GetBHLowNozzleToCamera(int index, XY_DOUBLE_STRUCT& dis);
  32. LONG SetBHLowNozzleToCamera(int index, XY_DOUBLE_STRUCT CameraToNozzle);
  33. LONG GetWHCameraToNozzle(int index, XY_DOUBLE_STRUCT& cameraToNozzle);
  34. LONG SetWHCameraToNozzle(int index, XY_DOUBLE_STRUCT cameraToNozzle);
  35. LONG SetNozzleHigh(int index, double pos);
  36. LONG GetNozzleHigh(int index, double& pos);
  37. LONG SetNozzleMaxAllowUseNum(int nozzleIndex, int num);
  38. LONG GetNozzleMaxAllowUseNum(int nozzleIndex, int& num);
  39. LONG SetNozzleUsedNum(int nozzleIndex, int num);
  40. LONG GetNozzleUsedNum(int nozzleIndex, int& num);
  41. LONG GetAllNozzleIndex(vector<int>& nozzles);
  42. private:
  43. TipMatrix();
  44. ~TipMatrix();
  45. void DataChangNotice(string strDbName, string strTableName);
  46. void SetParam();
  47. private:
  48. OneDimMatrix* m_pPosMatrix = nullptr;
  49. //key 是吸嘴号
  50. std::map<int, NozzleParam> m_mapNozzleParam;
  51. CMachineCalibration* m_pCalibrationDB = nullptr;
  52. CProduct* m_pProduct = nullptr;
  53. CManageDB* m_pCManageDB = nullptr;
  54. bool m_bIsPrTest = false;
  55. int m_nMatrixID = 1;
  56. std::string m_sName = "TipMatrix";
  57. };
  58. }