#pragma once #include "CppSQLite3.h" #include "dt.h" #include #include #include #include "CConfigBase.h" #include "CDataBaseOperate.h" namespace ns_db { using namespace std; #ifdef MODULE_CONFIG_DLL #define DLL_MODULE_CONFIG_API __declspec(dllexport) #else #define DLL_MODULE_CONFIG_API #endif #define MODULECONFIG_DATABASE_NAME ROOT_PATH##"\\db\\ModuleConfig.db" #define BONDHEAD_CONFIG_TABLE_NAME "EutecticHead" #define WAFERHEAD_CONFIG_TABLE_NAME "WaferHead" #define WAFFLEHEAD_CONFIG_TABLE_NAME "WaffleHead" #define EJECTOR_CONFIG_TABLE_NAME "Ejector" #define WAFERTABLE_CONFIG_TABLE_NAME "WaferTable" #define WAFER_CALIB_TABLE_CONFIG_TABLE_NAME "WaferCalibTable" #define WAFFLE_CALIB_TABLE_CONFIG_TABLE_NAME "WaffleCalibTable" #define BOND_TABLE_CONFIG_TABLE_NAME "BondTable" #define NOZZLE_TABLE_CONFIG_TABLE_NAME "NozzleTable" #define HARDWARE_SWICH_TABLE_NAME "HardwareSwich" #define ULTRAHEAD_TABLE_NAME "UltraHead" #define ULTRAHEAD_DIAGNOSIS_TABLE_NAME "UltraHead_Diagnosis" const static std::string g_mapModuleConfigDbList[] = { BONDHEAD_CONFIG_TABLE_NAME, WAFERHEAD_CONFIG_TABLE_NAME, WAFFLEHEAD_CONFIG_TABLE_NAME, EJECTOR_CONFIG_TABLE_NAME, WAFERTABLE_CONFIG_TABLE_NAME, WAFER_CALIB_TABLE_CONFIG_TABLE_NAME, WAFFLE_CALIB_TABLE_CONFIG_TABLE_NAME, BOND_TABLE_CONFIG_TABLE_NAME, NOZZLE_TABLE_CONFIG_TABLE_NAME, HARDWARE_SWICH_TABLE_NAME, ULTRAHEAD_TABLE_NAME, ULTRAHEAD_DIAGNOSIS_TABLE_NAME }; class DLL_MODULE_CONFIG_API CModuleConfig : public CDataBaseOperate { public: CModuleConfig(); LONG GetConfigParam(string strTableName, vector& vecConfig); LONG GetConfigParam(string strTableName, vector& vecConfig); LONG SetConfigParam(string strTableName, vector vecconfig); LONG SetConfigParam(string strTableName, vector vecconfig); private: std::unique_ptr m_ConfigBaseDb; LONG SaveDB() override; LONG LoadDB() override; /*LONG Read(vector stConfig, const CHAR* key, string& value); LONG Read(vector stConfig, const CHAR* key, CHAR* value, UINT len); LONG Read(vector stConfig, const CHAR* key, LONG* value); LONG Read(vector stConfig, const CHAR* key, ULONG* value); LONG Read(vector stConfig, const CHAR* key, INT* value); LONG Read(vector stConfig, const CHAR* key, DOUBLE* value); LONG Read(vector stConfig, const CHAR* key, bool* value); LONG Write(vector* stConfig, const CHAR* key, const CHAR* value); LONG Write(vector* stConfig, const CHAR* key, string value); LONG Write(vector* stConfig, const CHAR* key, LONG value); LONG Write(vector* stConfig, const CHAR* key, ULONG value); LONG Write(vector* stConfig, const CHAR* key, INT value); LONG Write(vector* stConfig, const CHAR* key, DOUBLE value); LONG Write(vector* stConfig, const CHAR* key, bool value);*/ /*LONG GetConfigParam(vector stConfig, vector* vecconfig); LONG SetConfigParam(vector* stConfig, vector vecconfig);*/ #pragma region HardwareSwich private: std::vector m_vecConfig_HardwareSwich; public: LONG GetConfigParam_HardwareSwich(string name,bool* flag); vector GetConfigParam_HardwareSwich() { return m_vecConfig_HardwareSwich; }; LONG SetConfigParam_HardwareSwich(vector vecconfig); LONG SetConfigParam_HardwareSwich(vector vecconfig); #pragma endregion #pragma region BondHead private: std::vector m_vecConfig_BondHead; public: LONG GetConfigParam_BondHead(vector* vecconfig); vector GetConfigParam_BondHead() { return m_vecConfig_BondHead; }; LONG SetConfigParam_BondHead(vector vecconfig); LONG SetConfigParam_BondHead(vector vecconfig); #pragma endregion #pragma region WaferHead private: std::vector m_vecConfig_WaferHead; public: LONG GetConfigParam_WaferHead(vector* vecconfig); vector GetConfigParam_WaferHead() { return m_vecConfig_WaferHead; }; LONG SetConfigParam_WaferHead(vector vecconfig); LONG SetConfigParam_WaferHead(vector vecconfig); #pragma endregion #pragma region WaffleHead private: std::vector m_vecConfig_WaffleHead; public: LONG GetConfigParam_WaffleHead(vector* vecconfig); vector GetConfigParam_WaffleHead() { return m_vecConfig_WaffleHead; }; LONG SetConfigParam_WaffleHead(vector vecconfig); LONG SetConfigParam_WaffleHead(vector vecconfig); #pragma endregion #pragma region Ejector private: std::vector m_vecConfig_Ejector; public: LONG GetConfigParam_Ejector(vector* vecconfig); vector GetConfigParam_Ejector() { return m_vecConfig_Ejector; }; LONG SetConfigParam_Ejector(vector vecconfig); LONG SetConfigParam_Ejector(vector vecconfig); #pragma endregion #pragma region WaferTable private: std::vector m_vecConfig_WaferTable; public: LONG GetConfigParam_WaferTable(vector* vecconfig); vector GetConfigParam_WaferTable() { return m_vecConfig_WaferTable; }; LONG SetConfigParam_WaferTable(vector vecconfig); LONG SetConfigParam_WaferTable(vector vecconfig); #pragma endregion #pragma region CalibTable private: std::vector m_vecConfig_WaferCalibTable; std::vector m_vecConfig_WaffleCalibTable; public: //LONG GetConfigParamg_CalibTable(int moduleType, vector* vecconfig); LONG GetConfigParam_WaferCalibTable(vector* vecconfig); LONG GetConfigParam_WaffleCalibTable(vector* vecconfig); vector GetConfigParam_WaferCalibTable() { return m_vecConfig_WaferCalibTable; }; vector GetConfigParam_WaffleCalibTable() { return m_vecConfig_WaffleCalibTable; }; LONG SetConfigParam_WaferCalibTable(vector vecconfig); LONG SetConfigParam_WaffleCalibTable(vector vecconfig); LONG SetConfigParam_WaferCalibTable(vector vecconfig); LONG SetConfigParam_WaffleCalibTable(vector vecconfig); //LONG SetConfigParam_CalibTable(int moduleType, vector vecconfig); #pragma endregion #pragma region BondTable private: std::vector m_vecConfig_BondTable; public: LONG GetConfigParam_BondTable(vector* vecconfig); vector GetConfigParam_BondTable() { return m_vecConfig_BondTable; }; LONG SetConfigParam_BondTable(vector vecconfig); LONG SetConfigParam_BondTable(vector vecconfig); #pragma endregion #pragma region NozzleTable private: std::vector m_vecConfig_NozzleTable; public: LONG GetConfigParam_NozzleTable(vector* vecconfig); vector GetConfigParam_NozzleTable() { return m_vecConfig_NozzleTable; }; LONG SetConfigParam_NozzleTable(vector vecconfig); LONG SetConfigParam_NozzleTable(vector vecconfig); #pragma endregion #pragma region UltraHead private: std::vector m_vecConfig_UltraHead; public: LONG GetConfigParam_UltraHead(vector* vecconfig); vector GetConfigParam_UltraHead() { return m_vecConfig_UltraHead; }; LONG SetConfigParam_UltraHead(vector vecconfig); LONG SetConfigParam_UltraHead(vector vecconfig); #pragma endregion #pragma region UltraHead_Diagnosis private: std::vector m_vecConfig_UltraHeadDiagnosis; public: LONG GetConfigParam_UltraHeadDiagnosis(vector* vecconfig); vector GetConfigParam_UltraHeadDiagnosis() { return m_vecConfig_UltraHeadDiagnosis; }; LONG SetConfigParam_UltraHeadDiagnosis(vector vecconfig); LONG SetConfigParam_UltraHeadDiagnosis(vector vecconfig); #pragma endregion }; }