| | |
| | | int nParamCount; //参数数量
|
| | | stParam Params[3]; //参数们
|
| | | int PairTo; //对应指令
|
| | | stProg() {};
|
| | | stProg(CStringA sOpStr) {};
|
| | | stProg(int nOpType):nOpType1(nOpType) { nParamCount = 0; }
|
| | | stProg(int nOpType, CStringA sParamStr):nOpType1(nOpType) |
| | | {
|
| | | nParamCount = 1;
|
| | | Params[0].sParamStr = sParamStr;
|
| | |
|
| | | Params[0].nParamType = 0;
|
| | | Params[0].nParamAddr = 0;
|
| | | };
|
| | | CStringA ToText()
|
| | | {
|
| | | CStringA s1, s2;
|
| | | OpToTxt(nOpType1, s1);
|
| | | if (nParamCount > 0) { s1.Append("\t" + Params[0].sParamStr); }
|
| | | if (nParamCount > 1) { s1.Append("\t" + Params[1].sParamStr); }
|
| | | if (nParamCount > 2) { s1.Append("\t" + Params[2].sParamStr); }
|
| | | if (nParamCount > 3) { s1.Append("\t" + Params[3].sParamStr); }
|
| | | s1.Append("\r\n");
|
| | | s2 += s1;
|
| | | return s2;
|
| | | }
|
| | | };
|
| | |
|
| | |
|
| | |
| | |
|
| | | // 操作
|
| | | public:
|
| | | int TxtToOp(CStringA optxt, int* ParamCount, int* ParamType);
|
| | | int OpToTxt(int nOp, CStringA & OpTxt);
|
| | | static int TxtToOp(CStringA optxt, int* ParamCount, int* ParamType);
|
| | | static int OpToTxt(int nOp, CStringA & OpTxt);
|
| | | int OpToShowTxt(int nOp, CStringA & OpShowTxt);
|
| | |
|
| | | int TxtToCoilType(CStringA Typetxt, int* nCoilType, int* CoilAddr);
|
| | |
| | | int TransProgToBin();
|
| | | int TransBinToProg();
|
| | |
|
| | | int FindProgPair();
|
| | |
|
| | | int LoadFromFile(CString sFilePathName);
|
| | | int SaveToFile(CString sFilePathName);
|
| | |
| | | stProg Progs[2048] = { 0 };
|
| | | int ProgTrace[2048] = { 0 };
|
| | | int m_nProgSteps = 0;
|
| | |
|
| | | stBinProg1 BinProgs[2000];
|
| | | int nBinProgSteps = 0;
|
| | |
|