zxs 1 nedēļu atpakaļ
vecāks
revīzija
7dded79908
1 mainītis faili ar 15 papildinājumiem un 0 dzēšanām
  1. 15 0
      robot/robotics/nexus_net_client.hpp

+ 15 - 0
robot/robotics/nexus_net_client.hpp

@@ -700,6 +700,21 @@ namespace robotics {
             void add_follow(std::vector<std::string> const& values) {
                 follow_list_ = values;
             }
+            /**
+             * @brief 获取父节点信息
+             * @return 
+             */
+            std::pair<std::string, std::string> get_parent() {
+                return std::pair(parent_code_, parent_name_);
+            }
+            /**
+             * @brief 获取用户信息
+             * @return 
+             */
+            std::pair<std::string, std::string> get_user() {
+                auto config = nexus_net_config::read();
+                return std::pair(config.user.code, config.user.name);
+            }
             /**
              * @brief 添加订阅
              * @tparam _Fn