ソースを参照

增加配置文件变量可读性

daiyueteng 6 年 前
コミット
48aa68b8c6

+ 1 - 1
module_service/module_call.h

@@ -196,7 +196,7 @@ public:
      */
     void init(config_file& config)
     {
-        sleep_ms = std::stoi(config.get("service.send_call_interval","5000"));
+        sleep_ms = std::stoi(config.get("service.send_call_interval_ms","5000"));
     }
 
 private:

+ 1 - 0
module_service/module_mgr.cpp

@@ -11,6 +11,7 @@
 #include"area_business_geofault.h"
 #include"log.h"
 #include"common_tool.h"
+#include "config_file.h"
 
 /**
  * @brief 注册web回调函数,读配置文件,启动向web发送线程

+ 1 - 1
module_service/module_mgr.h

@@ -11,9 +11,9 @@
  */
 
 #include "module_singleton_base.h"
-#include "config_file.h"
 #include "websocket/wsClientMgr.h"
 #include "common.h"
+struct config_file;
 
 class module_mgr: public singleton_base<module_mgr>
 {

+ 1 - 1
module_service/module_web.h

@@ -45,7 +45,7 @@ public:
      */
     void init(config_file& config, std::map<std::string, YA::MSG_HANDLE_FUNC_TYPE>& MsgFuncList)
     {
-        sleep_ms = std::stoi(config.get("service.interval_send_json_alarm","10000"));
+        sleep_ms = std::stoi(config.get("service.interval_send_json_alarm_ms","10000"));
 
         MsgFuncList.insert( std::make_pair( JSON_CMD_VALUE_META_DATA_CHANGED, &module_web::accept ) );
         MsgFuncList.insert( std::make_pair( JSON_CMD_VALUE_REQUEST_ALL_DATA, &module_web::accept ) );