#pragma once #include #include #include #include "IOCfg.h" #include "../Controller/Base.h" using namespace std; class PowderEstimate { public: PowderEstimate() : m_SpaceGrid(new UIntData("SpaceGrid", u8"")) , m_PowderPercent(new FloatData("PowderPercent", u8"")) , m_PowderPercentCtrl(new BoolData("PowderPercentCtrl", u8"")) {} UIntData* m_SpaceGrid; FloatData* m_PowderPercent; BoolData* m_PowderPercentCtrl; IOCfg* m_PosSensor; //需要在客户端赋值 不传过去 }; class PowderEstimateCfg : public Base { public: PowderEstimateCfg(); ~PowderEstimateCfg(); void GetUpdateSql(vector& ups); void Init(int posSize); public: PowderEstimate m_PE1; PowderEstimate m_PE2; PowderEstimate m_PE3; PowderEstimate m_PE4; PowderEstimate m_PE5; UIntData* m_PowderPerGrid; UIntData* m_TotalGrids; UIntData* m_RemainPowderGrid; IntData* m_StartSupplyPos; IntData* m_StopSupplyPos; FloatData* m_StartSupplyQty; FloatData* m_StopSupplyQty; BoolData* m_AutoSupplyEnable; UIntData* m_AutoSupplyTimeoutMinute; vector m_PEVec; CRITICAL_SECTION m_RemainCS; 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; };