| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 | 
							- // stdafx.h : 标准系统包含文件的包含文件,
 
- // 或是经常使用但不常更改的
 
- // 特定于项目的包含文件
 
- //
 
- #pragma once
 
- #include "targetver.h"
 
- #include <stdio.h>
 
- #include <tchar.h>
 
- #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // 某些 CString 构造函数将是显式的
 
- #ifndef VC_EXTRALEAN
 
- #define VC_EXTRALEAN            // 从 Windows 头中排除极少使用的资料
 
- #endif
 
- #include <afx.h>
 
- #include <afxwin.h>         // MFC 核心组件和标准组件
 
- #include <afxext.h>         // MFC 扩展
 
- #ifndef _AFX_NO_OLE_SUPPORT
 
- #include <afxdtctl.h>           // MFC 对 Internet Explorer 4 公共控件的支持
 
- #endif
 
- #ifndef _AFX_NO_AFXCMN_SUPPORT
 
- #include <afxcmn.h>                     // MFC 对 Windows 公共控件的支持
 
- #endif // _AFX_NO_AFXCMN_SUPPORT
 
- #include <iostream>
 
- #include <string>
 
- #include <vector>
 
- #include "Serial.h"
 
- typedef struct __CMDPARAM__ {
 
- 	std::string name;		// 命令描述;
 
- 	std::string head;		// 命令头;
 
- 	std::string code;		// 命令码;
 
- 	std::string param;		// 命令码参数;
 
- 	int nOption;			// 命令属性类型:0=None\1=Get\2=Set;
 
- 	bool bMulticode ;		// 命令码是否多参数;
 
- 	int cmd_wait_time ;		// 两条串口指令间隔时间;
 
- 	int read_wait_time ;	// 写完串口后,等待多久读;
 
- } CommandParam, *pCommandParam;
 
- int pares_time_value(std::string strTime);
 
- bool parse_key(std::string &value, std::string strLine, TCHAR *lpszText);
 
- int parse_cmd_param_from_file(char *file_name, std::vector<CommandParam> &vtCommandParams);
 
- unsigned char TwoHexCharToInteger(char high, char low);
 
- std::string PackingCommand(CommandParam &cmdPara, std::string data, const int &dataLen);
 
- std::string BytesToHexString(const unsigned char *pbuffer, int nLen);
 
- std::string BytesToHexString(const unsigned char *pbuffer, int nLen, char chSpace);
 
- // TODO: 在此处引用程序需要的其他头文件
 
 
  |