2024-06-25 15:25:46 +08:00
|
|
|
|
#pragma once
|
2024-03-19 17:45:12 +08:00
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <map>
|
2024-06-25 15:25:46 +08:00
|
|
|
|
#include <shared_mutex>
|
|
|
|
|
#include "../DataManage/RWData.h"
|
|
|
|
|
|
2024-03-19 17:45:12 +08:00
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
class ParamSetCfg
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
typedef struct LaserSet
|
|
|
|
|
{
|
|
|
|
|
double laser_speed;
|
|
|
|
|
double laser_diameter;
|
|
|
|
|
double laser_power;
|
|
|
|
|
} LaserSet;
|
|
|
|
|
|
|
|
|
|
typedef struct PowderSet
|
|
|
|
|
{
|
|
|
|
|
int start_layer;
|
|
|
|
|
int end_layer;
|
|
|
|
|
float powder;
|
|
|
|
|
PowderSet():start_layer(1),end_layer(10),powder(2){}
|
2024-06-25 15:25:46 +08:00
|
|
|
|
PowderSet(int slayer, int elayer, float powder) :start_layer(slayer), end_layer(elayer), powder(powder) {}
|
2024-03-19 17:45:12 +08:00
|
|
|
|
} PowderSet;
|
|
|
|
|
|
|
|
|
|
typedef struct ParamSet
|
|
|
|
|
{
|
|
|
|
|
string ConfigName;
|
2024-06-25 15:25:46 +08:00
|
|
|
|
std::map<string, LaserSet*> LaserSetMap; //没用到
|
2024-03-19 17:45:12 +08:00
|
|
|
|
std::vector<PowderSet*> PowderSets;
|
|
|
|
|
} ParamSet;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
ParamSetCfg();
|
|
|
|
|
~ParamSetCfg();
|
|
|
|
|
|
|
|
|
|
static void Generate(vector<string>& ins);
|
|
|
|
|
void GetUpdateSql(vector<string>& ups);
|
2024-06-25 15:25:46 +08:00
|
|
|
|
//bool Add(string name); //没用到
|
|
|
|
|
//bool Delete(string name); //没用到
|
2024-03-19 17:45:12 +08:00
|
|
|
|
|
2024-06-25 15:25:46 +08:00
|
|
|
|
void GetPowderCfg(vector<PowderSet>& powderVec);
|
2024-07-05 15:51:30 +08:00
|
|
|
|
void UpdatePowderCfg(const ReadData& wd,const list<Item>& lst);
|
2024-03-19 17:45:12 +08:00
|
|
|
|
public:
|
|
|
|
|
static const string TABLE_NAME;
|
|
|
|
|
static const string FIELD_ID;
|
|
|
|
|
static const string FIELD_CONFIG_NAME;
|
|
|
|
|
static const string FIELD_SET_TYPE;
|
|
|
|
|
static const string FIELD_DATA1;
|
|
|
|
|
static const string FIELD_DATA2;
|
|
|
|
|
static const string FIELD_DATA3;
|
|
|
|
|
|
|
|
|
|
public:
|
2024-06-25 15:25:46 +08:00
|
|
|
|
std::shared_mutex m_sMtx;
|
2024-03-19 17:45:12 +08:00
|
|
|
|
std::vector<ParamSet*> ParamSetVec;
|
|
|
|
|
};
|
|
|
|
|
|