DFS_Shuo_Chen 2 年之前
父节点
当前提交
5ff86b594c
共有 100 个文件被更改,包括 1758 次插入0 次删除
  1. 二进制
      Bin/HscLogViewer.exe
  2. 二进制
      HSC+主板数据文件/V0.1/HSC+主板数据文件(Bin)解析格式V0.01.xlsx
  3. 1 0
      HSC+主板数据文件/V0.1/calcu_info_A.bin
  4. 二进制
      HSC+主板数据文件/V0.1/config_A.bin
  5. 二进制
      HSC+主板数据文件/V0.1/err_record_A.bin
  6. 二进制
      HSC+主板数据文件/V0.1/standalone_trans_A.bin
  7. 二进制
      HSC+主板数据文件/V0.1/total_A.bin
  8. 二进制
      HSC+主板数据文件/V0.1/trans_records_A.bin
  9. 二进制
      HSC+主板数据文件/V0.2/HSC+主板数据文件(Bin)解析格式V0.02.xlsx
  10. 二进制
      HSC+主板数据文件/V0.2/config_A.bin
  11. 二进制
      HSC+主板数据文件/V0.2/debug_A.bin
  12. 二进制
      HSC+主板数据文件/V0.2/err_record_A.bin
  13. 二进制
      HSC+主板数据文件/V0.2/err_record_B.bin
  14. 二进制
      HSC+主板数据文件/V0.2/standalone_trans_A.bin
  15. 二进制
      HSC+主板数据文件/V0.2/standalone_trans_B.bin
  16. 二进制
      HSC+主板数据文件/V0.2/total_A.bin
  17. 二进制
      HSC+主板数据文件/V0.2/total_B.bin
  18. 二进制
      HSC+主板数据文件/V0.2/trans_record_A.bin
  19. 二进制
      HSC+主板数据文件/V0.2/trans_record_B.bin
  20. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求.rar
  21. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/HSC+主板数据文件(Bin)解析格式(对应主板程序V1.1.4).xlsx
  22. 2 0
      HSC+主板数据文件/V1.1.4数据解析需求/readme.txt
  23. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/calcu_info.bin
  24. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/config_A.bin
  25. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/config_B.bin
  26. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/debug_A.bin
  27. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/debug_B.bin
  28. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/err_record_A.bin
  29. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/err_record_B.bin
  30. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/standalone_trans_A.bin
  31. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/standalone_trans_B.bin
  32. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/total_A.bin
  33. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/total_B.bin
  34. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/trans_record_A.bin
  35. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/trans_record_B.bin
  36. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/calcu_info.bin
  37. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/config_A.bin
  38. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/config_B.bin
  39. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/debug_A.bin
  40. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/debug_B.bin
  41. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/err_record_A.bin
  42. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/err_record_B.bin
  43. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/standalone_trans_A.bin
  44. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/standalone_trans_B.bin
  45. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/total_A.bin
  46. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/total_B.bin
  47. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/trans_record_A.bin
  48. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/trans_record_B.bin
  49. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/calcu_info.bin
  50. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/config_A.bin
  51. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/config_B.bin
  52. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/debug_A.bin
  53. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/debug_B.bin
  54. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/err_record_A.bin
  55. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/err_record_B.bin
  56. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/standalone_trans_A.bin
  57. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/standalone_trans_B.bin
  58. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/total_A.bin
  59. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/total_B.bin
  60. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/trans_record_A.bin
  61. 二进制
      HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/trans_record_B.bin
  62. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求.rar
  63. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/calcu_info.bin
  64. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/config_A.bin
  65. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/config_B.bin
  66. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/debug_A.bin
  67. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/debug_B.bin
  68. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/err_record_A.bin
  69. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/err_record_B.bin
  70. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/standalone_trans_A.bin
  71. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/standalone_trans_B.bin
  72. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/total_A.bin
  73. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/total_B.bin
  74. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/trans_record_A.bin
  75. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/trans_record_B.bin
  76. 二进制
      HSC+主板数据文件/V1.1.6数据解析需求/HSC+主板数据文件(Bin)解析格式(对应主板程序V1.1.6).xlsx
  77. 1 0
      HSC+主板数据文件/V1.1.6数据解析需求/readme.txt
  78. 22 0
      HscLogViewer.sln
  79. 二进制
      HscLogViewer.v12.suo
  80. 771 0
      HscLogViewer/ConfigDlg.cpp
  81. 34 0
      HscLogViewer/ConfigDlg.h
  82. 30 0
      HscLogViewer/Debug/HscLogViewer.Build.CppClean.log
  83. 15 0
      HscLogViewer/Debug/HscLogViewer.log
  84. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/CL.read.1.tlog
  85. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/CL.write.1.tlog
  86. 2 0
      HscLogViewer/Debug/HscLogViewer.tlog/HscLogViewer.lastbuildstate
  87. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/cl.command.1.tlog
  88. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/link.command.1.tlog
  89. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/link.read.1.tlog
  90. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/link.write.1.tlog
  91. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/rc.command.1.tlog
  92. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/rc.read.1.tlog
  93. 二进制
      HscLogViewer/Debug/HscLogViewer.tlog/rc.write.1.tlog
  94. 265 0
      HscLogViewer/DebugDlg.cpp
  95. 37 0
      HscLogViewer/DebugDlg.h
  96. 279 0
      HscLogViewer/ErrorDlg.cpp
  97. 38 0
      HscLogViewer/ErrorDlg.h
  98. 137 0
      HscLogViewer/HeaderCtrlEx.cpp
  99. 22 0
      HscLogViewer/HeaderCtrlEx.h
  100. 102 0
      HscLogViewer/HscLogViewer.cpp

二进制
Bin/HscLogViewer.exe


二进制
HSC+主板数据文件/V0.1/HSC+主板数据文件(Bin)解析格式V0.01.xlsx


+ 1 - 0
HSC+主板数据文件/V0.1/calcu_info_A.bin

@@ -0,0 +1 @@
+DFSHSC001L1R100V000.000.0015AA5V000.000.002A55A

二进制
HSC+主板数据文件/V0.1/config_A.bin


二进制
HSC+主板数据文件/V0.1/err_record_A.bin


二进制
HSC+主板数据文件/V0.1/standalone_trans_A.bin


二进制
HSC+主板数据文件/V0.1/total_A.bin


二进制
HSC+主板数据文件/V0.1/trans_records_A.bin


二进制
HSC+主板数据文件/V0.2/HSC+主板数据文件(Bin)解析格式V0.02.xlsx


二进制
HSC+主板数据文件/V0.2/config_A.bin


二进制
HSC+主板数据文件/V0.2/debug_A.bin


二进制
HSC+主板数据文件/V0.2/err_record_A.bin


二进制
HSC+主板数据文件/V0.2/err_record_B.bin


二进制
HSC+主板数据文件/V0.2/standalone_trans_A.bin


二进制
HSC+主板数据文件/V0.2/standalone_trans_B.bin


二进制
HSC+主板数据文件/V0.2/total_A.bin


二进制
HSC+主板数据文件/V0.2/total_B.bin


二进制
HSC+主板数据文件/V0.2/trans_record_A.bin


二进制
HSC+主板数据文件/V0.2/trans_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求.rar


二进制
HSC+主板数据文件/V1.1.4数据解析需求/HSC+主板数据文件(Bin)解析格式(对应主板程序V1.1.4).xlsx


+ 2 - 0
HSC+主板数据文件/V1.1.4数据解析需求/readme.txt

@@ -0,0 +1,2 @@
+1、解析格式请参照excel文件说明,黄底部分为与上一版对比有变动的地方;
+2、支持打开文件路径操作;

二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/calcu_info.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/config_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/config_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/debug_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/debug_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/err_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/err_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/standalone_trans_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/standalone_trans_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/total_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/total_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/trans_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_17/trans_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/calcu_info.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/config_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/config_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/debug_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/debug_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/err_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/err_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/standalone_trans_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/standalone_trans_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/total_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/total_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/trans_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/11_23/trans_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/calcu_info.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/config_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/config_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/debug_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/debug_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/err_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/err_record_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/standalone_trans_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/standalone_trans_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/total_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/total_B.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/trans_record_A.bin


