FCUSTDT.H
上传用户:ywlong9188
上传日期:2022-05-31
资源大小:2656k
文件大小:2k
- /////////////////////////////////////////////////////////////
- //class CCfgSTInstrData
- #ifndef CFG_STTABLEDATA_HEADER
- #define CFG_STTABLEDATA_HEADER
- #include "checkdef.h"
- #include "STDtlChk.h"
- class CCfgSTInstrData : public CCfgCheckBase
- {
- public:
- CCfgSTInstrData();
- ~CCfgSTInstrData();
- void InitialPointer(CDaoDatabase* pOPSDB,CDaoDatabase* pFCUDB,BYTE* pbinbuf,int nOnlineMode,CFile* pFile,CCommunication* pComm);
- BOOL CheckData(const int nRowNo,CString strarEdit[][CFG_NUM_STTABLE_EDCOL],int& nErrColNo,CString& sErrMsg,BOOL& bRetIsChanged);
- void ReadData(CString strarEdit[][CFG_NUM_STTABLE_EDCOL]);
- void WriteData(CString strarEdit[][CFG_NUM_STTABLE_EDCOL]);
- BOOL CheckAllData(CString strarEdit[][CFG_NUM_STTABLE_EDCOL],int& nerrrow,int& nErrColNo,CString& sErrMsg);
- void CopyDetailTable(int srcTableNo,int dstTableNo,int copyMode);
- // DECLARE_DYNAMIC(CCfgSTInstrData)
- //Attributes
- public:
- struct STBinItem_Scan{
- WORD word0;
- WORD word2[15];
- };
- struct STBinItem_Mode{
- WORD word0;
- WORD word2;
- WORD word4;
- WORD word6; //not used
- WORD word8;
- WORD wordA;
- WORD wordC; //not used
- WORD wordE;
- };
- struct STTransItem{
- BOOL bScan;
- BOOL bMode_T;
- BOOL bMode_I;
- BOOL bMode_H;
- BOOL bMode_E;
- int nPrev;
- int nNext;
- BOOL bIsConfigChanged; //indicate whether ST config list changed
- BOOL bIsOperationChanged; //indicate whether ST operation list table changed
- };
- struct STDataBaseItem{
- CString sComment;
- };
- private:
- struct STBinItem_Scan m_arSTBinItem_Scan[CFG_NUM_STTABLE_REC];
- struct STBinItem_Mode m_arSTBinItem_Mode[CFG_NUM_STTABLE_REC];
- struct STTransItem m_arSTTransItem[CFG_NUM_STTABLE_REC];
- struct STDataBaseItem m_arSTDBItem[CFG_NUM_STTABLE_REC];
- CFCUSTTableSet m_STTableSet;
-
- // CFile* m_pBinFile;
- CCfgSTDtlInstrData m_STDetail;
- //Operations
- private:
- WORD SwapByte(WORD srcword);
- void SwapByteOfWord(int nRowNo);
- void WriteMemVarToDB(CFCUSTTableSet& STset);
- void WriteMemVarToBinFile();
- void ReadDBToMemVar(CFCUSTTableSet& STset);
- void ReadBinFileToMemVar();
- void TransSymbolToBin(int rowno);
- void TransBinToSymbol(int rowno);
- };
- #endif