From f3a8d83a23e86572ab606774a527e5e3cbb5a0d5 Mon Sep 17 00:00:00 2001 From: wtudio <95963900+wtudio@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:56:58 +0800 Subject: [PATCH] fix: misc (#130) --- ...timer_cfg.yaml => examples_cpp_executor_timer_cfg.yaml} | 0 .../install/linux/bin/start_examples_cpp_executor_timer.sh | 3 +++ .../executor/install/linux/bin/start_examples_cpp_timer.sh | 3 --- src/interface/aimrt_module_cpp_interface/rpc/rpc_handle.h | 7 ++++++- 4 files changed, 9 insertions(+), 4 deletions(-) rename src/examples/cpp/executor/install/linux/bin/cfg/{examples_cpp_timer_cfg.yaml => examples_cpp_executor_timer_cfg.yaml} (100%) create mode 100755 src/examples/cpp/executor/install/linux/bin/start_examples_cpp_executor_timer.sh delete mode 100755 src/examples/cpp/executor/install/linux/bin/start_examples_cpp_timer.sh diff --git a/src/examples/cpp/executor/install/linux/bin/cfg/examples_cpp_timer_cfg.yaml b/src/examples/cpp/executor/install/linux/bin/cfg/examples_cpp_executor_timer_cfg.yaml similarity index 100% rename from src/examples/cpp/executor/install/linux/bin/cfg/examples_cpp_timer_cfg.yaml rename to src/examples/cpp/executor/install/linux/bin/cfg/examples_cpp_executor_timer_cfg.yaml diff --git a/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_executor_timer.sh b/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_executor_timer.sh new file mode 100755 index 000000000..724d5f192 --- /dev/null +++ b/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_executor_timer.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_executor_timer_cfg.yaml diff --git a/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_timer.sh b/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_timer.sh deleted file mode 100755 index 875bce8c8..000000000 --- a/src/examples/cpp/executor/install/linux/bin/start_examples_cpp_timer.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_timer_cfg.yaml diff --git a/src/interface/aimrt_module_cpp_interface/rpc/rpc_handle.h b/src/interface/aimrt_module_cpp_interface/rpc/rpc_handle.h index c1820009a..27b0e3412 100644 --- a/src/interface/aimrt_module_cpp_interface/rpc/rpc_handle.h +++ b/src/interface/aimrt_module_cpp_interface/rpc/rpc_handle.h @@ -19,7 +19,12 @@ using ServiceFunc = aimrt::util::Function; inline std::string GetFullFuncName( std::string_view rpc_type, std::string_view service_name, std::string_view func_name) { - return std::string(rpc_type) + ":/" + std::string(service_name) + "/" + std::string(func_name); + std::string full_name; + + full_name.reserve(rpc_type.size() + service_name.size() + func_name.size() + 3); + full_name.append(rpc_type).append(":/").append(service_name).append("/").append(func_name); + + return full_name; } class ServiceBase {