二进制
HSC+主板数据文件/V1.1.4数据解析需求/文件/2020-08-28/13_59/trans_record_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求.rar


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/calcu_info.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/config_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/config_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/debug_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/debug_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/err_record_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/err_record_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/standalone_trans_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/standalone_trans_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/total_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/total_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/trans_record_A.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/2020-09-24/16_04/trans_record_B.bin


二进制
HSC+主板数据文件/V1.1.6数据解析需求/HSC+主板数据文件(Bin)解析格式(对应主板程序V1.1.6).xlsx


+ 1 - 0
HSC+主板数据文件/V1.1.6数据解析需求/readme.txt

@@ -0,0 +1 @@
+1、excel文件此次修改部分标黄底色,其余白底色部分与上个版本一致!

+ 22 - 0
HscLogViewer.sln

@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.40629.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HscLogViewer", "HscLogViewer\HscLogViewer.vcxproj", "{BFEEA239-FAA5-46CE-A276-E4B8D89ECC6E}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{BFEEA239-FAA5-46CE-A276-E4B8D89ECC6E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{BFEEA239-FAA5-46CE-A276-E4B8D89ECC6E}.Debug|Win32.Build.0 = Debug|Win32
+		{BFEEA239-FAA5-46CE-A276-E4B8D89ECC6E}.Release|Win32.ActiveCfg = Release|Win32
+		{BFEEA239-FAA5-46CE-A276-E4B8D89ECC6E}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

二进制
HscLogViewer.v12.suo


+ 771 - 0
HscLogViewer/ConfigDlg.cpp

@@ -0,0 +1,771 @@
+// ConfigDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "HscLogViewer.h"
+#include "ConfigDlg.h"
+#include "afxdialogex.h"
+
+
+// CConfigDlg dialog
+
+IMPLEMENT_DYNAMIC(CConfigDlg, CDialogEx)
+
+CConfigDlg::CConfigDlg(CWnd* pParent /*=NULL*/)
+	: CDialogEx(CConfigDlg::IDD, pParent)
+{
+
+}
+
+CConfigDlg::~CConfigDlg()
+{
+}
+
+void CConfigDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+	DDX_Control(pDX, IDC_LIST1, m_ListView);
+	DDX_Control(pDX, IDC_COMBO1, CB_PUMP);
+}
+
+
+BEGIN_MESSAGE_MAP(CConfigDlg, CDialogEx)
+	ON_BN_CLICKED(IDC_BUTTON_QUERY, &CConfigDlg::OnBnClickedButtonQuery)
+END_MESSAGE_MAP()
+
+
+// CConfigDlg message handlers
+
+RECORD_DATA_2 recorddata[] =
+{
+
+	"液压配置数据", "CFG_NB_PRODUCTS", TYPE_BIN, 1,
+	"液压配置数据", "CFG_NB_METERS", TYPE_BIN, 1,
+	"液压配置数据", "CFG_NB_FIPS", TYPE_BIN, 1,
+	"液压配置数据", "CFG_NB_LOGICAL_NOZZLES", TYPE_BIN, 1,
+	"液压配置数据", "CFG_HYDRAULIC_SETUP_ID", TYPE_BIN, 1,
+	"液压配置数据", "CFG_PULSER_HIDE", TYPE_BIN, 1,
+	"液压配置数据", "CFG_HOSE_EXPANSION_VOLUME", TYPE_BIN, 1,
+	"液压配置数据", "CFG_HOSE_EXPANSION_TIME", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_FIP_NB_PRODUCTS", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_FIP_NB_METERS", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_FIP_NB_LOGICAL_NOZZLES", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NOZZLE_PROD_INTERNAL_1", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NOZZLE_PROD_INTERNAL_2", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NB_DISPLAY_PER_FIP", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NB_FUELLING_MODES", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NOZZLE_PROD_EXTERNAL_1", TYPE_BCD, 4,
+	"加油点枪配置", "CFG_NOZZLE_PROD_EXTERNAL_2", TYPE_BCD, 4,
+	"加油点枪配置", "CFG_NOZZLE_NO_EXTERNAL_1", TYPE_BIN, 1,
+	"加油点枪配置", "CFG_NOZZLE_NO_EXTERNAL_2", TYPE_BIN, 1,
+	"阀配置数据", "CFG_PRESET_VALVE_RESPONSE_NS", TYPE_BIN, 1,
+	"阀配置数据", "CFG_PRESET_VALVE_TYPE", TYPE_BIN, 1,
+	"阀配置数据", "CFG_PRESET_VALVE_RESPONSE_LOW", TYPE_BIN, 1,
+	"时间参数配置数据", "CFG_TIME_MAX_AUTHORIZED", TYPE_BIN, 2,
+	"时间参数配置数据", "CFG_TIME_MAX_NO_PROGRESS", TYPE_BIN, 2,
+	"时间参数配置数据", "CFG_TIME_INTER_DELIVERY", TYPE_BIN, 1,
+	"时间参数配置数据", "CFG_TIME_MAX_SUSPENDED", TYPE_BIN, 2,
+	"时间参数配置数据", "CFG_TIME_WAIT_SLOW_FLOW", TYPE_BIN, 1,
+	"时间参数配置数据", "CFG_TIME_SUBMERGED_VALVE_DELAY", TYPE_BIN, 1,
+	"时间参数配置数据", "CFG_TIME_MAX_DELIVERY", TYPE_BIN, 2,
+	"时间参数配置数据", "CFG_TIME_DISPLAY_ERROR", TYPE_BIN, 1,
+	"时间参数配置数据", "CFG_TIME_CHECK_BATTERY_TEST", TYPE_BIN, 1,
+	"定量配置数据", "CFG_PRESET_VOLUME_MIN", TYPE_VALUE, 5,
+	"定量配置数据", "CFG_PRESET_VOLUME_MAX", TYPE_VALUE, 5,
+	"定量配置数据", "CFG_PRESET_AMOUNT_MIN", TYPE_VALUE, 5,
+	"定量配置数据", "CFG_PRESET_AMOUNT_MAX", TYPE_VALUE, 5,
+	"定量配置数据", "CFG_VOLUME_LIMIT", TYPE_VALUE, 5,
+	"显示配置数据", "CFG_TYPE_DISPLAY_TYPE", TYPE_BIN, 1,
+	"显示配置数据", "AUX_IDLE_DISPLAY_MODE", TYPE_BIN, 1,
+	"显示配置数据", "CFG_DIGITS_LAYOUT_VOLUME", TYPE_BIN, 1,
+	"显示配置数据", "CFG_DIGITS_LAYOUT_AMOUNT", TYPE_BIN, 1,
+	"显示配置数据", "CFG_DIGITS_LAYOUT_UNITPRICE", TYPE_BIN, 1,
+	"凑整配置数据", "CFG_AMOUNT_ROUNDING_TYPE", TYPE_BIN, 1,
+	"凑整配置数据", "CFG_VOLUME_ROUNDING_TYPE", TYPE_BIN, 1,
+	"凑整配置数据", "AUX_JUST_STOP_ROUNDING_MODE", TYPE_BIN, 1,
+	"油品单价配置数据", "OP_HSC_UNIT_PRICE_PROD_1", TYPE_VALUE, 4,
+	"油品单价配置数据", "OP_HSC_UNIT_PRICE_PROD_2", TYPE_VALUE, 4,
+	"计量板软硬件版本信息", "CFG_MANUFACTURER_ID", TYPE_ASC, 3,
+	"计量板软硬件版本信息", "CFG_CALCULATOR_SERIAL_NUMBER", TYPE_ASC, 12,
+	"计量板软硬件版本信息", "CFG_SW_VERSION_APPLICATION", TYPE_ASC, 12,
+	"计量板软硬件版本信息", "CFG_SW_CHECKSUM", TYPE_ASC, 4,
+	"计量板软硬件版本信息", "CFG_CAN_DEVICE_VERSION", TYPE_ASC, 12,
+	"计量板软硬件版本信息", "CFG_CAN_DEVICE_CHECKSUM", TYPE_ASC, 4,
+	"其它配置", "CFG_ZERO_TRANS_THRES", TYPE_BIN, 1,
+	"其它配置", "CFG_NB_DELIVERY_MODES", TYPE_BIN, 1,
+	"其它配置", "PRODUCT_1_NAME", TYPE_BCD, 4,
+	"其它配置", "PRODUCT_2_NAME", TYPE_BCD, 4
+
+};
+
+
+BOOL CConfigDlg::OnInitDialog()
+{
+	CDialogEx::OnInitDialog();
+
+	// TODO:  Add extra initialization here
+	DWORD style = m_ListView.GetExtendedStyle();
+	m_ListView.SetExtendedStyle(style | LVS_EX_FLATSB);
+	m_ListView.SetFullRowSel(true);
+
+	m_ListView.SetBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetBkColor( RGB(87,91,92) );
+	m_ListView.SetTextBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetTextBkColor( RGB(87,91,92) );
+	m_ListView.SetTxtColor(RGB(0, 0, 0));//m_DetailLstCtrl.SetTxtColor( RGB(255,255,255) );
+	m_ListView.ShowLineBk(false);
+	m_ListView.SetFontHeight(16);//m_DetailLstCtrl.SetFontHeight( 18 );
+
+
+	CB_PUMP.AddString("A");
+	CB_PUMP.AddString("B");
+	CB_PUMP.SetCurSel(0);
+
+
+	HEAD head[] = {
+		"类型", 250,
+		"字段", 400,
+		"数值", 150
+	};
+
+
+	CString tmpInfo;
+	int index = 0;
+
+	for (int i = 0; i < sizeof(head) / sizeof(HEAD); i++)
+	{
+		tmpInfo = head[i].name;
+		m_ListView.InsertColumn(index++, tmpInfo, LVCFMT_LEFT, head[i].width);
+	}
+
+
+
+
+
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+	// EXCEPTION: OCX Property Pages should return FALSE
+}
+
+
+void CConfigDlg::OnBnClickedButtonQuery()
+{
+
+	m_ListView.DeleteAllItems();
+
+	CString strpump = CB_PUMP.GetCurSel() == 0 ? "A" : "B";
+
+
+	CString path = "./config_" + strpump + ".bin";
+	
+
+	BYTE* v = new BYTE[MAXSIZE];
+	int i = 0;
+
+	//open
+	FILE *fr;
+	fopen_s(&fr, path, "rb");
+	if (fr == NULL) //打开文件出错。
+	{
+		AfxMessageBox("打开文件失败!");
+		return;
+	}
+
+
+	//size
+	fseek(fr, 0, SEEK_END);
+	long int size = ftell(fr);
+	fseek(fr, 0, SEEK_SET);
+	if (size >= MAXSIZE)
+	{
+		AfxMessageBox("文件太大!");
+		return;
+	}
+
+	//scan
+	while (fscanf_s(fr, "%c", &v[i]) != EOF) //读取数据到数组,直到文件结尾(返回EOF)
+	{
+		i++;
+	}
+	fclose(fr);
+
+
+	//int count = size / len;
+	int index = 0;
+
+	int offset_struct = 1;
+
+	//for (int i = 0; i < count; i++)
+	//{
+		//int col = 0;
+
+		int offset = 0;
+
+
+
+
+
+		for (int i = 0; i < sizeof(recorddata) / sizeof(RECORD_DATA); i++)
+		{
+
+			m_ListView.InsertItem(i, _T(""));
+			m_ListView.SetItemText(i, 0, recorddata[i].item);
+
+			CString text;
+
+			if (recorddata[i].type == TYPE_VALUE)
+			{
+				double val = BCDtoDec(&v[offset + offset_struct], recorddata[i].length - offset_struct);
+				text = _F2T(val / 100.0);
+			}
+			else if (recorddata[i].type == TYPE_BCD)
+			{
+				int val = BCDtoDec(&v[offset], recorddata[i].length);
+
+				text = _I2T(val);
+			}
+			else if (recorddata[i].type == TYPE_ASC)
+			{
+				char ch[100] = { 0 };// = new char[recorddata[i].length + 1];
+				memcpy(ch, v + offset, recorddata[i].length);
+
+
+				//char c[2] = { 0 };
+				//c[0] = v[offset];
+				text = ch;
+
+				//delete pchar;
+			}
+			else if (recorddata[i].type == TYPE_DATETIME)
+			{
+
+			}
+			else if (recorddata[i].type == TYPE_BIN)
+			{
+				text = BINtoCString(&v[offset], recorddata[i].length);
+			}
+
+
+
+			m_ListView.SetItemText(i, 1, recorddata[i].name);
+			m_ListView.SetItemText(i, 2, text);
+
+			offset += recorddata[i].length;
+		}
+
+
+
+		/*
+
+		int c1 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_PRODUCTS");
+		m_ListView.SetItemText(index, 2, _I2T(c1));
+		index++;
+
+		int c2 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_METERS");
+		m_ListView.SetItemText(index, 2, _I2T(c2));
+		index++;
+
+		int c3 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_FIPS");
+		m_ListView.SetItemText(index, 2, _I2T(c3));
+		index++;
+
+		int c4 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_LOGICAL_NOZZLES");
+		m_ListView.SetItemText(index, 2, _I2T(c4));
+		index++;
+
+		int c5 = v[offset];
+		offset += 1;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_HYDRAULIC_SETUP_ID");
+		m_ListView.SetItemText(index, 2, _I2T(c5));
+		index++;
+
+		int c6 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PULSER_HIDE");
+		m_ListView.SetItemText(index, 2, _I2T(c6));
+		index++;
+
+		int c7 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_HOSE_EXPANSION_VOLUME");
+		m_ListView.SetItemText(index, 2, _I2T(c7));
+		index++;
+
+		int c8 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_HOSE_EXPANSION_TIME");
+		m_ListView.SetItemText(index, 2, _I2T(c8));
+		index++;
+
+		int c8_2 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "NOZZLE_A_PROD");
+		m_ListView.SetItemText(index, 2, _I2T(c8_2));
+		index++;
+
+		int c8_3 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("液压配置数据"));
+		m_ListView.SetItemText(index, 1, "NOZZLE_B_PROD");
+		m_ListView.SetItemText(index, 2, _I2T(c8_3));
+		index++;
+
+		int c9 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("阀配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_VALVE_RESPONSE_NS");
+		m_ListView.SetItemText(index, 2, _I2T(c9));
+		index++;
+
+
+		int c10 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("阀配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_VALVE_TYPE");
+		m_ListView.SetItemText(index, 2, _I2T(c10));
+		index++;
+
+		int c11 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("阀配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_VALVE_RESPONSE_LOW");
+		m_ListView.SetItemText(index, 2, _I2T(c11));
+		index++;
+
+		//
+		int c12 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_MAX_AUTHORIZED");
+		m_ListView.SetItemText(index, 2, _I2T(c12));
+		index++;
+
+		int c13 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_MAX_NO_PROGRESS");
+		m_ListView.SetItemText(index, 2, _I2T(c13));
+		index++;
+
+		int c14 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_INTER_DELIVERY");
+		m_ListView.SetItemText(index, 2, _I2T(c14));
+		index++;
+
+		int c15 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_MAX_SUSPENDED");
+		m_ListView.SetItemText(index, 2, _I2T(c15));
+		index++;
+
+		int c16 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_MAX_LOW_NO_FILLING");
+		m_ListView.SetItemText(index, 2, _I2T(c16));
+		index++;
+
+		int c17 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_WAIT_SLOW_FLOW");
+		m_ListView.SetItemText(index, 2, _I2T(c17));
+		index++;
+
+		int c18 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_SUBMERGED_VALVE_DELAY");
+		m_ListView.SetItemText(index, 2, _I2T(c18));
+		index++;
+
+		int c19 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_DISPLAY_ERROR");
+		m_ListView.SetItemText(index, 2, _I2T(c19));
+		index++;
+
+		int c20 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TIME_IDLE_DISPLAY");
+		m_ListView.SetItemText(index, 2, _I2T(c20));
+		index++;
+
+		int c21 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("定时器配置数据"));
+		m_ListView.SetItemText(index, 1, "AUX_IDLE_DISPLAY_TIMEOUT");
+		m_ListView.SetItemText(index, 2, _I2T(c21));
+		index++;
+
+		//
+		double c22;
+		c22 = BCDtoDec(&v[offset + offset_struct], 5 - offset_struct);
+		offset += 5;
+		m_ListView.InsertItem(index, _T("预设值配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_VOLUME_MIN");
+		m_ListView.SetItemText(index, 2, _F2T(c22 / 100.0));
+		index++;
+
+		double c23;
+		c23 = BCDtoDec(&v[offset + offset_struct], 5 - offset_struct);
+		offset += 5;
+		m_ListView.InsertItem(index, _T("预设值配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_VOLUME_MAX");
+		m_ListView.SetItemText(index, 2, _F2T(c23 / 100.0));
+		index++;
+
+		double c24;
+		c24 = BCDtoDec(&v[offset + offset_struct], 5 - offset_struct);
+		offset += 5;
+		m_ListView.InsertItem(index, _T("预设值配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_AMOUNT_MIN");
+		m_ListView.SetItemText(index, 2, _F2T(c24 / 100.0));
+		index++;
+
+		double c25;
+		c25 = BCDtoDec(&v[offset + offset_struct], 5 - offset_struct);
+		offset += 5;
+		m_ListView.InsertItem(index, _T("预设值配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_PRESET_AMOUNT_MAX ");
+		m_ListView.SetItemText(index, 2, _F2T(c25 / 100.0));
+		index++;
+
+		double c26;
+		c26 = BCDtoDec(&v[offset + offset_struct], 5 - offset_struct);
+		offset += 5;
+		m_ListView.InsertItem(index, _T("预设值配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_VOLUME_LIMIT");
+		m_ListView.SetItemText(index, 2, _F2T(c26 / 100.0));
+		index++;
+
+		//
+		int c27 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_TYPE_DISPLAY_TYPE");
+		m_ListView.SetItemText(index, 2, _I2T(c27));
+		index++;
+
+		int c28 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "AUX_IDLE_DISPLAY_MODE");
+		m_ListView.SetItemText(index, 2, _I2T(c28));
+		index++;
+
+		int c29 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_DIGITS_LAYOUT_VOLUME");
+		m_ListView.SetItemText(index, 2, _I2T(c29));
+		index++;
+
+		int c30 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_DIGITS_LAYOUT_AMOUNT");
+		m_ListView.SetItemText(index, 2, _I2T(c30));
+		index++;
+
+		int c31 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_DIGITS_LAYOUT_UNITPRICE");
+		m_ListView.SetItemText(index, 2, _I2T(c31));
+		index++;
+
+		int c32 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("显示配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_DISPLAY_PER_FIP");
+		m_ListView.SetItemText(index, 2, _I2T(c32));
+		index++;
+
+
+		//
+		int c33 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("凑整配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_AMOUNT_ROUNDING_TYPE");
+		m_ListView.SetItemText(index, 2, _I2T(c33));
+		index++;
+
+
+		int c34 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("凑整配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_VOLUME_ROUNDING_TYPE");
+		m_ListView.SetItemText(index, 2, _I2T(c34));
+		index++;
+
+		int c35 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("凑整配置数据"));
+		m_ListView.SetItemText(index, 1, "AUX_JUST_STOP_ROUNDING_MODE");
+		m_ListView.SetItemText(index, 2, _I2T(c35));
+		index++;
+
+		//
+		int c36 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("加油模式配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_DELIVERY_MODES");
+		m_ListView.SetItemText(index, 2, _I2T(c36));
+		index++;
+
+		int c37 = v[offset];
+		offset++;
+		m_ListView.InsertItem(index, _T("加油模式配置数据"));
+		m_ListView.SetItemText(index, 1, "CFG_NB_FUELLING_MODES");
+		m_ListView.SetItemText(index, 2, _I2T(c37));
+		index++;
+
+
+		//
+		double c38 = BCDtoDec(&v[offset + offset_struct], 4 - offset_struct);
+		offset += 4;
+		m_ListView.InsertItem(index, _T("单价配置数据"));
+		m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_1");
+		m_ListView.SetItemText(index, 2, _F2T(c38 / 100.0));
+		index++;
+
+		double c39 = BCDtoDec(&v[offset + offset_struct], 4 - offset_struct);
+		offset += 4;
+		m_ListView.InsertItem(index, _T("单价配置数据"));
+		m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_2");
+		m_ListView.SetItemText(index, 2, _F2T(c39 / 100.0));
+		index++;
+
+		//double c40 = BCDtoDec(&v[offset + offset_struct], 4 - offset_struct);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_3");
+		//m_ListView.SetItemText(index, 2, _F2T(c40 / 100.0));
+		//index++;
+
+		//double c41 = BCDtoDec(&v[offset], 4);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_4");
+		//m_ListView.SetItemText(index, 2, _F2T(c41 / 100.0));
+		//index++;
+
+		//double c42 = BCDtoDec(&v[offset], 4);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_5");
+		//m_ListView.SetItemText(index, 2, _F2T(c42 / 100.0));
+		//index++;
+
+		//double c43 = BCDtoDec(&v[offset], 4);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_6");
+		//m_ListView.SetItemText(index, 2, _F2T(c43 / 100.0));
+		//index++;
+
+		//double c44 = BCDtoDec(&v[offset], 4);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_7");
+		//m_ListView.SetItemText(index, 2, _F2T(c44 / 100.0));
+		//index++;
+
+		//double c45 = BCDtoDec(&v[offset], 4);
+		//offset += 4;
+		//m_ListView.InsertItem(index, _T("单价配置数据"));
+		//m_ListView.SetItemText(index, 1, "OP_TQC_UNIT_PRICE_PROD_8");
+		//m_ListView.SetItemText(index, 2, _F2T(c45 / 100.0));
+		//index++;
+
+
+		*/
+
+
+
+		/*
+		int c2 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c2));
+
+		int c3;
+		c3 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+		m_ListView.SetItemText(index, col++, _I2T(c3));
+
+		int c4;
+		c4 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+		m_ListView.SetItemText(index, col++, _I2T(c4));
+
+		int c5 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c5));
+
+		int c6 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c6));
+
+
+		double c7;
+		c7 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c7 / 100.0));
+
+		double c8;
+		c8 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c8 / 100.0));
+
+		double c9;
+		c9 = BCDtoDec(&v[offset], 4);
+		offset += 4;
+		m_ListView.SetItemText(index, col++, _F2T(c9 / 100.0));
+
+
+		int c10 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c10));
+
+		int c11 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c11));
+
+		int c12 = v[offset + 2] * 256 * 256 + v[offset + 1] * 256 + v[offset]; //小端模式
+		offset += 3;
+		char c12_[15];
+		sprintf_s(c12_, "0x%06X", c12);
+		m_ListView.SetItemText(index, col++, c12_);
+
+		int c13 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c13));
+
+		double c14;
+		c14 = BCDtoDec(&v[offset], 3);
+		offset += 3;
+		m_ListView.SetItemText(index, col++, _F2T(c14 / 100.0));
+
+		char c15[2] = { 0 };
+		c15[0] = v[offset]; //asc
+		offset++;
+		m_ListView.SetItemText(index, col++, c15);
+
+
+		double c16;
+		c16 = BCDtoDec(&v[offset], 3);
+		offset += 3;
+		m_ListView.SetItemText(index, col++, _F2T(c16 / 100.0));
+
+
+		double c17;
+		c17 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c17 / 100.0));
+
+
+		double c18;
+		c18 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c18 / 100.0));
+
+		double c19;
+		c19 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c19 / 100.0));
+
+
+		double c20;
+		c20 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c20 / 100.0));
+
+
+		int c21;
+		c21 = BCDtoDec(&v[offset], 4);
+		offset += 4;
+		m_ListView.SetItemText(index, col++, _I2T(c21));
+
+		int c22;
+		c22 = BCDtoDec(&v[offset], 3);
+		offset += 3;
+		m_ListView.SetItemText(index, col++, _I2T(c22));
+
+		int c23;
+		c23 = BCDtoDec(&v[offset], 3);
+		offset += 3;
+		m_ListView.SetItemText(index, col++, _I2T(c23));
+
+
+		int c24 = v[offset];
+		offset++;
+		m_ListView.SetItemText(index, col++, _I2T(c24));
+
+
+		double c25;
+		c25 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c25 / 100.0));
+
+		double c26;
+		c26 = BCDtoDec(&v[offset], 5);
+		offset += 5;
+		m_ListView.SetItemText(index, col++, _F2T(c26 / 100.0));
+
+
+		int c27;
+		c27 = BCDtoDec(&v[offset], 1);
+		offset += 1;
+		m_ListView.SetItemText(index, col++, _I2T(c27));
+
+
+
+
+
+		index++;
+	}
+
+	*/
+
+
+
+
+	delete v;
+}
+
+void CConfigDlg::redraw()
+{
+
+	CRect listrc;
+	GetClientRect(listrc);
+	listrc.DeflateRect(0, 6);
+
+	//listrc.bottom = listrc.top + m_rect.Height();
+	//listrc.right = listrc.left + m_rect.Width();
+
+	listrc.top = 155;
+
+
+	m_ListView.MoveWindow(listrc);
+}

