2024-05-22 15:58:54 +08:00
|
|
|
|
#pragma once
|
2024-03-19 17:45:12 +08:00
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
class MachineCfg
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum PrintStrategy {
|
2024-05-22 15:58:54 +08:00
|
|
|
|
DATA = 0, //根据ScanField
|
2024-03-19 17:45:12 +08:00
|
|
|
|
DATA_SEQ_OPT,
|
2024-05-22 15:58:54 +08:00
|
|
|
|
Mass_Production_Strategy
|
2024-03-19 17:45:12 +08:00
|
|
|
|
};
|
|
|
|
|
|
2024-05-22 15:58:54 +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-22 15:58:54 +08:00
|
|
|
|
if (m_PrintStrategy == DATA_SEQ_OPT) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IsMassStrategy() {
|
|
|
|
|
if (m_PrintStrategy == Mass_Production_Strategy)
|
|
|
|
|
{
|
2024-03-19 17:45:12 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
string m_serial;
|
|
|
|
|
string m_Name;
|
|
|
|
|
int m_language;
|
|
|
|
|
int m_MachineType;
|
|
|
|
|
int m_ScanControl;
|
|
|
|
|
bool m_IsIntelli;
|
|
|
|
|
int m_PulifierType;
|
|
|
|
|
float m_fontSize;
|
|
|
|
|
float m_fontScale;
|
|
|
|
|
time_t m_lastStartTime;
|
|
|
|
|
time_t m_lastShutdownTime;
|
|
|
|
|
string m_LockPassword;
|
|
|
|
|
float m_LockAlpha;
|
|
|
|
|
int m_LockIdleTime;
|
|
|
|
|
time_t m_ExpriedTime;
|
|
|
|
|
string m_ConnectPassword;
|
|
|
|
|
string m_Location;
|
|
|
|
|
int m_PlatformShape;
|
|
|
|
|
bool m_SupportNonEncMagic;
|
|
|
|
|
int m_PrintStrategy;
|
|
|
|
|
int m_PlatformLength;
|
|
|
|
|
int m_PlatformWidth;
|
|
|
|
|
int m_IOVersion;
|
|
|
|
|
int m_SupplyMachineVersion;
|
2024-05-22 15:58:54 +08:00
|
|
|
|
bool m_UseTouchScreen;
|
2024-03-19 17:45:12 +08:00
|
|
|
|
string m_MachineCode;
|
|
|
|
|
char m_MachineCodeAss[64];
|
|
|
|
|
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;
|
2024-05-22 15:58:54 +08:00
|
|
|
|
static const string CODE_USE_TOUCH_SCREEN;
|
2024-03-19 17:45:12 +08:00
|
|
|
|
static const string CODE_MACHINE_CODE;
|
2024-05-22 15:58:54 +08:00
|
|
|
|
|
2024-03-19 17:45:12 +08:00
|
|
|
|
static map<int, vector<string>> m_CodeMap;
|
|
|
|
|
};
|
|
|
|
|
|