CMaterialBox.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #include "CModule.h"
  3. // 枚举定义:料盒的状态
  4. enum BOX_STATUS {
  5. Lev_Idle = 1, // 空闲
  6. Lev_Occupied, // 已占用
  7. };
  8. typedef struct
  9. {
  10. int iCurrLayers; //当前工作层
  11. int iLayersTotal; //总层数
  12. double iTopLev; //最上层高度 um
  13. double iBottomLev; //最下层高度 um
  14. XY_DOUBLE_STRUCT stPos; //料盒位置;
  15. std::vector<BOX_STATUS> iStatas; //每层状态
  16. int iLength; //料盒长度 um
  17. int iLeight; //料盒高度 um
  18. int iWall; //侧壁厚 um
  19. int iTopWall; //上壁厚 um
  20. int iBelowWall; //下壁厚 um
  21. }MATERIAL_BOX_VIEW_STRUCT;
  22. typedef struct
  23. {
  24. MATERIAL_BOX_VIEW_STRUCT stBoxView;
  25. string strStatas; //每层状态,用逗号分割
  26. double dSaftPos;
  27. }MATERIAL_BOX_CONFIG_STRUCT;
  28. class __declspec(dllexport) CMaterialBox : public CModule
  29. {
  30. public:
  31. CMaterialBox(MODULE_LIST eModuleType);
  32. ~CMaterialBox(){}
  33. virtual LONG AllocateAxis(vector<CAxis*> vecAxis) override;
  34. virtual LONG AllocateIo(vector<CIO*> vecIo) override;
  35. virtual LONG ToHome() override;
  36. virtual LONG Sync() override;
  37. virtual LONG ToSafePosition() override;
  38. virtual LONG InitResource() override;
  39. MATERIAL_BOX_VIEW_STRUCT GetMaterialBoxInfo();
  40. private:
  41. CAxis* m_pZAxis = nullptr;
  42. MATERIAL_BOX_CONFIG_STRUCT m_stConfig;
  43. void DataChangNotice(string strDbName, string strTableName);
  44. virtual void SetDataChangFunction() override;
  45. virtual LONG SetParam() override;//保存配置参数
  46. virtual LONG GetParam() override;//加载配置参数
  47. };