+ 34 - 0
HscLogViewer/ConfigDlg.h

@@ -0,0 +1,34 @@
+#pragma once
+#include "afxcmn.h"
+#include "global.h"
+#include "afxwin.h"
+
+
+// CConfigDlg dialog
+
+class CConfigDlg : public CDialogEx
+{
+	DECLARE_DYNAMIC(CConfigDlg)
+
+public:
+	CConfigDlg(CWnd* pParent = NULL);   // standard constructor
+	virtual ~CConfigDlg();
+
+// Dialog Data
+	enum { IDD = IDD_DIALOG_CONFIG };
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+
+	DECLARE_MESSAGE_MAP()
+public:
+	virtual BOOL OnInitDialog();
+	afx_msg void OnBnClickedButtonQuery();
+	CListCtrlH m_ListView;
+
+
+	void redraw();
+
+	CRect m_rect;
+	CComboBox CB_PUMP;
+};

+ 30 - 0
HscLogViewer/Debug/HscLogViewer.Build.CppClean.log

@@ -0,0 +1,30 @@
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\vc120.pdb
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\vc120.idb
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\configdlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\offlinerecorddlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\recorddlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.pch
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\stdafx.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\errordlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\headerctrlex.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewerdlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\infodlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\listctrlex.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\listctrlh.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\totaldlg.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\global.obj
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\debugdlg.obj
+c:\bitbucket\hsclogviewer\bin\hsclogviewer.ilk
+c:\bitbucket\hsclogviewer\bin\hsclogviewer.exe
+c:\bitbucket\hsclogviewer\bin\hsclogviewer.pdb
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.res
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\cl.command.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\cl.read.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\cl.write.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\link.command.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\link.read.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\link.write.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\rc.command.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\rc.read.1.tlog
+c:\bitbucket\hsclogviewer\hsclogviewer\debug\hsclogviewer.tlog\rc.write.1.tlog

