stdafx.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 特定于项目的包含文件
  4. //
  5. #pragma once
  6. #include "targetver.h"
  7. #include <stdio.h>
  8. #include <tchar.h>
  9. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  10. #ifndef VC_EXTRALEAN
  11. #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
  12. #endif
  13. #include <afx.h>
  14. #include <afxwin.h> // MFC 核心组件和标准组件
  15. #include <afxext.h> // MFC 扩展
  16. #ifndef _AFX_NO_OLE_SUPPORT
  17. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  18. #endif
  19. #ifndef _AFX_NO_AFXCMN_SUPPORT
  20. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  21. #endif // _AFX_NO_AFXCMN_SUPPORT
  22. #include <iostream>
  23. #include <string>
  24. #include <vector>
  25. #include "Serial.h"
  26. typedef struct __CMDPARAM__ {
  27. std::string name; // 命令描述;
  28. std::string head; // 命令头;
  29. std::string code; // 命令码;
  30. std::string param; // 命令码参数;
  31. bool bMulticode ; // 命令码是否多参数;
  32. int cmd_wait_time ; // 两条串口指令间隔时间;
  33. int read_wait_time ; // 写完串口后,等待多久读;
  34. } CommandParam, *pCommandParam;
  35. int pares_time_value(std::string strTime);
  36. bool parse_key(std::string &value, std::string strLine, TCHAR *lpszText);
  37. int parse_cmd_param_from_file(char *file_name, std::vector<CommandParam> &vtCommandParams);
  38. unsigned char TwoHexCharToInteger(char high, char low);
  39. // TODO: 在此处引用程序需要的其他头文件