atcommands.h

来自「串口开发的另一种方式.rar」· C头文件 代码 · 共 49 行

H
49
字号
#ifndef ATCOMMANDS_H_
#define ATCOMMANDS_H_

#include<vector>
using namespace std;

// contents of a command
typedef struct STCommand
{
	UINT iCommandCode;
	string strCommandName;
	string strExplain;
}*pSTCommand;

// AT-commands class
class CATCommand
{
public:
	CATCommand();
	virtual ~CATCommand();

// operations
public:
	BOOL LoadFile(TCHAR* FileName); /* Load a File */
	UINT AddCommand(STCommand *pCommand); /* Add a command */
	BOOL DeleteCommand(UINT commandCode); /* Delete a command */
	void ExecuteCommand(const TCHAR* strCommand); /* Execute a command */
	void ExecuteCommand(UINT commandCode); /* Execute a command of a code */
	void SaveFile(TCHAR* FileName); /* Save File */
	void Release(); /* Release the resource */

    // 06/06/16 ADDED BY LI BIN
	void AttachWin(CWnd* pWin, DWORD msg) { m_pWin = pWin; m_winMsg = msg; }

// Attributes 
public:
	vector<pSTCommand> Vcommands;
private:
	string myFileName;
	int iTotalLines;

    // 06/06/16 ADDED BY LI BIN
    CWnd* m_pWin;
	DWORD m_winMsg;
	
protected:
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?