+ 15 - 0
HscLogViewer/Debug/HscLogViewer.log

@@ -0,0 +1,15 @@
+  global.cpp
+  TotalDlg.cpp
+  RecordDlg.cpp
+  OffLineRecordDlg.cpp
+  HscLogViewerDlg.cpp
+c:\bitbucket\hsclogviewer\hsclogviewer\hsclogviewerdlg.cpp(134): warning C4018: '<' : signed/unsigned mismatch
+  DebugDlg.cpp
+  ConfigDlg.cpp
+  Generating Code...
+  Compiling...
+  ListCtrlEx.cpp
+  InfoDlg.cpp
+  ErrorDlg.cpp
+  Generating Code...
+  HscLogViewer.vcxproj -> C:\Bitbucket\HscLogViewer\Bin\HscLogViewer.exe

二进制
HscLogViewer/Debug/HscLogViewer.tlog/CL.read.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/CL.write.1.tlog


+ 2 - 0
HscLogViewer/Debug/HscLogViewer.tlog/HscLogViewer.lastbuildstate

@@ -0,0 +1,2 @@
+#TargetFrameworkVersion=v4.0:PlatformToolSet=v120_xp:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
+Debug|Win32|C:\Bitbucket\HscLogViewer\|

二进制
HscLogViewer/Debug/HscLogViewer.tlog/cl.command.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/link.command.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/link.read.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/link.write.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/rc.command.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/rc.read.1.tlog


