浏览代码

Merge branch 'ST2' into uos_cjl_Init_Sogou_20231225

陈纪林80310970 1 年之前
父节点
当前提交
ddd1bbe3e1
共有 100 个文件被更改,包括 1580 次插入1672 次删除
  1. 46 5
      CMakeLists.txt
  2. 38 0
      CMakeSettings.json
  3. 16 4
      DevAdapter/CMakeLists.txt
  4. 3 0
      DevAdapter/Note.md
  5. 3 1
      DevAdapter/cmbsz/CMakeLists.txt
  6. 1 1
      DevAdapter/cmbsz/cardissuer.1.1/CMakeLists.txt
  7. 3 1
      DevAdapter/cmbsz/cardissuer.1.1/cardissuer_impl.cpp
  8. 4 2
      DevAdapter/cmbsz/contactlesscard.1.1/contactless_impl.cpp
  9. 3 2
      DevAdapter/cmbsz/deps/cmbsz.demo/CMakeLists.txt
  10. 1 1
      DevAdapter/cmbsz/deps/cmbsz.sample/CMakeLists.txt
  11. 4 2
      DevAdapter/cmbsz/devctrl.1.1/devctrl_impl.cpp
  12. 4 3
      DevAdapter/cmbsz/gpio.1.1/gpio_impl.cpp
  13. 13 0
      DevAdapter/cmbsz/gpio.1.2/CMakeLists.txt
  14. 156 0
      DevAdapter/cmbsz/gpio.1.2/gpio_impl.cpp
  15. 62 0
      DevAdapter/cmbsz/gpio.1.2/gpio_impl.h
  16. 4 2
      DevAdapter/cmbsz/hspscanner.1.1/hspscanner_impl.cpp
  17. 4 2
      DevAdapter/cmbsz/idcer.1.1/idcer_impl.cpp
  18. 4 2
      DevAdapter/cmbsz/termalprint.1.1/termalprint_impl.cpp
  19. 4 2
      DevAdapter/cmbsz/ups.1.1/ups_impl.cpp
  20. 0 43
      DevAdapter/include/BranchDeviceClass.h
  21. 0 68
      DevAdapter/include/BranchDeviceHelper.h
  22. 28 10
      DevAdapter/include/CardAssist.cpp
  23. 9 2
      DevAdapter/include/CardAssist.h
  24. 1 1
      DevAdapter/include/CardIssuerClass.h
  25. 9 9
      DevAdapter/include/CardMix.h
  26. 0 1
      DevAdapter/include/DevErrorCode.h
  27. 25 14
      DevAdapter/include/DeviceBaseClass.h
  28. 8 8
      DevAdapter/include/FingerPrintClass.h
  29. 71 6
      DevAdapter/include/GpioClass.h
  30. 36 36
      DevAdapter/include/HSPScannerClass.h
  31. 59 59
      DevAdapter/include/IDCerClass.h
  32. 21 10
      DevAdapter/include/PinPadClass.h
  33. 3 0
      DevAdapter/self/liblog4vendor/CMakeLists.txt
  34. 88 13
      Module/CMakeLists.txt
  35. 2 2
      Module/include/CommEntityRestful.hpp
  36. 88 0
      Module/include/CommEntitySettings.hpp
  37. 3 1
      Module/include/DevFSMCommBase.hpp
  38. 0 11
      Module/include/EventCode.h
  39. 10 5
      Module/mod_CameraConfigManage/CMakeLists.txt
  40. 6 11
      Module/mod_CameraConfigManage/mod_CameraConfigManage.cpp
  41. 0 99
      Module/mod_CameraConfigManage/mod_CameraConfigManage.vcxproj
  42. 0 56
      Module/mod_CameraConfigManage/mod_CameraConfigManage.vcxproj.filters
  43. 1 0
      Module/mod_CardIssuerStand/CMakeLists.txt
  44. 0 5
      Module/mod_CardIssuerStand/CardIssuerFSM.h
  45. 10 4
      Module/mod_CardIssuerStand/CardIssuer_UserErrorCode.h
  46. 4 0
      Module/mod_CardIssuerStand/mod_cardissuer.h
  47. 1 3
      Module/mod_CenterSetting/CenterSettingConn.h
  48. 2 2
      Module/mod_ContactlessCard/CMakeLists.txt
  49. 1 4
      Module/mod_ContactlessCard/ContactlessFSM.h
  50. 0 2
      Module/mod_CustMngrAuth/CMakeLists.txt
  51. 0 8
      Module/mod_CustMngrAuth/CustMngrAuthFSM.h
  52. 0 2
      Module/mod_DeviceControl/CMakeLists.txt
  53. 4 4
      Module/mod_DeviceControl/DeviceControlFSM.cpp
  54. 0 5
      Module/mod_DeviceControl/mod_DeviceControl.h
  55. 2 2
      Module/mod_FingerPrint/CMakeLists.txt
  56. 41 41
      Module/mod_FingerPrint/FingerPrintFSM.cpp
  57. 3 1
      Module/mod_FingerPrint/FingerPrintFSM.h
  58. 2 1
      Module/mod_FingerPrint/mod_FingerPrint.h
  59. 8 5
      Module/mod_HSPScanner/CMakeLists.txt
  60. 0 1
      Module/mod_HSPScanner/HSPScannerFSM.h
  61. 25 7
      Module/mod_IDCertificate/CMakeLists.txt
  62. 6 8
      Module/mod_IDCertificate/IDCertFSM.cpp
  63. 5 7
      Module/mod_IDCertificate/IDCertFSM.h
  64. 2 2
      Module/mod_IDCertificate/IDCertificate.xml
  65. 10 0
      Module/mod_IDCertificate/mod_IDCertificate.h
  66. 33 0
      Module/mod_PortableScanner/CMakeLists.txt
  67. 6 6
      Module/mod_PortableScanner/Logger.cpp
  68. 12 0
      Module/mod_PortableScanner/PortableScanner_server_g.h
  69. 0 102
      Module/mod_PortableScanner/mod_PortableScanner.vcxproj
  70. 0 62
      Module/mod_PortableScanner/mod_PortableScanner.vcxproj.filters
  71. 3 3
      Module/mod_PortableScanner/targetver.h
  72. 9 4
      Module/mod_ResourceWatcher/CMakeLists.txt
  73. 11 1
      Module/mod_ResourceWatcher/EventLog.cpp
  74. 1 13
      Module/mod_ResourceWatcher/EventLog.h
  75. 12 2
      Module/mod_ResourceWatcher/EventLogW.cpp
  76. 0 13
      Module/mod_ResourceWatcher/EventLogW.h
  77. 8 8
      Module/mod_ResourceWatcher/MbnEventImpl.cpp
  78. 6 10
      Module/mod_ResourceWatcher/MbnEventImpl.h
  79. 19 19
      Module/mod_ResourceWatcher/MbnEventInternal.h
  80. 8 8
      Module/mod_ResourceWatcher/NetConfig.h
  81. 1 1
      Module/mod_ResourceWatcher/NetworkInfo.cpp
  82. 8 8
      Module/mod_ResourceWatcher/NetworkInfo.h
  83. 1 48
      Module/mod_ResourceWatcher/NetworkProbe.cpp
  84. 3 0
      Module/mod_ResourceWatcher/NetworkProbe.h
  85. 102 278
      Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp
  86. 5 10
      Module/mod_ResourceWatcher/ResourceWatcherFSM.h
  87. 10 10
      Module/mod_ResourceWatcher/ResourceWatcher_UserCode.h
  88. 3 3
      Module/mod_ResourceWatcher/UOSTools.hpp
  89. 4 4
      Module/mod_ResourceWatcher/XUnzip.cpp
  90. 0 255
      Module/mod_ResourceWatcher/hw_device_mnt.h
  91. 2 8
      Module/mod_ResourceWatcher/mod_ResourceWatcher.cpp
  92. 0 30
      Module/mod_RomoteController/.jazzignore
  93. 19 24
      Module/mod_RomoteController/CMakeLists.txt
  94. 10 0
      Module/mod_RomoteController/RemoteController.xml
  95. 127 131
      Module/mod_RomoteController/RemoteControllerCnn.cpp
  96. 2 2
      Module/mod_RomoteController/RemoteControllerFSM.cpp
  97. 81 0
      Module/mod_RomoteController/RemoteController_client_g.h
  98. 23 0
      Module/mod_RomoteController/RemoteController_def_g.h
  99. 83 0
      Module/mod_RomoteController/RemoteController_server_g.h
  100. 1 0
      Module/mod_RomoteController/digital_conv.h

+ 46 - 5
CMakeLists.txt

@@ -284,9 +284,10 @@ if(CONAN_CACHE_CLEAR)
 	conan_local_remove()
 endif(CONAN_CACHE_CLEAR)
 
-conan_cmake_run(REQUIRES RvcFramework/1.2.0.76@LR04.02_FrameworkLib/dev
+conan_cmake_run(REQUIRES RvcFramework/1.2.0.88@LR04.02_FrameworkLib/dev
 	Audio/2023.0509.01@LR04.02_MediaRes/testing
 BASIC_SETUP CMAKE_TARGETS)
+
 include(DependencyConanFiles)
 
 set(RVC_CONAN_DEP_LIBS ${CONAN_BIN_DIRS})
@@ -366,6 +367,14 @@ if(MSVC)
 	set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
 endif(MSVC)
 
+if(MSVC)
+    add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/source-charset:utf-8>")
+    add_compile_options("$<$<C_COMPILER_ID:MSVC>:/source-charset:utf-8>")
+
+	add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/execution-charset:gbk>")
+    add_compile_options("$<$<C_COMPILER_ID:MSVC>:/execution-charset:gbk>")
+endif(MSVC)
+
 # Enable 64bit file support on linux and FreeBSD.
 if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR FREEBSD)
 	add_definitions("-D_FILE_OFFSET_BITS=64")
@@ -435,6 +444,8 @@ set(RVC_CONFIG_PATH    "${PACK_INSTALL_PREFIX_CUR_VER}/cfg")
 set(RVC_VENDOR_PATH  "${PACK_INSTALL_PREFIX_CUR_VER}/dep")
 set(RVC_SHARED_PATH   "${PACK_INSTALL_PREFIX_CUR_VER}/share")
 set(RVC_RESOURCE_PATH   "${PACK_INSTALL_PREFIX_CUR_VER}/res")
+#win
+set(RVC_CHROMIUM_PATH "${RVC_RUNTIME_PATH}/Chromium")
 
 set(CMAKE_INSTALL_INCLUDEDIR ${RVC_INCLUDE_PATH})
 set(CMAKE_INSTALL_BINDIR ${RVC_RUNTIME_PATH})
@@ -622,8 +633,8 @@ set(CPACK_PACKAGE_VERSION_PATCH ${RVC_VERSION_REVISION})
 # Configure package type
 if(MSVC)
 	if( NOT CPACK_GENERATOR)
-		set(CPACK_GENERATOR "ZIP")
-		message(STATUS "set zip package file type")
+		set(CPACK_GENERATOR "NSIS")
+		#message(STATUS "set zip package file type")
 	endif()
 	if(CPACK_GENERATOR MATCHES "NSIS")
 		set(CPACK_PACKAGE_INSTALL_DIRECTORY "C:\\\\Run")
