2024-05-28 13:28:07 +08:00
|
|
|
|
#pragma once
|
2024-03-19 17:45:12 +08:00
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
#include "IOCfg.h"
|
2024-06-04 14:08:12 +08:00
|
|
|
|
#include "../Controller/Base.h"
|
2024-03-19 17:45:12 +08:00
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
class PowderEstimate
|
|
|
|
|
{
|
2024-06-04 14:08:12 +08:00
|
|
|
|
|
2024-03-19 17:45:12 +08:00
|
|
|
|
public:
|
2024-06-04 14:08:12 +08:00
|
|
|
|
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; //需要在客户端赋值 不传过去
|
2024-03-19 17:45:12 +08:00
|
|
|
|
};
|
|
|
|
|
|
2024-06-04 14:08:12 +08:00
|
|
|
|
class PowderEstimateCfg : public Base
|
2024-03-19 17:45:12 +08:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
PowderEstimateCfg();
|
|
|
|
|
~PowderEstimateCfg();
|
|
|
|
|
|
|
|
|
|
void GetUpdateSql(vector<string>& ups);
|
|
|
|
|
|
|
|
|
|
void Init(int posSize);
|
|
|
|
|
public:
|
|
|
|
|
PowderEstimate m_PE1;
|
|
|
|
|
PowderEstimate m_PE2;
|
|
|
|
|
PowderEstimate m_PE3;
|
|
|
|
|
PowderEstimate m_PE4;
|
|
|
|
|
PowderEstimate m_PE5;
|
|
|
|
|
|
2024-06-04 14:08:12 +08:00
|
|
|
|
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;
|
|
|
|
|
|
2024-03-19 17:45:12 +08:00
|
|
|
|
vector<PowderEstimate*> 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;
|
|
|
|
|
};
|
|
|
|
|
|