GrpcPrint/PrintS/Config/bean/MachineCfg.h

123 lines
2.9 KiB
C
Raw Normal View History

#pragma once
2024-03-19 17:45:12 +08:00
#include <string>
#include <vector>
#include <map>
2024-05-30 11:18:10 +08:00
#include "../Controller/Base.h"
#include "../Communication/BaseData.h"
2024-03-19 17:45:12 +08:00
using namespace std;
2024-05-30 11:18:10 +08:00
#pragma pack(1)
class MachineCfg : public Base
2024-03-19 17:45:12 +08:00
{
public:
enum PrintStrategy {
DATA = 0, //根据ScanField
2024-03-19 17:45:12 +08:00
DATA_SEQ_OPT,
Mass_Production_Strategy
2024-03-19 17:45:12 +08:00
};
enum ScanType {
2024-03-19 17:45:12 +08:00
RTC4 = 0,
RTC5,
RTC6_ETH
};
enum SupplyMachineVersion {
VERSION_1_0 = 0,
VERSION_2_1,
VERSION_2_2
};
MachineCfg();
~MachineCfg();
void GetUpdateSql(vector<string>& ups);
bool IsDataStrategy() {
return true;
}
bool IsDataSeqStragegy() {
2024-05-30 11:18:10 +08:00
if (m_PrintStrategy->GetValue() == DATA_SEQ_OPT) {
return true;
}
else return false;
}
bool IsMassStrategy() {
2024-05-30 11:18:10 +08:00
if (m_PrintStrategy->GetValue() == Mass_Production_Strategy)
{
2024-03-19 17:45:12 +08:00
return true;
}
else return false;
}
public:
2024-05-30 11:18:10 +08:00
char m_startFlag;
StrData* m_serial;
StrData* m_Name;
IntData* m_language;
IntData* m_MachineType;
IntData* m_ScanControl;
BoolData* m_IsIntelli;
IntData* m_PulifierType;
FloatData* m_fontSize;
FloatData* m_fontScale;
TimetData* m_lastStartTime;
TimetData* m_lastShutdownTime;
StrData* m_LockPassword;
FloatData* m_LockAlpha;
IntData* m_LockIdleTime;
TimetData* m_ExpriedTime;
StrData* m_ConnectPassword;
StrData* m_Location;
IntData* m_PlatformShape;
BoolData* m_SupportNonEncMagic;
IntData* m_PrintStrategy;
IntData* m_PlatformLength;
IntData* m_PlatformWidth;
IntData* m_IOVersion;
IntData* m_SupplyMachineVersion;
BoolData* m_UseTouchScreen;
StrData* m_MachineCode;
StrData* m_MachineCodeAss; //最少长度64
char m_endFlag; //结束标记
2024-03-19 17:45:12 +08:00
public:
static const string TABLE_NAME;
static const string FIELD_CODE;
static const string FIELD_VALUE;
static const string CODE_SERIAL;
static const string CODE_NAME;
static const string CODE_LANGUAGE;
static const string CODE_MACHINE_TYPE;
static const string CODE_SCAN_CONTROL;
static const string CODE_PULIFIER_TYPE;
static const string CODE_LAST_START_TIME;
static const string CODE_LAST_SHUTDOWN_TIME;
static const string CODE_FONT_SIZE;
static const string CODE_FONT_SCALE;
static const string CODE_LOCK_PASSWORD;
static const string CODE_LOCK_ALPHA;
static const string CODE_LOCK_IDLE_TIME;
static const string CODE_EXPIRED_TIME;
static const string CODE_HEATING_ENABLE;
//static const string CODE_IS_REMOTE_CONNECT;
static const string CODE_CONNECT_PASSWORD;
static const string CODE_LOCATION;
static const string CODE_SHAPE;
static const string CODE_SUPPORT_NON_ENC_MAGIC;
static const string CODE_PRINT_STRATEGY;
static const string CODE_PLATFORM_LENGTH;
static const string CODE_PLATFORM_WIDTH;
static const string CODE_IS_INTELLI;
static const string CODE_IO_VERSION;
static const string CODE_SUPPLY_MACHINE_VERSION;
static const string CODE_USE_TOUCH_SCREEN;
2024-03-19 17:45:12 +08:00
static const string CODE_MACHINE_CODE;
2024-03-19 17:45:12 +08:00
static map<int, vector<string>> m_CodeMap;
};
2024-05-30 11:18:10 +08:00
#pragma pack()
2024-03-19 17:45:12 +08:00