@@ -673,6 +684,7 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/addin/cfg" DESTINATION "${PACK_INSTALL_PR
 install(FILES ${CMAKE_BINARY_DIR}/env.ini DESTINATION ${RVC_CONFIG_PATH} COMPONENT scripts)
 
 set(active_txt_file "${CMAKE_BINARY_DIR}/active.txt")
+message(STATUS "RVC_VERSION = ${RVC_VERSION}, RVC_VERSION_MAJOR=${RVC_VERSION_MAJOR}, RVC_VERSION_MINOR=${RVC_VERSION_MINOR}, RVC_VERSION_REVISION=${RVC_VERSION_REVISION}, RVC_VERSION_SUFFIX=${RVC_VERSION_SUFFIX}")
 file(WRITE ${active_txt_file} "${RVC_VERSION}")
 install(FILES ${active_txt_file} DESTINATION ${PACK_INSTALL_PREFIX_VERSION} COMPONENT scripts)
 # Install RunInfo Directory
@@ -704,6 +716,37 @@ if(CONAN_LIB_DIRS_QT)
 	list(REMOVE_ITEM RVC_CONAN_DEP_LIBS ${CONAN_BIN_DIRS_QT})# 1.0.5-dev5
 endif(CONAN_LIB_DIRS_QT)
 
+if(MSVC)
+	if(CONAN_BIN_DIRS_CEFCLIENT_MUTABLE)
+		message(STATUS "remove cefclient dirs")
+		list(REMOVE_ITEM RVC_CONAN_DEP_LIBS ${CONAN_BIN_DIRS_CEFCLIENT_MUTABLE})
+		file(GLOB RVC_CHROMIUM_BIN_FILES LIST_DIRECTORIES true "${CONAN_BIN_DIRS_CEFCLIENT_MUTABLE}/Chromium/*")
+		foreach(item ${RVC_CHROMIUM_BIN_FILES})
+			if(IS_DIRECTORY ${item})
+				install(DIRECTORY "${item}" DESTINATION "${RVC_CHROMIUM_PATH}" COMPONENT libraries )
+			else()
+				install(FILES ${item} DESTINATION "${RVC_CHROMIUM_PATH}" 
+				PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE
+				COMPONENT libraries)
+			endif()
+		endforeach()
+	endif(CONAN_BIN_DIRS_CEFCLIENT_MUTABLE)
+	if(CONAN_BIN_DIRS_CEFCLIENT_CONST)
+		message(STATUS "remove cefclient dirs")
+		list(REMOVE_ITEM RVC_CONAN_DEP_LIBS ${CONAN_BIN_DIRS_CEFCLIENT_CONST})
+		file(GLOB RVC_CHROMIUM_BIN_FILES LIST_DIRECTORIES true "${CONAN_BIN_DIRS_CEFCLIENT_CONST}/Chromium/*")
+		foreach(item ${RVC_CHROMIUM_BIN_FILES})
+			if(IS_DIRECTORY ${item})
+				install(DIRECTORY "${item}" DESTINATION "${RVC_CHROMIUM_PATH}" COMPONENT libraries )
+			else()
+				install(FILES ${item} DESTINATION "${RVC_CHROMIUM_PATH}" 
+				PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_READ WORLD_EXECUTE
+				COMPONENT libraries)
+			endif()
+		endforeach()
+	endif(CONAN_BIN_DIRS_CEFCLIENT_CONST)
+endif(MSVC)
+
 foreach(bin_dir ${RVC_CONAN_DEP_LIBS})
 	message(STATUS "bin dir: ${bin_dir}")
 	# file(GLOB RVC_CONAN_BIN_FILES  LIST_DIRECTORIES false "${bin_dir}/*.so" "${bin_dir}/*.dll")
@@ -735,8 +778,6 @@ install(FILES ${RVC_RESOURCE_FILES} DESTINATION ${RVC_RUNTIME_PATH} COMPONENT re
 install(DIRECTORY "${CONAN_RES_DIRS_AUDIO}" DESTINATION "${PACK_INSTALL_DATA_DIR}" COMPONENT resources)
 #install(DIRECTORY "${CONAN_RES_DIRS_VIDEO}" DESTINATION "${PACK_INSTALL_DATA_DIR}" COMPONENT resources)
 
-
-
 if(CONAN_RES_DIRS_SOGOUIME)
 	message(STATUS "include sogou input installation.")
 	install(DIRECTORY "${CONAN_RES_DIRS_SOGOUIME}" DESTINATION "${PACK_INSTALL_DATA_DIR}" COMPONENT resources)

+ 38 - 0
CMakeSettings.json

@@ -1,5 +1,43 @@
 {
   "configurations": [
+    {
+      "name": "x86-Release",
+      "generator": "Visual Studio 16 2019",
+      "configurationType": "Release",
+      "buildRoot": "${projectDir}\\out\\build\\${name}",
+      "installRoot": "${projectDir}\\out\\install\\${name}",
+      "cmakeCommandArgs": "-D BUILD_TESTING=OFF",
+      "buildCommandArgs": "",
+      "ctestCommandArgs": "-C Release",
+      "inheritEnvironments": [ "msvc_x86" ]
+    },
+    {
+      "name": "ARM64-GCC-Debug",
+      "generator": "Unix Makefiles",
+      "configurationType": "Debug",
+      "cmakeExecutable": "cmake",
+      "remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
+      "cmakeCommandArgs": "-D BUILD_TESTING=OFF -D WITH_CI_NUMBER=OFF -D SIMULATE_ON=OFF -D BUILD_DEVADAPTER=ON",
+      "buildCommandArgs": "",
+      "ctestCommandArgs": "--output-on-failure",
+      "inheritEnvironments": [ "linux_arm" ],
+      "remoteMachineName": "${defaultRemoteMachineName}",
+      "remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
+      "remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
+      "remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
+      "remoteCopySources": true,
+      "rsyncCommandArgs": "-t --delete --delete-excluded --exclude \"/build\" --exclude \"/out\" --exclude-from=.gitignore",
+      "remoteCopyBuildOutput": false,
+      "remoteCopySourcesMethod": "rsync",
+      "addressSanitizerRuntimeFlags": "detect_leaks=0",
+      "variables": [
+        {
+          "name": "SIMULATE_ON",
+          "value": "False",
+          "type": "BOOL"
+        }
+      ]
+    },
     {
       "name": "ARM64-GCC-Release",
       "generator": "Unix Makefiles",

+ 16 - 4
DevAdapter/CMakeLists.txt

@@ -176,6 +176,11 @@ macro(rvc_dev_config_library _module_name _module_prefix)
             LIBRARY_OUTPUT_DIRECTORY_RELEASE "${RVC_INSTALL_PREFIX}${RVC_VENDOR_PATH}"
         )
     endif(SIMULATE_ON)
+
+    if(MSVC)
+        set_property(TARGET ${MODULE_FULL_NAME} PROPERTY FOLDER "devadapter/${CURRENT_VENDOR}/")
+    endif(MSVC)
+
 endmacro(rvc_dev_config_library)
 
 # 该宏仅在招行的编译生成环境下才会应用
@@ -243,15 +248,22 @@ message(STATUS "vendor log library: ${VENDOR_LOG_LIB_NAME}")
 
 # 通过conan的方式管理厂商库
 if(DEVADAPTER_USING_CONAN)
+if(NOT MSVC)
     if(RVC_INTEGRATE_BUILDV2)
-        set(KEBA_CONAN_ALL_LIB_NAME keba/2023.1208.18@LR04.02_VendorLib/stable)
-        set(CW_CONAN_ALL_LIB_NAME cw/2023.1207.13@LR04.02_VendorLib/stable)
+        set(KEBA_CONAN_ALL_LIB_NAME keba/2023.1222.22@LR04.02_VendorLib/stable)
+        set(CW_CONAN_ALL_LIB_NAME cw/2023.1226.14@LR04.02_VendorLib/stable)
+        set(SZZT_CONAN_ALL_LIB_NAME szzt/2023.1219.13@LR04.02_VendorLib/stable)
+        set(GWI_CONAN_ALL_LIB_NAME gwi/2023.1128.10@LR04.02_VendorLib/stable)
+        set(NANTIAN_CONAN_ALL_LIB_NAME nantian/2023.1206.1@LR04.02_VendorLib/stable)
         set(GRG_CONAN_ALL_LIB_NAME grg/2023.1213.24@LR04.02_VendorLib/stable)
         rvc_aggerate_vendor_libs(keba)
         rvc_aggerate_vendor_libs(cw)
+        rvc_aggerate_vendor_libs(szzt)
+        rvc_aggerate_vendor_libs(gwi)
+        rvc_aggerate_vendor_libs(nantian)
         rvc_aggerate_vendor_libs(grg)
     endif(RVC_INTEGRATE_BUILDV2)
-
+endif(NOT MSVC)
 endif(DEVADAPTER_USING_CONAN)
  
 file(GLOB all_valid_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*/CMakeLists.txt")
@@ -293,7 +305,7 @@ if(RVC_INTEGRATE_BUILD)
     endforeach()
 
 elseif(RVC_VENDOR_CONFIGV2)
-    # 此列表中的文件已在终端应用中包含,所以要移除
+    # 此列表中的文件已在终端应用中包含,所以要移除,TODO: Windows 需要兼容
     set(USELESS_DEVADAPTER_FILE_NAMES
     liblog4cplus.so
     libcmblog4vendor.so

+ 3 - 0
DevAdapter/Note.md

@@ -8,4 +8,7 @@
 `conan upload  sogouime/2.6.4.593@LR04.02_MediaRes/testing --all -r=conan-cmb`
 # 注意事项
 
+`conan export-pkg . LR04.02_ThirdParty/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Release`
+`conan export-pkg . LR04.02_ThirdParty/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Debug`
+`conan upload CEFControl/1.0@LR04.02_ThirdParty/testing --all -r=conan-cmb`
 * 科堡适配器依赖:`sudo apt-get install libasound2-dev` (廖桂发,2021年2月5日)

+ 3 - 1
DevAdapter/cmbsz/CMakeLists.txt

@@ -5,7 +5,9 @@ message(STATUS "CURRENT_VENDOR : ${CURRENT_VENDOR}")
 project(${CURRENT_VENDOR} C CXX)
 
 set(CMAKE_COLOR_MAKEFILE ON)
-
+if(MSVC)
+	add_definitions(-DDEVICEBASE_EXPORTS -DDEMO_LIBRARY_EXPORTS)
+endif(MSVC)
 # VENDOR_CURRENT_{DEPS|INCLUDE|ASSET|LIB|BIN}_DIR 等定义已集成到该宏内
 rvc_define_dependen_dirs()
 

+ 1 - 1
DevAdapter/cmbsz/cardissuer.1.1/CMakeLists.txt

@@ -10,4 +10,4 @@ set(${MODULE_PREFIX}_SRCS SHARED
 
 rvc_dev_config_library(${MODULE_NAME} ${MODULE_PREFIX})
 
-rvc_dev_target_install(${MODULE_FULL_NAME})
+rvc_dev_target_install(${MODULE_FULL_NAME})

+ 3 - 1
DevAdapter/cmbsz/cardissuer.1.1/cardissuer_impl.cpp

@@ -39,7 +39,9 @@ ErrorCodeEnum CardIssuerClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
     char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+    char szSubMessage[64];
+    sprintf(szSubMessage, "%d", ++times);
+    sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 4 - 2
DevAdapter/cmbsz/contactlesscard.1.1/contactless_impl.cpp

@@ -38,8 +38,10 @@ ErrorCodeEnum ContactlessCardImpl::DevClose()
 ErrorCodeEnum ContactlessCardImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 3 - 2
DevAdapter/cmbsz/deps/cmbsz.demo/CMakeLists.txt

@@ -1,9 +1,10 @@
 set(srcs demo.cpp demo.h)
-
 add_library(demo STATIC ${srcs})
 # target_compile_definitions(demo PUBLIC -D DEMO_LIBRARY_EXPORTS)
 set_target_properties(demo PROPERTIES OUTPUT_NAME "cmbsz.demo")
 
-
+    if(MSVC)
+        set_property(TARGET demo PROPERTY FOLDER "devadapter/${CURRENT_VENDOR}/")
+    endif(MSVC)
 #  =-=-=-=-=-= {.so依赖库工程}/CMakeLists.txt 文件最后必须声明如下内容,传入TARGET 名称, .a 类型的静态库无需添加 !!=-=-=-=-=-==-=-=
 #### rvc_dev_target_install(demo)

+ 1 - 1
DevAdapter/cmbsz/deps/cmbsz.sample/CMakeLists.txt

@@ -6,6 +6,6 @@ add_library(sample SHARED ${srcs})
 target_compile_definitions(sample PUBLIC -D SAMPLE_LIBRARY_EXPORTS)
 set_target_properties(sample PROPERTIES OUTPUT_NAME "cmbsz.sample")
 
-
+set_property(TARGET sample PROPERTY FOLDER "devadapter/${CURRENT_FOLDER}")
 #  =-=-=-=-=-= {.so依赖库工程}/CMakeLists.txt 文件最后必须声明如下内容,传入TARGET 名称, .a 类型的静态库无需添加 !!=-=-=-=-=-==-=-=
 rvc_dev_target_install(sample)

+ 4 - 2
DevAdapter/cmbsz/devctrl.1.1/devctrl_impl.cpp

@@ -39,8 +39,10 @@ ErrorCodeEnum DevCtrlClassImpl::DevClose()
 ErrorCodeEnum DevCtrlClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 4 - 3
DevAdapter/cmbsz/gpio.1.1/gpio_impl.cpp

@@ -39,9 +39,10 @@ ErrorCodeEnum GPIOClassImpl::DevClose()
 ErrorCodeEnum GPIOClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
-    strcpy(devErrInfo.szErrMsg, szMessage);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;
 }

+ 13 - 0
DevAdapter/cmbsz/gpio.1.2/CMakeLists.txt

@@ -0,0 +1,13 @@
+rvc_dev_define_module("Gpio")
+set(${MODULE_PREFIX}_VENDOR ${CURRENT_VENDOR})
+set(${MODULE_PREFIX}_VERSION "1")
+set(${MODULE_PREFIX}_BATCH "2")
+
+set(${MODULE_PREFIX}_SRCS SHARED
+        gpio_impl.cpp
+        )
+
+
+rvc_dev_config_library(${MODULE_NAME} ${MODULE_PREFIX})
+
+rvc_dev_target_install(${MODULE_FULL_NAME})

+ 156 - 0
DevAdapter/cmbsz/gpio.1.2/gpio_impl.cpp

@@ -0,0 +1,156 @@
+#include "gpio_impl.h"
+#include<cstring>
+#include <cstdio>
+GPIOClassImpl::GPIOClassImpl()
+        :m_mode(0)
+{
+
+}
+
+GPIOClassImpl::~GPIOClassImpl()
+{
+
+}
+
+ErrorCodeEnum GPIOClassImpl::GetDevCategory(DevCategoryInfo &devCategory)
+{
+
+    ErrorCodeEnum err = Error_Succeed;
+    std::strcpy(devCategory.szModel, "szModel");
+    //新接口版本标记
+    std::strcpy(devCategory.szType, "szType#FUNCVER=2.0");
+    std::strcpy(devCategory.szVendor, "szVendor");
+    return err;
+}
+
+ErrorCodeEnum GPIOClassImpl::Reset()
+{
+    ErrorCodeEnum err = Error_Succeed;
+    m_mode = 0;
+    return err;
+}
+
+
+ErrorCodeEnum GPIOClassImpl::DevClose()
+{
+    ErrorCodeEnum err = Error_Succeed;
+    return err;
+}
+
+
+
+ErrorCodeEnum GPIOClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
+{
+    static int times = 0;
+    char szMessage[128];
+    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+    strcpy(devErrInfo.szErrMsg, szMessage);
+    devErrInfo.dwErrMsgLen = strlen(szMessage);
+    return Error_Succeed;
+}
+
+ErrorCodeEnum GPIOClassImpl::SetStatus(DWORD dwReq, DWORD dwMode)
+{
+    ErrorCodeEnum ec = Error_Succeed;
+
+    if ((dwMode & GPIO_DEV_LIGHT_MODE_LIGHT_SUSTAIN) && (dwMode & GPIO_DEV_LIGHT_MODE_LIGHT_FLICKER)) {
+        return Error_Param;
+    }
+    if ((dwMode & GPIO_DEV_LIGHT_MODE_COLOR_NORMAL) && (dwMode & GPIO_DEV_LIGHT_MODE_COLOR_FAULT)) {
+        return Error_Param;
+    }
+
+    switch (dwReq) {
+    case GPIO_DEV_SN_LIGHT_CARDISSUER:
+        if (dwMode & GPIO_DEV_LIGHT_MODE_COLOR_NORMAL) { //常规颜色
+            if (dwMode & GPIO_DEV_LIGHT_MODE_LIGHT_FLICKER) { //闪烁
+
+            }
+        }
+        if (dwMode & GPIO_DEV_LIGHT_MODE_COLOR_FAULT) { //故障状态的颜色,一般为红色
+            if (dwMode & GPIO_DEV_LIGHT_MODE_LIGHT_SUSTAIN) { //常亮
+
+            }
+        }
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_IDCERTIFICATE:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_PINPAD:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_FACE:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_CARDISSUER_MAINTAIN:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_CONTACTLESSCARD:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_FINGERPRINT:
+        //....
+        break;
+    case GPIO_DEV_SN_LIGHT_SENSOR_ALL: 
+    {
+        if (dwMode == GPIO_DEV_LIGHT_MODE_RESET) {
+            //熄灭当前的所有灯
+        }
+    }
+        break;
+    default:
+        ec = Error_NotSupport;
+        break;
+    }
+    return ec;
+}
+
+ErrorCodeEnum GPIOClassImpl::DetectStatus(DWORD dwReq, DWORD& dwMode)
+{
+    ErrorCodeEnum ec = Error_Succeed;
+    dwMode = 0;
+
+    if (dwReq & GPIO_DEV_SN_SENSOR_SHAKE) {
+        //检测是否震动,如果震动,则对应的位置为1
+        dwMode |= GPIO_DEV_SN_SENSOR_SHAKE;
+    }
+    if (dwReq & GPIO_DEV_SN_SENSOR_DOOR) {
+        // 检测是否开机柜门,没开则置为0
+    }
+    if (dwReq & GPIO_DEV_SN_SENSOR_PHONE) {
+        //检测是否提机,如果提机,则对应的位置为1
+        dwMode |= GPIO_DEV_SN_SENSOR_PHONE;
+    }
+    if (dwReq & GPIO_DEV_SN_SENSOR_HUMAN_DETECT) {
+        //检测是否有人,如果有人,则对应的位置为1
+        dwMode |= GPIO_DEV_SN_SENSOR_HUMAN_DETECT;
+    }
+    if (dwReq & GPIO_DEV_SN_SENSOR_CARD_MOUTH) {
+        //......
+    }
+    return ec;
+}
+
+DEVICEBASE_API ErrorCodeEnum CreateDevComponent(DeviceBaseClass *&baseObj)
+{
+    baseObj = new GPIOClassImpl();
+    if(baseObj == NULL) {
+    return Error_Resource;
+    } else {
+    return Error_Succeed;
+    }
+}
+DEVICEBASE_API ErrorCodeEnum  ReleaseDevComponent(DeviceBaseClass *&pBaseObj)
+{
+    if(pBaseObj == NULL) {
+    return Error_Param;
+    }
+    if(GPIOClassImpl* pTmp = dynamic_cast<GPIOClassImpl*>(pBaseObj))
+    {
+    delete pTmp;
+    pTmp = NULL;
+    return Error_Succeed;
+    }
+    return Error_Param;
+}

+ 62 - 0
DevAdapter/cmbsz/gpio.1.2/gpio_impl.h

@@ -0,0 +1,62 @@
+#ifndef LIBFRAMEWORK_GPIO_IMPL_H
+#define LIBFRAMEWORK_GPIO_IMPL_H
+
+#include "GpioClass.h"
+
+class GPIOClassImpl : public GpioClass
+{
+public:
+    GPIOClassImpl();
+    ~GPIOClassImpl();
+
+
+    //DeviceBaseClass
+    ErrorCodeEnum GetDevCategory(DevCategoryInfo &devCategory);
+    ErrorCodeEnum Reset();
+    ErrorCodeEnum DevClose();
+    ErrorCodeEnum GetLastErr(DevErrorInfo &devErrInfo);
+
+    //
+    //	Device initialization.
+    //	Configure port input/output direction.
+    //
+    virtual ErrorCodeEnum DevOpen(GpioInitParam initParam)
+    {
+        ErrorCodeEnum err = Error_Succeed;
+        return err;
+    }
+
+    //
+    //	Set ports output.
+    //	Arguments:
+    //	- dwPort:port serial number,0~MAX_PORT_NUM-1
+    //	- btData:output value
+    //	  bit value 1/0 means voltage high or low
+    //	  ex.dwPort=0 btData=10001010 means set port 0's the 2nd,4th,8th pin output high
+    //
+    virtual ErrorCodeEnum WritePort(DWORD dwPort, BYTE btData)
+    {
+        return Error_Succeed;
+    }
+    //
+    //	Get port input.
+    //	Arguments:
+    //	- dwPort:port serial number,0~MAX_PORT_NUM-1
+    //	- btStatus:input value
+    //	  ex.dwPort=0 btStatus=10001010 means port 0's the 2nd,4th,8th pin with high level
+    //
+    virtual ErrorCodeEnum ReadPort(DWORD dwPort, BYTE& btStatus)
+    {
+        return Error_NotImpl;
+    }
+
+    ErrorCodeEnum SetStatus(DWORD dwReq, DWORD dwMode);
+
+    ErrorCodeEnum DetectStatus(DWORD dwReq, DWORD& dwMode);
+
+private:
+    int m_mode;
+};
+
+
+#endif //LIBFRAMEWORK_GPIO_IMPL_H

+ 4 - 2
DevAdapter/cmbsz/hspscanner.1.1/hspscanner_impl.cpp

@@ -38,8 +38,10 @@ ErrorCodeEnum HSPSClassImpl::DevClose()
 ErrorCodeEnum HSPSClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 4 - 2
DevAdapter/cmbsz/idcer.1.1/idcer_impl.cpp

@@ -101,8 +101,10 @@ ErrorCodeEnum IDCerClassImpl::IDCerGetDataEx(IDCerInfoEx &idCerInfoEx)
 ErrorCodeEnum IDCerClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 4 - 2
DevAdapter/cmbsz/termalprint.1.1/termalprint_impl.cpp

@@ -39,8 +39,10 @@ ErrorCodeEnum ThermalPrintClassImpl::DevClose()
 ErrorCodeEnum ThermalPrintClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 4 - 2
DevAdapter/cmbsz/ups.1.1/ups_impl.cpp

@@ -52,8 +52,10 @@ ErrorCodeEnum UpsClassImpl::DevClose()
 ErrorCodeEnum UpsClassImpl::GetLastErr(DevErrorInfo &devErrInfo)
 {
     static int times = 0;
-    char szMessage[128];
-    sprintf(szMessage, "这是第 %d 条错误信息", ++times);
+	char szMessage[128];
+	char szSubMessage[64];
+	sprintf(szSubMessage, "%d", ++times);
+	sprintf(szMessage, "{\"ErrCode\":9555, \"Description\":\"Func:%s,Line:%d,Msg:%s\"}", __FUNCTION__, __LINE__, szSubMessage);
     strcpy(devErrInfo.szErrMsg, szMessage);
     devErrInfo.dwErrMsgLen = strlen(szMessage);
     return Error_Succeed;

+ 0 - 43
DevAdapter/include/BranchDeviceClass.h

@@ -1,43 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-///	Copyright (c) 2017 China Merchants Bank, all rights reserved	       	  ///
-///	  Adapter Interface for Branch Device.                          	      ///
-///	                                                             	       	  ///
-///	                                                             	       	  ///
-/////////////////////////////////////////////////////////////////////////////////
-
-#ifndef __BRANCH_DEVICE_CLASS_H
-#define __BRANCH_DEVICE_CLASS_H
-
-#include "DeviceBaseClass.h"
-
-class BranchDeviceClass : public DeviceBaseClass
-{
-public:
-	//
-	//	打开设备
-	//	@param1: 配置在root.ini中,打开设备所需的参数字符串,比如说波特率端口,由实现子类进行字符串额分割和解析
-	//	@param2: 配置在CenterSetting.ini中,分行全行通用的字符串,作用暂未定义,由分行决定其使用功能
-	//	参数的配置方式见《可视化柜台分行特色硬件适配器开发说明.doc》
-	//
-	virtual ErrorCodeEnum DevOpen(const char *param1, const char *param2) = 0;	
-		
-	//
-	//	执行操作指令
-	//	@param:    指令内容
-	//	@retValue: 存储返回内容的字符串
-	//	@maxLen:   字符串的缓冲区长度
-	//
-	virtual ErrorCodeEnum ExecuteCmd(const char *param, char *&retValue, int maxLen) = 0;	
-	
-	//  
-	//	设备状态检测
-	//	@status: 在函数返回 Error_Succeed 的前提下定义为有效,其余情况不作任何处理
-	//	0:正常
-	//	1:警告,提示性信息,上层可不处理,原则上可通过GetLastErr接口可提取具体的原因
-	//	2:维护,设备可用,但需要上层发维护信息,分行通用实体将执行Reset接口函数
-	//	3:故障,设备不可用,原则上可通过GetLastErr接口可提取具体的原因,分行通道实体将执行适配器加载进程重启操作
-	//
-	virtual ErrorCodeEnum QueryDevice(unsigned int &status) = 0;
-};
-
-#endif //__BRANCH_DEVICE_CLASS_H

+ 0 - 68
DevAdapter/include/BranchDeviceHelper.h

@@ -1,68 +0,0 @@
-#ifndef __BRANCH_DEVICE_HLEPER_H
-#define __BRANCH_DEVICE_HLEPER_H
-#pragma once
-const int MAX_PATH_SIZE = 256;
-
-#include <strsafe.h>
-#include <Shlobj.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-	int GetCurrentRunPath(char *pPath)
-	{
-		char *pBuf = new char[MAX_PATH_SIZE];
-		if (pBuf == NULL)
-			return -1;
-		ZeroMemory(pBuf,MAX_PATH_SIZE);
-		GetModuleFileName(NULL,pBuf,MAX_PATH_SIZE);
-		int len = strnlen_s(pBuf,MAX_PATH_SIZE);
-		if (len <= 0)
-		{
-			delete []pBuf;
-			return -2;
-		}
-		char *pch;
-		pch = strstr (pBuf,"bin");
-		if (pch == NULL)
-			return -3;
-		int lenDel = strnlen_s(pch,MAX_PATH_SIZE);
-		if (len <= 0)
-		{
-			delete []pBuf;
-			return -3;
-		}
-		strncpy_s(pPath,MAX_PATH_SIZE,pBuf,len-lenDel);
-		delete []pBuf;
-
-		return strnlen_s(pPath,MAX_PATH_SIZE);
-	}
-
-	// >0 means suc and set the path size
-	//	  pPath store directory path like "C:\Users\{UserName}\AppData\LocalLow"
-	// <0 means failed !!
-	int GetWriteAvailableDirPath(char *pPath)
-	{
-		char *pBuf = new char[MAX_PATH_SIZE];
-		if (pBuf == NULL)
-			return -1;
-		ZeroMemory(pBuf,MAX_PATH_SIZE);
-		PWSTR pszPath = NULL;
-		if(SHGetKnownFolderPath(FOLDERID_LocalAppDataLow, 0, NULL, &pszPath) != S_OK)
-		{
-			delete[] pBuf;
-			return -2;
-		}
-		WideCharToMultiByte(CP_ACP, 0, pszPath, -1, pBuf, MAX_PATH_SIZE, NULL, NULL);
-		CoTaskMemFree((LPVOID)pszPath);
-		int len = strnlen_s(pBuf, MAX_PATH_SIZE);
-		strncpy_s(pPath, MAX_PATH_SIZE, pBuf, len);
-		delete []pBuf;
-		return strnlen_s(pPath, MAX_PATH_SIZE);
-	}
-
-#ifdef __cplusplus
-}
-#endif
-#endif //__BRANCH_DEVICE_HLEPER_H

+ 28 - 10
DevAdapter/include/CardAssist.cpp

@@ -2,16 +2,36 @@
 #include <algorithm>
 //CSimpleStringA<T> ambigulous
 
-#ifdef RVC_OS_WIN
+#if (defined(_WIN32) || defined(_WIN64))
 
 #define _ATL_NO_AUTOMATIC_NAMESPACE
 #include <atltime.h>
 
-#endif // RVC_OS_WIN
+#endif // 
 
 #include "CardAssist.h"
 #include "SpBase.h"
 
+#define DbgSysInfoWithLink DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)
+#define DbgUserInfoWithLink	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)
+#define DbgSysWarnWithLink	DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)
+
+void DbgInfo(CSimpleStringA apiName, long beginTime, long endTime, ErrorCodeEnum errCode, CSimpleStringA msg)
+{
+	DbgSysInfoWithLink.setAPI(apiName).setBeginTime(beginTime).setEndTime(endTime).setResultCode(std::to_string((unsigned long)errCode).c_str())(msg.GetData());
+}
+void DbgInfo(CSimpleStringA msg)
+{
+	DbgSysInfoWithLink(msg.GetData());
+}
+void DbgWarn(CSimpleStringA apiName, long beginTime, long endTime, ErrorCodeEnum errCode, CSimpleStringA msg)
+{
+	DbgSysWarnWithLink.setAPI(apiName).setBeginTime(beginTime).setEndTime(endTime).setResultCode(std::to_string((unsigned long)errCode).c_str())(msg.GetData());
+}
+void DbgWarn(CSimpleStringA msg)
+{
+	DbgSysWarnWithLink(msg.GetData());
+}
 
 char TTtmpxx[1024];
 char TtestIC[1024];
@@ -62,9 +82,6 @@ bool IsForm(LPBYTE data,int flagLen)
 
 int SplitICData(vector<ICData>& vResult, LPBYTE* origData, int start, int dataLen, int level , int origDataLen)
 {
-	//Dbg("to split IC Data size [%d],start[%d],dataLen[%d],level[%d]",vResult.size(),start,dataLen,level);
-	//Dbg("%x%x",*((*origData)+start),*((*origData)+start+1));
-	//ZeroMemory(Ttmpxx,sizeof(Ttmpxx));
 	LPBYTE pData = *origData;
 	DWORD len,tagLen,lenLen;
 	len=tagLen=lenLen=0;
@@ -74,10 +91,10 @@ int SplitICData(vector<ICData>& vResult, LPBYTE* origData, int start, int dataLe
 	{
 		if (start >= origDataLen - 1)
 		{
-			Dbg("Wrong start %d,%d,%d", start, origDataLen,dataLen);
+			DbgWarn(CSimpleStringA::Format("Wrong start %d,%d,%d", start, origDataLen,dataLen));
 			return 0;
 		}
-		//Dbg("%x,%d,%d", pData[start],start,dataLen);//oiltest 20160107
+
 		if (!IsDoubleByteFlag(pData[start]))
 		{
 			tagLen = 1;
@@ -196,7 +213,7 @@ int SplitFormString(vector<FormUnit> &vResult,const char *pData,int size,char fs
 	int dataLen = strlen(pData);
 	if (dataLen <= 0 || dataLen != size)
 	{
-		Dbg("Split form string failed.[%d,%s]",size,pData);
+		DbgWarn(CSimpleStringA::Format("Split form string failed.[%d,%s]",size,pData));
 		return -1;
 	}
 	for (int i = 0,j = 0; i < size; ++i)
@@ -2535,6 +2552,7 @@ int CCardProcess::GetICDataFromCard(CardReadType eType,DeviceBaseClass *pCardX,
 	}
 	return -3;
 }
+
 int CCardProcess::ConstructARQCData(const char *pATC, char *&pDataToARQC, char *&pSomeICData)
 {
 	//9f0206 9f0306 9f1a02 9505 5f2a02 9a03 9c01 9f3704 9f2103 9f4e14
@@ -2542,7 +2560,7 @@ int CCardProcess::ConstructARQCData(const char *pATC, char *&pDataToARQC, char *
 	//,5f2a02交易货币代码( 2), 9a03交易日期( 3), 9c01交易类型( 1),
 	pDataToARQC = new char[1024];
 	ZeroMemory(pDataToARQC,1024);
-	Dbg("atc %s",pATC);
+	//DbgInfo(CSimpleStringA::Format("<ConstructARQCData>, atc %s",pATC));
 	ICData authAmount(false,0x9f,0x02),otherAmount(false,0x9f,0x03),ctyCode(false,0x9f,0x1a)
 		,currCode(false,0x5f,0x2a),transTime(false,0x9f,0x21),transDate(false,0x9a,0x00)
 		,transType(false,0x9c,0x00);
@@ -2688,7 +2706,7 @@ int CCardProcess::ConstructARQCData(const char *pATC, char *&pDataToARQC, char *
 	tmpARQCData[len++] = m_CVR[1];
 	tmpARQCData[len++] = m_CVR[2];
 	tmpARQCData[len++] = m_CVR[3];
-	Dbg("term2arqcdata,len[%d]",len);
+	//DbgInfo(CSimpleStringA::Format("term2arqcdata,len[%d]",len));
 	HexBuf2StrBuf(tmpARQCData,&pDataToARQC,len);
 	HexBuf2StrBuf(tmpSomeICData, &pSomeICData, iclen);
 	//Dbg("[%s]",pDataToARQC);

+ 9 - 2
DevAdapter/include/CardAssist.h

@@ -7,8 +7,9 @@
 #include "CardSwiperClass.h"
 #include "RFICClass.h"
 #include "../../Module/mod_cardissuer/CardIssuer_UserErrorCode.h"
-//#include "../../Module/mod_CardSwiper/CardSwiper_UserErrorCode.h"
+#include "../../Module/mod_cardswiper/CardSwiper_UserErrorCode.h"
 #include "../../Module/mod_ContactlessCard/ContactlessCard_UserErrorCode.h"
+
 #include <vector>
 using namespace std;
 
@@ -48,6 +49,11 @@ int HexBuf2StrBuf(PBYTE hexBuf,char** strBuf,DWORD len);
 int SplitFormString(vector<FormUnit> &vResult,const char *pData,int size,char fstP,char sndP);
 int char2int(char ch);
 
+void DbgInfo(CSimpleStringA apiName, long beginTime, long endTime, ErrorCodeEnum errCode, CSimpleStringA msg);
+void DbgInfo(CSimpleStringA msg);
+void DbgWarn(CSimpleStringA apiName, long beginTime, long endTime, ErrorCodeEnum errCode, CSimpleStringA msg);
+void DbgWarn(CSimpleStringA msg);
+
 class CCardProcess
 {
 public:
@@ -110,13 +116,14 @@ private:
 	//BYTE *m_pAPDUSendBuf;
 	int m_lenAPDU;
 	char m_AuthCode[2];
-	//bool m_bOnlineOnly,m_bCDA;
+
 	//ICData gpoData;
 	vector<ICData> m_vICData,m_vBusData;
 	vector<ADFRecord> m_vADFRec;
 	vector<FormUnit> m_vOnlineReplyData;
 	//int SplitTrack2(CSimpleStringA pTrack2,Track2Data &decodeData);
 	//int SplitUnionPayTrack2(CSimpleStringA pTrack2,Track2Data &decodeData);
+	void LogErrInfo(const char*);
 };
 //#ifdef __cplusplus
 //	}

+ 1 - 1
DevAdapter/include/CardIssuerClass.h

@@ -118,7 +118,7 @@ public:
 	//	Move card to specified position.
 	//	hopperNo:多卡箱发卡时指定发卡箱号(面对发卡机,从左往右依次是1,2,3,...号卡箱)
 	//		卡库:卡片从卡库加卡箱移动到读卡器,eCardPos为CI_MOVECARD_FROM_HOPPER,hopperNo固定传入99
-	//		卡库:卡片从卡库加卡箱移动到读卡器,若加卡箱已经无卡,返回Error_DevMedia
+	//		卡库:卡片从卡库加卡箱移动到读卡器,若加卡箱已经无卡,返回Error_Dev_HopperHasNoCard
 	//
 	virtual ErrorCodeEnum MoveCard(CardPosEnum eCardPos, int hopperNo = 1) = 0;
 	//

+ 9 - 9
DevAdapter/include/CardMix.h

@@ -30,15 +30,15 @@ enum CardStatusEnum
 {
 	CI_MEDIA_NOTPRESENT,	//卡机任何位置没有发现卡片
 	//以下仅供大机、便携发卡机CardIssuer使用
-			CI_MEDIA_PRESENT,		//卡机内部发现卡片
+	CI_MEDIA_PRESENT,		//卡机内部发现卡片
 	CI_MEDIA_JAMMED,		//卡片卡住
 	//仅供大机、便携卡机CardIssuer和吸入式卡机CardSwiper使用
-			CI_MEDIA_ENTERING,		//卡片在进卡口
+	CI_MEDIA_ENTERING,		//卡片在进卡口
 	//以下仅供多合一、壁挂式、吸入式卡机CardSwiper使用
-			CI_MEDIA_IC,		//在多合一、壁挂式的IC插卡位检测到IC卡 或者 在吸入式卡机卡槽内检测到IC卡
+	CI_MEDIA_IC,		//在多合一、壁挂式的IC插卡位检测到IC卡 或者 在吸入式卡机卡槽内检测到IC卡 
 	CI_MEDIA_NOT_IC,	//在多合一、壁挂式的IC插卡位检测到卡片但未能检测到IC芯片 或者 在吸入式卡机卡槽内检测到纯磁条卡
-	CI_MEDIA_RF,		//检测到非接卡片
-	CI_MEDIA_IDCARD,	//检测到身份证
+	CI_MEDIA_RF,		//检测到非接卡片(ContactlessCard借用)
+	CI_MEDIA_IDCARD,	//检测到身份证(ContactlessCard借用)
 };
 //retain bin state
 enum RtBinStatusEnum
@@ -46,7 +46,7 @@ enum RtBinStatusEnum
 	CI_RETAINBIN_OK,	//number of retained card less than half of retain bin's capacity
 	CI_RETAIN_NOTSUPP,	//no retain bin
 	CI_RETAINBIN_FULL,	//retain bin is full
-	CI_RETAINBIN_HIGH,	//retain bin is almost full,number of retain card more
+	CI_RETAINBIN_HIGH,	//retain bin is almost full,number of retain card more 
 	//than half of retain bin's capacity
 };
 //issue hopper state
@@ -55,7 +55,7 @@ enum IssHopperStatusEnum
 	CI_ISSUEHOPPER_OK,	//number of issued card more than half of issue hopper's capacity
 	CI_ISSUEHOPPER_NOTSUPP,	//no issue hopper
 	CI_ISSUEHOPPER_EMPTY,	//issue hopper is empty
-	CI_ISSUEHOPPER_LOW,		//issue hopper is almost empty,number of card less
+	CI_ISSUEHOPPER_LOW,		//issue hopper is almost empty,number of card less 
 	//than half of issue hopper's capacity
 };
 enum LightPosEnum
@@ -63,7 +63,7 @@ enum LightPosEnum
 	CI_LIGHT_MAG = 0x1,			//the magnetic stripe light flicker
 	CI_LIGHT_IC = 0x2,			//the IC card light flicker
 	//CI_LIGHT_MAG_IC,		//both the magnetic and IC light flicker
-			CI_LIGHT_CONTACTLESS = 0x4,	//the contactless card light flicker
+	CI_LIGHT_CONTACTLESS = 0x4,	//the contactless card light flicker
 	CI_LIGHT_IDCERTIFICATE = 0x8,	//the IDCertificate card light flicker
 };
 enum TrackSrcEnum
@@ -127,7 +127,7 @@ struct TrackInfo
 };
 struct MagTracks
 {
-	TrackRange eRange;
+	TrackRange eRange;	
 	TrackInfo track[MAX_MAG_TRACK_NUM];
 };
 struct CardNo

+ 0 - 1
DevAdapter/include/DevErrorCode.h

@@ -1547,7 +1547,6 @@ typedef short DECRESULT;
 #define MAKE_SLV_ERRORCODE(eid,vendor,ec)	\
 	( (DWORD) (((unsigned long)(eid)<<20) | ((((unsigned long)(vendor & 0x1F)))<<15) | (((unsigned long)(ec)) & 0x7FFF)) )
 
-//ec: device original errorcode, remote the deivce identity through & 0x1FF
 #define MAKE_SLV_ERRORCODE_TO_BUSINESS(eid,ec,reserved)	\
 	( (DWORD) (((unsigned long)(eid)<<20) | (((unsigned long)(reserved)) << 14) | (((unsigned long)(ec)) & 0x1FF)) )
 //

+ 25 - 14
DevAdapter/include/DeviceBaseClass.h

@@ -6,6 +6,17 @@
 ///																			  ///
 /////////////////////////////////////////////////////////////////////////////////
 
+//	Return code(ErrorCodeEnum):
+//	Error code that adapters returned mainly in the following list:
+//	Error_Hardware=0x800,
+//	Error_DevLoadFileFailed,	//load dll or config file failed
+//	Error_DevNotAvailable,		//device not connected
+//	Error_DevAlreadyConnected,	//device already connected
+//	Error_DevConnFailed,		//connect to device failed
+//	Error_DevCommFailed,		//Communication failed between HOST and Device
+//	Error_DevMedia,				//Media error(Data lack,unrecognized and so on)
+//	Adapters can also return error code which included in the file ErrorCode.h
+
 //	The "Optional." in front of method's comment means this method to implement depends on device.
 //	If the device don't have the function ,just return Error_Succeed simply,but must declare in the 
 //	implementation document. 
@@ -83,27 +94,27 @@ struct DevSoftVersion
 {
 	WORD wMajor;		//release major version
 	WORD wMinor;		//release minor version
-	WORD wRevision;   //bug repair version with the major and minor version remains the same
-	WORD wBuild;		   //compile version
+	WORD wRevision;		//bug repair version with the major and minor version remains the same
+	WORD wBuild;		//compile version
 };
 enum DevStateEnum
 {
-	DEVICE_STATUS_NOT_READY,	 //uninit
-	DEVICE_STATUS_NORMAL,		     //normal
-	DEVICE_STATUS_MAINTAINCE,	 //need to maintaince
-								                         //ex:paper tray is empty,retain bin is full
-	DEVICE_STATUS_FAULT,		         //cannot work
-	DEVICE_STATUS_CONNECTING,	 //device connecting
-	DEVICE_STATUS_NOCFG,		     //the vtm has no such device
-	DEVICE_STATUS_CROSS_USING,	 //the device is in cross calling
+	DEVICE_STATUS_NOT_READY,	//uninit
+	DEVICE_STATUS_NORMAL,		//normal
+	DEVICE_STATUS_MAINTAINCE,	//need to maintaince
+								//ex:paper tray is empty,retain bin is full
+	DEVICE_STATUS_FAULT,		//cannot work
+	DEVICE_STATUS_CONNECTING,	//device connecting
+	DEVICE_STATUS_NOCFG,		//the vtm has no such device
+	DEVICE_STATUS_CROSS_USING,	//the device is in cross calling
 };
 struct DevCategoryInfo
 {
-	char szType[MAX_DEV_TYPE_LEN];             	//device type sth like "CMB.Printer.HP1234"
-	char szModel[MAX_DEV_MODEL_LEN];	        //device model
+	char szType[MAX_DEV_TYPE_LEN];	//device type sth like "CMB.Printer.HP1234"
+	char szModel[MAX_DEV_MODEL_LEN];	//device model
 	char szVendor[MAX_DEV_VENDOR_LEN];		//device vendor
-	DevStateEnum eState;		                                //device status
-	DevSoftVersion version;	                                //software version
+	DevStateEnum eState;		//device status
+	DevSoftVersion version;	//software version
 };
 struct DevErrorInfo
 {

+ 8 - 8
DevAdapter/include/FingerPrintClass.h

@@ -17,21 +17,21 @@ public:
 	// Open Device
 	virtual ErrorCodeEnum DevOpen(DWORD dwPort, DWORD dwBaudRate) = 0;
 
-	//采集指纹图片及对应特征值,imagePath保存图片名,lpbFeature保存对应特征,iLength:输入代表特征lpbFeature最大可用长度,输出为特征lpbFeature实际长度
-	//imagePath为传入的图片名,采集到的指纹图像请按此名称保存在dep目录下,lpbFeature为对应指纹图像特征
+	//閲囬泦鎸囩汗鍥剧墖鍙婂�搴旂壒寰佸€�,imagePath淇濆瓨鍥剧墖鍚嶏紝lpbFeature淇濆瓨瀵瑰簲鐗瑰緛锛宨Length:杈撳叆浠h〃鐗瑰緛lpbFeature鏈€澶у彲鐢ㄩ暱搴�,杈撳嚭涓虹壒寰乴pbFeature瀹為檯闀垮害
+	//imagePath涓轰紶鍏ョ殑鍥剧墖鍚嶏紝閲囬泦鍒扮殑鎸囩汗鍥惧儚璇锋寜姝ゅ悕绉颁繚瀛樺湪dep鐩�綍涓嬶紝lpbFeature涓哄�搴旀寚绾瑰浘鍍忕壒寰�
 	//Compute features
 	virtual ErrorCodeEnum Image2Feature(const char* imageName, LPBYTE lpbFeature, int &iLength) = 0;
 
-	//生成特征模板(注册时使用)
-	//imagePath1、imagePath2、imagePath3表示生成特征需要输入的三张图片名称,由应用传入,lpbTemplate表示输出特征模板,iLength表示模板长度
+	//鐢熸垚鐗瑰緛妯℃澘锛堟敞鍐屾椂浣跨敤锛�
+	//imagePath1銆乮magePath2銆乮magePath3琛ㄧず鐢熸垚鐗瑰緛闇€瑕佽緭鍏ョ殑涓夊紶鍥剧墖鍚嶇О,鐢卞簲鐢ㄤ紶鍏ワ紝lpbTemplate琛ㄧず杈撳嚭鐗瑰緛妯℃澘锛宨Length琛ㄧず妯℃澘闀垮害
 	virtual ErrorCodeEnum Image2Template(const char* imagePath1, const char* imagePath2, const char* imagePath3, LPBYTE lpbTemplate, int &iLength) = 0;
 
-	//比对校验
-	//lpbTemplate和iTemplateLen分别表示输入的一组特征模板及其对应的长度,templateNum为数组长度(即模板个数)
-	//lbpFeature表示待校验的指纹特征,iFeatureLen表示其长度,level表示校验等级,默认取3
+	//姣斿�鏍¢獙
+	//lpbTemplate鍜宨TemplateLen鍒嗗埆琛ㄧず杈撳叆鐨勪竴缁勭壒寰佹ā鏉垮強鍏跺�搴旂殑闀垮害锛宼emplateNum涓烘暟缁勯暱搴�(鍗虫ā鏉夸釜鏁�)
+	//lbpFeature琛ㄧず寰呮牎楠岀殑鎸囩汗鐗瑰緛锛宨FeatureLen琛ㄧず鍏堕暱搴︼紝level琛ㄧず鏍¢獙绛夌骇锛岄粯璁ゅ彇3
 	virtual ErrorCodeEnum Match(LPBYTE lpbTemplate[], int iTemplateLen[] ,int templateNum, LPBYTE lbpFeature, int &iFeatureLen ,int level = 3) = 0;
 	
-	//取消采集指纹
+	//鍙栨秷閲囬泦鎸囩汗
 	virtual ErrorCodeEnum Cancel() = 0;
 };
 

+ 71 - 6
DevAdapter/include/GpioClass.h

@@ -29,13 +29,45 @@ struct GpioInitParam
 							//port 0 = pin 1~8,port 1 = pin 9~16 ...
 };
 
+
+//硬件模块序号,对应规格文档
+#define GPIO_DEV_SN_LIGHT_SENSOR_ALL ((DWORD)(-1)) //全体指示灯,用于启动时重置所有的灯
+
+#define GPIO_DEV_SN_LIGHT_CARDISSUER 1 //读卡发卡器提示灯
+#define GPIO_DEV_SN_LIGHT_IDCERTIFICATE 3 //身份证阅读器提示灯
+#define GPIO_DEV_SN_LIGHT_PINPAD 4 //密码键盘提示灯
+#define GPIO_DEV_SN_LIGHT_FACE 5 //脸部照明灯
+#define GPIO_DEV_SN_LIGHT_CARDISSUER_MAINTAIN 7 //读卡发卡器维护提示灯
+#define GPIO_DEV_SN_LIGHT_CONTACTLESSCARD 9 //非接IC读卡器提示灯
+#define GPIO_DEV_SN_LIGHT_FINGERPRINT 11 //指纹仪提示灯
+
+#define GPIO_DEV_SN_SENSOR_SHAKE 1                              //震动探测器
+#define GPIO_DEV_SN_SENSOR_DOOR (1 << 1)                   //机具门感应
+#define GPIO_DEV_SN_SENSOR_PHONE (1 << 2)                 //话机提机感应
+#define GPIO_DEV_SN_SENSOR_HUMAN_DETECT (1 << 3)  //人体探测感应
+#define GPIO_DEV_SN_SENSOR_CARD_MOUTH (1 << 4)     //发卡器卡嘴覆盖探测
+
+//模块灯属性
+#define GPIO_DEV_LIGHT_MODE_RESET 0 //熄灭灯
+//灯亮模式
+#define GPIO_DEV_LIGHT_MODE_LIGHT_SUSTAIN 0x1 //常亮
+#define GPIO_DEV_LIGHT_MODE_LIGHT_FLICKER 0x2 //闪烁
+//灯颜色
+#define GPIO_DEV_LIGHT_MODE_COLOR_NORMAL 0x4 //常规颜色
+#define GPIO_DEV_LIGHT_MODE_COLOR_FAULT 0x8 //故障状态的颜色,一般为红色
+
+// 驱动状态
+#define GPIO_DEV_SENSOR_MODE_HIGHT_LEVEL 0x1
+
 class GpioClass : public DeviceBaseClass
 {
 public:
-	//
-	//	Device initialization.
-	//	Configure port input/output direction.
-	//
+	/// <summary>
+	/// Device initialization.
+	/// Configure port input/output direction.
+	/// </summary>
+	/// <param name="initParam"></param>
+	/// <returns></returns>
 	virtual ErrorCodeEnum DevOpen(GpioInitParam initParam) = 0;
 
 	//
@@ -46,7 +78,7 @@ public:
 	//	  bit value 1/0 means voltage high or low
 	//	  ex.dwPort=0 btData=10001010 means set port 0's the 2nd,4th,8th pin output high
 	//
-	virtual ErrorCodeEnum WritePort(DWORD dwPort,BYTE btData) = 0;
+	virtual ErrorCodeEnum WritePort(DWORD dwPort,BYTE btData) { return Error_NotImpl; }
 	//
 	//	Get port input.
 	//	Arguments:
@@ -54,6 +86,39 @@ public:
 	//	- btStatus:input value
 	//	  ex.dwPort=0 btStatus=10001010 means port 0's the 2nd,4th,8th pin with high level
 	//
-	virtual ErrorCodeEnum ReadPort(DWORD dwPort,BYTE &btStatus) = 0;
+	virtual ErrorCodeEnum ReadPort(DWORD dwPort,BYTE &btStatus) { return Error_NotImpl; }
+
+	/// <summary>
+	/// 打开指定模块的提示灯
+	/// </summary>
+	/// <param name="dwReq">
+	/// 硬件灯模块序号,见上方定义GPIO_DEV_SN_*,或参考规格说明文档,只会传送模式为”驱动“的序号之一
+	/// 只会设置灯,如果是其他值则返回 Error_NotSupport
+	/// </param>
+	/// <param name="dwMode">
+	/// 入参,指定灯的属性如常亮还是闪烁,是普通灯颜色还是故障灯颜色
+	/// 不同属性可以通过与的方式合并传入,如灯颜色和亮灯模式,同一属性只会传入其中一个值,比如灯常亮和闪烁只会传入其中之一
+	/// 具体值表示的内容参考上方定义的内容 GPIO_DEV_LIGHT_MODE_*
+	/// </param>
+	/// <returns>
+	///  参数有误或设置失败返回对应的报错
+	/// </returns>
+	virtual ErrorCodeEnum SetStatus(DWORD dwReq, DWORD dwMode) { return Error_NotImpl; }
+
+	/// <summary>
+	/// 获取探测器的状态
+	/// </summary>
+	/// <param name="dwReq">
+	/// 感应模块序号,见上方定义GPIO_DEV_SN_*,或参考规格说明文档,只会传送模式为”接收“的序号
+	/// 这个可能是与的关系,即有可能会一个调用同时获取多个模块的状态
+	/// </param>
+	/// <param name="dwMode">
+	/// 对应模块(有震动、开门、摘机、有人靠近)对应的位,如果是高电平置为1,如果低电平则置为0
+	/// </param>
+	/// <returns>
+	/// 无法获取状态则返回报错
+	/// </returns>
+	virtual ErrorCodeEnum DetectStatus(DWORD dwReq, DWORD& dwMode) { return Error_NotImpl; }
+
 };
 #endif //__GPIO_CLASS_H

+ 36 - 36
DevAdapter/include/HSPScannerClass.h

@@ -16,20 +16,20 @@
 enum ParamType
 {
 	/**Color model.*/
-	/**设置色彩*/
+	/**璁剧疆鑹插僵*/
 	HSPS_MODEL_COLOR,
 
 	/**Video rotate model.*/
-	/**设置拍摄角度,不带持续旋转的意义*/
+	/**璁剧疆鎷嶆憚瑙掑害锛屼笉甯︽寔缁�棆杞�殑鎰忎箟*/
 	HSPS_MODEL_ROTATE,
 
 	/**Scan type.*/
-	/**设置扫描图片尺寸*/
+	/**璁剧疆鎵�弿鍥剧墖灏哄�*/
 	HSPS_MODEL_SCANSIZE, 
 
 
 	/**Preview dialog view type.*/
-	/**设置预览窗口显示与否和显示的位置,预览活动窗口尺寸为16:9,*/
+	/**璁剧疆棰勮�绐楀彛鏄剧ず涓庡惁鍜屾樉绀虹殑浣嶇疆锛岄�瑙堟椿鍔ㄧ獥鍙e昂瀵镐负16:9锛�*/
 	HSPS_MODEL_VIEW
 
 };
@@ -41,35 +41,35 @@ enum ParamTypeValue
 	HSPS_BOOLVAL_TRUE,
 
 	/**for/set color model.*/
-	HSPS_COLOR_FULL,		// 彩色模式 default mod. 
-	HSPS_COLOR_GREY,		// 灰度模式 gray mode.	
+	HSPS_COLOR_FULL,		// 褰╄壊妯″紡 default mod. 
+	HSPS_COLOR_GREY,		// 鐏板害妯″紡 gray mode.	
 
 	/**for/set video rotate model.*/
-	HSPS_ROTATE_NOANGLE,	// 物理环境的上方为预览窗口的上方 Positive direction.
-	HSPS_ROTATE_LEFT,		// 物理环境的左侧为预览窗口的上方
-	HSPS_ROTATE_MIRROR,		// 物理环境的下方为预览窗口的上方 Opposite/Nagative direction.
-	HSPS_ROTATE_RIGHT,		// 物理环境的右侧为预览窗口的上方
+	HSPS_ROTATE_NOANGLE,	// 鐗╃悊鐜��鐨勪笂鏂逛负棰勮�绐楀彛鐨勪笂鏂� Positive direction.
+	HSPS_ROTATE_LEFT,		// 鐗╃悊鐜��鐨勫乏渚т负棰勮�绐楀彛鐨勪笂鏂�
+	HSPS_ROTATE_MIRROR,		// 鐗╃悊鐜��鐨勪笅鏂逛负棰勮�绐楀彛鐨勪笂鏂� Opposite/Nagative direction.
+	HSPS_ROTATE_RIGHT,		// 鐗╃悊鐜��鐨勫彸渚т负棰勮�绐楀彛鐨勪笂鏂�
 
 	/**for/set scan size.*/
-	HSPS_SCAN_FULL,			// 全画幅扫描
-	HSPS_SCAN_A4,			// A4尺寸扫描
-	HSPS_SCAN_IDCARD,		// 身份证尺寸扫描 
+	HSPS_SCAN_FULL,			// 鍏ㄧ敾骞呮壂鎻�
+	HSPS_SCAN_A4,			// A4灏哄�鎵�弿
+	HSPS_SCAN_IDCARD,		// 韬�唤璇佸昂瀵告壂鎻� 
 
 
 	
 
 	/**for/set dialog view type.*/
-	//宽的长度在第一次执行SetViewPos前使用 DEFAULT_DIALOG_WIDTH 的值,否则使用上一次执行SetViewPos成功时传送的值
-	HSPS_VIEW_HIDE,			// 隐藏预览窗口
-	HSPS_VIEW_SHOW,			// 显示预览窗口
+	//瀹界殑闀垮害鍦ㄧ�涓€娆℃墽琛孲etViewPos鍓嶄娇鐢� DEFAULT_DIALOG_WIDTH 鐨勫€硷紝鍚﹀垯浣跨敤涓婁竴娆℃墽琛孲etViewPos鎴愬姛鏃朵紶閫佺殑鍊�
+	HSPS_VIEW_HIDE,			// 闅愯棌棰勮�绐楀彛
+	HSPS_VIEW_SHOW,			// 鏄剧ず棰勮�绐楀彛
 
-	//  更新20161117:取消 HSPS_MODEL_VIEW 部分参数设置
+	//  鏇存柊20161117锛氬彇娑� HSPS_MODEL_VIEW 閮ㄥ垎鍙傛暟璁剧疆
 
-	//HSPS_VIEW_FULL,			// 副屏幕进行全屏显示
-	//HSPS_VIEW_CENTER,		// 中间显示
-	//HSPS_VIEW_LEFTTOP,		// 左上角显示
-	//HSPS_VIEW_RIGHTBOTTOM,	// 右下角显示
-	//HSPS_VIEW_CUSTOM		// 恢复上一次调用SetViewPos时显示的位置
+	//HSPS_VIEW_FULL,			// 鍓�睆骞曡繘琛屽叏灞忔樉绀�
+	//HSPS_VIEW_CENTER,		// 涓�棿鏄剧ず
+	//HSPS_VIEW_LEFTTOP,		// 宸︿笂瑙掓樉绀�
+	//HSPS_VIEW_RIGHTBOTTOM,	// 鍙充笅瑙掓樉绀�
+	//HSPS_VIEW_CUSTOM		// 鎭㈠�涓婁竴娆¤皟鐢⊿etViewPos鏃舵樉绀虹殑浣嶇疆
 };
 
 
@@ -78,18 +78,18 @@ struct HspsDevStatus
 {
 	//Indicate devic is connected or not.
 	//which 1 means connected and 0 means disconnected, others is undefined.
-	//高拍仪连接状态:1 表示已连接,0 表示未连接
+	//楂樻媿浠�繛鎺ョ姸鎬侊細1 琛ㄧず宸茶繛鎺ワ紝0 琛ㄧず鏈�繛鎺�
 	short isConnected;
 
 	//Indicate device is previewing or not. 
 	//which 1 means inPreview and 0 means outPreview, others is undefined.
-	//窗口预览状态:1 表示处于预览状态,0 表示预览关闭状态
+	//绐楀彛棰勮�鐘舵€侊細1 琛ㄧず澶勪簬棰勮�鐘舵€侊紝0 琛ㄧず棰勮�鍏抽棴鐘舵€�
 	short inPreview;
 
 	//Indicate the dlg is showing or not.
 	//which !0 means show and 0 means hide status.
-	//窗口显示状态:1 表示窗口处于显示状态,0表示窗口处于隐藏状态
-	//窗口处于显示状态时,必须能处于预览的状态 --这句无效!!!!
+	//绐楀彛鏄剧ず鐘舵€侊細1 琛ㄧず绐楀彛澶勪簬鏄剧ず鐘舵€侊紝0琛ㄧず绐楀彛澶勪簬闅愯棌鐘舵€�
+	//绐楀彛澶勪簬鏄剧ず鐘舵€佹椂锛屽繀椤昏兘澶勪簬棰勮�鐨勭姸鎬� --杩欏彞鏃犳晥锛侊紒锛侊紒
 	short inShow;
 };
 
@@ -100,7 +100,7 @@ public:
 	//
 	//	Device initialization.
 	//	Connect to High speed portable scanner.
-	//	更新20161117:只做设备连接操作,不显示窗口
+	//	鏇存柊20161117锛氬彧鍋氳�澶囪繛鎺ユ搷浣滐紝涓嶆樉绀虹獥鍙�
 	//
 	virtual ErrorCodeEnum DevOpen() = 0;
 
@@ -115,8 +115,8 @@ public:
 	//	If the device' state had been setted before what the nValue commanded, ignore it and
 	//		return Error_Succeed.
 	//	The function returns only the specified behavior is done completely, StartPreview in special.
-	//  更新20161117: nValue值为 1 时打开预览,确保当前打开预览过程执行结束且窗口处于显示状态才返回Error_Succeed,
-	//	nValue值为 0 时关闭预览并隐藏窗口
+	//  鏇存柊20161117锛� nValue鍊间负 1 鏃舵墦寮€棰勮�锛岀‘淇濆綋鍓嶆墦寮€棰勮�杩囩▼鎵ц�缁撴潫涓旂獥鍙e�浜庢樉绀虹姸鎬佹墠杩斿洖Error_Succeed,
+	//	nValue鍊间负 0 鏃跺叧闂��瑙堝苟闅愯棌绐楀彛
 	//		
 	//
 	virtual ErrorCodeEnum SetPreview(short nValue) = 0;
@@ -125,22 +125,22 @@ public:
 	//	Scan Image from device and store the image.
 	//	-pszFileName[in] Store the path and name using suffix ".jpg"
 	//		specifies that where the image will be located and what it would be named.
-	//	拍摄照片,传入的文件名已带绝对路径,无需再进行拼接处理
+	//	鎷嶆憚鐓х墖锛屼紶鍏ョ殑鏂囦欢鍚嶅凡甯︾粷瀵硅矾寰勶紝鏃犻渶鍐嶈繘琛屾嫾鎺ュ�鐞�
 	//
 	virtual ErrorCodeEnum ScanImage(const char* pszFileName) = 0;
 
 	//
 	//	Scan Image from device and return the image data in byte format.
 	//	-pBtImg[out] The buffer used to store the scanned image data.
-	//		存储图片字节流的缓冲区,大小为 nBtLen 字节
+	//		瀛樺偍鍥剧墖瀛楄妭娴佺殑缂撳啿鍖猴紝澶у皬涓� nBtLen 瀛楄妭
 	//	-nBtLen[in,out] Indicate the max byte-type size of pBtImg could be stored 
 	//		and Store the real byte-type size of pBtImg had used when returned.
 	//		when detect value of nBtLen is 0 or smaller that necessary size, please
 	//		set nBtlen with real byte-type size and return Error_TooSmallBuffer.
-	//		如果nBtLen指定的字节数过小,那么对nBtLen赋值实际所需的大小并返回 Error_TooSmallBuffer,此操作仅允许一次
+	//		濡傛灉nBtLen鎸囧畾鐨勫瓧鑺傛暟杩囧皬锛岄偅涔堝�nBtLen璧嬪€煎疄闄呮墍闇€鐨勫ぇ灏忓苟杩斿洖 Error_TooSmallBuffer锛屾�鎿嶄綔浠呭厑璁镐竴娆�
 	//	-pszFileName[in] Store the path and name where the image file should be located
 	//		while "" indicates that the image file shouldn't be stored at locate.
-	//		文件名长度为零表示不在本地生成图片文件
+	//		鏂囦欢鍚嶉暱搴︿负闆惰〃绀轰笉鍦ㄦ湰鍦扮敓鎴愬浘鐗囨枃浠�
 	//  
 	//
 	virtual ErrorCodeEnum ScanImageEx(BYTE* pBtImg,  int& nBtLen, const char* pszFileName = "") = 0;
@@ -150,14 +150,14 @@ public:
 	//	-nX[in] The X coordinate of leftTop point.
 	//  -nY[in] The Y coordinate of leftTop point.
 	//	-nWidth[in] The Width of Preview Dialog .
-	//	传入预览窗口显示的坐标,左上角的横坐标nX,左上角的纵坐标nY,以及预览窗口的宽,宽与高的比例为 16:9
+	//	浼犲叆棰勮�绐楀彛鏄剧ず鐨勫潗鏍囷紝宸︿笂瑙掔殑妯�潗鏍噉X锛屽乏涓婅�鐨勭旱鍧愭爣nY锛屼互鍙婇�瑙堢獥鍙g殑瀹斤紝瀹戒笌楂樼殑姣斾緥涓� 16:9
 	//
 	virtual ErrorCodeEnum SetViewPos(int nX, int nY, int nWidth) = 0;
 
 	//
 	//	Show property dialog of HSPS of LiangTian.
-	//	If there is no property dialog function, ignore it and return Error_NotImpl(更新20161117).
-	//  更新20161117:用于打开良田高拍仪设备的设置属性页,可能用不到
+	//	If there is no property dialog function, ignore it and return Error_NotImpl(鏇存柊20161117).
+	//  鏇存柊20161117锛氱敤浜庢墦寮€鑹�敯楂樻媿浠��澶囩殑璁剧疆灞炴€ч〉锛屽彲鑳界敤涓嶅埌
 	//
 	virtual ErrorCodeEnum SetProperty() = 0;
 

+ 59 - 59
DevAdapter/include/IDCerClass.h

@@ -15,8 +15,8 @@ const int MAX_IDCER_SIMPLE_INFO_SIZE = 32;
 const int MAX_IDCER_INFO_SIZE = 128;
 const int MAX_IDCER_PHOTO_PATH = 260;
 
-//二代身份证信息结构(需要支持外国人永久居留证请使用IDCerInfoEx)
-//请务必按照各字段指定格式返回数据
+//浜屼唬韬�唤璇佷俊鎭�粨鏋勶紙闇€瑕佹敮鎸佸�鍥戒汉姘镐箙灞呯暀璇佽�浣跨敤IDCerInfoEx锛�
+//璇峰姟蹇呮寜鐓у悇瀛楁�鎸囧畾鏍煎紡杩斿洖鏁版嵁
 struct IDCerInfo
 {
 	struct Name{
@@ -28,7 +28,7 @@ struct IDCerInfo
 	struct Nation{
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;}nation;
-	struct Birthday{//format:1986年10月07日
+	struct Birthday{//format:1986骞�10鏈�07鏃�
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;}birthday;
 	struct Address{
@@ -54,47 +54,47 @@ struct IDCerInfo
 		DWORD dwSize;}photoPath;
 };
 
-//二代证信息结构(支持外国人永久居留证)
-//请务必按照各字段指定格式返回数据
+//浜屼唬璇佷俊鎭�粨鏋勶紙鏀�寔澶栧浗浜烘案涔呭眳鐣欒瘉锛�
+//璇峰姟蹇呮寜鐓у悇瀛楁�鎸囧畾鏍煎紡杩斿洖鏁版嵁
 struct IDCerInfoEx
 {
-	struct Name{//中文姓名
+	struct Name{//涓�枃濮撳悕
 		CHAR data[MAX_IDCER_INFO_SIZE];
 		DWORD dwSize;
 	}name;
-	struct Sex{//性别
+	struct Sex{//鎬у埆
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}sex;
-	struct Nation{//民族(二代证专用)
+	struct Nation{//姘戞棌锛堜簩浠h瘉涓撶敤锛�
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}nation;
-	struct Birthday{//出生日期,格式:1986年10月07日
+	struct Birthday{//鍑虹敓鏃ユ湡锛屾牸寮�:1986骞�10鏈�07鏃�
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}birthday;
-	struct Address{//住址(二代证专用)
+	struct Address{//浣忓潃锛堜簩浠h瘉涓撶敤锛�
 		CHAR data[MAX_IDCER_INFO_SIZE];
 		DWORD dwSize;
 	}address;
-	struct Idno{//证件号码,二代证指身份证号,外国人指永久居留证号
+	struct Idno{//璇佷欢鍙风爜锛屼簩浠h瘉鎸囪韩浠借瘉鍙凤紝澶栧浗浜烘寚姘镐箙灞呯暀璇佸彿
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}idno;
-	struct Department{//二代证指签发机关,外国人指当次申请受理机关代码
+	struct Department{//浜屼唬璇佹寚绛惧彂鏈哄叧锛屽�鍥戒汉鎸囧綋娆$敵璇峰彈鐞嗘満鍏充唬鐮�
 		CHAR data[MAX_IDCER_INFO_SIZE];
 		DWORD dwSize;
 	}department;
-	struct StartDate{//有效期起始日(签发日)格式:2010.08.09
+	struct StartDate{//鏈夋晥鏈熻捣濮嬫棩锛堢�鍙戞棩锛夋牸寮�:2010.08.09
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}startDate;
-	struct EndDate{	//有效期截止日(终止日)格式:2020.08.09
+	struct EndDate{	//鏈夋晥鏈熸埅姝㈡棩锛堢粓姝㈡棩锛夋牸寮�:2020.08.09
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}endDate;
-	struct NewAddress{//最新地址,二代证专用
+	struct NewAddress{//鏈€鏂板湴鍧€锛屼簩浠h瘉涓撶敤
 		CHAR data[MAX_IDCER_INFO_SIZE];
 		DWORD dwSize;
 	}newAddress;
@@ -102,47 +102,47 @@ struct IDCerInfoEx
 		CHAR data[MAX_IDCER_PHOTO_PATH];
 		DWORD dwSize;
 	}photoPath;
-	struct EnglishName{//英文姓名,外国人专用
+	struct EnglishName{//鑻辨枃濮撳悕锛屽�鍥戒汉涓撶敤
 		CHAR data[MAX_IDCER_INFO_SIZE];
 		DWORD dwSize;
 	}englishName;
-	struct Nationality{//国籍或地区代码,外国人专用
+	struct Nationality{//鍥界睄鎴栧湴鍖轰唬鐮侊紝澶栧浗浜轰笓鐢�
 		CHAR data[IDCER_EIGHT_BYTE_SIZE];
 		DWORD dwSize;
 	}nationality;
-	struct IdVersion{//证件版本号,外国人专用
+	struct IdVersion{//璇佷欢鐗堟湰鍙凤紝澶栧浗浜轰笓鐢�
 		CHAR data[IDCER_EIGHT_BYTE_SIZE];
 		DWORD dwSize;
 	}idVersion;
-	struct IdType{//证件类型标识,外国人取值'I',二代证为空
+	struct IdType{//璇佷欢绫诲瀷鏍囪瘑锛屽�鍥戒汉鍙栧€�'I'锛屼簩浠h瘉涓虹┖
 		CHAR data[IDCER_EIGHT_BYTE_SIZE];
 		DWORD dwSize;
 	}idType;
-	struct Reserved{//保留字段,外国人专用
+	struct Reserved{//淇濈暀瀛楁�锛屽�鍥戒汉涓撶敤
 		CHAR data[IDCER_EIGHT_BYTE_SIZE];
 		DWORD dwSize;
 	}reserved;
-	struct TXZCode{//通行证号码(港澳台居住证)
+	struct TXZCode{//閫氳�璇佸彿鐮侊紙娓�境鍙板眳浣忚瘉锛�
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}txzCode;
-	struct IssuedSN{//签发次数(港澳台居住证)
+	struct IssuedSN{//绛惧彂娆℃暟锛堟腐婢冲彴灞呬綇璇侊級
 		CHAR data[IDCER_EIGHT_BYTE_SIZE];
 		DWORD dwSize;
 	}issuedSN;
-	struct Reserved2{//备用2(港澳台居住证)
+	struct Reserved2{//澶囩敤2锛堟腐婢冲彴灞呬綇璇侊級
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}reserved2;
-	struct Reserved3{//备用3(港澳台居住证)
+	struct Reserved3{//澶囩敤3锛堟腐婢冲彴灞呬綇璇侊級
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}reserved3;
-	struct Reserved4{//备用4(港澳台居住证)
+	struct Reserved4{//澶囩敤4锛堟腐婢冲彴灞呬綇璇侊級
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}reserved4;
-	struct Reserved5{//备用5(港澳台居住证)
+	struct Reserved5{//澶囩敤5锛堟腐婢冲彴灞呬綇璇侊級
 		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
 		DWORD dwSize;
 	}reserved5;				
@@ -150,43 +150,43 @@ struct IDCerInfoEx
 
  struct IDCerInfoEx2
  {
- 	struct Name {//中文姓名
+ 	struct Name {//涓�枃濮撳悕
  		CHAR data[MAX_IDCER_INFO_SIZE];
  		DWORD dwSize;
  	}name;
- 	struct Sex {//性别
+ 	struct Sex {//鎬у埆
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}sex;
- 	struct Nation {//民族(二代证专用)
+ 	struct Nation {//姘戞棌锛堜簩浠h瘉涓撶敤锛�
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}nation;
- 	struct Birthday {//出生日期,原始格式:19861007
+ 	struct Birthday {//鍑虹敓鏃ユ湡锛屽師濮嬫牸寮�:19861007
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}birthday;
- 	struct Address {//住址(二代证专用)
+ 	struct Address {//浣忓潃锛堜簩浠h瘉涓撶敤锛�
  		CHAR data[MAX_IDCER_INFO_SIZE];
  		DWORD dwSize;
  	}address;
- 	struct Idno {//证件号码,二代证指身份证号,外国人指永久居留证号
- 		CHAR data[2 * MAX_IDCER_SIMPLE_INFO_SIZE]; //拓展至64字节
+ 	struct Idno {//璇佷欢鍙风爜锛屼簩浠h瘉鎸囪韩浠借瘉鍙凤紝澶栧浗浜烘寚姘镐箙灞呯暀璇佸彿
+ 		CHAR data[2 * MAX_IDCER_SIMPLE_INFO_SIZE]; //鎷撳睍鑷�64瀛楄妭
  		DWORD dwSize;
  	}idno;
- 	struct Department {//二代证指签发机关,外国人指当次申请受理机关代码
+ 	struct Department {//浜屼唬璇佹寚绛惧彂鏈哄叧锛屽�鍥戒汉鎸囧綋娆$敵璇峰彈鐞嗘満鍏充唬鐮�
  		CHAR data[MAX_IDCER_INFO_SIZE];
  		DWORD dwSize;
  	}department;
- 	struct StartDate {//有效期起始日(签发日)原始格式:20200809
+ 	struct StartDate {//鏈夋晥鏈熻捣濮嬫棩锛堢�鍙戞棩锛夊師濮嬫牸寮忥細20200809
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}startDate;
- 	struct EndDate {//有效期截止日(终止日)原始格式:20200809
+ 	struct EndDate {//鏈夋晥鏈熸埅姝㈡棩锛堢粓姝㈡棩锛夊師濮嬫牸寮忥細20200809
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}endDate;
- 	struct NewAddress {//最新地址,二代证专用
+ 	struct NewAddress {//鏈€鏂板湴鍧€锛屼簩浠h瘉涓撶敤
  		CHAR data[MAX_IDCER_INFO_SIZE];
  		DWORD dwSize;
  	}newAddress;
@@ -194,47 +194,47 @@ struct IDCerInfoEx
  		CHAR data[MAX_IDCER_PHOTO_PATH];
  		DWORD dwSize;
  	}photoPath;
- 	struct EnglishName {//英文姓名,外国人专用
+ 	struct EnglishName {//鑻辨枃濮撳悕锛屽�鍥戒汉涓撶敤
  		CHAR data[MAX_IDCER_INFO_SIZE];
  		DWORD dwSize;
  	}englishName;
- 	struct Nationality {//国籍或地区代码,外国人专用
+ 	struct Nationality {//鍥界睄鎴栧湴鍖轰唬鐮侊紝澶栧浗浜轰笓鐢�
  		CHAR data[IDCER_EIGHT_BYTE_SIZE];
  		DWORD dwSize;
  	}nationality;
- 	struct IdVersion {//证件版本号,外国人专用
+ 	struct IdVersion {//璇佷欢鐗堟湰鍙凤紝澶栧浗浜轰笓鐢�
  		CHAR data[IDCER_EIGHT_BYTE_SIZE];
  		DWORD dwSize;
  	}idVersion;
- 	struct IdType {//证件类型标识,外国人取值'I',二代证为空
+ 	struct IdType {//璇佷欢绫诲瀷鏍囪瘑锛屽�鍥戒汉鍙栧€�'I'锛屼簩浠h瘉涓虹┖
  		CHAR data[IDCER_EIGHT_BYTE_SIZE];
  		DWORD dwSize;
  	}idType;
- 	struct Reserved {//保留字段,外国人专用
+ 	struct Reserved {//淇濈暀瀛楁�锛屽�鍥戒汉涓撶敤
  		CHAR data[IDCER_EIGHT_BYTE_SIZE];
  		DWORD dwSize;
  	}reserved;
- 	struct TXZCode {//通行证号码(港澳台居住证)
+ 	struct TXZCode {//閫氳�璇佸彿鐮侊紙娓�境鍙板眳浣忚瘉锛�
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}txzCode;
- 	struct IssuedSN {//签发次数(港澳台居住证)
+ 	struct IssuedSN {//绛惧彂娆℃暟锛堟腐婢冲彴灞呬綇璇侊級
  		CHAR data[IDCER_EIGHT_BYTE_SIZE];
  		DWORD dwSize;
  	}issuedSN;
- 	struct Reserved2 {//备用2(港澳台居住证)
+ 	struct Reserved2 {//澶囩敤2锛堟腐婢冲彴灞呬綇璇侊級
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}reserved2;
- 	struct Reserved3 {//备用3(港澳台居住证)
+ 	struct Reserved3 {//澶囩敤3锛堟腐婢冲彴灞呬綇璇侊級
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}reserved3;
- 	struct Reserved4 {//备用4(港澳台居住证)
+ 	struct Reserved4 {//澶囩敤4锛堟腐婢冲彴灞呬綇璇侊級
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}reserved4;
- 	struct Reserved5 {//备用5(港澳台居住证)
+ 	struct Reserved5 {//澶囩敤5锛堟腐婢冲彴灞呬綇璇侊級
  		CHAR data[MAX_IDCER_SIMPLE_INFO_SIZE];
  		DWORD dwSize;
  	}reserved5;
@@ -253,7 +253,7 @@ public:
 	//	Open or close RF. 
 	//	Arguments:
 	//	- bControl:true:open RF,false close RF
-	//	-	对于吸入式,为true接收身份证插入,为false时弹出身份证并关闭接收身份证插入
+	//	-	瀵逛簬鍚稿叆寮忥紝涓簍rue鎺ユ敹韬�唤璇佹彃鍏ワ紝涓篺alse鏃跺脊鍑鸿韩浠借瘉骞跺叧闂�帴鏀惰韩浠借瘉鎻掑叆
 	//
 	virtual ErrorCodeEnum IDCerRFControl(bool bControl) = 0;
 	//
@@ -261,30 +261,30 @@ public:
 	//	Certificate authentication.
 	//
 	virtual ErrorCodeEnum IDCerAuthenticate() = 0;
-	//  即将废弃,请使用IDCerGetDataEx
+	//  鍗冲皢搴熷純锛岃�浣跨敤IDCerGetDataEx
 	//	Get Identity Card info.
 	//
 	virtual ErrorCodeEnum IDCerGetData(IDCerInfo &idCerInfo) { return Error_NotImpl; }
-	//  获取证件信息,包括二代身份证、外国人永久居留证
+	//  鑾峰彇璇佷欢淇℃伅锛屽寘鎷�簩浠h韩浠借瘉銆佸�鍥戒汉姘镐箙灞呯暀璇�
 	//	Get Identity Card info.
 	//
 	virtual ErrorCodeEnum IDCerGetDataEx(IDCerInfoEx &idCerInfoEx){return Error_NotImpl;}
-	//	强制弹出身份证等证件
-	//	Force ID Card to eject
+	//	寮哄埗寮瑰嚭韬�唤璇佺瓑璇佷欢
+	//	Force ID Card to eject銆�
 	//
 	virtual ErrorCodeEnum ForceIDEject(){return Error_NotImpl;}
-	//	扫描证件并保留扫描文件到默认路径(dep目录下),证件正面使用“idfront.bmp”,证件反面使用“idback.bmp”
-	//	Scan ID Card and save the image to the position(dep/),using default name "idfront.bmp" and "idback.bmp"
+	//	鎵�弿璇佷欢骞朵繚鐣欐壂鎻忔枃浠跺埌榛樿�璺�緞锛坉ep鐩�綍涓嬶級锛岃瘉浠舵�闈�娇鐢ㄢ€渋dfront.bmp鈥�,璇佷欢鍙嶉潰浣跨敤鈥渋dback.bmp鈥�
+	//	Scan ID Card and save the image to the position(dep/),using default name "idfront.bmp" and "idback.bmp"銆�
 	//
 	virtual ErrorCodeEnum ScanIDAndSaveImage(){return Error_NotImpl;}
-	//	获取卡片是否插入或者取走
-	//	Query if ID Card have been inserted or fetched
+	//	鑾峰彇鍗$墖鏄�惁鎻掑叆鎴栬€呭彇璧�
+	//	Query if ID Card have been inserted or fetched銆�
 	//	pos:
-	//		-- 0,未检测到任何证件;1,证件在读卡器内部;2,证件在进卡口
+	//		-- 0锛屾湭妫€娴嬪埌浠讳綍璇佷欢锛�1锛岃瘉浠跺湪璇诲崱鍣ㄥ唴閮�紱2锛岃瘉浠跺湪杩涘崱鍙�
 	//
 	virtual ErrorCodeEnum QueryCardPos(int &pos){return Error_NotImpl;}
 
-	//该接口传回身份证原始UCS2编码文字信息,厂商不必进行编码转换
+	//璇ユ帴鍙d紶鍥炶韩浠借瘉鍘熷�UCS2缂栫爜鏂囧瓧淇℃伅锛屽巶鍟嗕笉蹇呰繘琛岀紪鐮佽浆鎹�
 	virtual ErrorCodeEnum IDCerGetDataEx2(IDCerInfoEx2& idCerInfoEx2) { return Error_NotImpl; }   
 };
 

+ 21 - 10
DevAdapter/include/PinPadClass.h

@@ -47,6 +47,12 @@ struct MasterKeyParam
 	DWORD dwSN;	//master key serial number:0,1,2,...
 	BYTE key[MAX_MASTER_KEY_SIZE];	//key value
 };
+struct MasterKeyParamEx
+{
+	int smFlag;	//0:3des,1:sm,11: 本结构体的字段key为设备临时公钥加密的主密钥密文(国密)
+	DWORD dwSN;	//master key serial number:0,1,2,...
+	BYTE key[MAX_EN_DECRYPT_DATA_SIZE];	//(plain or encrypted)key value
+};
 struct WorkKeyParam
 {
 	int smFlag;	//0:3des,1:sm
@@ -81,6 +87,9 @@ enum SetParamTypeEnum
 //parameter value to set device
 enum SetParamValueEnum
 {
+
+
+
 	////values for EPP_PT_SET_ENCRYPT_METHOD
 	EPP_ALGO_METHOD_DES,
 	EPP_ALGO_METHOD_3DES,
@@ -93,7 +102,7 @@ enum SetParamValueEnum
 	//values for EPP_PT_SET_PIN_ALGORITH
 	EPP_PIN_ALGO_ISO9564_1_ANSI,//ANSIx9.8
 	EPP_PIN_ALGO_IBM3624,
-
+	
 	//values for EPP_PT_SET_ECB_CBC_MODE
 	//设置加密方式,这里仅为了兼容,保留,设置ECB/CBC请使用	EPP_ALGO_MODE_ECB,	EPP_ALGO_MODE_CBC,
 	EPP_ALGO_MODE_DEC_ECB,
@@ -106,28 +115,25 @@ enum SetParamValueEnum
 	EPP_ALGO_MODE_ECB,
 	EPP_ALGO_MODE_CBC,
 };
-
 class PinPadClass : public DeviceBaseClass
 {
-
 public:
-
 	//
 	//	Open device.
 	//	Arguments:
 	//	- dwPort[in]		com port number
 	//	- dwBaudRate[in]	Baud rate
 	//
-	virtual ErrorCodeEnum DevOpen(DWORD dwPort, DWORD dwBaudRate) = 0;
+	virtual ErrorCodeEnum DevOpen(DWORD dwPort,DWORD dwBaudRate) = 0;
 
 	//
 	//	Get input key value.
 	//	Monitor pinpad key press,if any key pressed,set [ch] value and return Error_Succeed.
-	//	If none was pressed ,return Error_DevCommFailed.
+	//	If none was pressed ,return Error_DevCommFailed.	 
 	//
 	//	Two input mode:plain text,pin(encrypted)
-	//	1.In any mode,press key "*,#,blank,cancel,clear,confirm",set ch value
-	//		"0x2a,0x23,0x20,0x1b,0x08,0x0d" respectively
+	//	1.In any mode,press key "*,#,blank,cancel,clear,confirm",set ch value 
+	//		"0x2a,0x23,0x20,0x1b,0x08,0x0d" respectively 
 	//	2.In plain text input mode,press key 0~9,.,00,set ch 0x30~0x39,0x2e,0x4f respectively
 	//	3.In pin input mode,press any key of 0~9,set ch 0x3f,else('.','00') set ch 0x3d
 	//	4."clear" means clear all the input
@@ -166,14 +172,14 @@ public:
 	//
 	//	Start key press(pin mode).
 	//	byLen:输入密码长度,键盘检测到用户输入byLen位有效!!长度时自动结束输入,计算pinblock
-	//
+	//	
 	virtual ErrorCodeEnum StartPinInput(BYTE byLen) = 0;
 	//
 	//	Start key press(pin mode).
 	//	byLen:输入密码长度,键盘检测到用户输入确认键后结束输入,计算pinblock
 	//
 	virtual ErrorCodeEnum StartPinInputConfirm(BYTE byLen) = 0;
-
+	
 	//
 	//	Start key press(plain text mode).
 	//
@@ -209,6 +215,11 @@ public:
 	// 	0x1:3des only; 0x2:sm4 only; 0x3:both 3des and sm4
 	//
 	virtual int GetEncryptFunc() = 0;
+	//
+	//	Load master key.
+	//	[key]:byte value in string type. ex. 0x123456FF  --> "123456FF"
+	//
+	virtual ErrorCodeEnum LoadMasterKeyEx(MasterKeyParamEx enMasterKey) {return Error_NotImpl;}	
 };
 
 #endif // __PIN_PAD_CLASS_H

+ 3 - 0
DevAdapter/self/liblog4vendor/CMakeLists.txt

@@ -12,6 +12,7 @@ set(${MODULE_PREFIX}_SRCS
     log4link.cpp
     )
 
+add_definitions(-DLIBLOG4VENDOR_EXPORTS)
 
 rvc_set_win_dll_ver(${MODULE_PREFIX} ${RAW_VERSION_STRING})
 
@@ -44,3 +45,5 @@ if(BUILD_TESTING)
     add_subdirectory(test)
 endif(BUILD_TESTING)
 
+set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "devadapter/")
+

+ 88 - 13
Module/CMakeLists.txt

@@ -1,12 +1,10 @@
 
-#设置实体名称 ${MODULE_NAME},和实体前缀定义 ${MODULE_PREFIX}
 macro(define_module _module_name)
 	set(MODULE_NAME "mod_${_module_name}")
     set(ENTITY_NAME "${_module_name}")
 	string(TOUPPER "${MODULE_NAME}" MODULE_PREFIX)
 endmacro(define_module)
 
-# 使用 libRestfulFunc替换框架的Http组件
 set(REPLACE_HTTPCLIENT_WITH_CPPRESTSDK TRUE)
 
 if(RVC_DEBUG_MODE)
@@ -45,8 +43,6 @@ if(SIMULATE_ON)
     rvc_set_library_output_dir("${RVC_INSTALL_PREFIX}${RVC_MODULE_PATH}")
 endif(SIMULATE_ON)
 
-#对于 Windows 设置实体的版本信息
-#定义共享库输出
 macro(add_module_libraries _module_prefix _module_name _module_version)
     
     string(STRIP ${_module_version} RAW_VERSION_STRING)
@@ -76,6 +72,10 @@ macro(add_module_libraries _module_prefix _module_name _module_version)
         ${CMAKE_CURRENT_BINARY_DIR}/version.rc
         @ONLY)
         set(${_module_prefix}_SRCS ${${_module_prefix}_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
+    else()
+        add_definitions(
+        -DRVC_VERSION_STR="${RVC_VERSION}"
+    )
     endif(WIN32)
 
     set(${_module_name}_TEST_SRCS)
@@ -85,7 +85,6 @@ macro(add_module_libraries _module_prefix _module_name _module_version)
     endif(BUILD_MOUDLE_TEST)
 
     add_library(${_module_name} SHARED ${${_module_prefix}_SRCS} ${${_module_name}_TEST_SRCS})
-        # 设置工程输出路径,这操作在 Linux 才有效,在 Windows 感觉抽风了,死活不行,只能通过全局的方式进行设置
     if(SIMULATE_ON)
         set_target_properties( ${_module_name} PROPERTIES LIBRARY_OUTPUT_PATH "${RVC_INSTALL_PREFIX}${RVC_MODULE_PATH}")
         set_target_properties( ${_module_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${RVC_INSTALL_PREFIX}${RVC_MODULE_PATH}")
@@ -94,9 +93,7 @@ macro(add_module_libraries _module_prefix _module_name _module_version)
         # etc for the other available configuration types (MinSizeRel, RelWithDebInfo)
     endif()
 
-    # 添加导出宏定义
     target_compile_definitions(${_module_name} PUBLIC "${_module_prefix}_EXPORTS")
-    # 需找粤超确认这里加CJSON头文件引用的必要性 --gifur
     target_include_directories(${_module_name} PRIVATE ${MODULE_BASE_INCLUDES} ${THIRD_PARTY_BASE_DIR}/Include/CJson ${OTHER_LIB_BASE_DIR}/libpublicFun)
     if(BUILD_MOUDLE_TEST)
         target_compile_definitions(${_module_name} PRIVATE "WITH_BUILD_MODULE_TEST")
@@ -107,7 +104,7 @@ macro(add_module_libraries _module_prefix _module_name _module_version)
         target_compile_definitions(${_module_name} PRIVATE "WITH_CPPRESTSDK")
 	    target_include_directories(${_module_name} PRIVATE 
             ${CONAN_INCLUDE_DIRS_JSONCPP}
-            ${RVC_OTHER_DEPENDENIES_DIR}/libRestfulFunc)
+            ${OTHER_LIB_BASE_DIR}/libRestfulFunc)
         target_link_directories(${MODULE_NAME} PRIVATE
         	${CONAN_LIB_DIRS_JSONCPP}
         )
@@ -124,8 +121,6 @@ macro(add_module_libraries _module_prefix _module_name _module_version)
 
 endmacro(add_module_libraries)
 
-# 设置实体的安装拷贝路径
-# 对于 Windows 设置实体项目工程在解决方案的节点
 macro(deploy_module _module_prefix _module_name)
 
     if(MSVC)
@@ -150,7 +145,7 @@ macro(deploy_module _module_prefix _module_name)
 endmacro(deploy_module)
 
 if(BUILD_TESTING)
-	add_subdirectory(include/test)
+	#add_subdirectory(include/test)
 endif()
 
 if(BUILD_MOUDLE_TEST)
@@ -162,10 +157,15 @@ if(MSVC)
     conan_cmake_run(REQUIRES Misc/2020.1202.1@LR04.02_ModuleDep/Windows
     BASIC_SETUP CMAKE_TARGETS)
     set(MODULE_CONAN_DEP_LIBS ${CONAN_BIN_DIRS_MISC})
+    set(MODULE_PLAFORM_SUBDIR win)
+else(MSVC)
+    set(MODULE_PLAFORM_SUBDIR unix)
 endif(MSVC)
 
-# 遍历实体
 # rvc_add_all_cmake_subdirectory()
+
+if(MSVC)
+
 add_subdirectory(mod_validityVertifier)
 add_subdirectory(mod_CardReadAdapter)
 add_subdirectory(mod_cardissuer)
@@ -176,16 +176,20 @@ add_subdirectory(mod_CustMngrAuth)
 add_subdirectory(mod_FingerPrint)
 add_subdirectory(mod_customeraware)
 add_subdirectory(mod_localmediaplay)
+#zhaohu
 add_subdirectory(mod_interactivecontrol)
+#zhaohu
 add_subdirectory(mod_assistantchannel)
 add_subdirectory(mod_UpgradeMgr)
 add_subdirectory(mod_upload)
 add_subdirectory(mod_healthmanager)
 add_subdirectory(mod_accessauth)
+#will be offline in future cly said
 add_subdirectory(mod_guiconsole)
 add_subdirectory(mod_CenterSetting)
 add_subdirectory(mod_tokenmgr)
 add_subdirectory(mod_evtconverter)
+#zhaohu
 add_subdirectory(mod_interactivelog)
 add_subdirectory(mod_chromium)
 
@@ -194,32 +198,103 @@ add_subdirectory(mod_HSPScanner)
 add_subdirectory(mod_ContactlessCard)
 add_subdirectory(mod_gpio)
 add_subdirectory(mod_DeviceControl)
+#zhaohu
 add_subdirectory(mod_facetracking)
+#zhaohu
 add_subdirectory(mod_initiativetransfer)
+#zhaohu
 add_subdirectory(mod_interactioncontext)
 add_subdirectory(mod_agentip)
+#zhaohu
 add_subdirectory(mod_counterconnector)
 add_subdirectory(mod_countercontext)
+#zhaohu
 add_subdirectory(mod_mediacontroller)
+#zhaohu
 add_subdirectory(mod_recorder)
 add_subdirectory(mod_snapshot)
+#zhaohu
 add_subdirectory(mod_screenshot)
 add_subdirectory(mod_selfchecker)
 add_subdirectory(mod_heartbeat)
 add_subdirectory(mod_alarm)
+#feiqi
 add_subdirectory(mod_RomoteController)
 add_subdirectory(mod_ResourceWatcher)
+#zhaohu
 add_subdirectory(mod_livenessdetection)
 add_subdirectory(mod_vtmloader)
 
 #below should be compiled succesufully.
+#unknown
 add_subdirectory(mod_SalesRecorder)
+#zhaohu
 add_subdirectory(mod_sipphone)
 
+#pad remove
+add_subdirectory(mod_cardswiper)
+add_subdirectory(mod_PortableScanner)
+
+add_subdirectory(mod_cardissuerstore)
+
+else()
+
+add_subdirectory(mod_validityVertifier)
+add_subdirectory(mod_CardReadAdapter)
+add_subdirectory(mod_cardissuer)
+add_subdirectory(mod_CardIssuerStand)
+add_subdirectory(mod_pinpad)
+add_subdirectory(mod_IDCertificate)
+add_subdirectory(mod_CustMngrAuth)
+add_subdirectory(mod_FingerPrint)
+add_subdirectory(mod_customeraware)
+add_subdirectory(mod_localmediaplay)
+add_subdirectory(mod_interactivecontrol)
+add_subdirectory(mod_assistantchannel)
+add_subdirectory(mod_UpgradeMgr)
+add_subdirectory(mod_upload)
+add_subdirectory(mod_healthmanager)
+add_subdirectory(mod_accessauth)
+add_subdirectory(mod_guiconsole)
+add_subdirectory(mod_CenterSetting)
+add_subdirectory(mod_tokenmgr)
+add_subdirectory(mod_evtconverter)
+add_subdirectory(mod_interactivelog)
+add_subdirectory(mod_chromium)
+
+add_subdirectory(mod_ScannerSet)
+add_subdirectory(mod_HSPScanner)
+add_subdirectory(mod_ContactlessCard)
+add_subdirectory(mod_gpio)
+add_subdirectory(mod_DeviceControl)
+add_subdirectory(mod_facetracking)
+add_subdirectory(mod_initiativetransfer)
+add_subdirectory(mod_interactioncontext)
+add_subdirectory(mod_agentip)
+add_subdirectory(mod_counterconnector)
+add_subdirectory(mod_countercontext)
+add_subdirectory(mod_mediacontroller)
+add_subdirectory(mod_recorder)
+add_subdirectory(mod_snapshot)
+add_subdirectory(mod_screenshot)
+add_subdirectory(mod_selfchecker)
+add_subdirectory(mod_heartbeat)
+add_subdirectory(mod_alarm)
+add_subdirectory(mod_RomoteController)
+add_subdirectory(mod_ResourceWatcher)
+add_subdirectory(mod_livenessdetection)
+add_subdirectory(mod_vtmloader)
+
+#below should be compiled succesufully.
+add_subdirectory(mod_SalesRecorder)
+add_subdirectory(mod_sipphone)
+#to remove
 add_subdirectory(mod_CameraConfigManage)
 
+endif(MSVC)
+
+
 
-# 汇总要依赖拷贝的第三方库
 set(RVC_CONAN_DEP_LIBS ${RVC_CONAN_DEP_LIBS} ${MODULE_CONAN_DEP_LIBS} PARENT_SCOPE)
 
 

+ 2 - 2
Module/include/CommEntityRestful.hpp

@@ -13,14 +13,14 @@ namespace Module
 namespace Restful
 {
 
-/*errorCode 对应原有 Http 组件的 m_userCode;message 对应 m_errMsg*/
+/*errorCode 瀵瑰簲鍘熸湁 Http 缁勪欢鐨� m_userCode锛沵essage 瀵瑰簲 m_errMsg*/
 struct CommResponseJson : public MicroServices::API::CommResponse
 {
     JSONCONVERT2OBJECT_MEMEBER_REGISTER(success, errorCode, returnCode, errorMsg, message)
     JSONCONVERT2OBJECT_MEMEBER_RENAME_REGISTER("success", "code", "return_code", "error_msg", "message")
 };
 
-//{ "code":"10000", "data" : true, "message" : "请求成功", "request" : "https://rvcgray.paasst.cmbchina.cn/api/gray/way?null", "success" : true }
+//{ "code":"10000", "data" : true, "message" : "璇锋眰鎴愬姛", "request" : "https://rvcgray.paasst.cmbchina.cn/api/gray/way?null", "success" : true }
 struct GrayResponseJson : public MicroServices::API::GrayResponseJson
 {
     JSONCONVERT2OBJECT_MEMEBER_REGISTER(success, errorCode, message, graySwitch)

+ 88 - 0
Module/include/CommEntitySettings.hpp

@@ -104,6 +104,94 @@ static inline ErrorCodeEnum ReadConfigFromCenterSettings(
     return result;
 }
 
+static inline void InitializeOtherLogSwitch(CEntityBase* pEntity, const CSimpleStringA& strModuleName)
+{
+	LOG_FUNCTION();
+	if (pEntity == NULL || strModuleName.IsNullOrEmpty()) {
+		return;
+	}
+
+	struct OtherLogConfig
+	{
+		OtherLogConfig() :strLevel("OFF"), strType("FILE"), strDllName(""), strLogPath("") {}
+		OtherLogConfig(const CSimpleStringA& strModuleName) :strLevel("OFF"), strType("FILE"), strDllName(strModuleName), strLogPath("") {}
+
+		CSimpleStringA strLevel;
+		CSimpleStringA strType;
+		CSimpleStringA strDllName;
+		CSimpleStringA strLogPath;
+
+		void Settle()
+		{
+			toolkit_setenv("VENDOR_RECODE_LEVEL", strLevel);
+			toolkit_setenv("VENDOR_RECODE_TYPE", strType);
+			toolkit_setenv("VENDOR_DLL_NAME", strDllName);
+			toolkit_setenv("VENDOR_LOG_PATH", strLogPath);
+		}
+
+	} stLogConfig(strModuleName);
+
+	CSmartPointer<IConfigInfo> centerConfig;
+	pEntity->GetFunction()->OpenConfig(Config_CenterSetting, centerConfig);
+
+	int nSaveFileOrNot(0);
+
+	centerConfig->ReadConfigValueInt("Common", "SaveFile", nSaveFileOrNot);
+	stLogConfig.strType = "UPLOAD";
+	if ((nSaveFileOrNot & 1) == 1) {
+		if (!stLogConfig.strType.IsNullOrEmpty()) stLogConfig.strType += "|";
+		stLogConfig.strType += "FILE";
+	}
+
+	int nUploadLogLevel(1); /*INFO*/
+
+	CSimpleStringA strUploadLogLevelEntity(true);
+	centerConfig->ReadConfigValue(strModuleName.GetData(), "UpLoadLogLevel", strUploadLogLevelEntity);
+	if (strUploadLogLevelEntity.IsNullOrEmpty()) {
+		CSimpleStringA strUploadLogLevelComm(true);
+		centerConfig->ReadConfigValue("Common", "UpLoadLogLevel", strUploadLogLevelComm);
+		strUploadLogLevelEntity = strUploadLogLevelComm;
+	}
+	bool isValidDigit = !strUploadLogLevelEntity.IsNullOrEmpty();
+	for (int i = 0; i < strUploadLogLevelEntity.GetLength(); ++i) {
+		if (!(strUploadLogLevelEntity[i] >= '0' && strUploadLogLevelEntity[i] <= '9')) {
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("invalid param: %s", strUploadLogLevelEntity.GetData());
+			isValidDigit = false;
+			break;
+		}
+	}
+	if (isValidDigit) {
+		nUploadLogLevel = atoi(strUploadLogLevelEntity.GetData());
+	}
+	switch (nUploadLogLevel)
+	{
+	case 0: /*LOG_LEVEL_DEBUG*/
+		stLogConfig.strLevel = "ALL";
+		break;
+	case 1: /*LOG_LEVEL_INFO*/
+		stLogConfig.strLevel = "INFO";
+		break;
+	case 2: /*LOG_LEVEL_WARN*/
+		stLogConfig.strLevel = "WARN";
+		break;
+	case 3: /*LOG_LEVEL_ERROR*/
+		stLogConfig.strLevel = "ERROR";
+		break;
+	case 4: /*LOG_LEVEL_FATAL*/
+		stLogConfig.strLevel = "FATAL";
+		break;
+	default:
+		stLogConfig.strLevel = "OFF";
+		break;
+	}
+
+	pEntity->GetFunction()->GetPath("Dbg", stLogConfig.strLogPath);
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("DbgPath: %s", stLogConfig.strLogPath.GetData());
+	stLogConfig.Settle();
+
+	LogEvent(Severity_Low, 0, CSimpleStringA::Format("{\"RecordLevel\":\"%s\", \"RecordType\":\"%s\}", stLogConfig.strLevel.GetData(), stLogConfig.strType.GetData()));
+}
+
 
 } //namespace Settings
 } //namespace Comm

+ 3 - 1
Module/include/DevFSMCommBase.hpp

@@ -398,6 +398,8 @@ struct AdapterInfo : public AdaptorInfo
 		strcpy(devCatInfo.szModel, rhs.szModel);
 		strcpy(devCatInfo.szVendor, rhs.szVendor);
 
+        CSimpleStringA strVersion = CSimpleStringA::Format("%d.%d.%d.%d", devCatInfo.version.wMajor, devCatInfo.version.wMinor, devCatInfo.version.wRevision, devCatInfo.version.wBuild);
+
 		if (strlen(devCatInfo.szType) >= MAX_DEV_TYPE_LEN) {
 			devCatInfo.szType[MAX_DEV_TYPE_LEN - 1] = '\0';
 		}
@@ -408,7 +410,7 @@ struct AdapterInfo : public AdaptorInfo
 			devCatInfo.szVendor[MAX_DEV_VENDOR_LEN - 1] = '\0';
 		}
 
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetDevCategory")("{\"szVendor\":\"%s\",\"szType\":\"%s\",\"szModel\":\"%s\"}", devCatInfo.szVendor, devCatInfo.szType, devCatInfo.szModel);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetDevCategory")("{\"szVendor\":\"%s\",\"szType\":\"%s\",\"szModel\":\"%s\",\"szVersion\":\"%s\"}", devCatInfo.szVendor, devCatInfo.szType, devCatInfo.szModel, strVersion.GetData());
 		
 		CheckCategoryInfoFormat();
 	}

+ 0 - 11
Module/include/EventCode.h

@@ -5,7 +5,6 @@ enum LightSeq{
 	UNKNOWN_DEVICE,
 	CARDREADER,
 	CARDREADER_RED,
-	PRINTER,
 	IDCERTIFICATE,
 	PINPAD,
 	PINPADLIGHT,
@@ -17,11 +16,8 @@ enum LightSeq{
 	HEADLIGHT,
 	HEADLIGHT_RED,
 	CONTACTLESSCARD,
-	USBCONTROL,
-	USBLIGHT,
 	HEADLIGHT_ASSIST,
 	HSPSCANNER,
-	PRINTER_SEAL,
 	FINGERPRINT
 };
 //设备类型枚举
@@ -395,7 +391,6 @@ ERROR_ACCESSAUTH_CONNECT_ACS_6,\
 ERROR_ACCESSAUTH_CONNECT_ACS_28,\
 ERROR_ACCESSAUTH_CONNECT_ACS_x}
 
-
 /*----End--AccessAuth------------------------------------*/
 
 /*----UpgradeRun--modify--by--Lwt--at--2020/4/21----*/
@@ -631,12 +626,6 @@ ERROR_ACCESSAUTH_CONNECT_ACS_x}
 #define LOG_WARN_CONTACTLESS_CARD_FORGET_FETCH		(ContactlessCard_Public_Start + 4)
 #define LOG_ERR_CONTACTLESS_CARD_FAILED				(ContactlessCard_Public_Start + 5)
 
-#define LOG_EVT_USB_CONTROL_ON 0x21400001
-#define LOG_EVT_USB_CONTROL_OFF 0x21400002
-#define LOG_EVT_USB_CONTROL_OP 0x21400003
-#define LOG_EVT_USB_LIGHT_ON 0x21400004
-#define LOG_EVT_USB_LIGHT_OFF 0x21400005
-//#define LOG_DEVICECONTROL_BROWSER_CACHE_CLEAER 0x21400006
 #define LOG_DEVICECONTROL_SOGOU_SCRIPTS_NOT_EXISTS 0x21400007
 #define LOG_DEVICECONTROL_SOGOU_SCRIPTS_EXECUTE_SUCC 0x21400008
 #define LOG_DEVICECONTROL_SOGOU_SCRIPTS_EXECUTE_FAILED 0x21400009

+ 10 - 5
Module/mod_CameraConfigManage/CMakeLists.txt

@@ -12,7 +12,7 @@ if(MSVC)
     )
 else()
     set(${MODULE_PREFIX}_SRCS
-        ${MODULE_BASE_DIR}/mod_mediacontroller/capture.cpp
+        ${MODULE_BASE_DIR}/mod_mediacontroller/${MODULE_PLAFORM_SUBDIR}/capture.cpp
         mod_CameraConfigManage.cpp
         mod_CameraConfigManage.h
         CameraConfigManage_client_g.h
@@ -32,8 +32,14 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${CONAN_INCLUDE_DIRS_OPENCV}/opencv
 	${CONAN_INCLUDE_DIRS_OPENCV}/opencv2/imgcodecs
 	${MODULE_BASE_DIR}
-    ${RVC_OTHER_DEPENDENIES_DIR}/libmediadeviceinfo
-	${RVC_OTHER_DEPENDENIES_DIR}/libaudiomgr
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libvideoframework
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libvideohorflip
+	${OTHER_LIB_PLATFORM_BASE_DIR}/rvcmediacommon
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libaudioqueue
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libvideoqueue
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libmediadeviceinfo
+	${OTHER_LIB_BASE_DIR}/libaudiomgr
+	${OTHER_LIB_PLATFORM_BASE_DIR}/libvideocapture
     ${CONAN_INCLUDE_DIRS_PORTAUDIO}
     ${CONAN_INCLUDE_DIRS_FFMPEG}
 )
@@ -62,8 +68,7 @@ else()
 		target_include_directories(${MODULE_NAME} PRIVATE
 			${CONAN_INCLUDE_DIRS_PULSEAUDIO})
 		target_link_directories(${MODULE_NAME} PRIVATE
-			${CONAN_LIB_DIRS_PULSEAUDIO})
-		target_link_directories(${MODULE_NAME} PRIVATE
+			${CONAN_LIB_DIRS_PULSEAUDIO}
 			${CONAN_LIB_DIRS_APR}
 			${CONAN_LIB_DIRS_SOFIA}
 			${CONAN_LIB_DIRS_ZLIB}

+ 6 - 11
Module/mod_CameraConfigManage/mod_CameraConfigManage.cpp

@@ -3,7 +3,7 @@
 #include "Event.h"
 #include "rec_common.h"
 #include "SpComm.hpp"
-
+#include "CommEntityUtil.hpp"
 #if defined(RVC_OS_WIN)
 #include <tchar.h>
 #include "SetupApi.h"
@@ -92,13 +92,13 @@ void CCameraConfigManageEntity::OnPreStart(
 	CSmartPointer<IEntityFunction> spFunction = GetFunction();
 	CSystemStaticInfo stStaticinfo;
 	spFunction->GetSystemStaticInfo(stStaticinfo);
-	SP::MachineFormat::Site site = SP::MachineFormat::Str2Site(stStaticinfo.strSite);
-    SP::MachineFormat::What type = SP::MachineFormat::Str2Type(stStaticinfo.strSite);
+	SP::Module::Comm::Site site = SP::Module::Comm::Str2Site(stStaticinfo.strSite);
+	SP::Module::Comm::What type = SP::Module::Comm::Str2Type(stStaticinfo.strSite);
 
 
-	if (type == SP::MachineFormat::RVC_PAD)
+	if (type == SP::Module::Comm::RVC_PAD)
 	{
-		if (site == SP::MachineFormat::CMB_FLB)
+		if (site == SP::Module::Comm::CMB_FLB)
 		{
 			LOG_TRACE("the type is mobile pad");
 			m_eDeviceType = eMobilePadType;
@@ -109,16 +109,11 @@ void CCameraConfigManageEntity::OnPreStart(
 			m_eDeviceType = ePadtype;
 		}
 	}
-	else if (type == SP::MachineFormat::RVC_Desk2S)
+	else if (type == SP::Module::Comm::RVC_Desk2S)
 	{
 		LOG_TRACE("the type is Desk2S");
 		m_eDeviceType = eDesk2SType;
 	}
-	else if (type == SP::MachineFormat::RPM_Stand1S)
-	{
-		LOG_TRACE("the type is RPM.Stand1S");
-		m_eDeviceType = eRpm1sType;
-	}
 	else
 	{
 		LOG_TRACE("the type is standard");

+ 0 - 99
Module/mod_CameraConfigManage/mod_CameraConfigManage.vcxproj

@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{4E5356A5-9B1D-496E-8C01-077B149B590B}</ProjectGuid>
-    <RootNamespace>mod_CameraConfigManage</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>Windows7.1SDK</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <Import Project="..\modmake.setting" />
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(FrameworkHeadRoot)\libtoolkit;$(OtherHeadPath)\libvideoframework;$(OtherHeadPath)\libvideoqueue;$(OtherHeadPath)\libvideohorflip;$(OtherHeadPath)\libvideoecho;$(OtherHeadPath)\libaudioqueue;$(ModuleCommonHeadPath);$(ThirdPartyHeadRoot)\portaudio\include;$(ThirdPartyHeadRoot)\IPP;$(ThirdPartyHeadRoot)\ffmpeg_4.1\include;$(ThirdPartyHeadRoot)\opencv\include\opencv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>SpBase.lib;libtoolkit.lib;avcodec.lib;avutil.lib;swscale.lib;portaudio_x86.lib;opencv_highgui230.lib;opencv_video230.lib;opencv_core230.lib;opencv_imgproc230.lib;Vfw32.lib;winmm.lib;strmiids.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>$(FrameworkLib);$(ThirdPartyLib);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-    </ClCompile>
-    <Link>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClInclude Include="CameraConfigManage_client_g.h" />
-    <ClInclude Include="CameraConfigManage_def_g.h" />
-    <ClInclude Include="CameraConfigManage_msg_g.h" />
-    <ClInclude Include="CameraConfigManage_server_g.h" />
-    <ClInclude Include="Capture.h" />
-    <ClInclude Include="Event.h" />
-    <ClInclude Include="mod_CameraConfigManage.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="Capture.cpp" />
-    <ClCompile Include="mod_CameraConfigManage.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\Other\libaudioqueue\libaudioqueue.vcxproj">
-      <Project>{2ad3370e-8091-40a1-80ba-7db3aa809cda}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\..\Other\libvideoecho\libvideoecho.vcxproj">
-      <Project>{b8739abb-5955-46b3-bf0c-794c7feda47c}</Project>
-    </ProjectReference>
-    <ProjectReference Include="..\..\Other\libvideoqueue\libvideoqueue.vcxproj">
-      <Project>{24312d88-f752-40c2-a1b9-a55eddd9791a}</Project>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="CameraConfigManage.xml" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 56
Module/mod_CameraConfigManage/mod_CameraConfigManage.vcxproj.filters

@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="源文件">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="头文件">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="资源文件">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="mod_CameraConfigManage.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="Event.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="Capture.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="CameraConfigManage_client_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="CameraConfigManage_def_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="CameraConfigManage_msg_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="CameraConfigManage_server_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="mod_CameraConfigManage.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="Capture.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc">
-      <Filter>资源文件</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="CameraConfigManage.xml" />
-  </ItemGroup>
-</Project>

+ 1 - 0
Module/mod_CardIssuerStand/CMakeLists.txt

@@ -16,6 +16,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${ModuleCommonHeadPath}
 	${MODULE_BASE_DIR}/mod_heartbeat
 	${MODULE_BASE_DIR}/mod_accessauth
+	${MODULE_BASE_DIR}/mod_cardissuer
 	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
 	${CONAN_INCLUDE_DIRS_OPENSSL}
 	${CONAN_INCLUDE_DIRS_JSONCPP}

+ 0 - 5
Module/mod_CardIssuerStand/CardIssuerFSM.h

@@ -13,12 +13,7 @@
 #include "CardAssist.h"
 #include "ICDataElement.h"
 #include "IHttpFunc.h"
-//#include "publicFunExport.h"
-#ifdef RVC_OS_WIN
-#include "json.h"
-#else
 #include "json/json.h"
-#endif //RVC_OS_WIN
 #define REFLECTION(var) #var
 using namespace CardIssuer;
 //using namespace GUIConsole;

+ 10 - 4
Module/mod_CardIssuerStand/CardIssuer_UserErrorCode.h

@@ -37,7 +37,7 @@
 #define CardIssuer_UserErrorCode_NoCardRemains_Hopper6				(CardIssuer_UserErrorCode_Start + 30)	//卡箱6剩余卡片计数为0(空)
 #define CardIssuer_UserErrorCode_LogInfoAboutTerm					(CardIssuer_UserErrorCode_Start + 31)	//告警上送终端模块信息
 #define CardIssuer_UserErrorCode_KebaDeviceInfo						(CardIssuer_UserErrorCode_Start + 32)	//告警上送科堡机型信息
-//#define CardIssuer_UserErrorCode_RootInfo							(CardIssuer_UserErrorCode_Start + 33)  //root中版本批次号
+#define CardIssuer_UserErrorCode_RootInfo							(CardIssuer_UserErrorCode_Start + 33)  //root中版本批次号
 #define CardIssuer_UserErrorCode_Adapter_Version					(CardIssuer_UserErrorCode_Start + 34)//告警适配器版本号(长城卡库是将驱动版本号告警上来)
 #define CardIssuer_UserErrorCode_DevOpenTime						(CardIssuer_UserErrorCode_Start + 35) //统计DevOpen时长
 
@@ -53,6 +53,7 @@
 #define CardIssuer_UserErrorCode_PrintCardFaceRightNow				(CardIssuer_UserErrorCode_Start + 44) //卡面打印
 #define CardIssuer_UserErrorCode_InsertCardSucceed					(CardIssuer_UserErrorCode_Start + 45) //前端插卡
 
+#define CardIssuer_UserErrorCode_StandEntityInFailState				(CardIssuer_UserErrorCode_Start + 46)	//卡机处于故障态,请稍后重试,重试还有问题请联系厂商维护
 
 #define CardIssuer_UserErrorCode_CardStore_SlotNum					(CardIssuer_UserErrorCode_Start + 49) //记录卡库容量
 #define CardIssuer_UserErrorCode_Invoke_Access_IniDev_Failed		(CardIssuer_UserErrorCode_Start + 50) //建立加密通道时,调用准入接口失败
@@ -91,7 +92,7 @@
 #define CardIssuer_UserErrorCode_AddCardToStoreStepFirst			(CardIssuer_UserErrorCode_Start + 74)	//加卡第一步,从卡箱移到读卡器
 #define CardIssuer_UserErrorCode_AddCardToStoreStepLast				(CardIssuer_UserErrorCode_Start + 75)	//加卡第二步,从读卡器移到卡槽
 #define CardIssuer_UserErrorCode_ReadAccount_Data_Error				(CardIssuer_UserErrorCode_Start + 76)	//加卡过程,卡片数据有误
-//#define CardIssuer_UserErrorCode_FindFirstEmptySlot_Failed			(CardIssuer_UserErrorCode_Start + 77)	//加卡过程,未找到空卡槽
+#define CardIssuer_UserErrorCode_AddCardToStoreStepFirst_Failed		(CardIssuer_UserErrorCode_Start + 77)	//加卡过程,移卡到卡槽失败
 #define CardIssuer_UserErrorCode_NotifyPreonline_Wait_TooLong		(CardIssuer_UserErrorCode_Start + 78)	//NotifyPreonline收到时已经超过等待时间
 
 //临时 后续去除
@@ -183,7 +184,7 @@
 #define CardIssuer_UserErrorCode_HopperCardMixed					(CardIssuer_UserErrorCode_Start + 164)	//卡箱中的卡片放置不对
 #define CardIssuer_UserErrorCode_CardActive_CardStore_OffLine		(CardIssuer_UserErrorCode_Start + 165)	//跨机时卡库不在线
 #define CardIssuer_UserErrorCode_ReadByRF							(CardIssuer_UserErrorCode_Start + 166)	//非接读取成功
-#define CardIssuer_UserErrorCode_CardActive_CardStore_Issuing		(CardIssuer_UserErrorCode_Start + 167)	//跨机时卡库正在本地领卡
+#define CardIssuer_UserErrorCode_CardActive_CardStore_Issuing		(CardIssuer_UserErrorCode_Start + 167)	//跨机时卡库正在本地领卡或加卡
 #define CardIssuer_UserErrorCode_CardActive_CardStore_CallByOther	(CardIssuer_UserErrorCode_Start + 168)	//跨机时卡库正在其他VTM调用
 #define CardIssuer_UserErrorCode_ReadAccount_Cost_Time				(CardIssuer_UserErrorCode_Start + 169)	//ReadAccount耗时
 #define CardIssuer_UserErrorCode_CardActive_CardIssuer_InFaultState	(CardIssuer_UserErrorCode_Start + 170)	//卡库收到跨机请求时卡机未成功打开
@@ -202,4 +203,9 @@
 #define CardIssuer_UserErrorCode_Dev_CardJammed				(CardIssuer_UserErrorCode_Start + 189)//塞卡
 #define CardIssuer_UserErrorCode_Dev_SlotJammed				(CardIssuer_UserErrorCode_Start + 190)//卡槽堵塞
 #define CardIssuer_UserErrorCode_Dev_SlotInvalid			(CardIssuer_UserErrorCode_Start + 191)//卡槽地址非法(越界等)
-#endif //_CARDISSUER_USER_ERRORCODE_H
+
+//盘库异常明细报错
+#define CardIssuer_UserErrorCode_KakuPanKu_MoveCardFromSlot_Failed				(CardIssuer_UserErrorCode_Start + 200)	//卡库盘库失败,卡槽移卡失败
+#define CardIssuer_UserErrorCode_KakuPanKu_ReadAccount_Failed					(CardIssuer_UserErrorCode_Start + 201)	//卡库盘库失败,读卡失败吞卡
+#define CardIssuer_UserErrorCode_KakuPanKu_MoveCardToSlot_Failed				(CardIssuer_UserErrorCode_Start + 202)	//卡库盘库失败,卡移回卡槽失败
+#endif //_CARDISSUERSTAND_USER_ERRORCODE_H

+ 4 - 0
Module/mod_CardIssuerStand/mod_cardissuer.h

@@ -257,9 +257,13 @@ public:
 	void IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
 	{
 		LOG_FUNCTION();
+		int state = m_fsm.GetFSMState();
 		if (!m_fsm.GetDevInitFlag()) {
 			ctx->Answer(Error_DevNotAvailable, CardIssuer_UserErrorCode_DevOpen_Failed);
 		}
+		else if (state == 9) {
+			ctx->Answer(Error_InvalidState, CardIssuer_UserErrorCode_StandEntityInFailState);
+		}
 		else {
 			m_bNewSessionInit = false;
 			CardIssueExEvent* pEvt = new CardIssueExEvent();

+ 1 - 3
Module/mod_CenterSetting/CenterSettingConn.h

@@ -2,9 +2,7 @@
 #define RVC_MOD_CENTERSETTING_CONN_H_
 
 #pragma once
-#ifdef RVC_OS_WIN
-#include "json.h"
-#endif
+#include "json/json.h"
 #include "SpSecureClient.h"
 #include "SpIni.h"
 #include "IHttpFunc.h"

+ 2 - 2
Module/mod_ContactlessCard/CMakeLists.txt

@@ -1,4 +1,4 @@
-#实体å�
+#实体�
 define_module("ContactlessCard")
 
 add_definitions(-D_CRT_RAND_S)
@@ -14,7 +14,7 @@ add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
 
 target_include_directories(${MODULE_NAME} PRIVATE
 	${DevHeadPath}
-	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
+	${OTHER_LIB_BASE_DIR}/libpublicFun
 	${CONAN_INCLUDE_DIRS_JSONCPP}
 )
 

+ 1 - 4
Module/mod_ContactlessCard/ContactlessFSM.h

@@ -12,11 +12,8 @@
 #include "ContactlessCard_server_g.h"
 #include "ContactlessCard_msg_g.h"
 #include "ContactlessCard_UserErrorCode.h"
-#if defined(RVC_OS_LINUX)
 #include "json/json.h"
-#else
-#include "json.h"
-#endif
+
 enum EvtType
 {
 	USER_EVT_TEST = EVT_USER+1,

+ 0 - 2
Module/mod_CustMngrAuth/CMakeLists.txt

@@ -15,8 +15,6 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${RVC_COMMOM_INCLUDE_DIR}
 	${MODULE_BASE_DIR}/mod_FingerPrint
 	${MODULE_BASE_DIR}/mod_DeviceControl
-	${MODULE_BASE_DIR}/mod_MaintainWatcher
-	${MODULE_BASE_DIR}/mod_BootManager
 	${CONAN_INCLUDE_DIRS_JSONCPP}
 )
 

+ 0 - 8
Module/mod_CustMngrAuth/CustMngrAuthFSM.h

@@ -7,20 +7,12 @@
 #include "SpFSM.h"
 #include "SpSecureClient.h"
 
-
 #include "CustMngrAuth_server_g.h"
 #include "CustMngrAuth_msg_g.h"
-#ifdef RVC_OS_WIN
-#include "json.h"
-#include "..\mod_fingerprint\FingerPrint_client_g.h"
-#include "..\mod_DeviceControl\DeviceControl_client_g.h"
-#else
 #include "json/json.h"
 #include "FingerPrint_client_g.h"
 #include "DeviceControl_client_g.h"
 #include "CommEntityUtil.hpp"
-#endif
-
 
 using namespace CustMngrAuth;
 

+ 0 - 2
Module/mod_DeviceControl/CMakeLists.txt

@@ -23,9 +23,7 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
 
 target_include_directories(${MODULE_NAME} PRIVATE 
 ${CMAKE_CURRENT_SOURCE_DIR}
-#${OTHER_LIB_BASE_DIR}/libpublicFun
 ${MODULE_BASE_DIR}/mod_CenterSetting
-${MODULE_BASE_DIR}/mod_Initializer
 ${MODULE_BASE_DIR}/mod_CameraConfigManage
 )
 

+ 4 - 4
Module/mod_DeviceControl/DeviceControlFSM.cpp

@@ -1,4 +1,4 @@
-#include "stdafx.h"
+锘�#include "stdafx.h"
 #include "DeviceControlFSM.h"
 #include "GetDevInfoHelper.h"
 #include "EventCode.h"
@@ -50,7 +50,7 @@ ErrorCodeEnum CDeviceControlFSM::RestartSogouServices()
 
         bool monitor_exist(false), other_exists(false);
 
-        /** 因为接口暂时获取不了命令行的内容,只能暂时将此接口置为成功 [Gifur@2022110]*/
+        /** 锟斤拷为锟接匡拷锟斤拷时锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟叫碉拷锟斤拷锟捷o拷只锟斤拷锟斤拷时锟斤拷锟剿接匡拷锟斤拷为锟缴癸拷 [Gifur@2022110]*/
         monitor_exist = true;
 
         for (int i = 0; i < count; ++i) {
@@ -82,10 +82,10 @@ ErrorCodeEnum CDeviceControlFSM::RestartSogouServices()
             } else {
                 DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("execute {%s} suc: %s", shutdown_service_without_monitor.c_str(), succStr.c_str());
 
-                /**等待服务进程退出 */
+                /**锟饺达拷锟斤拷锟斤拷锟斤拷锟斤拷顺锟� */
                 Sleep(300);
 
-                /** Sogou的监护服务每隔5s会检测搜狗服务是否存在,否则会重启,为什么不自己重启,因为搜狗服务得跑在普通用户权限下 [Gifur@20211230]*/
+                /** Sogou锟侥监护锟斤拷锟斤拷每锟斤拷5s锟斤拷锟斤拷锟窖癸拷锟斤拷锟斤拷锟角凤拷锟斤拷冢锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟轿�裁达拷锟斤拷约锟斤拷锟斤拷锟斤拷锟斤拷为锟窖癸拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟酵�拷没锟饺�拷锟斤拷锟� [Gifur@20211230]*/
                 const DWORD defaultInterval = 3000;
                 const int maxtIntervalTimes(3);
                 int intervalTimes(0);

+ 0 - 5
Module/mod_DeviceControl/mod_DeviceControl.h

@@ -13,16 +13,11 @@
 #include <vector>
 
 #ifdef RVC_OS_WIN
-
 #include <Winsock2.h>
 #include <WS2tcpip.h>
 #include <Iphlpapi.h>
 #include "IHttpFunc.h"
-#include "json.h"
-#pragma comment(lib,"Iphlpapi")
-
 #else
-
 #include "SpTest.h"
 
 #endif // RVC_OS_WIN

+ 2 - 2
Module/mod_FingerPrint/CMakeLists.txt

@@ -1,4 +1,4 @@
-#实体å�
+#实体�
 define_module("FingerPrint")
 
 file(GLOB ${MODULE_PREFIX}_SRCS RELATIVE 
@@ -15,7 +15,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${DevHeadPath}
 	${MODULE_BASE_DIR}/mod_cardswiper
 	${MODULE_BASE_DIR}/mod_BootManager
-	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
+	${OTHER_LIB_BASE_DIR}/libpublicFun
 )
 
 # 添加实体需��赖的其他共享库(包括系统库)

+ 41 - 41
Module/mod_FingerPrint/FingerPrintFSM.cpp

@@ -344,7 +344,7 @@ int CFingerPrintFSM::Initial()
 	{
 		SetErrPackage("Initial::OpenConfig", m_csDevSN, errDev, FingerPrint_UserErrorCode_OPEN_ROOT_FAILED_ONINIT);
 		AlarmDEC();
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2402")("指纹仪实体初始化时,打开root.ini文件失败");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2402")("鎸囩汗浠�疄浣撳垵濮嬪寲鏃讹紝鎵撳紑root.ini鏂囦欢澶辫触");
 		return 2;
 	}
 
@@ -353,7 +353,7 @@ int CFingerPrintFSM::Initial()
 	if (m_csMachineType.Compare("RVC.PAD", true) == 0 && m_fwbSN.IsNullOrEmpty())
 	{
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("RVC.PAD without FWB");
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹仪设备打开成功");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗浠��澶囨墦寮€鎴愬姛");
 		return 0;
 	}
 
@@ -361,7 +361,7 @@ int CFingerPrintFSM::Initial()
 	int initCount = 0;
 	ErrorCodeEnum err;
 	auto pEntity = GET_DEV_ENTITY_BASE_POINTER();
-	//判断是否是蓝牙多合一
+	//鍒ゆ柇鏄�惁鏄�摑鐗欏�鍚堜竴
 	CSimpleStringA tmpVendor(""), tmpDLLVersion("");
 	bool isFWB = false;
 	CSimpleStringA tmpDevSN = m_fwbSN;
@@ -410,7 +410,7 @@ int CFingerPrintFSM::Initial()
 					//TODO: Support new or old edition machine.
 				}
 				else if (!m_csMachineType.Compare("RVC.PAD", true)) {
-					if (isFWB) {//蓝牙多合一
+					if (isFWB) {//钃濈墮澶氬悎涓€
 						GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", strVendor);
 						strVersion = "8";
 					}
@@ -423,11 +423,11 @@ int CFingerPrintFSM::Initial()
 				}
 				else if (!m_csMachineType.Compare("RVC.Desk2S", true)) {
 					strVersion = "4";
-					if (m_machineVersion.Compare("1.0", true)) {//低柜一体机(贵宾理财2.0&非贵宾理财2.1)
+					if (m_machineVersion.Compare("1.0", true)) {//浣庢煖涓€浣撴満(璐靛�鐞嗚储2.0&闈炶吹瀹剧悊璐�2.1)
 						strBatch = "20";
 					}
 				}
-				else if (!m_csMachineType.Compare("RVC.Desk1S", true) && !m_machineVersion.Compare("1.0", true)) {//低柜一体机(厅堂自助)
+				else if (!m_csMachineType.Compare("RVC.Desk1S", true) && !m_machineVersion.Compare("1.0", true)) {//浣庢煖涓€浣撴満(鍘呭爞鑷�姪)
 					strVersion = "4";
 					strBatch = "20";
 				}
@@ -451,29 +451,29 @@ int CFingerPrintFSM::Initial()
 	m_bOpened = false;
 	if (pEntity->vendorLibInfo.IsNotConfig()) {
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Not config, Allow this condition happend.");
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("没有配置,将其视为指纹仪设备打开成功");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("娌℃湁閰嶇疆锛屽皢鍏惰�涓烘寚绾逛华璁惧�鎵撳紑鎴愬姛");
 		return 0;
 	}
 	pEntity->InitializeVendorLogSwitch();
 	err = m_hDevHelper.LoadUp(m_adapterInfo.adapterFilePath);
 	if (!IS_SUCCEED(err))
 	{
-		if (err != Error_NotExist) { //文件存在,只是因为其他原因导致加载失败的
+		if (err != Error_NotExist) { //鏂囦欢瀛樺湪锛屽彧鏄�洜涓哄叾浠栧師鍥犲�鑷村姞杞藉け璐ョ殑
 			LogWarn(Severity_High, Error_NotInit, FingerPrint_UserErrorCode_LOAD_ADAPTER_FAILED,
 				CSimpleStringA::Format("Load library file: %s failed, GLE=%d", (LPCTSTR)m_adapterInfo.adapterFileName, GetLastError()));
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2405")("加载厂商适配器失败");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2405")("鍔犺浇鍘傚晢閫傞厤鍣ㄥけ璐�");
 			return 2;
 		}
 		else {
-			if (!triedFlag) {//是在root.ini进行配置的,而不是程序推断的
+			if (!triedFlag) {//鏄�湪root.ini杩涜�閰嶇疆鐨勶紝鑰屼笉鏄�▼搴忔帹鏂�殑
 				LogWarn(Severity_High, Error_DevLoadFileFailed, FingerPrint_UserErrorCode_VENDOR_ADAPTER_NOT_EXIST,
 					CSimpleStringA::Format("library file: %s is not existed!", (LPCTSTR)m_adapterInfo.adapterFileName));
-				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2404")("厂商适配器不存在dep中");
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Open_ID).setResultCode("RTA2404")("鍘傚晢閫傞厤鍣ㄤ笉瀛樺湪dep涓�");
 				return 2;
 			}
-			else {//程序推断出来的适配器名称,但本地不存在该文件,放弃吧
+			else {//绋嬪簭鎺ㄦ柇鍑烘潵鐨勯€傞厤鍣ㄥ悕绉帮紝浣嗘湰鍦颁笉瀛樺湪璇ユ枃浠讹紝鏀惧純鍚�
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Config programme,  Allow this condition happend.");
-				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("动态配置,没有该文件,放弃之");
+				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("鍔ㄦ€侀厤缃�紝娌℃湁璇ユ枃浠讹紝鏀惧純涔�");
 				return 0;
 			}
 		}
@@ -515,7 +515,7 @@ int CFingerPrintFSM::Initial()
 	m_adapterInfo.FulfillCategoryInfo(m_devCatInfo);
 	m_bOpened = true;
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("FingerPrint entity open success.");
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹仪设备打开成功");
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗浠��澶囨墦寮€鎴愬姛");
 	return 0;
 }
 
@@ -562,31 +562,31 @@ void CFingerPrintFSM::SelfTest(EntityTestEnum eTestType, CSmartPointer<ITransact
 #pragma endregion
 
 #pragma region collect finger for register and match interface
-//有用接口
+//鏈夌敤鎺ュ彛
 int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
 	ctx->Ans.reserved1.Init(10);
 	if(!m_bOpened) {
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFingerPrint return failed for device isn't init suc.");
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("指纹扫描失败,设备还未初始化成功");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("鎸囩汗鎵�弿澶辫触,璁惧�杩樻湭鍒濆�鍖栨垚鍔�");
 		ctx->Answer(Error_NotInit);  //maybe no vendor adapter
 		return 0;
 	}
 
 	if (m_bCancelRegister) //no cancel button anymore while register
-	{   //修复当扫描前已取消,需要把参数复制,否则授权实体会lost
+	{   //淇��褰撴壂鎻忓墠宸插彇娑堬紝闇€瑕佹妸鍙傛暟澶嶅埗锛屽惁鍒欐巿鏉冨疄浣撲細lost
 		m_bCancelRegister = false;
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹扫描失败,在扫描前,扫描已取消");
-		//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2412")("指纹扫描失败,扫描已取消");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗鎵�弿澶辫触,鍦ㄦ壂鎻忓墠,鎵�弿宸插彇娑�");
+		//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2412")("鎸囩汗鎵�弿澶辫触,鎵�弿宸插彇娑�");
 		ctx->Ans.reserved1[0] = 3;
 		ctx->Answer(Error_Cancel);
 		return 0;
 
 		//ctx->Answer(Error_Cancel);
 		//m_bCancelRegister = false;
-		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹扫描失败,在扫描前,扫描已取消");
-		////DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("指纹扫描失败,在扫描前,扫描已取消");
+		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗鎵�弿澶辫触,鍦ㄦ壂鎻忓墠,鎵�弿宸插彇娑�");
+		////DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("鎸囩汗鎵�弿澶辫触,鍦ㄦ壂鎻忓墠,鎵�弿宸插彇娑�");
 		//return 0;
 	}
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("ctx->Req.times = %d", ctx->Req.times);
@@ -594,7 +594,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 	if (ctx->Req.times <= 0 || ctx->Req.times > 10)
 	{
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFingerPrint, inParam is invalid:%d", ctx->Req.times);
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("指纹扫描失败,参数不对");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("鎸囩汗鎵�弿澶辫触,鍙傛暟涓嶅�");
 		ctx->Answer(Error_Param);
 		return 0;
 	}
@@ -617,7 +617,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 		
 		SetErrPackage("GetFingerPrint::GetPath", m_csDevSN, eErr, FingerPrint_UserErrorCode_GET_DEP_PATH_FAILED_REGISTER);
 		AlarmDEC();
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("指纹扫描失败,获取dep路径失败");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2410")("鎸囩汗鎵�弿澶辫触,鑾峰彇dep璺�緞澶辫触");
 		ctx->Answer(Error_Param);
 		return 0;
 	}
@@ -730,13 +730,13 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 
 	if (bGetFingerPrintSuc){
 		ctx->Ans.reserved1[0] = 1;
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID)("指纹仪扫描成功");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID)("鎸囩汗浠�壂鎻忔垚鍔�");
 		ctx->Answer(Error_Succeed);
 	}
 	else if(m_bCancelRegister){
 		m_bCancelRegister = false;
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹扫描失败,扫描已取消");
-		//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2412")("指纹扫描失败,扫描已取消");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗鎵�弿澶辫触,鎵�弿宸插彇娑�");
+		//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2412")("鎸囩汗鎵�弿澶辫触,鎵�弿宸插彇娑�");
 		ctx->Ans.reserved1[0] = 3;
 		ctx->Answer(Error_Succeed);
 	}
@@ -748,7 +748,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 		}else {
 			LogWarn(Severity_Middle, Error_Unexpect, FingerPrint_UserErrorCode_Match_Timeout, "match timeout");
 		}
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2411")("指纹扫描失败,扫描超时");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2411")("鎸囩汗鎵�弿澶辫触,鎵�弿瓒呮椂");
 		ctx->Answer(Error_Succeed);
 	}
 	//else if(m_bCancelRegister){
@@ -773,7 +773,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 				}
 				ctx->Answer(Error_Succeed, FingerPrint_UserErrorCode_NO_IMAGE_IN_DEP_MATCH);
 			}
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2416")("指纹扫描失败,采集接口调用成功,但未在dep中找到图片文件");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2416")("鎸囩汗鎵�弿澶辫触,閲囬泦鎺ュ彛璋冪敤鎴愬姛锛屼絾鏈�湪dep涓�壘鍒板浘鐗囨枃浠�");
 		}else if(bFeatureIsNull){
 			ctx->Ans.reserved1[0] = 4;
 			if(bIsRegister){
@@ -788,7 +788,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 				}
 				ctx->Answer(Error_Succeed, FingerPrint_UserErrorCode_GETFEATURE_FAILED_MATCH);
 			}
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2413")("指纹扫描失败,采集接口调用成功,但返回的特征值为空");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2413")("鎸囩汗鎵�弿澶辫触,閲囬泦鎺ュ彛璋冪敤鎴愬姛锛屼絾杩斿洖鐨勭壒寰佸€间负绌�");
 		}else if(bLenIsNotRight){
 			ctx->Ans.reserved1[0] = 5;
 			if(bIsRegister){
@@ -803,10 +803,10 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 				}
 				ctx->Answer(Error_Succeed, FingerPrint_UserErrorCode_FEATURELEN_ISNOTRIGHT_MATCH);
 			}
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2414")("指纹扫描失败,返回的指纹特征长度错误");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2414")("鎸囩汗鎵�弿澶辫触,杩斿洖鐨勬寚绾圭壒寰侀暱搴﹂敊璇�");
 		}else if(bExit){
 			LogWarn(Severity_Middle, Error_Hardware, FingerPrint_UserErrorCode_REGISTER_FAILED, "Exit to homepage when register.");
-			//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2415")("指纹扫描失败,手动Exit退出业务");
+			//DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode(FingerPrint_Scan_ID).setResultCode("RTA2415")("鎸囩汗鎵�弿澶辫触,鎵嬪姩Exit閫€鍑轰笟鍔�");
 			ctx->Ans.reserved1[0] = 6;
 			ctx->Answer(Error_Succeed);
 		}
@@ -819,7 +819,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 #pragma endregion
 
 #pragma region generate template
-//有用接口
+//鏈夌敤鎺ュ彛
 int CFingerPrintFSM::GenerateTemplate(SpReqAnsContext<FingerPrintService_GenerateTemplate_Req, FingerPrintService_GenerateTemplate_Ans>::Pointer ctx)
 {
 	LOG_FUNCTION();
@@ -829,7 +829,7 @@ int CFingerPrintFSM::GenerateTemplate(SpReqAnsContext<FingerPrintService_Generat
 		ctx->Answer(Error_NotInit);  //maybe no vendor adapter
 		return 0;
 	}
-	//可以去掉???
+	//鍙�互鍘绘帀锛燂紵锛�
 	if (m_bCancelRegister) //no cancel button anymore while register
 	{
 		ctx->Answer(Error_Cancel);
@@ -903,13 +903,13 @@ int CFingerPrintFSM::GenerateTemplate(SpReqAnsContext<FingerPrintService_Generat
 	DeleteBmp(BmpImage);
 	if (errCode == Error_Succeed) {
 		//DbgInfo("Image2Template success.");
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(FingerPrint_Generate_Template_ID)("指纹仪模板生成成功");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(FingerPrint_Generate_Template_ID)("鎸囩汗浠�ā鏉跨敓鎴愭垚鍔�");
 		ctx->Answer(Error_Succeed);
 	}
 	else {
 		SetErrPackage("generate template failed", m_csDevSN, Error_Unexpect, FingerPrint_UserErrorCode_GETTEMPLATE_FAILED);
 		AlarmDEC();
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹仪模板生成失败");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("鎸囩汗浠�ā鏉跨敓鎴愬け璐�");
 		ctx->Answer(errCode, FingerPrint_UserErrorCode_GETTEMPLATE_FAILED);
 	}
 
@@ -931,13 +931,13 @@ ErrorCodeEnum CFingerPrintFSM::GetDevCatInfo(DevCategoryInfo& devInfo)
 {
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("DevCatgoryInfo len:%d, %d, %d", strlen(m_devCatInfo.szModel), strlen(m_devCatInfo.szType), strlen(m_devCatInfo.szVendor));
 #ifdef RVC_OS_WIN
-	strncpy_s(devInfo.szModel, m_devCatInfo.szModel, (MAX_DEV_MODEL_LEN > strlen(m_devCatInfo.szModel)) ? strlen(m_devCatInfo.szModel) : MAX_DEV_MODEL_LEN);
-	strncpy_s(devInfo.szType, m_devCatInfo.szType, (MAX_DEV_TYPE_LEN > strlen(m_devCatInfo.szType)) ? strlen(m_devCatInfo.szType) : MAX_DEV_TYPE_LEN);
-	strncpy_s(devInfo.szVendor, m_devCatInfo.szVendor, (MAX_DEV_VENDOR_LEN > strlen(m_devCatInfo.szVendor)) ? strlen(m_devCatInfo.szVendor) : MAX_DEV_VENDOR_LEN);
+	strncpy_s(devInfo.szModel, m_devCatInfo.szModel, (MAX_DEV_MODEL_LEN > strlen(m_devCatInfo.szModel)) ? strlen(m_devCatInfo.szModel) : MAX_DEV_MODEL_LEN-1);
+	strncpy_s(devInfo.szType, m_devCatInfo.szType, (MAX_DEV_TYPE_LEN > strlen(m_devCatInfo.szType)) ? strlen(m_devCatInfo.szType) : MAX_DEV_TYPE_LEN-1);
+	strncpy_s(devInfo.szVendor, m_devCatInfo.szVendor, (MAX_DEV_VENDOR_LEN > strlen(m_devCatInfo.szVendor)) ? strlen(m_devCatInfo.szVendor) : MAX_DEV_VENDOR_LEN-1);
 #else
-	strncpy(devInfo.szModel, m_devCatInfo.szModel, (MAX_DEV_MODEL_LEN > strlen(m_devCatInfo.szModel)) ? strlen(m_devCatInfo.szModel) : MAX_DEV_MODEL_LEN);
-	strncpy(devInfo.szType, m_devCatInfo.szType, (MAX_DEV_TYPE_LEN > strlen(m_devCatInfo.szType)) ? strlen(m_devCatInfo.szType) : MAX_DEV_TYPE_LEN);
-	strncpy(devInfo.szVendor, m_devCatInfo.szVendor, (MAX_DEV_VENDOR_LEN > strlen(m_devCatInfo.szVendor)) ? strlen(m_devCatInfo.szVendor) : MAX_DEV_VENDOR_LEN);
+	strncpy(devInfo.szModel, m_devCatInfo.szModel, (MAX_DEV_MODEL_LEN > strlen(m_devCatInfo.szModel)) ? strlen(m_devCatInfo.szModel) : MAX_DEV_MODEL_LEN-1);
+	strncpy(devInfo.szType, m_devCatInfo.szType, (MAX_DEV_TYPE_LEN > strlen(m_devCatInfo.szType)) ? strlen(m_devCatInfo.szType) : MAX_DEV_TYPE_LEN-1);
+	strncpy(devInfo.szVendor, m_devCatInfo.szVendor, (MAX_DEV_VENDOR_LEN > strlen(m_devCatInfo.szVendor)) ? strlen(m_devCatInfo.szVendor) : MAX_DEV_VENDOR_LEN-1);
 #endif // RVC_OS_WIN
 
 	return Error_Succeed;

+ 3 - 1
Module/mod_FingerPrint/FingerPrintFSM.h

@@ -278,7 +278,9 @@ public:
 	void ResetDevInitFlag() { m_bOpened = false; }//À¶ÑÀ¶àºÏһʹÓÃ
 	void SetInWhatPage(int bValue) { m_iInWhatPage = bValue; }
 
-
+	DevStateEnum GetDevState(){
+		return m_devState;
+	}
 
 	void SelfTest(EntityTestEnum eTestType,CSmartPointer<ITransactionContext> pTransactionContext);
 

+ 2 - 1
Module/mod_FingerPrint/mod_FingerPrint.h

@@ -144,13 +144,14 @@ public:
 		LogWarn(Severity_Low, Error_Unexpect, LOG_ERR_FINGERPRINT_REQUEST_REFUSE, "web invoke CheckAndMatch request refuse");
 		ctx->Answer(Error_Exception);
 	}
-	//废弃
+	//设备安装状态使用
 	void GetDevInfo(SpReqAnsContext<FingerPrintService_GetDevInfo_Req, FingerPrintService_GetDevInfo_Ans>::Pointer ctx)
 	{
 		DevCategoryInfo devCatInfo;
 		m_fsm.GetDevCatInfo(devCatInfo);
 		ctx->Ans.model = devCatInfo.szModel;
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("GetDevInfo model is:%s", (const char*)ctx->Ans.model);
+		ctx->Ans.state = (int)m_fsm.GetDevState();
 		ctx->Answer(Error_Succeed);
 	}
 	//废弃

+ 8 - 5
Module/mod_HSPScanner/CMakeLists.txt

@@ -11,14 +11,17 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${DevHeadPath}
     ${CONAN_INCLUDE_DIRS_OPENCV}
     ${CONAN_INCLUDE_DIRS_OPENCV}/opencv2
-	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
+	${OTHER_LIB_BASE_DIR}/libpublicFun
 )
+target_include_directories(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
 
-set(${MODULE_PREFIX}_SYSLIBS libpublicFun)
-set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_LIBS}) 
-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${${MODULE_PREFIX}_SYSLIBS} ${CONAN_LIBS_OPENCV})   #add ${CONAN_LIBS_OPENCV}
 target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_BIN_DIRS_OPENCV} ${CONAN_LIB_DIRS_OPENCV}) #add all line
 
-target_include_directories(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+message(STATUS "MODULE_BASE_ALL_LIBS ${MODULE_BASE_ALL_LIBS}")
+
+set(${MODULE_PREFIX}_SYSLIBS libpublicFun)
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS}) 
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${${MODULE_PREFIX}_SYSLIBS} ${CONAN_LIBS_OPENCV})
+
 
 deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 0 - 1
Module/mod_HSPScanner/HSPScannerFSM.h

@@ -10,7 +10,6 @@
 #include "HSPSCanner_UserErrorCode.h"
 
 #if defined(_MSC_VER)
-#include "json.h"
 #include <xstring>
 using namespace std;
 #else

+ 25 - 7
Module/mod_IDCertificate/CMakeLists.txt

@@ -1,4 +1,3 @@
-#实体名
 define_module("IDCertificate")
 
 file(GLOB ${MODULE_PREFIX}_SRCS RELATIVE 
@@ -20,10 +19,13 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${CONAN_INCLUDE_DIRS_OPENCV}/opencv2/imgcodecs
 	${MODULE_BASE_DIR}
 	${OTHER_LIB_BASE_DIR}/libimageproc
-	${RVC_OTHER_DEPENDENIES_DIR}/libpublicFun
+	${OTHER_LIB_BASE_DIR}/libpublicFun
 )
-
-target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_BIN_DIRS_OPENCV})
+if(MSVC)
+	target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_LIB_DIRS_OPENCV})
+else()
+	target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_BIN_DIRS_OPENCV})
+endif(MSVC)
 
 if(RVC_DEBUG_MODE)
     set(OPENCV_DYNAMIC_LIBS 
@@ -41,6 +43,23 @@ if(RVC_DEBUG_MODE)
 	opencv_videoio 
 	opencv_videostab
 	)
+else()
+if(MSVC)
+    set(OPENCV_DYNAMIC_LIBS
+	opencv_calib3d310 
+	opencv_core310 
+	opencv_features2d310 
+	opencv_flann310 
+	opencv_highgui310 
+	opencv_imgcodecs310 
+	opencv_imgproc310 
+	opencv_ml310 
+	opencv_objdetect310 
+	opencv_photo310 
+	opencv_video310 
+	opencv_videoio310 
+	opencv_videostab310
+	)
 else()
     set(OPENCV_DYNAMIC_LIBS
 	opencv_calib3d 
@@ -57,18 +76,17 @@ else()
 	opencv_videoio 
 	opencv_videostab
 	)
+endif(MSVC)
 endif(RVC_DEBUG_MODE)
 
-# 添加实体需要依赖的其他共享库(包括系统库)
 set(${MODULE_PREFIX}_SYSLIBS libpublicFun)
 set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS} ${OPENCV_DYNAMIC_LIBS})
 if(MSVC)
-	set(${MODULE_PREFIX}_LIBS ${MODULE_PREFIX}_LIBS user32)
+	set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} user32)
 endif(MSVC)
 
 target_link_libraries(${MODULE_NAME} libimageproc ${${MODULE_PREFIX}_LIBS} ${${MODULE_PREFIX}_SYSLIBS})
 
 deploy_module(${MODULE_PREFIX} ${MODULE_NAME})
 
-# 设置要依赖拷贝的第三方库
 set(MODULE_CONAN_DEP_LIBS ${MODULE_CONAN_DEP_LIBS} ${CONAN_BIN_DIRS} PARENT_SCOPE)

+ 6 - 8
Module/mod_IDCertificate/IDCertFSM.cpp

@@ -19,10 +19,7 @@ using namespace SP::Module::Comm;
 #else
 #include "RVCComm.h"
 #include "publicFunExport.h"
-#include "json.h" 
 #include <Windows.h>
-#include <unordered_map>
-#pragma comment(lib,"user32.lib")
 #endif // RVC_OS_LINUX
 
 #define IDCER_INIT_COUNT 3
@@ -997,7 +994,7 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
 		SetErrPackage("ReadAndScan::IDCerRFControl", m_devSN, errRF, MEC_DEVAPI_IDCER_IDCerRFControl);
 		AlarmDEC();
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerRFControl").
-			setResultCode(std::to_string((_Longlong)errRF).c_str())
+			setResultCode(std::to_string((unsigned long)errRF).c_str())
 			("ReadAndScan::IDCerRFControl with errcode: %d", errRF);
 	}
 
@@ -1006,7 +1003,7 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
 		SetErrPackage("ReadAndScan::IDCerAuthenticate", m_devSN, errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate);
 		AlarmDEC();
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerAuthenticate").
-			setResultCode(std::to_string((_Longlong)errAuth).c_str())
+			setResultCode(std::to_string((unsigned long)errAuth).c_str())
 			("ReadAndScan::IDCerAuthenticate with errcode: %d", errAuth);
 	}
 #endif
@@ -1578,7 +1575,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
 		SetErrPackage("ReadAndScanUTF8::IDCerRFControl", m_devSN, errRF, MEC_DEVAPI_IDCER_IDCerRFControl);
 		AlarmDEC();
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerRFControl").
-			setResultCode(std::to_string((_Longlong)errRF).c_str())
+			setResultCode(std::to_string((unsigned long)errRF).c_str())
 			("ReadAndScanUTF8::IDCerRFControl with errcode: %d", errRF);
 	}
 
@@ -1587,7 +1584,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
 		SetErrPackage("ReadAndScanUTF8::IDCerAuthenticate", m_devSN, errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate);
 		AlarmDEC();
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerAuthenticate").
-			setResultCode(std::to_string((_Longlong)errAuth).c_str())
+			setResultCode(std::to_string((unsigned long)errAuth).c_str())
 			("ReadAndScanUTF8::IDCerAuthenticate with errcode: %d", errAuth);
 	}
 #endif
@@ -1845,6 +1842,7 @@ ErrorCodeEnum CIDCertFSM::GetPngBlobEx(CBlob &data, CSimpleStringA fileNamePrefi
 		{
 			transImgMsg = errMsg;
 		}
+
 		if (bClear)
 			DeleteZP(Bmp_SCAN);
 
@@ -2106,7 +2104,7 @@ int CIDCertFSM::Initial() //windows ver
 		SetErrPackage("Initial::DevOpen", m_devSN, err, MEC_DEVAPI_IDCER_DevOpen);
 		AlarmDEC();
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("DevOpen").
-			setBeginTime(m_ullBeginTime).setEndTime(m_ullEndTime).setResultCode(std::to_string((_Longlong)err).c_str())
+			setBeginTime(m_ullBeginTime).setEndTime(m_ullEndTime).setResultCode(std::to_string((unsigned long)err).c_str())
 			("Initial::DevOpen with errcode:%d", err);
 		m_hDevHelper.TearDown();
 		return 2;

+ 5 - 7
Module/mod_IDCertificate/IDCertFSM.h

@@ -2,22 +2,20 @@
 #define IDCERTFSM_H
 
 #pragma once
-#ifdef RVC_OS_LINUX
+
 #include "SpFSM.h"
+#ifdef RVC_OS_LINUX
 #include "SpTest.h"
-#include "DevFSMCommBase.hpp"
 #else //windows
-#include "SpFSM.h"
-#include "json.h"
+#include "json/json.h"
 #include <xstring>
+#include "IHttpFunc.h"
 #endif
 
 #include <unordered_map>
-
-#ifdef RVC_OS_WIN
 #include "DevFSMCommBase.hpp"
-#include "IHttpFunc.h"
 
+#ifdef RVC_OS_WIN
 #define REFLECTION(var) #var
 typedef struct ImgCheckReq : CHTTPReq {
 	string terminalNo;

+ 2 - 2
Module/mod_IDCertificate/IDCertificate.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="gb2312" ?>
+<?xml version="1.0" encoding="utf-8" ?>
 <entity name="IDCertificate">
 	<class name="IDCertService" overlap="true" exclusive="false">			
 		<twoway name="Read" overlap="true">
@@ -147,7 +147,7 @@
 				<param name="reserved2" type="array_string"/>
 			</req>
 			<res>
-				<!--msgtype鐢ㄤ簬鍖哄垎浼犻€掓柟寮忕殑鏂版棫-->
+				<!--msgtype用于区分传递方式的新旧-->
 				<param name="msgtype" type="int" />
 				<param name="hasscan" type="int" />
 				<param name="photodata" type="blob" />

+ 10 - 0
Module/mod_IDCertificate/mod_IDCertificate.h

@@ -183,6 +183,16 @@ public:
 		if (ctx->Ans.model.GetLength() < 256)
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("GetDevInfo")
 			("%s", (const char*)ctx->Ans.model);
+
+		if (m_fsm.GetDevInitFlag())
+		{
+			ctx->Ans.state = DEVICE_STATUS_NORMAL;
+		}
+		else
+		{
+			ctx->Ans.state = DEVICE_STATUS_NOT_READY;
+		}
+
 		ctx->Answer(Error_Succeed);
 	}
 

+ 33 - 0
Module/mod_PortableScanner/CMakeLists.txt

@@ -0,0 +1,33 @@
+define_module("PortableScanner")
+
+set(${MODULE_PREFIX}_SRCS
+	DocScannerCap.cpp
+	mod_PortableScanner.cpp
+	PortableScannerFSM.cpp
+	)
+
+
+set(MOD_VERSION_STRING "0.0.1-dev1")
+add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
+
+#target_compile_options(${MODULE_NAME} PRIVATE  "$<$<CXX_COMPILER_ID:MSVC>:/source-charset:gbk>")
+#target_compile_options(${MODULE_NAME} PRIVATE  "$<$<C_COMPILER_ID:MSVC>:/source-charset:gbk>")
+
+target_include_directories(${MODULE_NAME} PRIVATE
+	${DevHeadPath}
+    ${CONAN_INCLUDE_DIRS_OPENCV}
+    ${CONAN_INCLUDE_DIRS_OPENCV}/opencv2
+	${OTHER_LIB_BASE_DIR}/libpublicFun
+)
+target_include_directories(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
+target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_BIN_DIRS_OPENCV} ${CONAN_LIB_DIRS_OPENCV}) #add all line
+
+message(STATUS "MODULE_BASE_ALL_LIBS ${MODULE_BASE_ALL_LIBS}")
+
+set(${MODULE_PREFIX}_SYSLIBS libpublicFun)
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS}) 
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${${MODULE_PREFIX}_SYSLIBS} ${CONAN_LIBS_OPENCV})
+
+
+deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 6 - 6
Module/mod_PortableScanner/Logger.cpp

@@ -538,11 +538,11 @@ void Logger::TraceTrace_f(const tchar* szFile, int line, const tchar* fmt, ...)
 }
 
 
-/*鑾峰彇褰撳墠璋冪敤璇ユ棩蹇楁枃浠剁殑绋嬪簭璺�緞鎴栫▼搴忓悕绉帮紙鏃犵被鍨嬪悗缂€锛夛紝涓荤敤浜庢棩蹇楀悕绉板0鏄�
- *@param: [out] outFilePath 鑾峰彇鍒扮▼搴忚矾寰勬垨绋嬪簭鍚嶇О鐨勫瓧绗︿覆
- *        [in] sizeLen outFilePath瀛楃�鏁扮粍鐨勫ぇ灏�
- *        [in] fetchKind FALSE琛ㄧず浠呰幏鍙栫▼搴忚矾寰勶紝TRUE琛ㄧず鑾峰彇绋嬪簭鍚嶇О
- *@return 濡傛灉鑾峰彇鎴愬姛鍒欒〃绀哄疄闄呭緱鍒扮殑瀛楃�涓查暱搴︼紝-1琛ㄧず澶辫触
+/*获取当前调用该日志文件的程序路径或程序名称(无类型后缀),主用于日志名称声明
+ *@param: [out] outFilePath 获取到程序路径或程序名称的字符串
+ *        [in] sizeLen outFilePath字符数组的大小
+ *        [in] fetchKind FALSE表示仅获取程序路径,TRUE表示获取程序名称
+ *@return 如果获取成功则表示实际得到的字符串长度,-1表示失败
  */
 DWORD Logger::GetCurExeNameOrPath(tchar* outFilePath, int sizeLen, int fetchKind)
 {
@@ -624,7 +624,7 @@ void Logger::DelayLoop(unsigned long usec)
 {
 	LOG_FUNCTION();
 	LARGE_INTEGER freq, start, now;
-	//杩斿洖纭�欢鏀�寔鐨勯珮绮惧害璁℃暟鍣ㄧ殑姣忕�閽熷榾鍡掔殑娆℃暟锛岄浂琛ㄧず纭�欢涓嶆敮鎸侊紝璇诲彇澶辫触
+	//返回硬件支持的高精度计数器的每秒钟嘀嗒的次数,零表示硬件不支持,读取失败
 	if (!QueryPerformanceFrequency(&freq))
 	{
 		Sleep(usec);

+ 12 - 0
Module/mod_PortableScanner/PortableScanner_server_g.h

@@ -274,6 +274,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_BindCameraDevice_Req,PortableScannerService_BindCameraDevice_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_BindCameraDevice(ctx);
 					}
 					break;
@@ -283,6 +284,7 @@ public:
 						ctx.Attach(new SpOnewayCallContext<PortableScannerService_DropOffDevice_Info>());
 						SpBuffer2Object(Buf, ctx->Info);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_DropOffDevice(ctx);
 					}
 					break;
@@ -292,6 +294,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_StartPreview_Req,PortableScannerService_StartPreview_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_StartPreview(ctx);
 					}
 					break;
@@ -301,6 +304,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_CancelPreview_Req,PortableScannerService_CancelPreview_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_CancelPreview(ctx);
 					}
 					break;
@@ -310,6 +314,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_ScanImage_Req,PortableScannerService_ScanImage_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_ScanImage(ctx);
 					}
 					break;
@@ -319,6 +324,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_ScanImageEx_Req,PortableScannerService_ScanImageEx_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_ScanImageEx(ctx);
 					}
 					break;
@@ -328,6 +334,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_SetProperty_Req,PortableScannerService_SetProperty_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_SetProperty(ctx);
 					}
 					break;
@@ -337,6 +344,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_SetWinPos_Req,PortableScannerService_SetWinPos_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_SetWinPos(ctx);
 					}
 					break;
@@ -346,6 +354,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_ShowProperty_Req,PortableScannerService_ShowProperty_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_ShowProperty(ctx);
 					}
 					break;
@@ -355,6 +364,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_GetDevStatus_Req,PortableScannerService_GetDevStatus_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_GetDevStatus(ctx);
 					}
 					break;
@@ -364,6 +374,7 @@ public:
 						ctx.Attach(new SpReqAnsContext<PortableScannerService_GetDevInfo_Req,PortableScannerService_GetDevInfo_Ans>(pTransactionContext));
 						SpBuffer2Object(Buf, ctx->Req);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_GetDevInfo(ctx);
 					}
 					break;
@@ -373,6 +384,7 @@ public:
 						ctx.Attach(new SpOnewayCallContext<PortableScannerService_Exit_Info>());
 						SpBuffer2Object(Buf, ctx->Info);
 						pTransactionContext->GetLinkContext(ctx->link);
+						EntityResource::setLink(ctx->link);
 						Handle_Exit(ctx);
 					}
 					break;

+ 0 - 102
Module/mod_PortableScanner/mod_PortableScanner.vcxproj

@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{3F0A7498-026E-4738-8B54-56639B0D121F}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>mod_PortableScanner</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <Import Project="..\modmake.setting" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <TargetName>$(ProjectName)</TargetName>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>Create</PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_PORTABLESCANNER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(DevHeadPath);$(ModuleCommonHeadPath);$(FrameworkHeadRoot)\libtoolkit;$(ThirdPartyHeadRoot)\opencv31v10;$(ThirdPartyHeadRoot)\opencv31v10\opencv;$(ThirdPartyHeadRoot)\opencv31v10\opencv2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>$(FrameworkLib)\SpBase.lib;$(FrameworkLib)\libtoolkit.lib;$(ThirdPartyLib)\opencv_highgui310d.lib;$(ThirdPartyLib)\opencv_video310d.lib;$(ThirdPartyLib)\opencv_core310d.lib;$(ThirdPartyLib)\opencv_imgproc310d.lib;$(ThirdPartyLib)\opencv_videoio310d.lib;$(ThirdPartyLib)\opencv_imgcodecs310d.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>Use</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_PORTABLESCANNER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <None Include="ReadMe.txt" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="DocScannerCap.h" />
-    <ClInclude Include="mod_PortableScanner.h" />
-    <ClInclude Include="PortableScannerFSM.h" />
-    <ClInclude Include="PortableScanner_def_g.h" />
-    <ClInclude Include="PortableScanner_msg_g.h" />
-    <ClInclude Include="PortableScanner_server_g.h" />
-    <ClInclude Include="targetver.h" />
-    <ClInclude Include="UserEventCode.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="DocScannerCap.cpp" />
-    <ClCompile Include="mod_PortableScanner.cpp" />
-    <ClCompile Include="PortableScannerFSM.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 62
Module/mod_PortableScanner/mod_PortableScanner.vcxproj.filters

@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="源文件">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="头文件">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="资源文件">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="ReadMe.txt" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="targetver.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="PortableScanner_def_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="PortableScanner_msg_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="PortableScanner_server_g.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="PortableScannerFSM.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="mod_PortableScanner.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="DocScannerCap.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="UserEventCode.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="mod_PortableScanner.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="PortableScannerFSM.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="DocScannerCap.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc">
-      <Filter>资源文件</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-</Project>

+ 3 - 3
Module/mod_PortableScanner/targetver.h

@@ -1,8 +1,8 @@
 #pragma once
 
-// 鍖呮嫭 SDKDDKVer.h 灏嗗畾涔夊彲鐢ㄧ殑鏈€楂樼増鏈�殑 Windows 骞冲彴銆�
+// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
 
-// 濡傛灉瑕佷负浠ュ墠鐨� Windows 骞冲彴鐢熸垚搴旂敤绋嬪簭锛岃�鍖呮嫭 WinSDKVer.h锛屽苟灏�
-// WIN32_WINNT 瀹忚�缃�负瑕佹敮鎸佺殑骞冲彴锛岀劧鍚庡啀鍖呮嫭 SDKDDKVer.h銆�
+// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
+// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
 
 #include <SDKDDKVer.h>

+ 9 - 4
Module/mod_ResourceWatcher/CMakeLists.txt

@@ -13,13 +13,16 @@ set(${MODULE_PREFIX}_SRCS
     ResourceWatcher_msg_g.h
     ResourceWatcher_server_g.h
     ${OTHER_LIB_BASE_DIR}/libRestfulFunc/RestfulFunc.h
-
     EventLog.cpp
     EventLogW.cpp
     mod_ResourceWatcher.cpp
     ResourceWatcherFSM.cpp
-    XUnZipZilb.cpp
-	XUnZipZilb.h
+    XUnzip.cpp
+	XUnzip.h
+    NetworkProbe.cpp
+    NetworkProbe.h
+    MbnEventImpl.cpp
+    MbnEventInternal.cpp
 )
 
 else()
@@ -46,7 +49,8 @@ set(MOD_VERSION_STRING "1.0.1-dev1")
 add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
 
 if(MSVC)
-    set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32 mbnapi_uuid pdh)
+    set(${MODULE_PREFIX}_LIBS RestfulFunc)
+    set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ws2_32 mbnapi_uuid pdh winmm shell32 Wintrust crypt32 wlanapi mbnapi_uuid Gdi32 User32)
 else()
     target_link_directories(${MODULE_NAME} PRIVATE ${CONAN_LIB_DIRS_SOGOULIB})
     set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_LIBS} libpublicFun RestfulFunc ${CONAN_LIBS_SOGOULIB})
@@ -58,6 +62,7 @@ target_include_directories(${MODULE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
     ${MODULE_BASE_DIR}/mod_cardswiper
     ${MODULE_BASE_DIR}/mod_healthmanager
     ${MODULE_BASE_DIR}/mod_UpgradeMgr
+    ${MODULE_BASE_DIR}/mod_chromium
     ${DevHeadPath}
     ${OTHER_LIB_BASE_DIR}/libpublicFun
     ${CONAN_INCLUDE_DIRS_SOGOULIB}

+ 11 - 1
Module/mod_ResourceWatcher/EventLog.cpp

@@ -1,8 +1,16 @@
 #include "stdafx.h"
 #include "EventLog.h"
-
 #include "Spbase.h"
 
+#define _U      0x01    /* upper */ 
+#define _L      0x02    /* lower */  
+#define _D      0x04    /* digit */ 
+#define _C      0x08    /* cntrl */ 
+#define _P      0x10    /* punct */ 
+#define _S      0x20    /* white space (space/lf/tab) */ 
+#define _X      0x40    /* hex digit */ 
+#define _SP     0x80    /* hard space (0x20) */ 
+
 unsigned char _ctype[] = {0x00,                 /* EOF */ 
 	_C,_C,_C,_C,_C,_C,_C,_C,                        /* 0-7 */ 
 	_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C,         /* 8-15 */ 
@@ -29,6 +37,8 @@ unsigned char _ctype[] = {0x00,                 /* EOF */
 	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,                /* 224-239 */ 
 	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};               /* 240-255 */
 
+#define isdigit(c) ((_ctype+1)[c]&(_D)) 
+
 // If the message string contains parameter insertion strings (for example, %%4096),
 // you must perform the parameter substitution yourself. To get the parameter message 
 // string, call FormatMessage with the message identifier found in the parameter insertion 

+ 1 - 13
Module/mod_ResourceWatcher/EventLog.h

@@ -10,22 +10,10 @@
 #include <sstream>
 #include <string>
 #include <iomanip>
+#include <xlocale>
 #include "SimpleString.h"
 
 #define EXT_EVTLOG_NAME ".evtlog"
-
-
-#define _U      0x01    /* upper */ 
-#define _L      0x02    /* lower */  
-#define _D      0x04    /* digit */ 
-#define _C      0x08    /* cntrl */ 
-#define _P      0x10    /* punct */ 
-#define _S      0x20    /* white space (space/lf/tab) */ 
-#define _X      0x40    /* hex digit */ 
-//#define _SP     0x80    /* hard space (0x20) */ 
-
-extern unsigned char _ctype[]; 
-#define isdigit(c) ((_ctype+1)[c]&(_D)) 
  
 #define MAX_TIMESTAMP_LEN       23 + 1   // yyyy/mm/dd hh:mm:ss.mmm
 #define MAX_RECORD_BUFFER_SIZE  0x10000  // 64K

+ 12 - 2
Module/mod_ResourceWatcher/EventLogW.cpp

@@ -1,9 +1,19 @@
 #include "StdAfx.h"
 #include "EventLogW.h"
-//#include "SpBase.h"
-
 #include <excpt.h>
 
+#define _U      0x01    /* upper */ 
+#define _L      0x02    /* lower */  
+#define _D      0x04    /* digit */ 
+#define _C      0x08    /* cntrl */ 
+#define _P      0x10    /* punct */ 
+#define _S      0x20    /* white space (space/lf/tab) */ 
+#define _X      0x40    /* hex digit */ 
+#define _SP     0x80    /* hard space (0x20) */ 
+
+extern unsigned char _ctype[];
+#define isdigit(c) ((_ctype+1)[c]&(_D)) 
+
 int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep)
 {
 	if(code == EXCEPTION_ACCESS_VIOLATION)

+ 0 - 13
Module/mod_ResourceWatcher/EventLogW.h

@@ -13,19 +13,6 @@
 
 #define EXT_EVTLOG_NAME L".evtlog"
 
-
-#define _U      0x01    /* upper */ 
-#define _L      0x02    /* lower */  
-#define _D      0x04    /* digit */ 
-#define _C      0x08    /* cntrl */ 
-#define _P      0x10    /* punct */ 
-#define _S      0x20    /* white space (space/lf/tab) */ 
-#define _X      0x40    /* hex digit */ 
-//#define _SP     0x80    /* hard space (0x20) */ 
-
-extern unsigned char _ctype[]; 
-#define isdigit(c) ((_ctype+1)[c]&(_D)) 
- 
 #define MAX_TIMESTAMP_LEN       23 + 1   // yyyy/mm/dd hh:mm:ss.mmm
 #define MAX_RECORD_BUFFER_SIZE  0x10000  // 64K
 

+ 8 - 8
Module/mod_ResourceWatcher/MbnEventImpl.cpp

@@ -100,7 +100,7 @@ HRESULT STDMETHODCALLTYPE CustomConnectionEvents::OnConnectComplete(
 	ULONG requestID, HRESULT status)
 {
 	HRESULT result = S_OK;
-	//置连接成功状态
+	//缃�繛鎺ユ垚鍔熺姸鎬�
 	if(m_pHelper)
 	{
 		BSTR interfaceID;
@@ -123,7 +123,7 @@ HRESULT STDMETHODCALLTYPE CustomConnectionEvents::OnDisconnectComplete(
 	ULONG reqeustID, HRESULT status)
 {
 	HRESULT result = S_OK;
-	//置断开连接状态
+	//缃�柇寮€杩炴帴鐘舵€�
 	if(m_pHelper)
 	{
 		BSTR interfaceID;
@@ -174,7 +174,7 @@ HRESULT STDMETHODCALLTYPE CustomConnctionMnrEvents::OnConnectionArrival(IMbnConn
 {
 	HRESULT result = S_OK;
 
-	//检测到设备连接
+	//妫€娴嬪埌璁惧�杩炴帴
 	if(m_pHelper)
 	{
 		BSTR interfaceID;
@@ -192,7 +192,7 @@ HRESULT STDMETHODCALLTYPE CustomConnctionMnrEvents::OnConnectionRemoval(IMbnConn
 {
 	HRESULT result = S_OK;
 
-	//检测到设备移除
+	//妫€娴嬪埌璁惧�绉婚櫎
 	if(m_pHelper)
 	{
 		BSTR interfaceID;
@@ -253,7 +253,7 @@ int CMbnImplHelper::EnumerateInterfaces(BOOL bUpdateOnly)
 			} else if(result == E_OUTOFMEMORY) {
 				DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("*** ERROR: Could not allocate the required memory for inferfaces");
 			} else {
-				//经验证,很多情况下是因为没有插入网卡设备才会报此错误
+				//缁忛獙璇侊紝寰堝�鎯呭喌涓嬫槸鍥犱负娌℃湁鎻掑叆缃戝崱璁惧�鎵嶄細鎶ユ�閿欒�
 				if(result == HRESULT_FROM_WIN32(ERROR_NOT_FOUND))
 				{
 					SetTmpState(MBD_NO_MOBILEDONGLE);
@@ -1505,7 +1505,7 @@ BOOL CMbnImplHelper::Connect()
 		if(SUCCEEDED(result)) {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Connect successfully with ProfileName[%s][%u]", (LPCTSTR)m_csProfileName, requestID);
 			m_ulTempID = requestID;
-			//等待监听结果或者直接调用GetConnectionState函数
+			//绛夊緟鐩戝惉缁撴灉鎴栬€呯洿鎺ヨ皟鐢℅etConnectionState鍑芥暟
 			SetCurState(MBD_ACTIVATION_CONNECTING);
 			return TRUE;
 		} else {
@@ -1798,7 +1798,7 @@ void CMbnImplHelper::OnConnectComplete(ULONG requestID, LPCTSTR newInterface, HR
 
 	if(status == S_OK)
 	{
-		//连接成功
+		//杩炴帴鎴愬姛
 		SetRequestID(requestID);
 		// m_ulRequestID = requestID;
 		m_ulTempID = (ULONG)-1;
@@ -1806,7 +1806,7 @@ void CMbnImplHelper::OnConnectComplete(ULONG requestID, LPCTSTR newInterface, HR
 	}
 	else
 	{
-		//连接失败
+		//杩炴帴澶辫触
 		m_ulTempID = (ULONG)-1;
 		if(status == E_MBN_SIM_NOT_INSERTED)
 		{

+ 6 - 10
Module/mod_ResourceWatcher/MbnEventImpl.h

@@ -7,15 +7,11 @@
 #include <conio.h>
 #include <comdef.h> 
 #include "PortableDevice.h"
-
 #include "MbnEventInternal.h"
 
-#pragma comment(lib, "mbnapi_uuid.lib")
-
 // Macro that releases a COM object if not NULL.
 #define SAFE_RELEASE(p)     do { if ((p)) { (p)->Release(); (p) = NULL; } } while(0)
 
-
 LPCTSTR ConvertToString(BSTR& bstrValue);
 void FreeBString(BSTR& bstrValue);
 
@@ -352,10 +348,10 @@ public:
 			CoUninitialize();
 		}
 	}
-	// bUpdateOnly : TRUE:只是更新网卡列表, FALSE:选取当前网卡,兼容旧接口
-	// >0 如果当前未存储接口值,则将找到的第一个进行赋予
-	// =0 无设备
-	// <0 也有可能是无设备造成的错误,或者是有设备但是打不开接口
+	// bUpdateOnly : TRUE锛氬彧鏄�洿鏂扮綉鍗″垪琛�紝 FALSE锛氶€夊彇褰撳墠缃戝崱锛屽吋瀹规棫鎺ュ彛
+	// >0 濡傛灉褰撳墠鏈�瓨鍌ㄦ帴鍙e€硷紝鍒欏皢鎵惧埌鐨勭�涓€涓�繘琛岃祴浜�
+	// =0 鏃犺�澶�
+	// <0 涔熸湁鍙�兘鏄�棤璁惧�閫犳垚鐨勯敊璇�紝鎴栬€呮槸鏈夎�澶囦絾鏄�墦涓嶅紑鎺ュ彛
 	int EnumerateInterfaces(BOOL bUpdateOnly = FALSE);
 
 	//Store in m_pTmpInterface if returned true.
@@ -376,10 +372,10 @@ public:
 
 	BOOL GetConnectState();
 
-	// 0: 表示无网卡; 1: 错误 2: 稍后查询; 3: 3G; 4: 4G;
+	// 0: 琛ㄧず鏃犵綉鍗�; 1: 閿欒� 2: 绋嶅悗鏌ヨ�; 3: 3G; 4: 4G;
 	int GetGeneration(ATL::CComPtr<IMbnInterface> pInterface);
 	BOOL GetConnectState(ATL::CComPtr<IMbnInterface> pInterface, MBN_ACTIVATION_STATE& state);
-	// 仅获取网络信号
+	// 浠呰幏鍙栫綉缁滀俊鍙�
 	BOOL GetSignalValue(ATL::CComPtr<IMbnInterface> pInterface, ULONG& ulSignalStrength);
 	BOOL SearchForProfileName(ptMbnDongleInfo pInfo = NULL);
 

+ 19 - 19
Module/mod_ResourceWatcher/MbnEventInternal.h

@@ -192,17 +192,17 @@ typedef
 
 typedef struct _AccessKeyInfo {
 	
-	CSimpleStringA strProfileDesc;	// 配置文件名称
+	CSimpleStringA strProfileDesc;	// 閰嶇疆鏂囦欢鍚嶇О
 	CSimpleStringA strAccessString; // APN
-	CSimpleStringA strUserName;		// 用户名
-	CSimpleStringA strPassword;		// 密码
-	CSimpleStringA strIPType;		// IP类型(MBN有效)
-	CSimpleStringA strAuthProtocol; // 登录类型(MBN有效)
-	CSimpleStringA strPhoneNum; // 电话号码(RAS有效)
-	BOOL IsDefault;					// 是否为已应用
+	CSimpleStringA strUserName;		// 鐢ㄦ埛鍚�
+	CSimpleStringA strPassword;		// 瀵嗙爜
+	CSimpleStringA strIPType;		// IP绫诲瀷锛圡BN鏈夋晥锛�
+	CSimpleStringA strAuthProtocol; // 鐧诲綍绫诲瀷锛圡BN鏈夋晥锛�
+	CSimpleStringA strPhoneNum; // 鐢佃瘽鍙风爜锛圧AS鏈夋晥锛�
+	BOOL IsDefault;					// 鏄�惁涓哄凡搴旂敤
 	USHORT usCntType;
 	//RAS vaild
-	USHORT usAPType; //协议(RAS有效)
+	USHORT usAPType; //鍗忚�锛圧AS鏈夋晥锛�
 
 } AccessKeyInfo, *ptAccessKeyInfo;
 
@@ -210,7 +210,7 @@ void InitAccessKeyInfo(ptAccessKeyInfo info);
 
 typedef struct _MbnProfileInfo {
 
-	CSimpleStringA strProfileName;     // 配置文件中的名称
+	CSimpleStringA strProfileName;     // 閰嶇疆鏂囦欢涓�殑鍚嶇О
 	AccessKeyInfo AccessInfo;
 
 	bool bUserDefined;
@@ -221,11 +221,11 @@ typedef struct _MbnProfileInfo {
 typedef CAutoArray<MbnProfileInfo> MBNProfileList;
 
 typedef struct _MbnDongleSubInfo {
-	CSimpleStringA strDeviceID;        // 设备ID
-	CSimpleStringA strManufacturer;    // 制造商
-	CSimpleStringA strMode;            // 型号
-	CSimpleStringA strFirmware;        // 固件
-	CSimpleStringA strCellularClass;   // 网络类型
+	CSimpleStringA strDeviceID;        // 璁惧�ID
+	CSimpleStringA strManufacturer;    // 鍒堕€犲晢
+	CSimpleStringA strMode;            // 鍨嬪彿
+	CSimpleStringA strFirmware;        // 鍥轰欢
+	CSimpleStringA strCellularClass;   // 缃戠粶绫诲瀷
 	
 	//CSimpleStringA strReadyState;
 	//CSimpleStringA strConnectState;
@@ -236,10 +236,10 @@ typedef struct _MbnDongleSubInfo {
 	MBN_ACTIVATION_STATE mbnCntState;
 
 	CSimpleStringA strDataClass;
-	CSimpleStringA strProfileName;     // 已连接状态下的配置名称
-	CSimpleStringA strProviderName;    // 提供商名字(用于显示网卡名称)
-	//对于GSM,其值表示 International Mobile Equipment Identity(IMSI) 多至15位数字
-	//对于CDMA, 表示 Moblile Identification Number 或者 International Roaming MIN(IRM)
+	CSimpleStringA strProfileName;     // 宸茶繛鎺ョ姸鎬佷笅鐨勯厤缃�悕绉�
+	CSimpleStringA strProviderName;    // 鎻愪緵鍟嗗悕瀛楋紙鐢ㄤ簬鏄剧ず缃戝崱鍚嶇О锛�
+	//瀵逛簬GSM锛屽叾鍊艰〃绀� International Mobile Equipment Identity(IMSI) 澶氳嚦15浣嶆暟瀛�
+	//瀵逛簬CDMA锛� 琛ㄧず Moblile Identification Number 鎴栬€� International Roaming MIN(IRM)
 	CSimpleStringA strIMSI; 
 	// SIM international circuit card number
 	CSimpleStringA strSimIccID;
@@ -262,7 +262,7 @@ void InitMbnDongleSubInfo(pMbnDongleSubInfo info);
 
 typedef struct _MbnDongleInfo {
 	
-	CSimpleStringA csInterfaceId; //在RAS中存储为设备名称
+	CSimpleStringA csInterfaceId; //鍦≧AS涓�瓨鍌ㄤ负璁惧�鍚嶇О
 	MbnDongleSubInfo subInfo;
 	MBNProfileList profileList;
 	USHORT usDeviceType;

+ 8 - 8
Module/mod_ResourceWatcher/NetConfig.h

@@ -24,21 +24,21 @@ public:
 	}
 	~NetConfig();
 
-	//设置网络设备GUID
+	//璁剧疆缃戠粶璁惧�GUID
 	void set_key(const std::string& key) {
 		clear();
 		key_ = key;
 	}
-	//启用DHCP
+	//鍚�敤DHCP
 	bool enable_dhcp();
-	//启动静态IP,设置IP,掩码,网关
+	//鍚�姩闈欐€両P,璁剧疆IP,鎺╃爜,缃戝叧
 	bool set_ip_config(const std::string& ip, const std::string& mask, const std::string& gateway);
 	bool set_ip_config(const std::string& ip, const std::string& mask);
-	//设置网关
+	//璁剧疆缃戝叧
 	bool set_gateway(const std::string& gateway);
-	//设置DNS地址
+	//璁剧疆DNS鍦板潃
 	bool set_dns(const std::string& default_dns, const std::string& backup_dns);
-	//设置自动DNS
+	//璁剧疆鑷�姩DNS
 	bool set_auto_dns();
 
 	int get_last_error_code()const {
@@ -54,9 +54,9 @@ public:
 	*/
 
 private:
-	//初始化
+	//鍒濆�鍖�
 	bool init();
-	//创建COM数组
+	//鍒涘缓COM鏁扮粍
 	std::shared_ptr<SAFEARRAY> create_SAFEARRAY(const std::vector<std::string>& args);
 	bool set_dns_base(bool is_auto, const std::string& default_dns, const std::string& backup_dns);
 	bool exec_method(const wchar_t* method, IWbemClassObject* params_instance);

+ 1 - 1
Module/mod_ResourceWatcher/NetworkInfo.cpp

@@ -1,4 +1,4 @@
-
+
 #include "StdAfx.h"
 #include "NetConfigCommon.h"
 #include "NetConfig.h"

+ 8 - 8
Module/mod_ResourceWatcher/NetworkInfo.h

@@ -6,14 +6,14 @@ public:
 	NetCardInfo();
 
 	struct Info {
-		std::string adapter_name;      // 适配器的GUID
-		std::string friendly_name;    // 适配器的名字
-		std::string physical_addr;   // mac地址
+		std::string adapter_name;      // 閫傞厤鍣ㄧ殑GUID
+		std::string friendly_name;    // 閫傞厤鍣ㄧ殑鍚嶅瓧
+		std::string physical_addr;   // mac鍦板潃
 		std::string ip;             // ip
-		std::string ip_mask;       // 子网掩码
-		std::string gateway;      // 网关
-		std::string default_dns; // 默认dns
-		std::string backup_dns; // 备选dns
+		std::string ip_mask;       // 瀛愮綉鎺╃爜
+		std::string gateway;      // 缃戝叧
+		std::string default_dns; // 榛樿�dns
+		std::string backup_dns; // 澶囬€塪ns
 	};
 
 	static std::vector<std::shared_ptr<NetCardInfo>> GetNetworkInfo();
@@ -42,6 +42,6 @@ protected:
 
 	bool ParseInfo(PIP_ADAPTER_ADDRESSES adapter_addresses);
 private:
-	Info info_; // 网卡信息
+	Info info_; // 缃戝崱淇℃伅
 	std::shared_ptr<NetConfig> config_;
 };

+ 1 - 48
Module/mod_ResourceWatcher/NetworkProbe.cpp

@@ -16,14 +16,11 @@
 
 #include <SpBase.h>
 #include "ResourceWatcher_UserCode.h"
-
 #include <cstdint>
-#include "hw_device_mnt.h"
-
 #define MAXLINE 1024 
 
 
-static std::string print_json_msg(char* ip, int port, int code, char *extra) {
+std::string print_json_msg(const char* ip, int port, int code, const char *extra) {
     char print_msg[512];
     if (port == 0) {
         sprintf(print_msg, "{\"address\":\"%s\",\"code\":\"%d\",\"extra\":\"%s\"}", ip,
@@ -219,8 +216,6 @@ int http_probe(char *url, int timeout_ms, int index, int warnFlag) {
         return false;
     }
 
-#if 0
-
     IHttpFunc* pHttpFunc = create_http(HTTPLogCallback);
 
     HealthReq req;
@@ -240,46 +235,4 @@ int http_probe(char *url, int timeout_ms, int index, int warnFlag) {
     LogWarn(Severity_High, Error_Unexpect, LOG_WARN_NET_PROBE_SUCCESS_BASE + index, print_msg.c_str());
     return false;
 
-#else
-
-	net_probe::probe_helper* phelper = new net_probe::probe_helper();
-	net_probe::probe_content ctt;
-	std::wstring wurl = s2w(url);
-	wcscpy_s(ctt.param1, wurl.c_str());
-	phelper->set_timeout(timeout_ms/1000);
-
-	net_probe::probe_result ret = phelper->test(net_probe::http, ctt);
-
-
-	if(ret != net_probe::ok) {
-		char err_msg[256] = {'\0'};
-		phelper->get_more_detail(err_msg, 255);
-		print_msg = print_json_msg(url, 0, -1, strlen(err_msg) > 0 ? err_msg : "http_probe failed");
-        if (warnFlag == 1)
-        {
-            LogWarn(Severity_High, Error_Unexpect, LOG_WARN_NET_PROBE_FAILED_BASE + index, print_msg.c_str());
-        }
-
-		delete phelper;
-		phelper = nullptr;
-
-		return false;
-	} else {
-		//print_msg = print_json_msg(url, 0, 0, "http_probe success");
-        char err_msg[256] = { '\0' };
-        phelper->get_more_detail(err_msg, 255);
-        print_msg = print_json_msg(url, 0, -1, strlen(err_msg) > 0 ? err_msg : "http_probe success");
-        if (warnFlag == 1)
-        {
-            LogWarn(Severity_Low, Error_Unexpect, LOG_WARN_NET_PROBE_SUCCESS_BASE + index, print_msg.c_str());
-        }
-
-		delete phelper;
-		phelper = nullptr;
-
-		return true;
-	}
-
-#endif
-
 }

+ 3 - 0
Module/mod_ResourceWatcher/NetworkProbe.h

@@ -1,5 +1,8 @@
 #pragma once
 
+#include <string>
+
+std::string print_json_msg(const char* ip, int port, int code, const char* extra);
 int udp_probe(char* ip, int port, int timeout_ms, int index);
 int tcp_probe(char* ip, int port, int index);
 int http_probe(char* url, int timeout_ms, int index, int warnFlag = 1);

+ 102 - 278
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -22,8 +22,6 @@
 #include "toolkit.h"
 #include "iniutil.h"
 #include "osutil.h"
-#include "SpUtility.h"
-#include "RestfulFunc.h"
 #else
 #include <intrin.h>
 #include <ShlObj.h>
@@ -50,18 +48,14 @@
 #include "NetworkInfo.h"
 #include "NetworkProbe.h"
 #include "MbnEventImpl.h"
-
-#include "..\mod_chromium\Chromium_client_g.h" //启动浏览器接口
+#include "Chromium_client_g.h" //启动浏览器接口
 using namespace Chromium;
-
-#pragma comment(lib, "pdh.lib")
-#pragma comment(lib,"winmm.lib" )
-#pragma comment(lib, "shell32.lib")
-#pragma comment(lib, "Wintrust.lib")   
-#pragma comment(lib, "crypt32.lib")
-#pragma comment(lib, "wlanapi.lib")
 #endif
 
+#include "SpUtility.h"
+#include "RestfulFunc.h"
+
+
 //硬件信息搜集参数  
 const int MAX_HARDWARE_CHECK_TIME = 5000;
 const int TIMER_HARDWARE_CHECK = 2;
@@ -208,7 +202,6 @@ void ResourceWatcherFSM::s0_on_entry()
     }
 #else
     this->PostEventFIFO(new RunEvent());
-    SetDnsServer();
     GetEntityBase()->GetFunction()->PostThreadPoolTask(new ClearCenterSettingFilesTask(this));
     BOOL fInstallBySetup(FALSE);
     if (Error_Succeed == DetectVTMInstalledBySetup(fInstallBySetup) && !fInstallBySetup) {
@@ -743,7 +736,16 @@ int ResourceWatcherFSM::NetProbe()
             return 0;
         }
         if (strContent[0].Compare("http") == 0) {
-            http_probe((char*)strContent[1].GetData(), 5 * 1000, i);
+            std::string msg("");
+            std::string print_msg;
+            const int curFlag = HttpProbe(strContent[1].GetData(), msg, 5);
+			if (curFlag > 0 && curFlag < 400) {
+                print_msg = print_json_msg(strContent[1].GetData(), 0, -1, msg.empty() ? "http_probe success" : msg.c_str());
+                LogWarn(Severity_Low, Error_Unexpect, LOG_WARN_NET_PROBE_SUCCESS_BASE + i, print_msg.c_str());
+			} else {
+                print_msg = print_json_msg(strContent[1].GetData(), 0, -1, msg.empty() ? "http_probe failed" : msg.c_str());
+                LogWarn(Severity_High, Error_Unexpect, LOG_WARN_NET_PROBE_FAILED_BASE + i, print_msg.c_str());
+			}
         }
         else if (strContent[0].Compare("tcp") == 0) {
             if (strContent.GetCount() < 3)
@@ -775,142 +777,6 @@ int ResourceWatcherFSM::NetProbe()
     return 0;
 }
 
-/** 该功能已经移到准入实体了,目前没有从集中配置读取信息,所以直接返回了 [Gifur@20231010]*/
-int ResourceWatcherFSM::SetDnsServer()
-{
-    if (!m_nEnableSetDns) {
-        return 0;
-    }
-    if ((m_strDefaultDns.GetLength() == 0) || (m_strBackupDns.GetLength() == 0)) {
-        return 0;
-    }
-    //get dns
-    char print_buffer[1024];
-    DWORD before_time = GetTickCount();
-    auto netcards_info = NetCardInfo::GetNetworkInfo();
-    DWORD now_time = GetTickCount();
-    std::vector<std::shared_ptr<NetCardInfo>>::iterator it;
-    std::string print_msg = "Get Dns Success ! Cust: ";
-    std::ostringstream os;
-    os << now_time - before_time;
-    print_msg += os.str();
-    for (it = netcards_info.begin(); it != netcards_info.end(); ++it) {
-        print_msg += "default_dns:";
-        print_msg += (*it)->GetNetCardInfo().default_dns.c_str();
-        print_msg += " backup_dns:";
-        print_msg += (*it)->GetNetCardInfo().backup_dns.c_str();
-        print_msg += ", ";
-    }
-    print_msg += "cfg_default_dns:";
-    print_msg += m_strDefaultDns.GetData();
-    print_msg += " cfg_bak_dns:";
-    print_msg += m_strBackupDns.GetData();
-    LogWarn(Severity_Low, Error_Unexpect, LOG_WARN_GET_DNS_CUST, print_msg.c_str());
-
-    //set or delete dns
-    before_time = now_time;
-    bool set_result = false;
-    bool delete_dns = false;
-    bool had_set = false;
-    std::vector<int> error_codes;
-    if ((strcmp("0.0.0.0", m_strDefaultDns.GetData()) == 0) && (strcmp("0.0.0.0", m_strBackupDns.GetData()) == 0)) {
-        delete_dns = true;
-    }
-    for (it = netcards_info.begin(); it != netcards_info.end(); ++it) {
-        char buffer[1024];
-        (*it)->show(buffer, 1024);
-        DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("SetDnsServer, NetworkInfo: %s", buffer);
-        string::size_type idx = (*it)->GetNetCardInfo().ip.find(":");
-        if (idx != string::npos) {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("SetDnsServer, ip is ipv6, skip.");
-            continue;
-        }
-        idx = (*it)->GetNetCardInfo().default_dns.find(":");
-        if (idx != string::npos) {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("SetDnsServer, default dns is ipv6, skip.");
-            continue;
-        }
-        idx = (*it)->GetNetCardInfo().backup_dns.find(":");
-        if (idx != string::npos) {
-            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("SetDnsServer, backup dns is ipv6, skip.");
-            continue;
-        }
-        //delete dns
-        if (delete_dns) {
-            if ((*it)->SetAutoDns()) {
-                DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Delete Dns Success.");
-                set_result = true;
-            } else {
-                int error_code = (*it)->get_last_error_code();
-                DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("Delete Dns Failed. error_code: %d", error_code);
-                error_codes.push_back(error_code);
-            }
-            continue;
-        }
-        //set dns
-        if ((strcmp((*it)->GetNetCardInfo().default_dns.c_str(), m_strDefaultDns.GetData()) != 0) ||
-            (strcmp((*it)->GetNetCardInfo().backup_dns.c_str(), m_strBackupDns.GetData()) != 0)) {
-            if ((*it)->SetDns(m_strDefaultDns.GetData(), m_strBackupDns.GetData())) {
-                DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Set Dns Success.");
-                set_result = true;
-            } else {
-                int error_code = (*it)->get_last_error_code();
-                DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("Set Dns Failed. error_code: %d", error_code);
-                error_codes.push_back(error_code);
-            }
-        } else {
-            had_set = true;
-        }
-    }
-
-    //print set dns result
-    if (!had_set) {
-        now_time = GetTickCount();
-        if (delete_dns) {
-            if (set_result) {
-                _snprintf(print_buffer, 1024, "Delete Dns Success ! Cust: %d", now_time - before_time);
-                LogWarn(Severity_Low, Error_Unexpect, LOG_WARN_DELETE_DNS_CUST, print_buffer);
-            } else {
-                //_snprintf(print_buffer, 1024, "Delete Dns Failed ! Cust: %d", now_time - before_time);
-                std::string print_msg = "Delete Dns Failed ! Cust: ";
-                std::ostringstream os;
-                os << now_time - before_time;
-                print_msg += os.str();
-                std::vector<int>::iterator it;
-                print_msg += "error_codes: ";
-                for (it = error_codes.begin(); it != error_codes.end(); ++it) {
-                    std::ostringstream os;
-                    os << *it;
-                    print_msg += os.str();
-                    print_msg += ", ";
-                }
-                LogWarn(Severity_High, Error_Unexpect, LOG_ERR_DELETE_DNS_FAILED, print_msg.c_str());
-            }
-        } else {
-            if (set_result) {
-                _snprintf(print_buffer, 1024, "Set Dns Success ! Cust: %d", now_time - before_time);
-                LogWarn(Severity_Low, Error_Unexpect, LOG_WARN_SET_DNS_CUST, print_buffer);
-            } else {
-                //_snprintf(print_buffer, 1024, "Set Dns Failed ! Cust: %d", now_time - before_time);
-                std::string print_msg = "Set Dns Failed ! Cust: ";
-                std::ostringstream os;
-                os << now_time - before_time;
-                print_msg += os.str();
-                std::vector<int>::iterator it;
-                print_msg += "error_codes: ";
-                for (it = error_codes.begin(); it != error_codes.end(); ++it) {
-                    std::ostringstream os;
-                    os << *it;
-                    print_msg += os.str();
-                    print_msg += ", ";
-                }
-                LogWarn(Severity_High, Error_Unexpect, LOG_ERR_SET_DNS_FAILED, print_msg.c_str());
-            }
-        }
-    }
-
-    return 0;
-}
 #endif //RVC_OS_WIN
 
 int ResourceWatcherFSM::GetCardSwiperStatus()
@@ -1420,59 +1286,37 @@ int ResourceWatcherFSM::ProcessVideoFile(
 
 void ResourceWatcherFSM::LinkDetect(int detectType, const char* url, bool& status, unsigned int& delay, int warnFlag)
 {
+
+	string tUrl = url;
+	string host = "http://";
+	string msg;
+	if (tUrl.find("http") == string::npos) {
+		tUrl = host + tUrl;
+	}
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Check url:[%s].", tUrl.c_str());
+
 #if defined(RVC_OS_LINUX)
     timeval begin, end;
     uint tInterval = 0;
-    bool flag = false;
-
-    string tUrl = url;
-    string host = "http://";
-
-    if (tUrl.find("http") == string::npos) {
-        tUrl = host + tUrl;
-    }
-    char tmpUrl[1024] = { 0 };
-    strcpy(tmpUrl, tUrl.c_str());
-
-    DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Check url:[%s].", url);
-
     gettimeofday(&begin, NULL);
-    string msg;
-    int curFlag = HttpProbe(tmpUrl, msg, 5);
+    int curFlag = HttpProbe(tUrl, msg, 5);
     gettimeofday(&end, NULL);
     tInterval = (end.tv_sec - begin.tv_sec) * 1000 + (end.tv_usec - begin.tv_usec) / 1000;
 
-    if (curFlag > 0 && curFlag < 400) {
-        status = true;
-    } else {
-        status = false;
-    }
-
-    delay = tInterval;
 #else
-    int flag = 0;
     DWORD start, finish;
-    string tUrl = url;
-    string host = "http://";
-    if (tUrl.find("http") == string::npos) {
-        tUrl = host + tUrl;
-    }
-    char tmpUrl[MAX_PATH] = { 0 };
-    strcpy_s(tmpUrl, tUrl.c_str());
-
     start = timeGetTime();
-    flag = http_probe(tmpUrl, 5000, 0, warnFlag);
+    int curFlag = HttpProbe(tUrl, msg, 5);
     finish = timeGetTime();
-
     unsigned int tInterval = finish - start;
-    if (flag == false) {
-        status = false;
-    } else {
-        status = true;
-    }
-
-    delay = tInterval;
 #endif //RVC_OS_LINUX
+
+	if (curFlag > 0 && curFlag < 400) {
+		status = true;
+	} else {
+		status = false;
+	}
+	delay = tInterval;
 }
 
 ErrorCodeEnum ResourceWatcherFSM::BizLinkDetect(
@@ -2803,9 +2647,10 @@ void ResourceWatcherFSM::HardwareInfoTimer(void* pData)
 ErrorCodeEnum ResourceWatcherFSM::CheckNetType(
     SpReqAnsContext<ResourceWatcherService_CheckNetType_Req, ResourceWatcherService_CheckNetType_Ans>::Pointer ctx)
 {
+	ErrorCodeEnum ec = Error_Succeed;
+	int netType = 0; //默认未知
+
 #ifdef RVC_OS_LINUX
-    ErrorCodeEnum ec = Error_Succeed;
-    int netType = 0; //默认未知
     int i = 0;
     int sockfd;
     struct ifconf ifconf;
@@ -2839,83 +2684,73 @@ ErrorCodeEnum ResourceWatcherFSM::CheckNetType(
         }
     }
 
-    ctx->Ans.netType = netType;
-
-    if (ctx != NULL) {
-        ctx->Answer(ec);
-    }
-    return ec;
 #else
-    ErrorCodeEnum ec = Error_Succeed;
-    int netType = 0; //默认未知
-
-    CSystemStaticInfo info;
-    GetEntityBase()->GetFunction()->GetSystemStaticInfo(info);
-    if (info.strMachineType.Compare("RVC.PAD") == 0) //PAD机型
-    {
-        CMbnImplHelper mbnHelper;
-        ResetDongleInfos();
-        const int nMBN = mbnHelper.EnumerateInterfaces();
-        const int cnt = g_DongleInfos.GetCount();
-        for (int i = 0; i < cnt; ++i) {
-            if (g_DongleInfos[i].state == MBD_ACTIVATION_CONNECTED) {
-                netType = 4;  //移动网络
-            }
-        }
-
-        if (netType == 0 && 1 == IsWifiConnected()) {
-            netType = 3;  //无线网络
-        }
-        if (netType == 0) {
-            if (SP::Module::Net::CheckLANConnectStatus()) {
-                netType = 2;  //有线
-            } else {
-                netType = 1;  //未连接
-            }
-        }
-    } else //大机、低柜、卡库
-    {
-        CoInitialize(NULL);
-        //  通过NLA接口获取网络状态
-        IUnknown* pUnknown = NULL;
-        bool  bOnline = true;//是否在线  
-        HRESULT Result = CoCreateInstance(CLSID_NetworkListManager, NULL, CLSCTX_ALL,
-                                          IID_IUnknown, (void**)&pUnknown);
-        if (SUCCEEDED(Result)) {
-            INetworkListManager* pNetworkListManager = NULL;
-            if (pUnknown)
-                Result = pUnknown->QueryInterface(IID_INetworkListManager, (void
-                                                                            **)&pNetworkListManager);
-            if (SUCCEEDED(Result)) {
-                VARIANT_BOOL IsConnect = VARIANT_FALSE;
-                if (pNetworkListManager) {
-                    //Result = pNetworkListManager->get_IsConnectedToInternet(&IsConnect);  //检测互联网连接
-                    Result = pNetworkListManager->get_IsConnected(&IsConnect); //检测本地网络
-                }
-                if (SUCCEEDED(Result)) {
-                    bOnline = (IsConnect == VARIANT_TRUE) ? true : false;
-                }
-            }
-            if (pNetworkListManager)
-                pNetworkListManager->Release();
-        }
-        if (pUnknown)
-            pUnknown->Release();
-
-        if (bOnline == true) {
-            netType = 2;
-        } else {
-            netType = 1;
-        }
-    }
+	CSystemStaticInfo info;
+	GetEntityBase()->GetFunction()->GetSystemStaticInfo(info);
+	if (info.strMachineType.Compare("RVC.PAD") == 0) //PAD机型
+	{
+		CMbnImplHelper mbnHelper;
+		ResetDongleInfos();
+		const int nMBN = mbnHelper.EnumerateInterfaces();
+		const int cnt = g_DongleInfos.GetCount();
+		for (int i = 0; i < cnt; ++i) {
+			if (g_DongleInfos[i].state == MBD_ACTIVATION_CONNECTED) {
+				netType = 4;  //移动网络
+			}
+		}
+		if (netType == 0 && 1 == IsWifiConnected()) {
+			netType = 3;  //无线网络
+		}
+		if (netType == 0) {
+			if (SP::Module::Net::CheckLANConnectStatus()) {
+				netType = 2;  //有线
+			} else {
+				netType = 1;  //未连接
+			}
+		}
+	} else //大机、低柜、卡库
+	{
+		CoInitialize(NULL);
+		//  通过NLA接口获取网络状态
+		IUnknown* pUnknown = NULL;
+		bool  bOnline = true;//是否在线  
+		HRESULT Result = CoCreateInstance(CLSID_NetworkListManager, NULL, CLSCTX_ALL,
+			IID_IUnknown, (void**)&pUnknown);
+		if (SUCCEEDED(Result)) {
+			INetworkListManager* pNetworkListManager = NULL;
+			if (pUnknown)
+				Result = pUnknown->QueryInterface(IID_INetworkListManager, (void
+					**)&pNetworkListManager);
+			if (SUCCEEDED(Result)) {
+				VARIANT_BOOL IsConnect = VARIANT_FALSE;
+				if (pNetworkListManager) {
+					//Result = pNetworkListManager->get_IsConnectedToInternet(&IsConnect);  //检测互联网连接
+					Result = pNetworkListManager->get_IsConnected(&IsConnect); //检测本地网络
+				}
+				if (SUCCEEDED(Result)) {
+					bOnline = (IsConnect == VARIANT_TRUE) ? true : false;
+				}
+			}
+			if (pNetworkListManager)
+				pNetworkListManager->Release();
+		}
+		if (pUnknown)
+			pUnknown->Release();
 
-    ctx->Ans.netType = netType;
+		if (bOnline == true) {
+			netType = 2;
+		} else {
+			netType = 1;
+		}
+	}
 
-    if (ctx != NULL) {
-        ctx->Answer(ec);
-}
-    return ec;
 #endif // RVC_OS_LINUX
+
+	if (ctx != NULL) {
+		ctx->Ans.netType = netType;
+		ctx->Answer(ec);
+	}
+	return ec;
 }
 
 #ifdef _MSC_VER
@@ -3029,11 +2864,7 @@ ErrorCodeEnum ResourceWatcherFSM::GetBizLinks(
         CSimpleStringA getLink("");
         do {
             bizCnt++;
-#if defined(RVC_OS_WIN)
-            getLink = CSimpleStringA("UserBizLink").Append(std::to_string((_Longlong)bizCnt).c_str());
-#else
-            getLink = CSimpleStringA("UserBizLink").Append(std::to_string(bizCnt).c_str());
-#endif //RVC_OS_WIN
+			getLink = CSimpleStringA("UserBizLink").Append(std::to_string(bizCnt).c_str());
             spCtSettingConfig->ReadConfigValue("Chromium", (LPCTSTR)getLink, tLink);
             if (tLink.GetLength() != 0) {
                 CAutoArray<CSimpleStringA> arr = tLink.Split('|');
@@ -3042,11 +2873,7 @@ ErrorCodeEnum ResourceWatcherFSM::GetBizLinks(
                     continue;
                 }
                 outCnt++;
-#if defined(RVC_OS_WIN)
-                CSimpleStringA tName = CSimpleStringA("业务站点").Append(std::to_string((_Longlong)outCnt).c_str());
-#else
-                CSimpleStringA tName = CSimpleStringA("业务站点").Append(std::to_string(outCnt).c_str());
-#endif //RVC_OS_WIN
+				CSimpleStringA tName = CSimpleStringA("业务站点").Append(std::to_string(outCnt).c_str());
                 bizNames.Append(&tName, 0, 1);
                 bizLinks.Append(&tLink, 0, 1);
             }
@@ -3060,11 +2887,7 @@ ErrorCodeEnum ResourceWatcherFSM::GetBizLinks(
             bizCnt++;
             CSimpleStringA chineseName(""), entityName(""), key("");
             CSimpleStringA url("");
-#if defined(RVC_OS_WIN)
-            getLink = CSimpleStringA("UserBizLink").Append(std::to_string((_Longlong)bizCnt).c_str());
-#else
             getLink = CSimpleStringA("UserBizLink").Append(std::to_string(bizCnt).c_str());
-#endif //RVC_OS_WIN
             spCtSettingConfig->ReadConfigValue("Chromium", (LPCTSTR)getLink, info);
             if (info.GetLength() != 0) {
                 CAutoArray<CSimpleStringA> arr = info.Split('|');
@@ -3773,6 +3596,7 @@ BOOL ResourceWatcherFSM::IsTodayDone(int nRecordTime)
     return FALSE;
 }
 
+///*TODO: 使用共用库的接口 (80374374@11/24/2023)*/
 BOOL ResourceWatcherFSM::GetSystemBootTime(CSmallDateTime & systemBootTime)
 {
 #ifdef RVC_OS_LINUX

+ 5 - 10
Module/mod_ResourceWatcher/ResourceWatcherFSM.h

@@ -41,20 +41,16 @@ using namespace std;
 #include "FileSimpleComp.h"
 #include "CommEntityUtil.hpp"
 #else
-#pragma comment(lib, "ws2_32.lib")
-#pragma comment(lib, "mbnapi_uuid.lib")
-
-#include "../mod_cardswiper/CardSwiper_client_g.h"
-#include "../mod_cardswiper/CardSwiper_msg_g.h"
-#include "../mod_cardswiper/CardSwiper_def_g.h"
+#include "CardSwiper_client_g.h"
+#include "CardSwiper_msg_g.h"
+#include "CardSwiper_def_g.h"
 
 #include "ResourceWatcher_UserCode.h"
 #include "FileSimpleComp.h"
 
-#include <SDL.h>
-#include <SDL_syswm.h>
+//#include <SDL.h>
+//#include <SDL_syswm.h>
 #include <time.h>
-#pragma comment(lib, "Gdi32.lib")
 #endif //  RVC_OS_LINUX
 
 #define DEFAULT_INTERVAL 1000
@@ -532,7 +528,6 @@ public:
 
 	int RemoveExpireVideoFileAndRecord(LPCTSTR dirName, int& deletedFileCnt, int& deleteFailedCnt, const int nFlag);
 #else
-	int SetDnsServer();
 	int NetProbe();
 	void CalculateBackTime(PFILETIME ftResultTime, int days);
 	BOOL CalCulateUploadFileAddition(ULARGE_INTEGER& uiBytesCal);

+ 10 - 10
Module/mod_ResourceWatcher/ResourceWatcher_UserCode.h

@@ -76,18 +76,18 @@
 #define LOG_EVT_RSAKEY_ADD_OFFLINE		0x50A00014
 #define LOG_ERR_RSAKEY_MINOTOR_FAILED	0x50A00015
 
-#define LOG_EVT_RESOURCE_CPU_ERROR	0x50A00102                //CPU使用率过于异常 > 98%(mod_ResourceWatcher)
-#define LOG_EVT_RESOURCE_CPU_TOO_HIGH  0x50A00103		    //CPU使用率过高 (mod_ResourceWatcher)
-#define LOG_EVT_RESOURCE_MEMORY_TOO_HIGH   0x50A00104	//内存使用率过高 (mod_ResourceWatcher)
-#define LOG_EVT_RESOURCE_HARDDISK_TOO_HIGH  0x50A00105	//硬盘快满 (mod_ResourceWatcher)
+#define LOG_EVT_RESOURCE_CPU_ERROR	0x50A00102                //CPU浣跨敤鐜囪繃浜庡紓甯� > 98%锛坢od_ResourceWatcher锛�
+#define LOG_EVT_RESOURCE_CPU_TOO_HIGH  0x50A00103		    //CPU浣跨敤鐜囪繃楂� (mod_ResourceWatcher)
+#define LOG_EVT_RESOURCE_MEMORY_TOO_HIGH   0x50A00104	//鍐呭瓨浣跨敤鐜囪繃楂� (mod_ResourceWatcher)
+#define LOG_EVT_RESOURCE_HARDDISK_TOO_HIGH  0x50A00105	//纭�洏蹇�弧 (mod_ResourceWatcher)
 
-#define LOG_WARN_FILE_NOT_TRUSTED 0x50A35201 //文件没有数字签名
+#define LOG_WARN_FILE_NOT_TRUSTED 0x50A35201 //鏂囦欢娌℃湁鏁板瓧绛惧悕
 
-#define LOG_WARN_NET_PROBE_FAILED_BASE	0x50A35500 //预留100个错误码50A35500-50A35599,用于网络探测监控
-#define LOG_WARN_NET_PROBE_SUCCESS_BASE	0x50A35600 //预留100个错误码50A35600-50A35699,用于网络探测监控
-#define LOG_WARN_SOFTWARE_DETECT_EXISTS_BASE	0x50A35700 //用于判断有安装软件
-#define LOG_WARN_SOFTWARE_DETECT_NOT_EXISTS_BASE	0x50A35765 //用于判断未安装软件
-#define LOG_WARN_SOFTWARE_DETECT_EXISTS_STATUS_FAILED 0x50A357C9 //安装检测失败
+#define LOG_WARN_NET_PROBE_FAILED_BASE	0x50A35500 //棰勭暀100涓�敊璇�爜50A35500-50A35599锛岀敤浜庣綉缁滄帰娴嬬洃鎺�
+#define LOG_WARN_NET_PROBE_SUCCESS_BASE	0x50A35600 //棰勭暀100涓�敊璇�爜50A35600-50A35699锛岀敤浜庣綉缁滄帰娴嬬洃鎺�
+#define LOG_WARN_SOFTWARE_DETECT_EXISTS_BASE	0x50A35700 //鐢ㄤ簬鍒ゆ柇鏈夊畨瑁呰蒋浠�
+#define LOG_WARN_SOFTWARE_DETECT_NOT_EXISTS_BASE	0x50A35765 //鐢ㄤ簬鍒ゆ柇鏈�畨瑁呰蒋浠�
+#define LOG_WARN_SOFTWARE_DETECT_EXISTS_STATUS_FAILED 0x50A357C9 //瀹夎�妫€娴嬪け璐�
 
 #define LOG_WARN_MAINLINK_CONNECT_FAILED 0x50A35801
 #define LOG_WARN_BIZLINK_CONNECT_CHECK 0x50A35802

+ 3 - 3
Module/mod_ResourceWatcher/UOSTools.hpp

@@ -4,7 +4,7 @@
 namespace UOS
 {
 
-//工具栏隐藏模式
+//宸ュ叿鏍忛殣钘忔ā寮�
 const std::string domain_dock = "com.deepin.dde.dock";
 const std::string attribute_hide_mode = "hide-mode"; 
 const std::string keep_hidden = "keep-hidden";
@@ -21,11 +21,11 @@ struct MonitorInfo
 {
     std::string name;
     bool isPrimary;
-    int posDirecttion; //-1:skip;0:copy mode;1:up;2:right;3:bottom;4:left; 如果isPrimary,该字段无效
+    int posDirecttion; //-1:skip;0:copy mode;1:up;2:right;3:bottom;4:left; 濡傛灉isPrimary,璇ュ瓧娈垫棤鏁�
     int nResolutionX;
     int nResolutionY;
     int refreshRate;
-    std::string other;//如果是副屏,要设置扩展模式,这个是主屏幕的名称
+    std::string other;//濡傛灉鏄�壇灞忥紝瑕佽�缃�墿灞曟ā寮忥紝杩欎釜鏄�富灞忓箷鐨勫悕绉�
 
     MonitorInfo() :name(""), isPrimary(false), posDirecttion(-1), nResolutionX(1920), nResolutionY(1080), refreshRate(60)
     {

+ 4 - 4
Module/mod_ResourceWatcher/XUnzip.cpp

@@ -4096,7 +4096,7 @@ ZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags)
 		GetUnicodeFileName(ze.name, uname, MAX_PATH-1);
 		EnsureDirectory(rootdir, uname);
 #else
-		EnsureDirectory(rootdir,(const TCHAR *)dst);//用外围传进的文件夹名称
+		EnsureDirectory(rootdir,(const TCHAR *)dst);//鐢ㄥ�鍥翠紶杩涚殑鏂囦欢澶瑰悕绉�
 	//	EnsureDirectory(rootdir, ze.name);
 #endif
 		return ZR_OK;
@@ -4140,7 +4140,7 @@ ZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags)
 	bool haderr=false;
 	
     
-    uLong fileSum = 0;//解压总长度
+    uLong fileSum = 0;//瑙e帇鎬婚暱搴�
 	for (;;)
 	{ 
 		int res = unzReadCurrentFile(uf,buf,16384);
@@ -4158,9 +4158,9 @@ ZRESULT TUnzip::Unzip(int index,void *dst,unsigned int len,DWORD flags)
 			haderr=true; 
 			break;
 		}
-        fileSum = fileSum + writ;//写入长度
+        fileSum = fileSum + writ;//鍐欏叆闀垮害
 	}
-    //判断写入总长度是否和未压缩长度一致
+    //鍒ゆ柇鍐欏叆鎬婚暱搴︽槸鍚﹀拰鏈�帇缂╅暱搴︿竴鑷�
     if (fileSum != uf->cur_file_info.uncompressed_size) {
         haderr = true;
     }

+ 0 - 255
Module/mod_ResourceWatcher/hw_device_mnt.h

@@ -1,255 +0,0 @@
-/***********************************//**
- * @file hw_device_mnt.h
- * @author Gifur
- * @email guifaliao@gmail.com
- * @version 1.1.0.0
- * @date 2020-07-23
- * @copyright China Merchants Bank Co.,Ltd All rights reserved
- *
- * @brief 
- * @details 
- **************************************/
-
-
-#pragma once
-#include <cstdio>
-#include <string>
-#include <vector>
-
-#ifdef HWMOBILELIB_FORMAT
-#define HWMOBILE_API
-#else
-
-#ifdef HWMOBILEDLL_EXPORTS
-#define HWMOBILE_API _declspec(dllexport)
-#else
-#define HWMOBILE_API _declspec(dllimport)
-#pragma comment(lib, "HWMobileDll.lib")
-#endif
-
-#endif //HWMOBILELIB_FORMAT
-
-
-
-namespace  hw
-{
-	enum auth_mode_em
-	{
-		auth_auto = 0,
-		auth_pap,
-		auth_chap,
-		auth_none
-	};
-
-	enum ip_type_em
-	{
-		//0:ipv4; 1:ipv6; 2:ipv4&v6
-		ipv4 = 0,
-		ipv6,
-		ipv46
-	};
-
-	enum connect_status_em
-	{
-		invalid = 0,
-		connecting,
-		connected,
-		disconnected,
-		disconnecting,
-		connect_failed,
-		connect_failed_with_poor,
-		other,
-		no_service,
-		connect_dial_up_param_failed
-	};
-
-	enum sim_status_em
-	{
-		invalid_sim,
-		valid_sim,
-		sim_not_found
-	};
-
-#define MBB_STR_BUF_LEN 256
-
-	struct apn_config_t
-	{
-		wchar_t profile_name[MBB_STR_BUF_LEN];
-		wchar_t apn_name[MBB_STR_BUF_LEN];
-		wchar_t username[MBB_STR_BUF_LEN];
-		wchar_t password[MBB_STR_BUF_LEN];
-
-		auth_mode_em auth_mode;
-		ip_type_em ip_type;
-	};
-
-	struct wlan_config_t
-	{
-		wchar_t ssid[MBB_STR_BUF_LEN];
-		wchar_t password[MBB_STR_BUF_LEN];
-		bool hidden;
-	};
-
-	struct connect_profile_t
-	{
-		uint32_t index;
-		apn_config_t apn_config;
-		bool is_default;
-	};
-
-	struct wlan_status_t
-	{
-		bool started;
-		wlan_config_t wlan_config;
-	};
-
-	struct network_info_t
-	{
-		connect_status_em connect_status;
-		uint8_t signal_strength;
-		uint8_t network_type;
-		uint8_t battery_percent;
-		bool roaming;
-		bool sim_locked;
-		sim_status_em sim_status;
-		bool wifi_status;
-		int32_t wifi_current_user_count;
-		bool usb_plug_in_status;
-		wchar_t dev_name[MBB_STR_BUF_LEN];
-	};
-
-	struct dev_info_t
-	{
-		wchar_t dev_name[MBB_STR_BUF_LEN];
-		wchar_t provider_name[MBB_STR_BUF_LEN];
-		wchar_t sn[MBB_STR_BUF_LEN];
-		wchar_t work_mode[MBB_STR_BUF_LEN];
-		wchar_t hardware_version[MBB_STR_BUF_LEN];
-		wchar_t iccid[MBB_STR_BUF_LEN];
-		wchar_t imsi[MBB_STR_BUF_LEN];
-		wchar_t extend_msg[MBB_STR_BUF_LEN];
-		network_info_t network_status;
-	};
-
-	struct mac_filter_t
-	{
-		int mac_filter_mode;
-		wchar_t mac_filter[MBB_STR_BUF_LEN];
-	};
-
-	#define CURRENT_NETWORK_NO_SERVICE 0
-	#define SERVICE_DOMAIN_NO_SERVICE 0
-	#define SERVICE_STATUS_AVAILABLE 2
-
-	class HWMOBILE_API hw_device_mnt
-	{
-	public:
-		hw_device_mnt();
-		~hw_device_mnt();
-		/*检测MIFI设备是否存在*/
-		bool detect_devices();
-		/*登录到MIFI设备*/
-		int login(std::wstring const& username, std::wstring const& password);
-		/*更改MIFI的登录密码*/
-		int change_password(std::wstring const& username, std::wstring const& current_password, std::wstring const& new_password);
-
-		/*获取APN配置文件列表*/
-		int get_connect_profiles(std::vector<connect_profile_t>& profiles);
-		/*获取APN配置文件列表*/
-		int get_profiles(connect_profile_t* profile, const int profile_capacity);
-		/*设置当前的APN配置文件*/
-		int set_default_profile_by(const uint32_t profile_idx);
-
-		/*添加APN配置文件,set_as_default 指定是否将新添加的配置文件设备默认的*/
-		int add_profile(const apn_config_t& config, bool set_as_default);
-		/*更新APN配置文件*/
-		int update_profile(const connect_profile_t& profile);
-		/*根据APN配置文件的序号,删除指定的配置文件*/
-		int delete_profile_by(const uint32_t profile_idx);
-		/*根据APN配置文件的名称,删除指定的配置文件*/
-		int delete_profile(std::wstring profile_name);
-
-		/*切换是否自动连接(拨号)*/
-		int switch_auto_dial(bool enable = true);
-		/*断开网络拨号连接*/
-		int disconnect();
-		/*拨号连接*/
-		int connect();
-
-		/*判断用户是否已经登录*/
-		bool has_login(bool& first_login);
-		/*注销*/
-		int logout();
-
-		/*设置WIFI的SSID,密码等相关信息*/
-		int set_wlan_config(const wlan_config_t& config, bool restart);
-		/*获取WIFI的SSID,密码等相关信息*/
-		int get_wlan_config(wlan_config_t& config);
-		/*查询WIFI状态是否打开*/
-		bool is_wlan_open();
-
-		/*获取SIM卡和设备的一些信息*/
-		int get_dev_info(dev_info_t& info);
-		/*获取网络的一些信息*/
-		int get_network_info(network_info_t& info);
-		/*激活并将新条目加入白名单*/
-		int insert_mac_filter(const mac_filter_t& info);
-	private:
-		int connect_pending(bool to_connect);
-	};
-}
-
-namespace net_probe
-{
-
-enum probe_protocol
-{
-	http = 1,
-	tcp,
-	udp,
-	socket,
-	telnet
-};
-
-enum probe_result
-{
-	ok = 0,
-	invalid_param,
-	invalid_hostname_format,
-	disconnect,
-	timeout,
-
-	not_support = 97,
-	exception,
-	unexpect
-};
-
-#define PROBE_STR_BUF_LEN 512
-
-struct probe_content
-{
-	wchar_t param1[PROBE_STR_BUF_LEN];
-	wchar_t param2[PROBE_STR_BUF_LEN];
-	int reversed1;
-	int reversed2;
-};
-
-#define PROBE_STR_ERR_LEN 1024
-
-class HWMOBILE_API probe_helper
-{
-public:
-	probe_helper();
-	~probe_helper();
-	
-	probe_result test(probe_protocol protocol, const probe_content& content);
-	void set_timeout(int secs);
-
-	void get_more_detail(char* ret_val, int buf_size);
-
-private:
-	probe_result http_test(std::wstring url);
-	int timeout_secs;
-	std::string last_err_msg;
-};
-}

+ 2 - 8
Module/mod_ResourceWatcher/mod_ResourceWatcher.cpp

@@ -14,8 +14,8 @@
 #include <direct.h>
 #include <psapi.h>  
 #include <sys/stat.h>
-#include <SDL.h>
-#include <SDL_syswm.h>
+//#include <SDL.h>
+//#include <SDL_syswm.h>
 #else
 #include "SogouVersion.h"
 #include <winpr/sysinfo.h>
@@ -40,12 +40,6 @@
 #include "mod_ResourceWatcher.h"
 #include "ResourceWatcher_UserCode.h"
 
-#pragma comment(lib, "shell32.lib")
-#pragma comment(lib, "Wintrust.lib")   
-#pragma comment(lib, "crypt32.lib")
-#pragma comment(lib, "Gdi32.lib")
-#pragma comment(lib, "User32.lib")
-
 using namespace HealthManager;
 
 #define SafeDeleteArraySize(pData) { if(pData){delete []pData;pData=NULL;} }  

+ 0 - 30
Module/mod_RomoteController/.jazzignore

@@ -1,30 +0,0 @@
-### Jazz Ignore 0
-# 将不会落实已忽略的文件和文件夹,
-# 但是在接受或更新期间可以修改这些文件和文件夹。
-# - 忽略属性应该包含以空格分隔的文件名模式列表。
-# - 每个模式都区分大小写并且用花括号“{”和“}”括起来。
-# - “*”与零个或多个字符匹配。
-# - “?”与单个字符匹配。
-# - 模式列表可能分割为多行,每行以反斜杠结尾,
-#     下一行以制表符开头。
-# - core.ignore 中的模式将阻止
-#     落实同一目录中相匹配的资源。
-# - core.ignore.recursive 中的模式
-#     将阻止落实当前目录和所有子目录中相匹配的资源。
-# - core.ignore.recursive 的缺省值为 *.class 
-# - core.ignore 的缺省值为 bin 
-# 
-# 要忽略 shell 脚本并隐藏此子树中的文件:
-#     例如:core.ignore.recursive = {*.sh} {\.*} 
-# 
-# 要忽略当前目录中名为“bin”的资源(但是允许
-#     它们在子目录的下面):
-#     例如:core.ignore = {bin} 
-# 
-# 注意:修改忽略文件将不会更改
-#     Eclipse 派生资源的忽略状态。
-
-core.ignore.recursive= 
-
-core.ignore= \
-	{mod_RomoteController.vcxproj.user} 

+ 19 - 24
Module/mod_RomoteController/CMakeLists.txt

@@ -1,26 +1,7 @@
 define_module("RomoteController")
 
-file(GLOB RomoteControl_CPP_SRCS *.cpp)
-file(GLOB RomoteControl_H_SRCS *.h)
-if (MSVC)
-	set(ZIP_SRCS
-	${ThirdPartyHeadRoot}/XZip/XZip.h
-	${ThirdPartyHeadRoot}/XZip/XZip.cpp
-	)
-else()
-	set(ZIP_SRCS
-	XZipZilb.h
-	XZipZilb.cpp
-	)
-endif()
-
-MESSAGE( STATUS "RomoteControl_CPP_SRCS = ${RomoteControl_CPP_SRCS}")
-MESSAGE( STATUS "RomoteControl_H_SRCS = ${RomoteControl_H_SRCS}")
-MESSAGE( STATUS "ZIP_SRCS = ${ZIP_SRCS}")
-
 
 MESSAGE( STATUS "BOOST_ROOT = ${CONAN_BOOST_ROOT}")
-#set(BOOST_ROOT /home/pcacc/Desktop/boost_1_69_0)
 set(BOOST_ROOT ${CONAN_BOOST_ROOT})
 
 set(Boost_DEBUG ON)
@@ -44,18 +25,32 @@ endif()
 
 #boost end
 
-
-
 MESSAGE( STATUS "CONAN_INCLUDE_DIRS_ZLIB = ${CONAN_INCLUDE_DIRS_ZLIB}")
 MESSAGE( STATUS "CONAN_PKG_LIBS_ZLIB = ${CONAN_PKG_LIBS_ZLIB}")
 
+if(WIN32)
+set(${MODULE_PREFIX}_SRCS
+	mod_RemoteController.cpp
+	RemoteControllerCnn.cpp
+	RemoteControllerFSM.cpp
+	remoteBase.cpp
+	${ThirdPartyHeadRoot}/CJson/cJSON.c
+	${Boost_INCLUDE_DIRS}
+	${ThirdPartyHeadRoot}/XZip/XZip.h
+	${ThirdPartyHeadRoot}/XZip/XZip.cpp
+	MyZip.cpp
+	)
+else()
 set(${MODULE_PREFIX}_SRCS
-	${RomoteControl_CPP_SRCS}
-	${RomoteControl_H_SRCS}
+	mod_RemoteController.cpp
+	remoteBase.cpp
+	RemoteControllerCnn.cpp
+	RemoteControllerFSM.cpp
 	${ThirdPartyHeadRoot}/CJson/cJSON.c
 	${Boost_INCLUDE_DIRS}
-	${ZIP_SRCS}
+	XZipZilb.cpp
 	)
+endif(WIN32)
 
 set(MOD_VERSION_STRING "0.0.1-dev1")
 add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})

+ 10 - 0
Module/mod_RomoteController/RemoteController.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="gb2312"?>
+<entity name="RemoteController">
+  <class name="RemoteControllerService" overlap="true" exclusive="false">
+    <!--<oneway name="Unregist" overlap="true">
+        <param name="nReason" type="int"/>
+        <param name="nWay" type="int"/>
+    </oneway>-->
+  </class>
+</entity>
+

文件差异内容过多而无法显示
+ 127 - 131
Module/mod_RomoteController/RemoteControllerCnn.cpp


+ 2 - 2
Module/mod_RomoteController/RemoteControllerFSM.cpp

@@ -22,7 +22,7 @@ ErrorCodeEnum CRemoteControllerFSM::OnExit()
 
 void CRemoteControllerFSM::s1_on_entry()
 {
-	Dbg("enter to init state");
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("s1_on_entry")("enter to init state");
 	auto pFunction = m_pEntity->GetFunction();
 	pFunction->SetSysVar("RemoteMaintain", "N");
 }
@@ -36,7 +36,7 @@ unsigned int CRemoteControllerFSM::s1_on_event(FSMEvent* event)
 	//MessageBoxA(0,0,0,0);
 	if (event->iEvt == Event_CreateChannel)
 	{
-		Dbg("recv Event_CreateChannel");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("s1_on_event")("recv Event_CreateChannel");
 
 		auto rc = SecureClientConnect();
 		if (rc == Error_Succeed && m_pConnection->IsConnectionOK())

+ 81 - 0
Module/mod_RomoteController/RemoteController_client_g.h

@@ -0,0 +1,81 @@
+
+#ifndef __REMOTECONTROLLER_CLIENT_G_H
+#define __REMOTECONTROLLER_CLIENT_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "RemoteController_def_g.h"
+
+namespace RemoteController {
+class RemoteControllerService_ClientBase : public CClientSessionBase {
+public:
+	explicit RemoteControllerService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
+
+	RemoteControllerService_ClientBase* operator () (const linkContext &curLink) 
+	{
+		m_context = curLink;
+		return this;
+	}
+
+protected:
+	virtual ~RemoteControllerService_ClientBase()
+	{
+		/// override by user
+	}
+public:
+
+	void OnConnectSucceed()
+	{
+		bSessionClosed = false;
+	}
+	void OnClose(ErrorCodeEnum)
+	{
+		Dbg("session closed.");
+		bSessionClosed = true;
+	}
+	bool QuerySessionClosed()
+	{
+		return bSessionClosed;
+	}
+	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
+	{
+		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
+		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "RemoteController", "RemoteControllerService", spAsyncWait);
+		if (Error == Error_Succeed) {
+			m_bSysManaged = true;
+			bSessionClosed = false;
+		}
+		return Error;
+	}
+	ErrorCodeEnum Connect()
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = Connect(spAsyncWait);
+		if (Error == Error_Succeed) {
+			Error = spAsyncWait->WaitAnswer();
+		}
+		return Error;
+	}
+
+
+	bool SafeDelete()
+	{
+		if (!m_bSysManaged) {
+			delete this;
+		}
+		return m_bSysManaged;
+	}
+
+protected:
+	bool m_bSysManaged;
+	CEntityBase *m_pEntityBase;
+	linkContext m_context;
+	bool bSessionClosed;
+};
+
+///////////////////////////
+
+} // namespace RemoteController
+#endif // __REMOTECONTROLLER_CLIENT_G_H

+ 23 - 0
Module/mod_RomoteController/RemoteController_def_g.h

@@ -0,0 +1,23 @@
+#ifndef __REMOTECONTROLLER_DEF_G_H
+#define __REMOTECONTROLLER_DEF_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "SpHelper.h"
+
+namespace RemoteController {
+//
+// const goes here
+//
+
+
+
+
+
+///////////////////////////
+
+} // namespace RemoteController
+
+#endif // __REMOTECONTROLLER_DEF_G_H

+ 83 - 0
Module/mod_RomoteController/RemoteController_server_g.h

@@ -0,0 +1,83 @@
+
+#ifndef __REMOTECONTROLLER_SERVER_G_H
+#define __REMOTECONTROLLER_SERVER_G_H
+
+#pragma once
+
+// This code is generated by spgen tool!
+
+#include "RemoteController_def_g.h"
+
+namespace RemoteController {
+class RemoteControllerService_ServerSessionBase : public CServerSessionBase
+{
+public:
+	RemoteControllerService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual ~RemoteControllerService_ServerSessionBase()
+	{
+		/// override by user
+	}
+
+	virtual bool IsExclusive() { return false; }
+
+	virtual bool IsSessionOverlap() { return true; }
+
+	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
+	{
+		ErrorCodeEnum Error = Error_Succeed;
+		switch (dwMessageID) {
+		default:
+			Error = Error_MethodNotFound;
+			break;
+		}
+		return Error;
+	}
+
+	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
+	{
+		CAutoBuffer Buf;
+		DWORD dwMessageID;
+		DWORD dwMessageSignature;
+		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
+		if (Error == Error_Succeed) {
+#ifdef DEBUG
+			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
+#else
+			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
+				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
+				return;
+			}
+#endif
+			switch (dwMessageID) {
+				default:
+					assert(0);
+					break;
+			}
+			
+		} else {
+			pTransactionContext->SendAnswer(Error);
+		}
+	}
+
+};
+
+
+///////////////////////////
+
+} // namespace RemoteController
+#endif // __REMOTECONTROLLER_SERVER_G_H

+ 1 - 0
Module/mod_RomoteController/digital_conv.h

@@ -6,6 +6,7 @@
 *********************************************************************/
 
 #pragma once
+#include "stdafx.h"
 #include "string_util.h"
 
 

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