#pragma once #include #include #include #include "IOCfg.h" using namespace std; class PowderEstimate { public: unsigned int m_SpaceGrid; float m_PowderPercent; bool m_PowderPercentCtrl; IOCfg* m_PosSensor; }; class PowderEstimateCfg { public: PowderEstimateCfg(); ~PowderEstimateCfg(); void GetUpdateSql(vector& ups); void Init(int posSize); public: unsigned int m_PowderPerGrid; PowderEstimate m_PE1; PowderEstimate m_PE2; PowderEstimate m_PE3; PowderEstimate m_PE4; PowderEstimate m_PE5; unsigned int m_TotalGrids; unsigned int m_RemainPowderGrid; vector m_PEVec; CRITICAL_SECTION m_RemainCS; int m_StartSupplyPos; int m_StopSupplyPos; float m_StartSupplyQty; float m_StopSupplyQty; bool m_AutoSupplyEnable; unsigned int m_AutoSupplyTimeoutMinute; public: static const string CONFIG_NAME; static const string FIELD_POWDER_PER_GRID; static const string FIELD_SPACE_GRID1; static const string FIELD_SPACE_GRID2; static const string FIELD_SPACE_GRID3; static const string FIELD_SPACE_GRID4; static const string FIELD_SPACE_GRID5; static const string FIELD_POWDER_PERCENT1; static const string FIELD_POWDER_PERCENT2; static const string FIELD_POWDER_PERCENT3; static const string FIELD_POWDER_PERCENT4; static const string FIELD_POWDER_PERCENT5; static const string FIELD_REMAIN_POWDER_GRID; static const string FIELD_START_SUPPLY_POS; static const string FIELD_STOP_SUPPLY_POS; static const string FIELD_AUTO_SUPPLY_ENABLE; static const string FIELD_AUTO_SUPPLY_TIMEOUT_MINUTE; static const string FIELD_START_SUPPLY_QTY; static const string FIELD_STOP_SUPPLY_QTY; };