二进制
HscLogViewer/Debug/HscLogViewer.tlog/rc.write.1.tlog


+ 265 - 0
HscLogViewer/DebugDlg.cpp

@@ -0,0 +1,265 @@
+// DebugDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "HscLogViewer.h"
+#include "DebugDlg.h"
+#include "afxdialogex.h"
+#include "global.h"
+
+// CDebugDlg dialog
+
+IMPLEMENT_DYNAMIC(CDebugDlg, CDialogEx)
+
+CDebugDlg::CDebugDlg(CWnd* pParent /*=NULL*/)
+	: CDialogEx(CDebugDlg::IDD, pParent)
+{
+
+}
+
+CDebugDlg::~CDebugDlg()
+{
+}
+
+void CDebugDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+	DDX_Control(pDX, IDC_LIST1, m_ListView);
+	DDX_Control(pDX, IDC_COMBO1, CB_PUMP);
+	DDX_Control(pDX, IDC_DATETIMEPICKER1, DT_Begin);
+	DDX_Control(pDX, IDC_DATETIMEPICKER2, DT_End);
+}
+
+
+BEGIN_MESSAGE_MAP(CDebugDlg, CDialogEx)
+	ON_BN_CLICKED(IDC_BUTTON_QUERY, &CDebugDlg::OnBnClickedButtonQuery)
+	ON_BN_CLICKED(IDC_BUTTON_FILTER, &CDebugDlg::OnBnClickedButtonFilter)
+END_MESSAGE_MAP()
+
+
+// CDebugDlg message handlers
+static BOOL filterflag = 0;
+BOOL CDebugDlg::OnInitDialog()
+{
+	CDialogEx::OnInitDialog();
+
+	// TODO:  Add extra initialization here
+	DWORD style = m_ListView.GetExtendedStyle();
+	m_ListView.SetExtendedStyle(style | LVS_EX_FLATSB);
+	m_ListView.SetFullRowSel(true);
+
+	m_ListView.SetBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetBkColor( RGB(87,91,92) );
+	m_ListView.SetTextBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetTextBkColor( RGB(87,91,92) );
+	m_ListView.SetTxtColor(RGB(0, 0, 0));//m_DetailLstCtrl.SetTxtColor( RGB(255,255,255) );
+	m_ListView.ShowLineBk(false);
+	m_ListView.SetFontHeight(16);//m_DetailLstCtrl.SetFontHeight( 18 );
+
+	CB_PUMP.AddString("A");
+	CB_PUMP.AddString("B");
+	CB_PUMP.SetCurSel(0);
+
+	HEAD head[] = {
+		"DEBUG_SEQ_NB", 250,
+		"FILE_NAME", 400,
+		"LINE_NB", 200,
+		"UTN", 200,
+		"TEXT", 1200,
+		"DATE_TIME", 200
+
+
+	};
+
+
+
+
+	CString tmpInfo;
+	int index = 0;
+
+	for (int i = 0; i < sizeof(head) / sizeof(HEAD); i++)
+	{
+		tmpInfo = head[i].name;
+		m_ListView.InsertColumn(index++, tmpInfo, LVCFMT_CENTER, head[i].width);
+	}
+
+
+	DT_Begin.SetFormat("yyyy-MM-dd HH:mm:ss");
+	DT_End.SetFormat("yyyy-MM-dd HH:mm:ss");
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+	// EXCEPTION: OCX Property Pages should return FALSE
+}
+
+
+
+
+void CDebugDlg::OnBnClickedButtonQuery()
+{
+	// TODO: Add your control notification handler code here
+
+	m_ListView.DeleteAllItems();
+
+	CString strpump = CB_PUMP.GetCurSel() == 0 ? "A" : "B";
+
+	CString path = "./debug_" + strpump + ".bin";
+	//int len = 172;
+
+	BYTE* v = new BYTE[MAXSIZE];
+	int i = 0;
+
+	//open
+	FILE *fr;
+	fopen_s(&fr, path, "rb");
+	if (fr == NULL) //打开文件出错。
+	{
+		AfxMessageBox("打开文件失败!");
+		return;
+	}
+
+
+	//size
+	fseek(fr, 0, SEEK_END);
+	long int size = ftell(fr);
+	fseek(fr, 0, SEEK_SET);
+	if (size >= MAXSIZE)
+	{
+		AfxMessageBox("文件太大!");
+		return;
+	}
+
+	//scan
+	while (fscanf_s(fr, "%c", &v[i]) != EOF) //读取数据到数组,直到文件结尾(返回EOF)
+	{
+		i++;
+	}
+	fclose(fr);
+
+
+	SYSTEMTIME tm_begin = { 0 }, tm_end = { 0 };
+	DT_Begin.GetTime(&tm_begin);
+	DT_End.GetTime(&tm_end);
+	char s_tm_begin[15] = { 0 };
+	sprintf_s(s_tm_begin, "%04d%02d%02d%02d%02d%02d", tm_begin.wYear, tm_begin.wMonth, tm_begin.wDay, tm_begin.wHour, tm_begin.wMinute, tm_begin.wSecond);
+	char s_tm_end[15] = { 0 };
+	sprintf_s(s_tm_end, "%04d%02d%02d%02d%02d%02d", tm_end.wYear, tm_end.wMonth, tm_end.wDay, tm_end.wHour, tm_end.wMinute, tm_end.wSecond);
+
+
+	//int count = size / len;
+	int index = 0;
+
+	int offset_struct = 1;
+
+
+	int offset = 0;
+
+	//for (int i = 0; i < count; i++)
+	while (offset < size)
+	{
+		int col = 0;
+
+		//int offset = len * i;
+
+
+		int c1;
+		c1 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+		char c2[41] = { 0 };
+		memcpy(c2, &v[offset], 40);
+		offset += 40;
+
+
+		int c3 = v[offset] + v[offset+1] * 256 ;
+		offset+=2;
+
+
+		int c4 = v[offset];
+		offset++;
+
+
+		char c5[61] = { 0 };
+		memcpy(c5, &v[offset], 60);
+		offset += 60;
+
+
+
+		char c6[15] = { 0 };
+		BCDtoChar1(c6, 14, &v[offset], 7);
+		offset += 7;
+
+		CString s6 = c6;
+		CString str6 = "";
+		if (s6 != "")
+		{
+			str6 = s6.Mid(0, 4) + "-" + s6.Mid(4, 2) + "-" + s6.Mid(6, 2) + " "
+				+ s6.Mid(8, 2) + ":" + +s6.Mid(10, 2) + ":" + s6.Mid(12, 2);
+		}
+
+
+		//reserved(预留)
+		offset += 18;
+
+
+
+		if (filterflag)
+		{
+			CString strtime = s6;
+			if (strtime < CString(s_tm_begin) || strtime > CString(s_tm_end))
+			{
+				continue;
+			}
+		}
+
+
+
+		m_ListView.InsertItem(index, _T(""));
+		m_ListView.SetItemText(index, col++, _I2T(c1));
+		m_ListView.SetItemText(index, col++, c2);
+		m_ListView.SetItemText(index, col++, _I2T(c3));
+		m_ListView.SetItemText(index, col++, _I2T(c4));
+		m_ListView.SetItemText(index, col++, c5);
+		m_ListView.SetItemText(index, col++, str6);
+
+
+		index++;
+	}
+
+
+
+
+
+	filterflag = 0;
+
+	delete v;
+
+
+
+
+
+
+}
+
+
+void CDebugDlg::OnBnClickedButtonFilter()
+{
+	filterflag = 1;
+	OnBnClickedButtonQuery();
+}
+
+
+
+void CDebugDlg::redraw()
+{
+
+	CRect listrc;
+	GetClientRect(listrc);
+	listrc.DeflateRect(0, 6);
+
+	//listrc.bottom = listrc.top + m_rect.Height();
+	//listrc.right = listrc.left + m_rect.Width();
+
+	listrc.top = 155;
+
+
+	m_ListView.MoveWindow(listrc);
+}
+

