zxs 1 tháng trước cách đây
mục cha
commit
5edfcf4b6b
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      robot/robotics/v2/nexus_net_client.hpp

+ 9 - 0
robot/robotics/v2/nexus_net_client.hpp

@@ -2192,6 +2192,13 @@ namespace robotics::v2 {
      */
     class nexus_net_xml_config {
     public:
+		/**
+		 * @brief 配置文件是否存在
+		 * @return 
+		 */
+		static bool is_config_file() {
+			return instance()->is_config_file_;
+		}
         /**
          * @brief 查找客户端配置
          * @return
@@ -2253,6 +2260,7 @@ namespace robotics::v2 {
         void load(std::string const& filename = "./config/nexus_net_xml_config.xml") {
             if (!std::filesystem::exists(filename))
                 return;
+            is_config_file_ = true;
             boost::property_tree::ptree pt;
             read_xml(filename, pt);
             //获取根节点
@@ -2329,6 +2337,7 @@ namespace robotics::v2 {
             }
         }
     private:
+		bool                                                                is_config_file_ = false;
         /**
          * @brief 客户端
          */