+ 37 - 0
HscLogViewer/DebugDlg.h

@@ -0,0 +1,37 @@
+#pragma once
+#include "ListCtrlH.h"
+#include "afxwin.h"
+#include "afxdtctl.h"
+
+
+// CDebugDlg dialog
+
+class CDebugDlg : public CDialogEx
+{
+	DECLARE_DYNAMIC(CDebugDlg)
+
+public:
+	CDebugDlg(CWnd* pParent = NULL);   // standard constructor
+	virtual ~CDebugDlg();
+
+// Dialog Data
+	enum { IDD = IDD_DIALOG_DEBUG };
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+
+	DECLARE_MESSAGE_MAP()
+public:
+	CListCtrlH m_ListView;
+	CComboBox CB_PUMP;
+	CDateTimeCtrl DT_Begin;
+	CDateTimeCtrl DT_End;
+	afx_msg void OnBnClickedButtonQuery();
+	afx_msg void OnBnClickedButtonFilter();
+
+	void redraw();
+
+	CRect m_rect;
+
+	virtual BOOL OnInitDialog();
+};

+ 279 - 0
HscLogViewer/ErrorDlg.cpp

@@ -0,0 +1,279 @@
+// ErrorDlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "HscLogViewer.h"
+#include "ErrorDlg.h"
+#include "afxdialogex.h"
+
+
+// CErrorDlg dialog
+
+IMPLEMENT_DYNAMIC(CErrorDlg, CDialogEx)
+
+CErrorDlg::CErrorDlg(CWnd* pParent /*=NULL*/)
+	: CDialogEx(CErrorDlg::IDD, pParent)
+{
+
+}
+
+CErrorDlg::~CErrorDlg()
+{
+}
+
+void CErrorDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialogEx::DoDataExchange(pDX);
+	DDX_Control(pDX, IDC_LIST1, m_ListView);
+	DDX_Control(pDX, IDC_COMBO1, CB_PUMP);
+	DDX_Control(pDX, IDC_DATETIMEPICKER1, DT_Begin);
+	DDX_Control(pDX, IDC_DATETIMEPICKER2, DT_End);
+}
+
+
+BEGIN_MESSAGE_MAP(CErrorDlg, CDialogEx)
+	ON_BN_CLICKED(IDC_BUTTON_QUERY, &CErrorDlg::OnBnClickedButtonQuery)
+	ON_BN_CLICKED(IDC_BUTTON_FILTER, &CErrorDlg::OnBnClickedButtonFilter)
+END_MESSAGE_MAP()
+
+
+// CErrorDlg message handlers
+
+static BOOL filterflag = 0;
+
+BOOL CErrorDlg::OnInitDialog()
+{
+	CDialogEx::OnInitDialog();
+
+	// TODO:  Add extra initialization here
+	DWORD style = m_ListView.GetExtendedStyle();
+	m_ListView.SetExtendedStyle(style | LVS_EX_FLATSB);
+	m_ListView.SetFullRowSel(true);
+
+	m_ListView.SetBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetBkColor( RGB(87,91,92) );
+	m_ListView.SetTextBkColor(RGB(255, 255, 255));//m_DetailLstCtrl.SetTextBkColor( RGB(87,91,92) );
+	m_ListView.SetTxtColor(RGB(0, 0, 0));//m_DetailLstCtrl.SetTxtColor( RGB(255,255,255) );
+	m_ListView.ShowLineBk(false);
+	m_ListView.SetFontHeight(16);//m_DetailLstCtrl.SetFontHeight( 18 );
+
+
+	
+		
+		
+	CB_PUMP.AddString("A");
+	CB_PUMP.AddString("B");
+	CB_PUMP.SetCurSel(0);
+		
+		
+		
+		
+		
+
+
+	HEAD head[] = {
+		"ERROR_GEN_SEQUENCE_NUMBER", 250,
+		"ERROR_FIP_SEQUENCE_NUMBER", 250,
+		"ERROR_FIP_NUMBER", 200,
+		"ERROR_CLASS_ID", 200,
+		"MODULE_ID", 200,
+		"EVENT_ERR_ID", 200,
+		"DETAIL_ID", 200,
+		"DATE_TIME", 200,
+		"ERROR_PRODUCT_ID", 200
+	};
+
+
+
+
+	CString tmpInfo;
+	int index = 0;
+
+	for (int i = 0; i < sizeof(head) / sizeof(HEAD); i++)
+	{
+		tmpInfo = head[i].name;
+		m_ListView.InsertColumn(index++, tmpInfo, LVCFMT_CENTER, head[i].width);
+	}
+
+
+	DT_Begin.SetFormat("yyyy-MM-dd HH:mm:ss");
+	DT_End.SetFormat("yyyy-MM-dd HH:mm:ss");
+
+
+	return TRUE;  // return TRUE unless you set the focus to a control
+	// EXCEPTION: OCX Property Pages should return FALSE
+}
+
+
+void CErrorDlg::OnBnClickedButtonQuery()
+{
+	m_ListView.DeleteAllItems();
+
+	CString strpump = CB_PUMP.GetCurSel() == 0 ? "A" : "B";
+
+	CString path = "./err_record_" + strpump + ".bin";
+	//int len = 20;
+
+	BYTE* v = new BYTE[MAXSIZE];
+	int i = 0;
+
+	//open
+	FILE *fr;
+	fopen_s(&fr, path, "rb");
+	if (fr == NULL) //打开文件出错。
+	{
+		AfxMessageBox("打开文件失败!");
+		return;
+	}
+
+
+	//size
+	fseek(fr, 0, SEEK_END);
+	long int size = ftell(fr);
+	fseek(fr, 0, SEEK_SET);
+	if (size >= MAXSIZE)
+	{
+		AfxMessageBox("文件太大!");
+		return;
+	}
+
+	//scan
+	while (fscanf_s(fr, "%c", &v[i]) != EOF) //读取数据到数组,直到文件结尾(返回EOF)
+	{
+		i++;
+	}
+	fclose(fr);
+
+
+	SYSTEMTIME tm_begin = { 0 }, tm_end = { 0 };
+	DT_Begin.GetTime(&tm_begin);
+	DT_End.GetTime(&tm_end);
+	char s_tm_begin[15] = { 0 };
+	sprintf_s(s_tm_begin, "%04d%02d%02d%02d%02d%02d", tm_begin.wYear, tm_begin.wMonth, tm_begin.wDay, tm_begin.wHour, tm_begin.wMinute, tm_begin.wSecond);
+	char s_tm_end[15] = { 0 };
+	sprintf_s(s_tm_end, "%04d%02d%02d%02d%02d%02d", tm_end.wYear, tm_end.wMonth, tm_end.wDay, tm_end.wHour, tm_end.wMinute, tm_end.wSecond);
+
+
+
+	//int count = size / len;
+	int index = 0;
+
+	int offset_struct = 1;
+
+
+	int offset = 0;
+
+	//for (int i = 0; i < count; i++)
+	while (offset < size)
+	{
+		int col = 0;
+
+		//int offset = len * i;
+
+		int c1;
+		c1 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+		int c2;
+		c2 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+		int c3 = v[offset];
+		offset++;
+
+		int c4 = BCDtoDec(&v[offset], 1);
+		offset++;
+
+		int c5;
+		c5 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+
+		int c6;
+		c6 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+
+		int c7;
+		c7 = BCDtoDec(&v[offset], 2);
+		offset += 2;
+
+
+		char c8[15] = { 0 };
+		BCDtoChar1(c8, 14, &v[offset], 7);
+		offset += 7;
+
+		CString s8 = c8;
+		CString str8 = "";
+		if (s8 != "")
+		{
+			str8 = s8.Mid(0, 4) + "-" + s8.Mid(4, 2) + "-" + s8.Mid(6, 2) + " "
+				+ s8.Mid(8, 2) + ":" + +s8.Mid(10, 2) + ":" + s8.Mid(12, 2);
+		}
+	
+
+
+		int c9 = v[offset];
+		offset++;
+
+
+		//reserved(预留)
+		offset += 44;
+
+
+
+		if (filterflag)
+		{
+			CString strtime = c8;
+			if (strtime < CString(s_tm_begin) || strtime > CString(s_tm_end))
+			{
+				continue;
+			}
+		}
+		
+
+		m_ListView.InsertItem(index, _T(""));
+		m_ListView.SetItemText(index, col++, _I2T(c1));
+		m_ListView.SetItemText(index, col++, _I2T(c2));
+		m_ListView.SetItemText(index, col++, _I2T(c3));
+		m_ListView.SetItemText(index, col++, _I2T(c4));
+		m_ListView.SetItemText(index, col++, _I2T(c5));
+		m_ListView.SetItemText(index, col++, _I2T(c6));
+		m_ListView.SetItemText(index, col++, _I2T(c7));
+		m_ListView.SetItemText(index, col++, str8);
+		m_ListView.SetItemText(index, col++, _I2T(c9));
+
+		index++;
+	}
+
+
+
+
+	filterflag = 0;
+
+	delete v;
+}
+
+
+void CErrorDlg::redraw()
+{
+
+	CRect listrc;
+	GetClientRect(listrc);
+	listrc.DeflateRect(0, 6);
+
+	//listrc.bottom = listrc.top + m_rect.Height();
+	//listrc.right = listrc.left + m_rect.Width();
+
+	listrc.top = 155;
+
+
+	m_ListView.MoveWindow(listrc);
+}
+
+void CErrorDlg::OnBnClickedButtonFilter()
+{
+	
+
+	filterflag = 1;
+	OnBnClickedButtonQuery();
+}

+ 38 - 0
HscLogViewer/ErrorDlg.h

@@ -0,0 +1,38 @@
+#pragma once
+#include "afxcmn.h"
+#include "global.h"
+#include "afxwin.h"
+#include "afxdtctl.h"
+
+
+// CErrorDlg dialog
+
+class CErrorDlg : public CDialogEx
+{
+	DECLARE_DYNAMIC(CErrorDlg)
+
+public:
+	CErrorDlg(CWnd* pParent = NULL);   // standard constructor
+	virtual ~CErrorDlg();
+
+// Dialog Data
+	enum { IDD = IDD_DIALOG_ERROR };
+
+protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+
+	DECLARE_MESSAGE_MAP()
+public:
+	virtual BOOL OnInitDialog();
+	afx_msg void OnBnClickedButtonQuery();
+	CListCtrlH m_ListView;
+
+
+	void redraw();
+
+	CRect m_rect;
+	CComboBox CB_PUMP;
+	CDateTimeCtrl DT_Begin;
+	CDateTimeCtrl DT_End;
+	afx_msg void OnBnClickedButtonFilter();
+};

+ 137 - 0
HscLogViewer/HeaderCtrlEx.cpp

@@ -0,0 +1,137 @@
+// HeaderCtrlEx.cpp : 实现文件
+//
+
+#include "stdafx.h"
+#include "HeaderCtrlEx.h"
+
+
+// CHeaderCtrlEx
+
+IMPLEMENT_DYNAMIC(CHeaderCtrlEx, CHeaderCtrl)
+
+CHeaderCtrlEx::CHeaderCtrlEx()
+{
+
+}
+
+CHeaderCtrlEx::~CHeaderCtrlEx()
+{
+}
+
+
+BEGIN_MESSAGE_MAP(CHeaderCtrlEx, CHeaderCtrl)
+	ON_WM_PAINT()
+	ON_MESSAGE(HDM_LAYOUT, OnLayout)
+END_MESSAGE_MAP()
+
+LRESULT CHeaderCtrlEx::OnLayout( WPARAM wParam, LPARAM lParam )
+{
+	LRESULT lResult = CHeaderCtrl::DefWindowProc(HDM_LAYOUT, 0, lParam);
+	HD_LAYOUT &hdl = *( HD_LAYOUT * ) lParam;
+	RECT *prc = hdl.prc;
+	WINDOWPOS *pwpos = hdl.pwpos;
+	int nHeight = 30;
+	pwpos->cy = nHeight;
+	prc->top = nHeight;
+	return lResult;
+}
+
+// CHeaderCtrlEx 消息处理程序;
+void CHeaderCtrlEx::OnPaint()
+{
+	CPaintDC dc(this); // device context for painting  
+	// TODO: 在此处添加消息处理程序代码;  
+	RECT rRect;  
+	GetClientRect(&rRect);  
+	int nWidth = rRect.right-rRect.left;  
+	int nHeight = rRect.bottom-rRect.top;  
+	CDC memDC;  
+	CBitmap memBitmap;  
+	CBrush brush;  	 
+
+	//填充整个客户区;  
+	memDC.CreateCompatibleDC(&dc);  
+	memBitmap.CreateCompatibleBitmap(&dc, nWidth, nHeight);  
+	memDC.SelectObject(&memBitmap);  
+	memDC.SetBkMode(TRANSPARENT);  
+	memDC.SelectObject(GetFont());   
+
+	TRIVERTEX        vert[2] ;
+	GRADIENT_RECT    gRect;
+	vert [0] .x      = rRect.left;
+	vert [0] .y      = rRect.top;
+	vert [1] .x      = rRect.right;
+	vert [1] .y      = rRect.bottom;
+
+	vert [0] .Red    = 0xff00;
+	vert [0] .Green  = 0xff00;
+	vert [0] .Blue   = 0xff00;
+	vert [0] .Alpha  = 0x0000;
+
+	vert [1] .Red    = 0xff00;
+	vert [1] .Green  = 0xe400;
+	vert [1] .Blue   = 0xe100;
+	vert [1] .Alpha  = 0xff00;
+
+	gRect.UpperLeft  = 0;
+	gRect.LowerRight = 1;
+	//memDC.GradientFill(vert,2,&gRect,1,GRADIENT_FILL_RECT_V);
+
+	memDC.FillSolidRect(&rRect, 0xe6e89f);//0xfbfcca  0xf2f1c8//RGB(172,232,244)
+
+	int nCount = GetItemCount();  
+	for (int i =0; i < nCount; i++)  
+	{  
+		CRect itemRc;   
+		GetItemRect(i, &itemRc);  
+		CRect txtRc= itemRc;  
+		txtRc.left+=5;  
+		//txtRc.top +=5;  
+
+		HDITEM Item={0};  
+		TCHAR  lpBuffer[256] = {0}; 
+		Item.cchTextMax = 256;  
+		Item.pszText = lpBuffer;  
+		Item.mask = HDI_TEXT;  
+		GetItem(i, &Item);  
+
+
+		memDC.DrawText(lpBuffer, txtRc, DT_CENTER | DT_SINGLELINE | DT_VCENTER);  
+
+		//切割线;
+		CPen pen;  
+		pen.CreatePen(PS_SOLID, 1, 0xFFE4E1);  
+		memDC.SelectObject(&pen);  
+		memDC.MoveTo(itemRc.right, itemRc.top);  
+		memDC.LineTo(itemRc.right, itemRc.bottom);  
+		pen.DeleteObject();  
+		pen.CreatePen(PS_SOLID, 1, 0xFFFFFF);  
+		memDC.SelectObject(&pen);  
+		memDC.MoveTo(itemRc.right+1, itemRc.top);  
+		memDC.LineTo(itemRc.right+1, itemRc.bottom);  
+
+	}  
+	//底边线;  
+	CPen pen;  
+	pen.CreatePen(PS_SOLID, 1,0xFFE4E1);  
+	memDC.SelectObject(&pen);  
+	memDC.MoveTo(rRect.left, rRect.bottom-1);  
+	memDC.LineTo(rRect.right, rRect.bottom-1);  
+	pen.DeleteObject();  
+	//pen.CreatePen(PS_SOLID, 1, 0xFFFFFF);  
+	//memDC.SelectObject(&pen);  
+	//memDC.MoveTo(rRect.left, rRect.bottom-2);  
+	//memDC.LineTo(rRect.right, rRect.bottom-2);  
+
+	dc.BitBlt(0,0, nWidth, nHeight, &memDC, 0, 0, SRCCOPY); 
+
+	ReleaseDC(&memDC);
+}
+
+
+BOOL CHeaderCtrlEx::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID)
+{
+	// TODO: 在此添加专用代码和/或调用基类;
+
+	return CHeaderCtrl::Create(dwStyle, rect, pParentWnd, nID);
+}

+ 22 - 0
HscLogViewer/HeaderCtrlEx.h

@@ -0,0 +1,22 @@
+#pragma once
+
+
+// CHeaderCtrlEx
+
+class CHeaderCtrlEx : public CHeaderCtrl
+{
+	DECLARE_DYNAMIC(CHeaderCtrlEx)
+
+public:
+	CHeaderCtrlEx();
+	virtual ~CHeaderCtrlEx();
+
+protected:
+	DECLARE_MESSAGE_MAP()
+public:
+	afx_msg void OnPaint();
+	LRESULT OnLayout( WPARAM wParam, LPARAM lParam );
+	virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
+};
+
+

+ 102 - 0
HscLogViewer/HscLogViewer.cpp

@@ -0,0 +1,102 @@
+
+// HscLogViewer.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "HscLogViewer.h"
+#include "HscLogViewerDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CHscLogViewerApp
+
+BEGIN_MESSAGE_MAP(CHscLogViewerApp, CWinApp)
+	ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+
+// CHscLogViewerApp construction
+
+CHscLogViewerApp::CHscLogViewerApp()
+{
+	// support Restart Manager
+	m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
+
+	// TODO: add construction code here,
+	// Place all significant initialization in InitInstance
+}
+
+
+// The one and only CHscLogViewerApp object
+
+CHscLogViewerApp theApp;
+
+
+// CHscLogViewerApp initialization
+
+BOOL CHscLogViewerApp::InitInstance()
+{
+	// InitCommonControlsEx() is required on Windows XP if an application
+	// manifest specifies use of ComCtl32.dll version 6 or later to enable
+	// visual styles.  Otherwise, any window creation will fail.
+	INITCOMMONCONTROLSEX InitCtrls;
+	InitCtrls.dwSize = sizeof(InitCtrls);
+	// Set this to include all the common control classes you want to use
+	// in your application.
+	InitCtrls.dwICC = ICC_WIN95_CLASSES;
+	InitCommonControlsEx(&InitCtrls);
+
+	CWinApp::InitInstance();
+
+
+	AfxEnableControlContainer();
+
+	// Create the shell manager, in case the dialog contains
+	// any shell tree view or shell list view controls.
+	CShellManager *pShellManager = new CShellManager;
+
+	// Activate "Windows Native" visual manager for enabling themes in MFC controls
+	CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
+
+	// Standard initialization
+	// If you are not using these features and wish to reduce the size
+	// of your final executable, you should remove from the following
+	// the specific initialization routines you do not need
+	// Change the registry key under which our settings are stored
+	// TODO: You should modify this string to be something appropriate
+	// such as the name of your company or organization
+	SetRegistryKey(_T("Local AppWizard-Generated Applications"));
+
+	CHscLogViewerDlg dlg;
+	m_pMainWnd = &dlg;
+	INT_PTR nResponse = dlg.DoModal();
+	if (nResponse == IDOK)
+	{
+		// TODO: Place code here to handle when the dialog is
+		//  dismissed with OK
+	}
+	else if (nResponse == IDCANCEL)
+	{
+		// TODO: Place code here to handle when the dialog is
+		//  dismissed with Cancel
+	}
+	else if (nResponse == -1)
+	{
+		TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n");
+		TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n");
+	}
+
+	// Delete the shell manager created above.
+	if (pShellManager != NULL)
+	{
+		delete pShellManager;
+	}
+
+	// Since the dialog has been closed, return FALSE so that we exit the
+	//  application, rather than start the application's message pump.
+	return FALSE;
+}
+

部分文件因为文件数量过多而无法显示