diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fa1ba304..22ba8494f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -file(READ "${CMAKE_SOURCE_DIR}/VERSION" AIMRT_VERSION) +file(READ "${PROJECT_SOURCE_DIR}/VERSION" AIMRT_VERSION) string(STRIP "${AIMRT_VERSION}" AIMRT_VERSION) set(INSTALL_CONFIG_NAME ${PROJECT_NAME}-config) diff --git a/CODE_OF_CONDUCT.zh_CN.md b/CODE_OF_CONDUCT.zh_CN.md index f1197f734..2ffa1a124 100644 --- a/CODE_OF_CONDUCT.zh_CN.md +++ b/CODE_OF_CONDUCT.zh_CN.md @@ -1,3 +1,4 @@ + [English](CODE_OF_CONDUCT.md) | 中文 # 社区行为准则 diff --git a/VERSION b/VERSION index a3df0a695..ac39a106c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.0 +0.9.0 diff --git a/build.bat b/build.bat index 84a07107b..67f4bb0ce 100644 --- a/build.bat +++ b/build.bat @@ -41,4 +41,9 @@ if exist .\build\install ( cmake --build build --config Release --target install --parallel %NUMBER_OF_PROCESSORS% +if %errorlevel% neq 0 ( + echo build failed + exit /b 1 +) + endlocal diff --git a/cmake/GetNghttp2.cmake b/cmake/GetNghttp2.cmake index e9e389d47..255322fbf 100644 --- a/cmake/GetNghttp2.cmake +++ b/cmake/GetNghttp2.cmake @@ -28,6 +28,7 @@ if(NOT nghttp2_POPULATED) set(BUILD_SHARED_LIBS OFF) set(BUILD_STATIC_LIBS ON) + set(ENABLE_LIB_ONLY ON) # Avoid name conflict set(nghttp2_CMAKE_FILE "${nghttp2_SOURCE_DIR}/CMakeLists.txt") diff --git a/document/doxygen/Doxyfile b/document/doxygen/Doxyfile index 667c1d449..af0b4b9ad 100644 --- a/document/doxygen/Doxyfile +++ b/document/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = AimRT # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.8.0 +PROJECT_NUMBER = 0.9.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/document/sphinx-cn/conf.py b/document/sphinx-cn/conf.py index 1fa269674..f5581ba70 100644 --- a/document/sphinx-cn/conf.py +++ b/document/sphinx-cn/conf.py @@ -9,7 +9,7 @@ project = 'AimRT' copyright = '2024, Agibot' author = 'Agibot' -release = 'v0.8.0' +release = 'v0.9.0' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/document/sphinx-cn/release_notes/index.md b/document/sphinx-cn/release_notes/index.md index 865ddf80e..e13ce894b 100644 --- a/document/sphinx-cn/release_notes/index.md +++ b/document/sphinx-cn/release_notes/index.md @@ -6,7 +6,8 @@ ```{toctree} :maxdepth: 1 -v0_8_0.md +v0_9_0.md + ``` @@ -17,4 +18,7 @@ v0_8_0.md v0_6_0.md v0_7_0.md +v0_8_0.md +v0_8_1.md + ``` diff --git a/document/sphinx-cn/release_notes/v0_8_1.md b/document/sphinx-cn/release_notes/v0_8_1.md new file mode 100644 index 000000000..a5d335298 --- /dev/null +++ b/document/sphinx-cn/release_notes/v0_8_1.md @@ -0,0 +1,7 @@ +# v0.8.1 + + +**重要修改**: +- 修复读取 VERSION 文件的错误 +- 修复 aimrt_py 打包过程中的错误 +- 修复 nghttp2 依赖问题 diff --git a/document/sphinx-cn/release_notes/v0_9_0.md b/document/sphinx-cn/release_notes/v0_9_0.md new file mode 100644 index 000000000..f3a5225e1 --- /dev/null +++ b/document/sphinx-cn/release_notes/v0_9_0.md @@ -0,0 +1,14 @@ +# v0.9.0 + + +**重要修改**: +- 优化了 zenoh 插件: + - 添加了 zenoh rpc 后端; + - 现在可以传入 zenoh 原生配置; +- mqtt 新增配置项以支持加密传输 + + + +**次要修改**: +- 缩短了一些 examples 的文件路径长度; +- 修复了一些轻微问题; diff --git a/document/sphinx-cn/tutorials/examples/examples_cpp.md b/document/sphinx-cn/tutorials/examples/examples_cpp.md index 5431840be..cb1fa0a9b 100644 --- a/document/sphinx-cn/tutorials/examples/examples_cpp.md +++ b/document/sphinx-cn/tutorials/examples/examples_cpp.md @@ -8,9 +8,9 @@ AimRT 提供了以下 CPP 接口使用示例: - {{ '[executor]({}/src/examples/cpp/executor)'.format(code_site_root_path_url) }} - {{ '[logger]({}/src/examples/cpp/logger)'.format(code_site_root_path_url) }} - {{ '[parameter]({}/src/examples/cpp/parameter)'.format(code_site_root_path_url) }} - - {{ '[protobuf_channel]({}/src/examples/cpp/protobuf_channel)'.format(code_site_root_path_url) }} - - {{ '[protobuf_rpc]({}/src/examples/cpp/protobuf_rpc)'.format(code_site_root_path_url) }} - - {{ '[ros2_channel]({}/src/examples/cpp/ros2_channel)'.format(code_site_root_path_url) }} + - {{ '[pb_chn]({}/src/examples/cpp/pb_chn)'.format(code_site_root_path_url) }} + - {{ '[pb_rpc]({}/src/examples/cpp/pb_rpc)'.format(code_site_root_path_url) }} + - {{ '[ros2_chn]({}/src/examples/cpp/ros2_chn)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc]({}/src/examples/cpp/ros2_rpc)'.format(code_site_root_path_url) }} 关于这些示例的说明: diff --git a/document/sphinx-cn/tutorials/examples/examples_py.md b/document/sphinx-cn/tutorials/examples/examples_py.md index df72c8701..e9e397d93 100644 --- a/document/sphinx-cn/tutorials/examples/examples_py.md +++ b/document/sphinx-cn/tutorials/examples/examples_py.md @@ -5,8 +5,8 @@ AimRT 提供了以下 Python 接口使用示例: - {{ '[python examples]({}/src/examples/py)'.format(code_site_root_path_url) }} - {{ '[helloworld]({}/src/examples/py/helloworld)'.format(code_site_root_path_url) }} - - {{ '[protobuf_channel]({}/src/examples/py/protobuf_channel)'.format(code_site_root_path_url) }} - - {{ '[protobuf_rpc]({}/src/examples/py/protobuf_rpc)'.format(code_site_root_path_url) }} + - {{ '[pb_chn]({}/src/examples/py/pb_chn)'.format(code_site_root_path_url) }} + - {{ '[pb_rpc]({}/src/examples/py/pb_rpc)'.format(code_site_root_path_url) }} 关于这些示例的说明: - 每个示例都有自己独立的 readme 文档,详情请点击示例链接进入后查看; diff --git a/document/sphinx-cn/tutorials/index.md b/document/sphinx-cn/tutorials/index.md index fc836f3c7..4235e59f9 100644 --- a/document/sphinx-cn/tutorials/index.md +++ b/document/sphinx-cn/tutorials/index.md @@ -3,7 +3,7 @@ ## 快速开始 -通过此部分文档,您可以了解到如何引用、安装 AimRT,并通过创建一个`Hello World`程序来快速体验AimRT。 +通过此部分文档,您可以了解到如何引用、安装 AimRT,并通过创建一个`Hello World`程序来快速体验 AimRT。 ```{toctree} :maxdepth: 1 @@ -16,7 +16,7 @@ quick_start/helloworld_py.md ## 概念 -通过此部分文档,您可以了解到AimRT中的一些核心概念和设计思想。 +通过此部分文档,您可以了解到 AimRT 中的一些核心概念和设计思想。 ```{toctree} diff --git a/document/sphinx-cn/tutorials/interface_cpp/channel.md b/document/sphinx-cn/tutorials/interface_cpp/channel.md index 56de4aab0..cb03072c9 100644 --- a/document/sphinx-cn/tutorials/interface_cpp/channel.md +++ b/document/sphinx-cn/tutorials/interface_cpp/channel.md @@ -9,12 +9,12 @@ - {{ '[aimrt_module_ros2_interface/channel/ros2_channel.h]({}/src/interface/aimrt_module_ros2_interface/channel/ros2_channel.h)'.format(code_site_root_path_url) }} 参考示例: -- {{ '[protobuf_channel]({}/src/examples/cpp/protobuf_channel)'.format(code_site_root_path_url) }} - - {{ '[normal_publisher_module.cc]({}/src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc)'.format(code_site_root_path_url) }} - - {{ '[normal_subscriber_module.cc]({}/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc)'.format(code_site_root_path_url) }} -- {{ '[ros2_channel]({}/src/examples/cpp/ros2_channel)'.format(code_site_root_path_url) }} - - {{ '[normal_publisher_module.cc]({}/src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc)'.format(code_site_root_path_url) }} - - {{ '[normal_subscriber_module.cc]({}/src/examples/cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_chn]({}/src/examples/cpp/pb_chn)'.format(code_site_root_path_url) }} + - {{ '[normal_publisher_module.cc]({}/src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc)'.format(code_site_root_path_url) }} + - {{ '[normal_subscriber_module.cc]({}/src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc)'.format(code_site_root_path_url) }} +- {{ '[ros2_chn]({}/src/examples/cpp/ros2_chn)'.format(code_site_root_path_url) }} + - {{ '[normal_publisher_module.cc]({}/src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc)'.format(code_site_root_path_url) }} + - {{ '[normal_subscriber_module.cc]({}/src/examples/cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc)'.format(code_site_root_path_url) }} ## 协议 diff --git a/document/sphinx-cn/tutorials/interface_cpp/rpc.md b/document/sphinx-cn/tutorials/interface_cpp/rpc.md index 812715b19..9dbb32ca3 100644 --- a/document/sphinx-cn/tutorials/interface_cpp/rpc.md +++ b/document/sphinx-cn/tutorials/interface_cpp/rpc.md @@ -10,7 +10,7 @@ - {{ '[aimrt_module_cpp_interface/rpc/rpc_co_filter.h]({}/src/interface/aimrt_module_cpp_interface/rpc/rpc_co_filter.h)'.format(code_site_root_path_url) }} 参考示例: -- {{ '[protobuf_rpc]({}/src/examples/cpp/protobuf_rpc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc]({}/src/examples/cpp/pb_rpc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc]({}/src/examples/cpp/ros2_rpc)'.format(code_site_root_path_url) }} @@ -334,7 +334,7 @@ void HelloWorldModule::Foo() { 更多示例请参考: -- {{ '[protobuf_rpc_sync_client]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_sync_client]({}/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_sync_client]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc)'.format(code_site_root_path_url) }} @@ -398,7 +398,7 @@ void HelloWorldModule::Foo() { 更多示例请参考: -- {{ '[protobuf_rpc_async_client]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_async_client]({}/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_async_client]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc)'.format(code_site_root_path_url) }} @@ -465,7 +465,7 @@ void HelloWorldModule::Foo() { 更多示例请参考: -- {{ '[protobuf_rpc_future_client]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_future_client]({}/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_future_client]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc)'.format(code_site_root_path_url) }} @@ -526,7 +526,7 @@ co::Task HelloWorldModule::Foo() { 更多示例请参考: -- {{ '[protobuf_rpc_co_client]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_co_client]({}/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_co_client]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc)'.format(code_site_root_path_url) }} @@ -609,7 +609,7 @@ bool HelloWorldModule::Initialize(aimrt::CoreRef core) { 更多示例请参考: -- {{ '[protobuf_rpc_sync_service]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_sync_service]({}/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_sync_service]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_sync_server_module/service.cc)'.format(code_site_root_path_url) }} @@ -658,7 +658,7 @@ bool HelloWorldModule::Initialize(aimrt::CoreRef core) { 更多示例请参考: -- {{ '[protobuf_rpc_async_service]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_async_service]({}/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_async_service]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_async_server_module/service.cc)'.format(code_site_root_path_url) }} @@ -704,7 +704,7 @@ bool HelloWorldModule::Initialize(aimrt::CoreRef core) { ``` 更多示例请参考: -- {{ '[protobuf_rpc_co_service]({}/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc)'.format(code_site_root_path_url) }} +- {{ '[pb_rpc_co_service]({}/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc)'.format(code_site_root_path_url) }} - {{ '[ros2_rpc_co_service]({}/src/examples/cpp/ros2_rpc/module/normal_rpc_co_server_module/service.cc)'.format(code_site_root_path_url) }} ## Context diff --git a/document/sphinx-cn/tutorials/interface_cpp/runtime.md b/document/sphinx-cn/tutorials/interface_cpp/runtime.md index f12a867ca..217322d08 100644 --- a/document/sphinx-cn/tutorials/interface_cpp/runtime.md +++ b/document/sphinx-cn/tutorials/interface_cpp/runtime.md @@ -11,8 +11,8 @@ - {{ '[helloworld]({}/src/examples/cpp/helloworld)'.format(code_site_root_path_url) }} - {{ '[helloworld_app_registration_mode]({}/src/examples/cpp/helloworld/app/helloworld_app_registration_mode)'.format(code_site_root_path_url) }} - {{ '[helloworld_app]({}/src/examples/cpp/helloworld/app/helloworld_app)'.format(code_site_root_path_url) }} - - {{ '[normal_publisher_app]({}/src/examples/cpp/protobuf_channel/app/normal_publisher_app)'.format(code_site_root_path_url) }} - - {{ '[normal_subscriber_app]({}/src/examples/cpp/protobuf_channel/app/normal_subscriber_app)'.format(code_site_root_path_url) }} + - {{ '[normal_publisher_app]({}/src/examples/cpp/pb_chn/app/normal_publisher_app)'.format(code_site_root_path_url) }} + - {{ '[normal_subscriber_app]({}/src/examples/cpp/pb_chn/app/normal_subscriber_app)'.format(code_site_root_path_url) }} ## 简介 @@ -229,8 +229,8 @@ int32_t main(int32_t argc, char** argv) { 更多示例请参考: - {{ '[helloworld_app]({}/src/examples/cpp/helloworld/app/helloworld_app)'.format(code_site_root_path_url) }} -- {{ '[normal_publisher_app]({}/src/examples/cpp/protobuf_channel/app/normal_publisher_app)'.format(code_site_root_path_url) }} -- {{ '[normal_subscriber_app]({}/src/examples/cpp/protobuf_channel/app/normal_subscriber_app)'.format(code_site_root_path_url) }} +- {{ '[normal_publisher_app]({}/src/examples/cpp/pb_chn/app/normal_publisher_app)'.format(code_site_root_path_url) }} +- {{ '[normal_subscriber_app]({}/src/examples/cpp/pb_chn/app/normal_subscriber_app)'.format(code_site_root_path_url) }} ## Pkg 模式 diff --git a/document/sphinx-cn/tutorials/interface_py/channel.md b/document/sphinx-cn/tutorials/interface_py/channel.md index 02f2d691c..d709892c1 100644 --- a/document/sphinx-cn/tutorials/interface_py/channel.md +++ b/document/sphinx-cn/tutorials/interface_py/channel.md @@ -4,8 +4,8 @@ ## 相关链接 参考示例: -- {{ '[examples_py_protobuf_channel_publisher_app.py]({}/src/examples/py/protobuf_channel/examples_py_protobuf_channel_publisher_app.py)'.format(code_site_root_path_url) }} -- {{ '[examples_py_protobuf_channel_subscriber_app.py]({}/src/examples/py/protobuf_channel/examples_py_protobuf_channel_subscriber_app.py)'.format(code_site_root_path_url) }} +- {{ '[examples_py_pb_chn_publisher_app.py]({}/src/examples/py/pb_chn/examples_py_pb_chn_publisher_app.py)'.format(code_site_root_path_url) }} +- {{ '[examples_py_pb_chn_subscriber_app.py]({}/src/examples/py/pb_chn/examples_py_pb_chn_subscriber_app.py)'.format(code_site_root_path_url) }} ## protobuf 协议 diff --git a/document/sphinx-cn/tutorials/interface_py/rpc.md b/document/sphinx-cn/tutorials/interface_py/rpc.md index da2d5e006..a37608f7e 100644 --- a/document/sphinx-cn/tutorials/interface_py/rpc.md +++ b/document/sphinx-cn/tutorials/interface_py/rpc.md @@ -4,8 +4,8 @@ ## 相关链接 参考示例: -- {{ '[examples_py_protobuf_rpc_client_app.py]({}/src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_client_app.py)'.format(code_site_root_path_url) }} -- {{ '[examples_py_protobuf_rpc_server_app.py]({}/src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_server_app.py)'.format(code_site_root_path_url) }} +- {{ '[examples_py_pb_rpc_client_app.py]({}/src/examples/py/pb_rpc/examples_py_pb_rpc_client_app.py)'.format(code_site_root_path_url) }} +- {{ '[examples_py_pb_rpc_server_app.py]({}/src/examples/py/pb_rpc/examples_py_pb_rpc_server_app.py)'.format(code_site_root_path_url) }} ## protobuf 协议 diff --git a/document/sphinx-cn/tutorials/plugins/mqtt_plugin.md b/document/sphinx-cn/tutorials/plugins/mqtt_plugin.md index 61bf6046e..aafb696ee 100644 --- a/document/sphinx-cn/tutorials/plugins/mqtt_plugin.md +++ b/document/sphinx-cn/tutorials/plugins/mqtt_plugin.md @@ -17,18 +17,19 @@ 插件的配置项如下: -| 节点 | 类型 | 是否可选| 默认值 | 作用 | -| ---- | ---- | ---- | ---- | ---- | -| broker_addr | string | 必选 | "" | mqtt broker 的地址 | -| client_id | string | 必选 | "" | 本节点的 mqtt client id | -| max_pkg_size_k | int | 可选 | 1024 | 最大包尺寸,单位:KB | +| 节点 | 类型 | 是否可选 | 默认值 | 作用 | +| -------------- | ------ | -------- | ------ | ----------------------- | +| broker_addr | string | 必选 | "" | mqtt broker 的地址 | +| client_id | string | 必选 | "" | 本节点的 mqtt client id | +| max_pkg_size_k | int | 可选 | 1024 | 最大包尺寸,单位:KB | +| truststore | string | 可选 | "" | broker的CA证书路径 | 关于**mqtt_plugin**的配置,使用注意点如下: - `broker_addr`表示 mqtt broker 的地址,使用者必须保证有 mqtt 的 broker 运行在该地址,否则启动会失败。 - `client_id`表示本节点连接 mqtt broker 时的 client id。 - `max_pkg_size_k`表示传输数据时的最大包尺寸,默认 1 MB。注意,必须 broker 也要支持该尺寸才行。 - +- `truststore`表示 broker 的 CA 证书路径,例如`/etc/emqx/certs/cacert.pem` 。当`broker_addr`的协议被配置为`ssl`或者`mqtts`时,该选项生效,用于指定 CA 证书路径,否则自动忽略该选项。 **mqtt_plugin**插件基于[paho.mqtt.c](https://github.com/eclipse/paho.mqtt.c)封装,在使用时,Channel 订阅回调、RPC Server 处理方法、RPC Client 返回时,使用的都是**paho.mqtt.c**提供的线程,当使用者在回调中阻塞了线程时,有可能导致无法继续接收/发送消息。正如 Module 接口文档中所述,一般来说,如果回调中的任务非常轻量,那就可以直接在回调里处理;但如果回调中的任务比较重,那最好调度到其他专门执行任务的执行器里处理。 @@ -53,17 +54,17 @@ aimrt: `mqtt`类型的 RPC 后端是**mqtt_plugin**中提供的一种 RPC 后端,用于通过 mqtt 的方式来调用和处理 AimRT RPC 请求。其所有的配置项如下: -| 节点 | 类型 | 是否可选 | 默认值 | 作用 | -|------------------------------------|---------|-------|------|----------------------------------------------| -| timeout_executor | string | 可选 | "" | Client 端发起 RPC 超时情况下的执行器 | -| clients_options | array | 可选 | [] | Client 端发起 RPC 请求时的规则 | -| clients_options[i].func_name | string | 必选 | "" | RPC Func 名称,支持正则表达式 | -| clients_options[i].server_mqtt_id | string | 可选 | "" | RPC Func 发起调用时请求的 mqtt 服务端 id | -| clients_options[i].qos | int | 可选 | 2 | RPC Client 端 mqtt qos,取值范围:0/1/2 | -| servers_options | array | 可选 | [] | 服务端处理 RPC 请求时的规则 | -| servers_options[i].func_name | string | 必选 | "" | RPC Func 名称,支持正则表达式 | -| servers_options[i].allow_share | bool | 可选 | true | 该 RPC 服务是否允许共享订阅,不允许的话该服务只能通过指定 server id 进行调用 | -| servers_options[i].qos | int | 可选 | 2 | RPC Server 端 mqtt qos,取值范围:0/1/2 | +| 节点 | 类型 | 是否可选 | 默认值 | 作用 | +| --------------------------------- | ------ | -------- | ------ | ---------------------------------------------------------------------------- | +| timeout_executor | string | 可选 | "" | Client 端发起 RPC 超时情况下的执行器 | +| clients_options | array | 可选 | [] | Client 端发起 RPC 请求时的规则 | +| clients_options[i].func_name | string | 必选 | "" | RPC Func 名称,支持正则表达式 | +| clients_options[i].server_mqtt_id | string | 可选 | "" | RPC Func 发起调用时请求的 mqtt 服务端 id | +| clients_options[i].qos | int | 可选 | 2 | RPC Client 端 mqtt qos,取值范围:0/1/2 | +| servers_options | array | 可选 | [] | 服务端处理 RPC 请求时的规则 | +| servers_options[i].func_name | string | 必选 | "" | RPC Func 名称,支持正则表达式 | +| servers_options[i].allow_share | bool | 可选 | true | 该 RPC 服务是否允许共享订阅,不允许的话该服务只能通过指定 server id 进行调用 | +| servers_options[i].qos | int | 可选 | 2 | RPC Server 端 mqtt qos,取值范围:0/1/2 | 以下是一个简单的客户端的示例: ```yaml @@ -192,14 +193,14 @@ Server -> Client 的 Mqtt 数据包格式整体分 4 段: `mqtt`类型的 Channel 后端是**mqtt_plugin**中提供的一种 Channel 后端,用于通过 mqtt 的方式来发布和订阅消息。其所有的配置项如下: -| 节点 | 类型 | 是否可选| 默认值 | 作用 | -| ---- | ---- | ---- | ---- | ---- | -| pub_topics_options | array | 可选 | [] | 发布 Topic 时的规则 | -| pub_topics_options[i].topic_name | string | 必选 | "" | Topic 名称,支持正则表达式 | -| pub_topics_options[i].qos | int | 必选 | 2 | Publish 端 mqtt qos,取值范围:0/1/2 | -| sub_topics_options | array | 可选 | [] | 发布 Topic 时的规则 | -| sub_topics_options[i].topic_name | string | 必选 | "" | Topic 名称,支持正则表达式 | -| sub_topics_options[i].qos | int | 必选 | 2 | Subscribe 端 mqtt qos,取值范围:0/1/2 | +| 节点 | 类型 | 是否可选 | 默认值 | 作用 | +| -------------------------------- | ------ | -------- | ------ | -------------------------------------- | +| pub_topics_options | array | 可选 | [] | 发布 Topic 时的规则 | +| pub_topics_options[i].topic_name | string | 必选 | "" | Topic 名称,支持正则表达式 | +| pub_topics_options[i].qos | int | 必选 | 2 | Publish 端 mqtt qos,取值范围:0/1/2 | +| sub_topics_options | array | 可选 | [] | 发布 Topic 时的规则 | +| sub_topics_options[i].topic_name | string | 必选 | "" | Topic 名称,支持正则表达式 | +| sub_topics_options[i].qos | int | 必选 | 2 | Subscribe 端 mqtt qos,取值范围:0/1/2 | 以下是一个简单的发布端的示例: diff --git a/document/sphinx-cn/tutorials/plugins/zenoh_plugin.md b/document/sphinx-cn/tutorials/plugins/zenoh_plugin.md index 889e9be1d..fecc525ca 100644 --- a/document/sphinx-cn/tutorials/plugins/zenoh_plugin.md +++ b/document/sphinx-cn/tutorials/plugins/zenoh_plugin.md @@ -9,30 +9,173 @@ ## 插件概述 -**zenoh_plugin**是一个基于[zenoh.c](https://github.com/eclipse-zenoh/zenoh-c)实现的轻量级的、高效的、实时的数据传输插件,它旨在为分布式系统提供低延迟、高吞吐量的数据传输和处理能力。此插件提供了以下组件: -- `zenoh`类型 Channel 后端 +**zenoh_plugin** 是一个轻量级的、高效的、实时的数据传输插件,它旨在为分布式系统提供低延迟、高吞吐量的数据传输和处理能力。当需要以下业务场景的时候,zenoh 插件将非常合适: +- `服务发现`机制的通信系统; +- 灵活的网络拓扑结构; +- 低延迟、高吞吐量的网络通信和数据传输; + +此插件为 AimRT 提供以下组件: +- `zenoh` 类型 Rpc 后端 +- `zenoh` 类型 Channel 后端 -在当前版本,本插件没有插件级的配置。由于 zenoh 自带的服务发现机制,用户不必手动配置对端地址。 + +插件的配置项如下: + +| 节点 | 类型 | 是否可选 | 默认值 | 作用 | +| :-------------: | :----: | :------: | :----: | :-------------------------: | +| native_cfg_path | string | 可选 | "" | 使用zenoh提供的原生配置文件 | +| limit_domain | string | 可选 | "" | 对插件的通信域进行限制 | + +关于**zenoh_plugin**的配置,使用注意点如下: +- `native_cfg_path` 表示 zenoh 提供的原生配置文件的路径,可以通过配置该文件来灵活配置 zenoh 的网络结构。如果不填写则默认使用 zenoh 官方提供的默认配置,具体配置内容请参考 zenoh 官方关于[configuration](https://zenoh.io/docs/manual/configuration/)的说明,您也可以直接修改 {{ '[zenoh_native_config.json5]({}/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/zenoh_native_config.json5)'.format(code_site_root_path_url) }}文件来自定义配置,这里列举几个常用的配置项: + +| 配置项 | 作用 | zenoh_native_config中的配置值 | +| :---------------------------: | :-------------------------------------------------------------------: | :---------------------------: | +| scouting.scouting. enabled | 是否开启多播,这将允许多个 zenoh 节点自动发现彼此 | true | +| scouting.scouting. address | 配置多播地址 | 224.0.0.224:7446 | +| scouting.scouting. interface | 配置所用的网络接口 | auto | +| listen.endpoints | 需要主动监听的地址 | - | +| transport.unicast.lowlatency | 是否启动最低时延,若开启将有助于提升传输速率,注意其不能与qos同时开启 | true | +| transport.unicast.qos.enabled | 是否启动服务质量,注意其不能与lowlatency同时开启 | false | -**请注意**,该插件在编译过程依赖于[Rust](https://www.rust-lang.org/),请确保运行环境中存在 Rust 编译器,否则该插件将不会编译。 +- limit_domain 表示插件的通信域,其兼容 zenoh 强大的Key & Key Expression。如果不填写则使用插件的默认的通信域(即消息的 topic ),只有相`匹配`的域才能进行通信,具体的书写格式如下: +```shell + +#请不要以"/"开始,中间以"/"分隔,结尾不要带"/" (与zenoh官方书写方式一致),如: + +xxx/yyy/zzz + +``` + 最简单的一种匹配就是二者域相同,除此之外,zenoh 官方提供了更灵活的匹配机制,具体可查阅 zenoh 官方关于[key](https://zenoh.io/docs/manual/abstractions/)的解释。 以下是一个简单的示例: +```yaml +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 +``` + + +## zenoh 类型 Rpc 后端 +`zenoh`类型的 Rpc后端是**zenoh_plugin**中提供的一种 Rpc 后端,主要用来构建请求-响应模型。其所有的配置项如下: + +| 节点 | 类型 | 是否可选 | 默认值 | 作用 | +| ---------------- | ------ | -------- | ------ | ---------------------------------- | +| timeout_executor | string | 可选 | "" | Client 端发起 RPC 超时情况下的执行器 | + +以下是一个简单的客户端的示例: + ```yaml aimrt: plugin: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + executor: + executors: + - name: timeout_handle + type: time_wheel + options: + bind_executor: work_thread_pool + rpc: + backends: + - type: zenoh + options: + timeout_executor: timeout_handle + clients_options: + - func_name: "(.*)" + enable_backends: [zenoh] + +``` + +以下是一个简单的服务端的示例: + +```yaml + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + rpc: + backends: + - type: zenoh + servers_options: + - func_name: "(.*)" + enable_backends: [zenoh] + +``` +以上示例中,Client 端和 Server 端都采用服务发现机制,即在统一网络中的两个端点可自动发现彼此并建立连接。 + +在整个 RPC 过程中,底层使用的 Zenoh Topic 名称格式如下: +- Server 端 + - 订阅 Req 使用的 topic: + - `req/aimrt_rpc/${func_name}/${limit_domain}>` + - 发布 Rsp 使用的 topic:`rsp/aimrt_rpc/${func_name}/${limit_domain}` +- Client 端 + - 发布 Req 使用的 topic: + - `req/aimrt_rpc/${func_name}/ ${limit_domain}` + - 订阅 Rsp 使用的 topic:`rsp_/imrt_rpc/${func_name}/${limit_domain}` + +`${func_name}`是 url 编码后的 AimRT RPC 方法名称。 + + +例如,对于一个 client 的请求来说,若 func 名称为`/aimrt.protocols.example.ExampleService/GetBarData`, limit_domain 没有配置,则`最终的topic名称为`:req/aimrt_rpc/%2Faimrt.protocols.example.ExampleService%2FGetBarData`。 + + + +Client -> Server 的 Zenoh 数据包格式整体分 5 段: +- 序列化类型,一般是`pb`或`json` +- client 端想要 server 端回复 rsp 的 zenoh topic 名称。client 端自己需要订阅这个 zenoh topic +- msg id,4 字节,server 端会原封不动的封装到 rsp 包里,供 client 端定位 rsp 对应哪个 req +- context 区 + - context 数量,1 字节,最大 255 个 context + - context_1 key, 2 字节长度 + 数据区 + - context_2 key, 2 字节长度 + 数据区 + - ... +- msg 数据 + +``` +| n(0~255) [1 byte] | content type [n byte] +| m(0~255) [1 byte] | rsp topic name [m byte] +| msg id [4 byte] +| context num [1 byte] +| context_1 key size [2 byte] | context_1 key data [key_1_size byte] +| context_1 val size [2 byte] | context_1 val data [val_1_size byte] +| context_2 key size [2 byte] | context_2 key data [key_2_size byte] +| context_2 val size [2 byte] | context_2 val data [val_2_size byte] +| ... +| msg data [remaining byte] +``` + +Server -> Client 的 Zenoh 数据包格式整体分 4 段: +- 序列化类型,一般是`pb`或`json` +- msg id,4 字节,req 中的 msg id +- status code,4 字节,框架错误码,如果这个部分不为零,则代表服务端发生了错误,数据段将没有内容 +- msg 数据 + +``` +| n(0~255) [1 byte] | content type [n byte] +| msg id [4 byte] +| status code [4 byte] +| msg data [remaining byte] ``` ## zenoh 类型 Channel 后端 -`zenoh`类型的 Channel 后端是**zenoh_plugin**中提供的一种 Channel 后端,主要用来构建发布和订阅模型,当前版本暂时没有可配置项。 - +`zenoh`类型的 Channel 后端是**zenoh_plugin**中提供的一种Channel后端,主要用来构建发布和订阅模型。 以下是一个简单的发布端的示例: ```yaml @@ -41,6 +184,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 channel: backends: - type: zenoh @@ -57,6 +202,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 channel: backends: - type: zenoh @@ -65,11 +212,11 @@ channel: enable_backends: [zenoh] ``` -以上示例中都使用 zeonh 的服务发现机制,即在统一网络中的两个端点可自动发现彼此并建立连接,因此在配置过程中不需要用户手动输入任何参数,降低使用复杂度。 +以上示例中都使用 zeonh 的服务发现机制,即在统一网络中的两个端点可自动发现彼此并建立连接。 -在这个过程中,底层使用的 Zenoh Topic 名称格式为:`channel/${topic_name}/${message_type}`。其中,`${topic_name}`为 AimRT 的 Topic 名称,`${message_type}`为 url 编码后的 AimRT 消息名称。这个 Topic 被设置成为 Zenoh 的键表达式(Keyxpr),这是 Zenoh 的提供的资源标识符,只有键表达式匹配的订阅者和发布者才能够进行通信。 +在这个过程中,底层使用的 Topic 名称格式为:`channel/${topic_name}/${message_type}${limit_domain}`。其中,`${topic_name}`为 AimRT 的 Topic 名称,`${message_type}`为 url 编码后的 AimRT 消息名称, `${limit_domain}`为插件的限制域。这个 Topic 被设置成为 Zenoh 最终的键表达式(Keyxpr),这是 Zenoh 的提供的资源标识符,只有键表达式匹配的订阅者和发布者才能够进行通信。 -例如,AimRT Topic 名称为`test_topic`,消息类型为`pb:aimrt.protocols.example.ExampleEventMsg`,则最终 Zenoh 的 topic 名称为:`channel/test_topic/pb%3Aaimrt.protocols.example.ExampleEventMsg`。如果订阅者和发布者的 Topic 均为`channel/test_topic/pb%3Aaimrt.protocols.example.ExampleEventMsg`,则二者可以进行通信。 +例如,AimRT Topic 名称为`test_topic`,消息类型为`pb:aimrt.protocols.example.ExampleEventMsg`,限制域为`room1/A2`,则最终 Zenoh 的 topic 名称为:`channel/test_topic/pb%3Aaimrt.protocols.example.ExampleEventMsgroom1/A2`。如果订阅者和发布者的 Topic 均为`channel/test_topic/pb%3Aaimrt.protocols.example.ExampleEventMsgroom1/A2`,则二者可以进行通信。 在AimRT发布端发布数据到订阅端这个链路上,Zenoh 数据包格式整体分 3 段: - 序列化类型,一般是`pb`或`json` @@ -90,4 +237,4 @@ channel: | context_2 val size [2 byte] | context_2 val data [val_2_size byte] | ... | msg data [len - 1 - n byte] | -``` \ No newline at end of file +``` diff --git a/document/sphinx-cn/tutorials/quick_start/helloworld_cpp.md b/document/sphinx-cn/tutorials/quick_start/helloworld_cpp.md index 6c87567f1..f6e515ce3 100644 --- a/document/sphinx-cn/tutorials/quick_start/helloworld_cpp.md +++ b/document/sphinx-cn/tutorials/quick_start/helloworld_cpp.md @@ -70,7 +70,8 @@ add_subdirectory(src) ``` ### File 2 : /cmake/GetAimRT.cmake -此文件用于获取 AimRT。 +此文件用于获取 AimRT,注意需要将`GIT_TAG`版本改为你想引用的版本: + ```cmake include(FetchContent) diff --git a/document/sphinx-cn/tutorials/quick_start/installation_cpp.md b/document/sphinx-cn/tutorials/quick_start/installation_cpp.md index b25d63d1d..76c9e5e66 100644 --- a/document/sphinx-cn/tutorials/quick_start/installation_cpp.md +++ b/document/sphinx-cn/tutorials/quick_start/installation_cpp.md @@ -28,12 +28,15 @@ AimRT 兼容 linux、windows 等主流操作系统,编译器需要能够支持 - 在编译构建时,AimRT 可能通过源码方式引用一些第三方依赖,如果出现网络问题,可以参考[CMake](../concepts/cmake.md)文档进行处理。 - 在打开某些选项、编译某些插件时,AimRT 可能需要额外引用一些第三方依赖,细节请参考对应插件的文档、CMake 代码文件或构建时的提示。以下是一些示例: - 如果要编译 ROS2 相关接口/插件,AimRT 会通过`find_package`的方式在本地寻找 rclcpp 等依赖,请确保本地安装有[ROS2 Humble](https://docs.ros.org/en/humble/)。 - - 如果要构建 Python 接口、cli 工具等,AimRT 会通过`find_package`的方式在本地寻找 Python 依赖,请确保本地安装有 Python3。 + - 如果要构建 Python 接口、cli 工具等,AimRT 会通过`find_package`的方式在本地寻找 Python 依赖,请确保本地安装有 Python3 及相关的 python 包,缺失相应包在 CMake 生成过程中会告警不会编译相应内容。 + - Zenoh 插件需要本地安装有 rust 环境,在 Ubuntu 上可通过 `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` 进行安装,没有 rust 环境则不会编译 zenoh 插件。 + - Iceoryx 插件依赖 libacl,在 ubuntu 上可通过 `sudo apt install libacl1-dev` 进行安装,选项开启但缺失相应包会报错。 + - Boost 依赖由于其内容较大,CMake 会首先检查本地是否有 1.82.0 及以上版本的 boost,如果有则使用本地安装的 boost,如果没有则进行下载。 ## 通过源码引用 -您可以参考以下 CMake 代码引用 AimRT: +您可以参考以下 CMake 代码引用 AimRT,注意需要将`GIT_TAG`版本改为你想引用的版本: ```cmake include(FetchContent) diff --git a/src/examples/cpp/CMakeLists.txt b/src/examples/cpp/CMakeLists.txt index 7d435a763..928f91d5c 100644 --- a/src/examples/cpp/CMakeLists.txt +++ b/src/examples/cpp/CMakeLists.txt @@ -9,11 +9,11 @@ add_subdirectory(executor) add_subdirectory(parameter) if(AIMRT_BUILD_WITH_PROTOBUF) - add_subdirectory(protobuf_channel) - add_subdirectory(protobuf_rpc) + add_subdirectory(pb_chn) + add_subdirectory(pb_rpc) endif() if(AIMRT_BUILD_WITH_ROS2) - add_subdirectory(ros2_channel) + add_subdirectory(ros2_chn) add_subdirectory(ros2_rpc) endif() diff --git a/src/examples/cpp/protobuf_channel/CMakeLists.txt b/src/examples/cpp/pb_chn/CMakeLists.txt similarity index 76% rename from src/examples/cpp/protobuf_channel/CMakeLists.txt rename to src/examples/cpp/pb_chn/CMakeLists.txt index adf8b77c7..601075692 100644 --- a/src/examples/cpp/protobuf_channel/CMakeLists.txt +++ b/src/examples/cpp/pb_chn/CMakeLists.txt @@ -14,9 +14,9 @@ add_subdirectory(module/benchmark_publisher_module) add_subdirectory(module/benchmark_subscriber_module) # pkg -add_subdirectory(pkg/protobuf_channel_pkg) -add_subdirectory(pkg/protobuf_channel_pub_pkg) -add_subdirectory(pkg/protobuf_channel_sub_pkg) +add_subdirectory(pkg/pb_chn_pkg) +add_subdirectory(pkg/pb_chn_pub_pkg) +add_subdirectory(pkg/pb_chn_sub_pkg) # app add_subdirectory(app/normal_publisher_app) @@ -38,6 +38,6 @@ add_custom_target( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CUR_INSTALL_SOURCE_DIR}/bin ${CMAKE_BINARY_DIR} DEPENDS aimrt::runtime::main - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_channel_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_channel_pub_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_channel_sub_pkg) + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_chn_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_chn_pub_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_chn_sub_pkg) diff --git a/src/examples/cpp/protobuf_channel/README.md b/src/examples/cpp/pb_chn/README.md similarity index 72% rename from src/examples/cpp/protobuf_channel/README.md rename to src/examples/cpp/pb_chn/README.md index 21dfd5e9f..c84ca564d 100644 --- a/src/examples/cpp/protobuf_channel/README.md +++ b/src/examples/cpp/pb_chn/README.md @@ -14,17 +14,17 @@ - [event.proto](../../../protocols/example/event.proto) - [normal_publisher_module.cc](./module/normal_publisher_module/normal_publisher_module.cc) - [normal_subscriber_module.cc](./module/normal_subscriber_module/normal_subscriber_module.cc) -- [protobuf_channel_pub_pkg/pkg_main.cc](./pkg/protobuf_channel_pub_pkg/pkg_main.cc) -- [protobuf_channel_sub_pkg/pkg_main.cc](./pkg/protobuf_channel_sub_pkg/pkg_main.cc) +- [pb_chn_pub_pkg/pkg_main.cc](./pkg/pb_chn_pub_pkg/pkg_main.cc) +- [pb_chn_sub_pkg/pkg_main.cc](./pkg/pb_chn_sub_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_channel_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml) +- [examples_cpp_pb_chn_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_chn_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_channel.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_chn.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -32,7 +32,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 channel 后端进行通信; @@ -51,21 +51,21 @@ - [event.proto](../../../protocols/example/event.proto) - [normal_publisher_module.cc](./module/normal_publisher_module/normal_publisher_module.cc) - [normal_subscriber_module.cc](./module/normal_subscriber_module/normal_subscriber_module.cc) -- [protobuf_channel_pkg/pkg_main.cc](./pkg/protobuf_channel_pkg/pkg_main.cc) +- [pb_chn_pkg/pkg_main.cc](./pkg/pb_chn_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_channel_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml) +- [examples_cpp_pb_chn_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_channel_single_pkg.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_chn_single_pkg.sh`脚本启动进程; - 键入`ctrl-c`停止进程; 说明: -- 此示例与 **protobuf channel** 示例基本一致,唯一的区别是将 `NormalPublisherModule` 和 `NormalSubscriberModule` 集成到 `protobuf_channel_pkg` 一个 Pkg 中; +- 此示例与 **protobuf channel** 示例基本一致,唯一的区别是将 `NormalPublisherModule` 和 `NormalSubscriberModule` 集成到 `pb_chn_pkg` 一个 Pkg 中; ## protobuf channel publisher app @@ -83,22 +83,22 @@ - [event.proto](../../../protocols/example/event.proto) - [normal_publisher_app/main.cc](./app/normal_publisher_app/main.cc) - [normal_subscriber_module.cc](./module/normal_subscriber_module/normal_subscriber_module.cc) -- [protobuf_channel_sub_pkg/pkg_main.cc](./pkg/protobuf_channel_sub_pkg/pkg_main.cc) +- [pb_chn_sub_pkg/pkg_main.cc](./pkg/pb_chn_sub_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_channel_publisher_app_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_channel_publisher_app_cfg.yaml) +- [examples_cpp_pb_chn_publisher_app_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_chn_publisher_app_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_channel_publisher_app.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_chn_publisher_app.sh`脚本启动进程; - 键入`ctrl-c`停止进程; 说明: - 此示例在 App 模式下,直接创建 `NormalPublisherModule` 模块,获取 CoreRef 句柄,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; -- 此示例以继承 `ModuleBase` 的方式创建了`NormalSubscriberModule`模块,会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息,并集成到了 `protobuf_channel_sub_pkg` 中,在启动时加载; +- 此示例以继承 `ModuleBase` 的方式创建了`NormalSubscriberModule`模块,会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息,并集成到了 `pb_chn_sub_pkg` 中,在启动时加载; - 此示例使用 local 类型的 channel 后端进行通信; - 此示例以 App 模式启动; @@ -118,23 +118,23 @@ - [event.proto](../../../protocols/example/event.proto) - [normal_subscriber_app/main.cc](./app/normal_subscriber_app/main.cc) - [normal_publisher_module.cc](./module/normal_publisher_module/normal_publisher_module.cc) -- [protobuf_channel_pub_pkg/pkg_main.cc](./pkg/protobuf_channel_pub_pkg/pkg_main.cc) +- [pb_chn_pub_pkg/pkg_main.cc](./pkg/pb_chn_pub_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_channel_subscriber_app_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_channel_subscriber_app_cfg.yaml) +- [examples_cpp_pb_chn_subscriber_app_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_chn_subscriber_app_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_channel_subscriber_app.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_chn_subscriber_app.sh`脚本启动进程; - 键入`ctrl-c`停止进程; 说明: - 此示例在 App 模式下,直接创建 `NormalSubscriberModule` 模块,获取 CoreRef 句柄,会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例以继承 `ModuleBase` 的方式创建了`NormalPublisherModule`模块,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息,并集成到了 `protobuf_channel_pub_pkg` 中,在启动时加载; +- 此示例以继承 `ModuleBase` 的方式创建了`NormalPublisherModule`模块,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息,并集成到了 `pb_chn_pub_pkg` 中,在启动时加载; - 此示例使用 local 类型的 channel 后端进行通信; - 此示例以 App 模式启动; diff --git a/src/examples/cpp/protobuf_channel/app/normal_publisher_app/CMakeLists.txt b/src/examples/cpp/pb_chn/app/normal_publisher_app/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/app/normal_publisher_app/CMakeLists.txt rename to src/examples/cpp/pb_chn/app/normal_publisher_app/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/app/normal_publisher_app/main.cc b/src/examples/cpp/pb_chn/app/normal_publisher_app/main.cc similarity index 100% rename from src/examples/cpp/protobuf_channel/app/normal_publisher_app/main.cc rename to src/examples/cpp/pb_chn/app/normal_publisher_app/main.cc diff --git a/src/examples/cpp/protobuf_channel/app/normal_subscriber_app/CMakeLists.txt b/src/examples/cpp/pb_chn/app/normal_subscriber_app/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/app/normal_subscriber_app/CMakeLists.txt rename to src/examples/cpp/pb_chn/app/normal_subscriber_app/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/app/normal_subscriber_app/main.cc b/src/examples/cpp/pb_chn/app/normal_subscriber_app/main.cc similarity index 100% rename from src/examples/cpp/protobuf_channel/app/normal_subscriber_app/main.cc rename to src/examples/cpp/pb_chn/app/normal_subscriber_app/main.cc diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml similarity index 94% rename from src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml index fc2d2a1a9..0a3e48be6 100644 --- a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml @@ -36,9 +36,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] - - path: ./protobuf_channel_sub_pkg.dll + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml similarity index 97% rename from src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml index 16e5f8b51..93ea16969 100644 --- a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml @@ -36,7 +36,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_pkg.dll + - path: ./libpb_chn_pkg.so enable_modules: [BenchmarkPublisherModule, BenchmarkSubscriberModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_cfg.yaml similarity index 92% rename from src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_cfg.yaml index 0021431f3..ae76661b4 100644 --- a/src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_cfg.yaml @@ -26,9 +26,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./ros2_channel_pub_pkg.dll + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] - - path: ./ros2_channel_sub_pkg.dll + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_publisher_app_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_publisher_app_cfg.yaml similarity index 95% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_publisher_app_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_publisher_app_cfg.yaml index ef8ad7da4..fc15b8f4f 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_publisher_app_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_publisher_app_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml similarity index 96% rename from src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml index 3c4a6fe2c..cb7491fef 100644 --- a/src/examples/cpp/ros2_channel/install/win/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./ros2_channel_pkg.dll + - path: ./libpb_chn_pkg.so enable_modules: [NormalPublisherModule, NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_subscriber_app_cfg.yaml b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_subscriber_app_cfg.yaml similarity index 95% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_subscriber_app_cfg.yaml rename to src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_subscriber_app_cfg.yaml index 78fc21f8d..fd04ad83c 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_subscriber_app_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/linux/bin/cfg/examples_cpp_pb_chn_subscriber_app_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn.sh new file mode 100755 index 000000000..e41df4a63 --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_chn_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark.sh new file mode 100755 index 000000000..9561afdaa --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_chn_benchmark_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.sh new file mode 100755 index 000000000..8d7b3ab5f --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_publisher_app.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_publisher_app.sh new file mode 100755 index 000000000..069ad4cd7 --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_publisher_app.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./normal_publisher_app ./cfg/examples_cpp_pb_chn_publisher_app_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_single_pkg.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_single_pkg.sh new file mode 100755 index 000000000..d9e3b2d99 --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_single_pkg.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_subscriber_app.sh b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_subscriber_app.sh new file mode 100755 index 000000000..fad10ed2a --- /dev/null +++ b/src/examples/cpp/pb_chn/install/linux/bin/start_examples_cpp_pb_chn_subscriber_app.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./normal_subscriber_app ./cfg/examples_cpp_pb_chn_subscriber_app_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml similarity index 94% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml rename to src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml index 51dbf6a8c..4e3aacc1c 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_cfg.yaml @@ -36,9 +36,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./pb_chn_pub_pkg.dll enable_modules: [BenchmarkPublisherModule] - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./pb_chn_sub_pkg.dll enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml similarity index 97% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml rename to src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml index b0e15e737..d1a2be4b9 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml @@ -36,7 +36,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pkg.so + - path: ./pb_chn_pkg.dll enable_modules: [BenchmarkPublisherModule, BenchmarkSubscriberModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_cfg.yaml b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_cfg.yaml similarity index 92% rename from src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_cfg.yaml rename to src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_cfg.yaml index 1e07afc6c..a729447c8 100644 --- a/src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_cfg.yaml @@ -26,9 +26,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libros2_channel_pub_pkg.so + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] - - path: ./libros2_channel_sub_pkg.so + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml similarity index 96% rename from src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml rename to src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml index a6e7385fc..45c234b79 100644 --- a/src/examples/cpp/ros2_channel/install/linux/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_chn/install/win/bin/cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libros2_channel_pkg.so + - path: ./pb_chn_pkg.dll enable_modules: [NormalPublisherModule, NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn.bat b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn.bat new file mode 100644 index 000000000..09c4e3b4a --- /dev/null +++ b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_chn_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark.bat b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark.bat new file mode 100644 index 000000000..d5b2a0654 --- /dev/null +++ b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_chn_benchmark_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.bat b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.bat new file mode 100644 index 000000000..a50609cbf --- /dev/null +++ b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_benchmark_single_pkg.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_chn_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_single_pkg.bat b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_single_pkg.bat new file mode 100644 index 000000000..6b764332a --- /dev/null +++ b/src/examples/cpp/pb_chn/install/win/bin/start_examples_cpp_pb_chn_single_pkg.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_chn_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/CMakeLists.txt b/src/examples/cpp/pb_chn/module/benchmark_publisher_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/CMakeLists.txt rename to src/examples/cpp/pb_chn/module/benchmark_publisher_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.cc b/src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.cc similarity index 97% rename from src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.cc rename to src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.cc index 353113830..b055a0811 100644 --- a/src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.cc +++ b/src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.cc @@ -10,7 +10,7 @@ #include "benchmark.pb.h" -namespace aimrt::examples::cpp::protobuf_channel::benchmark_publisher_module { +namespace aimrt::examples::cpp::pb_chn::benchmark_publisher_module { std::string GenerateRandomString(int min_length, int max_length) { static constexpr std::string_view kChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; @@ -217,4 +217,4 @@ void BenchmarkPublisherModule::StartSinglePlan(uint32_t plan_id, BenchPlan plan) aimrt::channel::Publish(signal_publisher_, end_signal); } -} // namespace aimrt::examples::cpp::protobuf_channel::benchmark_publisher_module \ No newline at end of file +} // namespace aimrt::examples::cpp::pb_chn::benchmark_publisher_module \ No newline at end of file diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.h b/src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.h similarity index 89% rename from src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.h rename to src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.h index 6bae63af8..c7d82b921 100644 --- a/src/examples/cpp/protobuf_channel/module/benchmark_publisher_module/benchmark_publisher_module.h +++ b/src/examples/cpp/pb_chn/module/benchmark_publisher_module/benchmark_publisher_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" -namespace aimrt::examples::cpp::protobuf_channel::benchmark_publisher_module { +namespace aimrt::examples::cpp::pb_chn::benchmark_publisher_module { class BenchmarkPublisherModule : public aimrt::ModuleBase { public: @@ -59,4 +59,4 @@ class BenchmarkPublisherModule : public aimrt::ModuleBase { std::vector bench_plans_; }; -} // namespace aimrt::examples::cpp::protobuf_channel::benchmark_publisher_module +} // namespace aimrt::examples::cpp::pb_chn::benchmark_publisher_module diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/CMakeLists.txt b/src/examples/cpp/pb_chn/module/benchmark_subscriber_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/CMakeLists.txt rename to src/examples/cpp/pb_chn/module/benchmark_subscriber_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.cc b/src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.cc similarity index 97% rename from src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.cc rename to src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.cc index 75cc6f749..657f92b5e 100644 --- a/src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.cc +++ b/src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.cc @@ -15,7 +15,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_channel::benchmark_subscriber_module { +namespace aimrt::examples::cpp::pb_chn::benchmark_subscriber_module { bool BenchmarkSubscriberModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -219,4 +219,4 @@ p999 latency: {} us p999_latency / 1000.0); } -} // namespace aimrt::examples::cpp::protobuf_channel::benchmark_subscriber_module \ No newline at end of file +} // namespace aimrt::examples::cpp::pb_chn::benchmark_subscriber_module \ No newline at end of file diff --git a/src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.h b/src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.h similarity index 91% rename from src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.h rename to src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.h index 51458454a..01a2f1c53 100644 --- a/src/examples/cpp/protobuf_channel/module/benchmark_subscriber_module/benchmark_subscriber_module.h +++ b/src/examples/cpp/pb_chn/module/benchmark_subscriber_module/benchmark_subscriber_module.h @@ -7,7 +7,7 @@ #include "benchmark.pb.h" -namespace aimrt::examples::cpp::protobuf_channel::benchmark_subscriber_module { +namespace aimrt::examples::cpp::pb_chn::benchmark_subscriber_module { class BenchmarkSubscriberModule : public aimrt::ModuleBase { public: @@ -69,4 +69,4 @@ class BenchmarkSubscriberModule : public aimrt::ModuleBase { std::vector topic_record_vec_; }; -} // namespace aimrt::examples::cpp::protobuf_channel::benchmark_subscriber_module \ No newline at end of file +} // namespace aimrt::examples::cpp::pb_chn::benchmark_subscriber_module \ No newline at end of file diff --git a/src/examples/cpp/protobuf_channel/module/normal_publisher_module/CMakeLists.txt b/src/examples/cpp/pb_chn/module/normal_publisher_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/module/normal_publisher_module/CMakeLists.txt rename to src/examples/cpp/pb_chn/module/normal_publisher_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc b/src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc similarity index 94% rename from src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc rename to src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc index 005da03f2..e6bfa51bc 100644 --- a/src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc +++ b/src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc @@ -9,7 +9,7 @@ #include "event.pb.h" -namespace aimrt::examples::cpp::protobuf_channel::normal_publisher_module { +namespace aimrt::examples::cpp::pb_chn::normal_publisher_module { bool NormalPublisherModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -100,4 +100,4 @@ void NormalPublisherModule::MainLoop() { stop_sig_.set_value(); } -} // namespace aimrt::examples::cpp::protobuf_channel::normal_publisher_module +} // namespace aimrt::examples::cpp::pb_chn::normal_publisher_module diff --git a/src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.h b/src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.h similarity index 84% rename from src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.h rename to src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.h index 9acca06d0..34643a979 100644 --- a/src/examples/cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.h +++ b/src/examples/cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" -namespace aimrt::examples::cpp::protobuf_channel::normal_publisher_module { +namespace aimrt::examples::cpp::pb_chn::normal_publisher_module { class NormalPublisherModule : public aimrt::ModuleBase { public: @@ -42,4 +42,4 @@ class NormalPublisherModule : public aimrt::ModuleBase { aimrt::channel::PublisherRef publisher_; }; -} // namespace aimrt::examples::cpp::protobuf_channel::normal_publisher_module +} // namespace aimrt::examples::cpp::pb_chn::normal_publisher_module diff --git a/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/CMakeLists.txt b/src/examples/cpp/pb_chn/module/normal_subscriber_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/module/normal_subscriber_module/CMakeLists.txt rename to src/examples/cpp/pb_chn/module/normal_subscriber_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc b/src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc similarity index 91% rename from src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc rename to src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc index f757d7f86..07fe8a285 100644 --- a/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc +++ b/src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc @@ -7,7 +7,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_channel::normal_subscriber_module { +namespace aimrt::examples::cpp::pb_chn::normal_subscriber_module { bool NormalSubscriberModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -49,4 +49,4 @@ void NormalSubscriberModule::EventHandle( AIMRT_INFO("Receive new pb event, ctx: {}, data: {}", ctx.ToString(), aimrt::Pb2CompactJson(*data)); } -} // namespace aimrt::examples::cpp::protobuf_channel::normal_subscriber_module +} // namespace aimrt::examples::cpp::pb_chn::normal_subscriber_module diff --git a/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.h b/src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.h similarity index 84% rename from src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.h rename to src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.h index e52a3ff1a..d343d1b69 100644 --- a/src/examples/cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.h +++ b/src/examples/cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.h @@ -7,7 +7,7 @@ #include "event.pb.h" -namespace aimrt::examples::cpp::protobuf_channel::normal_subscriber_module { +namespace aimrt::examples::cpp::pb_chn::normal_subscriber_module { class NormalSubscriberModule : public aimrt::ModuleBase { public: @@ -37,4 +37,4 @@ class NormalSubscriberModule : public aimrt::ModuleBase { aimrt::channel::SubscriberRef subscriber_; }; -} // namespace aimrt::examples::cpp::protobuf_channel::normal_subscriber_module +} // namespace aimrt::examples::cpp::pb_chn::normal_subscriber_module diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pkg/CMakeLists.txt b/src/examples/cpp/pb_chn/pkg/pb_chn_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pkg/CMakeLists.txt rename to src/examples/cpp/pb_chn/pkg/pb_chn_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pkg/pkg_main.cc b/src/examples/cpp/pb_chn/pkg/pb_chn_pkg/pkg_main.cc similarity index 95% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pkg/pkg_main.cc rename to src/examples/cpp/pb_chn/pkg/pb_chn_pkg/pkg_main.cc index fe3fe0c19..883225ecf 100644 --- a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_chn/pkg/pb_chn_pkg/pkg_main.cc @@ -9,7 +9,7 @@ #include "normal_publisher_module/normal_publisher_module.h" #include "normal_subscriber_module/normal_subscriber_module.h" -using namespace aimrt::examples::cpp::protobuf_channel; +using namespace aimrt::examples::cpp::pb_chn; static std::tuple> aimrt_module_register_array[]{ {"NormalPublisherModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pub_pkg/CMakeLists.txt b/src/examples/cpp/pb_chn/pkg/pb_chn_pub_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pub_pkg/CMakeLists.txt rename to src/examples/cpp/pb_chn/pkg/pb_chn_pub_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pub_pkg/pkg_main.cc b/src/examples/cpp/pb_chn/pkg/pb_chn_pub_pkg/pkg_main.cc similarity index 93% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pub_pkg/pkg_main.cc rename to src/examples/cpp/pb_chn/pkg/pb_chn_pub_pkg/pkg_main.cc index 4152f9ed8..944ac56f1 100644 --- a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_pub_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_chn/pkg/pb_chn_pub_pkg/pkg_main.cc @@ -9,7 +9,7 @@ #include "normal_publisher_module/normal_publisher_module.h" #include "normal_subscriber_module/normal_subscriber_module.h" -using namespace aimrt::examples::cpp::protobuf_channel; +using namespace aimrt::examples::cpp::pb_chn; static std::tuple> aimrt_module_register_array[]{ {"NormalPublisherModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_sub_pkg/CMakeLists.txt b/src/examples/cpp/pb_chn/pkg/pb_chn_sub_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_sub_pkg/CMakeLists.txt rename to src/examples/cpp/pb_chn/pkg/pb_chn_sub_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_sub_pkg/pkg_main.cc b/src/examples/cpp/pb_chn/pkg/pb_chn_sub_pkg/pkg_main.cc similarity index 93% rename from src/examples/cpp/protobuf_channel/pkg/protobuf_channel_sub_pkg/pkg_main.cc rename to src/examples/cpp/pb_chn/pkg/pb_chn_sub_pkg/pkg_main.cc index 35daeb892..2e96ccadd 100644 --- a/src/examples/cpp/protobuf_channel/pkg/protobuf_channel_sub_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_chn/pkg/pb_chn_sub_pkg/pkg_main.cc @@ -9,7 +9,7 @@ #include "normal_publisher_module/normal_publisher_module.h" #include "normal_subscriber_module/normal_subscriber_module.h" -using namespace aimrt::examples::cpp::protobuf_channel; +using namespace aimrt::examples::cpp::pb_chn; static std::tuple> aimrt_module_register_array[]{ {"NormalSubscriberModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_rpc/CMakeLists.txt b/src/examples/cpp/pb_rpc/CMakeLists.txt similarity index 78% rename from src/examples/cpp/protobuf_rpc/CMakeLists.txt rename to src/examples/cpp/pb_rpc/CMakeLists.txt index f4cab5f72..b8f8d7be0 100644 --- a/src/examples/cpp/protobuf_rpc/CMakeLists.txt +++ b/src/examples/cpp/pb_rpc/CMakeLists.txt @@ -18,9 +18,9 @@ add_subdirectory(module/normal_rpc_sync_server_module) add_subdirectory(module/normal_rpc_async_server_module) # pkg -add_subdirectory(pkg/protobuf_rpc_pkg) -add_subdirectory(pkg/protobuf_rpc_client_pkg) -add_subdirectory(pkg/protobuf_rpc_server_pkg) +add_subdirectory(pkg/pb_rpc_pkg) +add_subdirectory(pkg/pb_rpc_client_pkg) +add_subdirectory(pkg/pb_rpc_server_pkg) # install if(CMAKE_SYSTEM_NAME MATCHES "Linux") @@ -38,6 +38,6 @@ add_custom_target( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CUR_INSTALL_SOURCE_DIR}/bin ${CMAKE_BINARY_DIR} DEPENDS aimrt::runtime::main - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_rpc_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_rpc_client_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::protobuf_rpc_server_pkg) + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_rpc_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_rpc_client_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::pb_rpc_server_pkg) diff --git a/src/examples/cpp/protobuf_rpc/README.md b/src/examples/cpp/pb_rpc/README.md similarity index 73% rename from src/examples/cpp/protobuf_rpc/README.md rename to src/examples/cpp/pb_rpc/README.md index 17acc6511..3b5b9eef3 100644 --- a/src/examples/cpp/protobuf_rpc/README.md +++ b/src/examples/cpp/pb_rpc/README.md @@ -17,18 +17,18 @@ - [normal_rpc_sync_client_module.cc](./module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc) - [normal_rpc_sync_server_module.cc](./module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc) - [service.cc](./module/normal_rpc_sync_server_module/service.cc) -- [protobuf_rpc_client_pkg/pkg_main.cc](./pkg/protobuf_rpc_client_pkg/pkg_main.cc) -- [protobuf_rpc_server_pkg/pkg_main.cc](./pkg/protobuf_rpc_server_pkg/pkg_main.cc) +- [pb_rpc_client_pkg/pkg_main.cc](./pkg/pb_rpc_client_pkg/pkg_main.cc) +- [pb_rpc_server_pkg/pkg_main.cc](./pkg/pb_rpc_server_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_rpc_sync_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_rpc_sync_cfg.yaml) +- [examples_cpp_pb_rpc_sync_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_rpc_sync_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_rpc_sync.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_rpc_sync.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -36,7 +36,7 @@ - 此示例创建了以下两个模块: - `NormalRpcSyncClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过同步 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcSyncServerModule`:会注册 `ExampleService` 服务端,通过同步 Server 接口,提供 echo 功能; -- 此示例将 `NormalRpcSyncClientModule` 和 `NormalRpcSyncServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalRpcSyncClientModule` 和 `NormalRpcSyncServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 rpc 后端进行通信,并配置了 `timeout_handle` 执行器作为超时执行器; @@ -57,18 +57,18 @@ - [normal_rpc_async_client_module.cc](./module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc) - [normal_rpc_async_server_module.cc](./module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc) - [service.cc](./module/normal_rpc_async_server_module/service.cc) -- [protobuf_rpc_client_pkg/pkg_main.cc](./pkg/protobuf_rpc_client_pkg/pkg_main.cc) -- [protobuf_rpc_server_pkg/pkg_main.cc](./pkg/protobuf_rpc_server_pkg/pkg_main.cc) +- [pb_rpc_client_pkg/pkg_main.cc](./pkg/pb_rpc_client_pkg/pkg_main.cc) +- [pb_rpc_server_pkg/pkg_main.cc](./pkg/pb_rpc_server_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_rpc_async_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_rpc_async_cfg.yaml) +- [examples_cpp_pb_rpc_async_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_rpc_async_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_rpc_async.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_rpc_async.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -76,7 +76,7 @@ - 此示例创建了以下两个模块: - `NormalRpcAsyncClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过异步 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcAsyncServerModule`:会注册 `ExampleService` 服务端,通过异步 Server 接口,提供 echo 功能; -- 此示例将 `NormalRpcAsyncClientModule` 和 `NormalRpcAsyncServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalRpcAsyncClientModule` 和 `NormalRpcAsyncServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 rpc 后端进行通信,并配置了 `timeout_handle` 执行器作为超时执行器; @@ -96,18 +96,18 @@ - [normal_rpc_future_client_module.cc](./module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc) - [normal_rpc_sync_server_module.cc](./module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc) - [service.cc](./module/normal_rpc_sync_server_module/service.cc) -- [protobuf_rpc_client_pkg/pkg_main.cc](./pkg/protobuf_rpc_client_pkg/pkg_main.cc) -- [protobuf_rpc_server_pkg/pkg_main.cc](./pkg/protobuf_rpc_server_pkg/pkg_main.cc) +- [pb_rpc_client_pkg/pkg_main.cc](./pkg/pb_rpc_client_pkg/pkg_main.cc) +- [pb_rpc_server_pkg/pkg_main.cc](./pkg/pb_rpc_server_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_rpc_future_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_rpc_future_cfg.yaml) +- [examples_cpp_pb_rpc_future_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_rpc_future_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_rpc_future.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_rpc_future.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -115,7 +115,7 @@ - 此示例创建了以下两个模块: - `NormalRpcFutureClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过 future 型 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcSyncServerModule`:会注册 `ExampleService` 服务端,通过同步 Server 接口,提供 echo 功能; -- 此示例将 `NormalRpcFutureClientModule` 和 `NormalRpcSyncServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalRpcFutureClientModule` 和 `NormalRpcSyncServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 rpc 后端进行通信,并配置了 `timeout_handle` 执行器作为超时执行器; @@ -137,18 +137,18 @@ - [normal_rpc_co_client_module.cc](./module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) - [normal_rpc_co_server_module.cc](./module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) - [service.cc](./module/normal_rpc_co_server_module/service.cc) -- [protobuf_rpc_client_pkg/pkg_main.cc](./pkg/protobuf_rpc_client_pkg/pkg_main.cc) -- [protobuf_rpc_server_pkg/pkg_main.cc](./pkg/protobuf_rpc_server_pkg/pkg_main.cc) +- [pb_rpc_client_pkg/pkg_main.cc](./pkg/pb_rpc_client_pkg/pkg_main.cc) +- [pb_rpc_server_pkg/pkg_main.cc](./pkg/pb_rpc_server_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_rpc_co_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml) +- [examples_cpp_pb_rpc_co_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_rpc_co.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_rpc_co.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -157,7 +157,7 @@ - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; - 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; -- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 rpc 后端进行通信,并配置了 `timeout_handle` 执行器作为超时执行器; @@ -179,20 +179,20 @@ - [normal_rpc_co_client_module.cc](./module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) - [normal_rpc_co_server_module.cc](./module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) - [service.cc](./module/normal_rpc_co_server_module/service.cc) -- [protobuf_rpc_pkg/pkg_main.cc](./pkg/protobuf_rpc_pkg/pkg_main.cc) +- [pb_rpc_pkg/pkg_main.cc](./pkg/pb_rpc_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_protobuf_rpc_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml) +- [examples_cpp_pb_rpc_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_protobuf_rpc_single_pkg.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_pb_rpc_single_pkg.sh`脚本启动进程; - 键入`ctrl-c`停止进程; 说明: -- 此示例与 **protobuf rpc co** 示例基本一致,唯一的区别是将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 集成到 `protobuf_rpc_pkg` 一个 Pkg 中; +- 此示例与 **protobuf rpc co** 示例基本一致,唯一的区别是将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 集成到 `pb_rpc_pkg` 一个 Pkg 中; diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_async_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_async_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_async_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_async_cfg.yaml index 7fbee39fb..c24a76ca5 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_async_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_async_cfg.yaml @@ -29,9 +29,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcAsyncClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcAsyncServerModule] modules: - name: NormalRpcAsyncClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_cfg.yaml similarity index 94% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_cfg.yaml index 3a5868381..eb5ead08a 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_cfg.yaml @@ -37,9 +37,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [BenchmarkRpcClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_single_pkg_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_single_pkg_cfg.yaml similarity index 97% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_single_pkg_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_single_pkg_cfg.yaml index 6bc45da91..75f9460c2 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_benchmark_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_benchmark_single_pkg_cfg.yaml @@ -37,7 +37,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_pkg.so + - path: ./libpb_rpc_pkg.so enable_modules: [BenchmarkRpcClientModule, NormalRpcCoServerModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml similarity index 92% rename from src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml index 4feb6aa95..b9fab13ca 100644 --- a/src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml @@ -29,9 +29,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_rpc_client_pkg.dll + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcCoClientModule] - - path: ./protobuf_rpc_server_pkg.dll + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_future_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_future_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_future_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_future_cfg.yaml index 0319c72ca..01be48e44 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_future_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_future_cfg.yaml @@ -29,9 +29,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcFutureClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcSyncServerModule] modules: - name: NormalRpcFutureClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml similarity index 96% rename from src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml index c979dd553..066ae20af 100644 --- a/src/examples/cpp/protobuf_rpc/install/win/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml @@ -29,7 +29,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_rpc_pkg.dll + - path: ./libpb_rpc_pkg.so enable_modules: [NormalRpcCoClientModule, NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_sync_cfg.yaml b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_sync_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_sync_cfg.yaml rename to src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_sync_cfg.yaml index 213ee1524..5aa201826 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_sync_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/linux/bin/cfg/examples_cpp_pb_rpc_sync_cfg.yaml @@ -29,9 +29,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcSyncClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcSyncServerModule] modules: - name: NormalRpcSyncClientModule diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_async.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_async.sh new file mode 100755 index 000000000..77b3ae985 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_async.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_async_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark.sh new file mode 100755 index 000000000..bddd80b20 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_benchmark_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark_single_pkg.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark_single_pkg.sh new file mode 100755 index 000000000..7ff72775f --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_benchmark_single_pkg.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_co.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_co.sh new file mode 100755 index 000000000..64427bb45 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_co.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_co_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_future.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_future.sh new file mode 100755 index 000000000..7ed5f8d55 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_future.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_future_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_single_pkg.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_single_pkg.sh new file mode 100755 index 000000000..e87d6c1ab --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_single_pkg.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_sync.sh b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_sync.sh new file mode 100755 index 000000000..1f66f7ff3 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/linux/bin/start_examples_cpp_pb_rpc_sync.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_pb_rpc_sync_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml b/src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml rename to src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml index 848f0756f..20f2565a0 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_co_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_co_cfg.yaml @@ -29,9 +29,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./pb_rpc_client_pkg.dll enable_modules: [NormalRpcCoClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./pb_rpc_server_pkg.dll enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml b/src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml similarity index 96% rename from src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml rename to src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml index 31b1735a5..509db1862 100644 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml +++ b/src/examples/cpp/pb_rpc/install/win/bin/cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml @@ -29,7 +29,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_rpc_pkg.so + - path: ./pb_rpc_pkg.dll enable_modules: [NormalRpcCoClientModule, NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_co.bat b/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_co.bat new file mode 100644 index 000000000..ad7f52725 --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_co.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_rpc_co_cfg.yaml diff --git a/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_single_pkg.bat b/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_single_pkg.bat new file mode 100644 index 000000000..bac5d3f8d --- /dev/null +++ b/src/examples/cpp/pb_rpc/install/win/bin/start_examples_cpp_pb_rpc_single_pkg.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_pb_rpc_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc b/src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc similarity index 98% rename from src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc rename to src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc index 09db89c1e..a657ddfea 100644 --- a/src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc +++ b/src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.cc @@ -15,7 +15,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_rpc::benchmark_rpc_client_module { +namespace aimrt::examples::cpp::pb_rpc::benchmark_rpc_client_module { std::string GenerateRandomString(int min_length, int max_length) { static constexpr std::string_view kChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; @@ -403,4 +403,4 @@ co::Task BenchmarkRpcClientModule::StartBenchPlan( co_return; } -} // namespace aimrt::examples::cpp::protobuf_rpc::benchmark_rpc_client_module +} // namespace aimrt::examples::cpp::pb_rpc::benchmark_rpc_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h b/src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h similarity index 91% rename from src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h rename to src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h index 39e1fdc50..85dacb394 100644 --- a/src/examples/cpp/protobuf_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h +++ b/src/examples/cpp/pb_rpc/module/benchmark_rpc_client_module/benchmark_rpc_client_module.h @@ -12,7 +12,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::benchmark_rpc_client_module { +namespace aimrt::examples::cpp::pb_rpc::benchmark_rpc_client_module { class BenchmarkRpcClientModule : public aimrt::ModuleBase { public: @@ -70,4 +70,4 @@ class BenchmarkRpcClientModule : public aimrt::ModuleBase { std::vector bench_plans_; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::benchmark_rpc_client_module +} // namespace aimrt::examples::cpp::pb_rpc::benchmark_rpc_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc similarity index 95% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc index cd1276b89..654b58bd3 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.cc @@ -6,7 +6,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_client_module { bool NormalRpcAsyncClientModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -106,4 +106,4 @@ void NormalRpcAsyncClientModule::MainLoopFunc() { std::bind(&NormalRpcAsyncClientModule::MainLoopFunc, this)); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h similarity index 84% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h index 2989547d2..af7b92f47 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_client_module/normal_rpc_async_client_module.h @@ -11,7 +11,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_client_module { class NormalRpcAsyncClientModule : public aimrt::ModuleBase { public: @@ -44,4 +44,4 @@ class NormalRpcAsyncClientModule : public aimrt::ModuleBase { double rpc_frq_ = 1.0; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.cc similarity index 64% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.cc index 45ce98360..934b3e522 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.cc @@ -3,10 +3,10 @@ #include "normal_rpc_async_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { aimrt::logger::LoggerRef global_logger; void SetLogger(aimrt::logger::LoggerRef logger) { global_logger = logger; } aimrt::logger::LoggerRef GetLogger() { return global_logger; } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.h b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.h similarity index 57% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.h index d99dce56b..578b66d53 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/global.h @@ -5,9 +5,9 @@ #include "aimrt_module_cpp_interface/logger/logger.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { void SetLogger(aimrt::logger::LoggerRef); aimrt::logger::LoggerRef GetLogger(); -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc similarity index 84% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc index d298d260a..6c211849a 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.cc @@ -4,7 +4,7 @@ #include "normal_rpc_async_server_module/normal_rpc_async_server_module.h" #include "normal_rpc_async_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { bool NormalRpcAsyncServerModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -35,4 +35,4 @@ bool NormalRpcAsyncServerModule::Start() { return true; } void NormalRpcAsyncServerModule::Shutdown() {} -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h similarity index 80% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h index 341b5c5d0..48b0af2cb 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/normal_rpc_async_server_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" #include "normal_rpc_async_server_module/service.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { class NormalRpcAsyncServerModule : public aimrt::ModuleBase { public: @@ -30,4 +30,4 @@ class NormalRpcAsyncServerModule : public aimrt::ModuleBase { std::shared_ptr service_ptr_; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.cc similarity index 88% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.cc index 874899907..90ca4e11b 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.cc @@ -5,7 +5,7 @@ #include "aimrt_module_protobuf_interface/util/protobuf_tools.h" #include "normal_rpc_async_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { void ExampleServiceAsyncServiceImpl::GetFooData( aimrt::rpc::ContextRef ctx, @@ -33,4 +33,4 @@ void ExampleServiceAsyncServiceImpl::GetBarData( callback(aimrt::rpc::Status()); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.h b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.h similarity index 83% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.h index 9a1052a71..e8f6d528a 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/service.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_async_server_module/service.h @@ -5,7 +5,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module { class ExampleServiceAsyncServiceImpl : public aimrt::protocols::example::ExampleServiceAsyncService { public: @@ -25,4 +25,4 @@ class ExampleServiceAsyncServiceImpl : public aimrt::protocols::example::Example std::function&& callback) override; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_async_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc similarity index 97% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc index 2fd7e5ddd..eafcc2652 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc @@ -11,7 +11,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_client_module { bool NormalRpcCoClientModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -153,4 +153,4 @@ co::Task NormalRpcCoClientModule::MainLoop() { co_return; } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h similarity index 87% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h index 5e153ff61..3de88cac2 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.h @@ -13,7 +13,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_client_module { class NormalRpcCoClientModule : public aimrt::ModuleBase { public: @@ -46,4 +46,4 @@ class NormalRpcCoClientModule : public aimrt::ModuleBase { std::shared_ptr proxy_; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/filter.h b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/filter.h similarity index 89% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/filter.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/filter.h index f1052a18d..cfce5d0e8 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/filter.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/filter.h @@ -7,7 +7,7 @@ #include "aimrt_module_protobuf_interface/util/protobuf_tools.h" #include "normal_rpc_co_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { inline co::Task DebugLogServerFilter( aimrt::rpc::ContextRef ctx, const void* req_ptr, void* rsp_ptr, @@ -36,4 +36,4 @@ inline co::Task TimeCostLogServerFilter( co_return status; } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.cc similarity index 65% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.cc index 5cf1817b3..bc11484f9 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/global.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.cc @@ -3,10 +3,10 @@ #include "normal_rpc_co_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { aimrt::logger::LoggerRef global_logger; void SetLogger(aimrt::logger::LoggerRef logger) { global_logger = logger; } aimrt::logger::LoggerRef GetLogger() { return global_logger; } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.h b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.h similarity index 56% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.h index 107d88041..e98dfbc9b 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/global.h @@ -5,9 +5,9 @@ #include "aimrt_module_cpp_interface/logger/logger.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { void SetLogger(aimrt::logger::LoggerRef); aimrt::logger::LoggerRef GetLogger(); -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc similarity index 86% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc index 3f1960bb0..1385785bf 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc @@ -5,7 +5,7 @@ #include "normal_rpc_co_server_module/filter.h" #include "normal_rpc_co_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { bool NormalRpcCoServerModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -40,4 +40,4 @@ bool NormalRpcCoServerModule::Start() { return true; } void NormalRpcCoServerModule::Shutdown() {} -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h similarity index 80% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h index 91d8a7ed4..648b1e0a3 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" #include "normal_rpc_co_server_module/service.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { class NormalRpcCoServerModule : public aimrt::ModuleBase { public: @@ -30,4 +30,4 @@ class NormalRpcCoServerModule : public aimrt::ModuleBase { std::shared_ptr service_ptr_; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc similarity index 87% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc index d80f0829f..f67f0c83a 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc @@ -5,7 +5,7 @@ #include "aimrt_module_protobuf_interface/util/protobuf_tools.h" #include "normal_rpc_co_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { co::Task ExampleServiceImpl::GetFooData( aimrt::rpc::ContextRef ctx, @@ -31,4 +31,4 @@ co::Task ExampleServiceImpl::GetBarData( co_return aimrt::rpc::Status(); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.h b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.h similarity index 81% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.h index 84deeb0b3..d522d452b 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_co_server_module/service.h @@ -5,7 +5,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module { class ExampleServiceImpl : public aimrt::protocols::example::ExampleServiceCoService { public: @@ -23,4 +23,4 @@ class ExampleServiceImpl : public aimrt::protocols::example::ExampleServiceCoSer ::aimrt::protocols::example::GetBarDataRsp& rsp) override; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_co_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_co_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc similarity index 95% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc index 587267ba7..7ba02b116 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.cc @@ -6,7 +6,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_future_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_future_client_module { bool NormalRpcFutureClientModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -113,4 +113,4 @@ void NormalRpcFutureClientModule::MainLoop() { stop_sig_.set_value(); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_future_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_future_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h similarity index 83% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h index 07cf1ff40..0db37400b 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_future_client_module/normal_rpc_future_client_module.h @@ -11,7 +11,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_future_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_future_client_module { class NormalRpcFutureClientModule : public aimrt::ModuleBase { public: @@ -43,4 +43,4 @@ class NormalRpcFutureClientModule : public aimrt::ModuleBase { double rpc_frq_ = 1.0; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_future_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_future_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc similarity index 95% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc index 8efc65ad3..bdcfa6b1d 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.cc @@ -6,7 +6,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_client_module { bool NormalRpcSyncClientModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -112,4 +112,4 @@ void NormalRpcSyncClientModule::MainLoop() { stop_sig_.set_value(); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h similarity index 84% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h index b8eb4aaf4..3e0e17e7c 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_client_module/normal_rpc_sync_client_module.h @@ -11,7 +11,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_client_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_client_module { class NormalRpcSyncClientModule : public aimrt::ModuleBase { public: @@ -43,4 +43,4 @@ class NormalRpcSyncClientModule : public aimrt::ModuleBase { double rpc_frq_ = 1.0; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_client_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_client_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/CMakeLists.txt b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/CMakeLists.txt rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.cc similarity index 64% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.cc index b0220d5f4..14dde0214 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/global.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.cc @@ -3,10 +3,10 @@ #include "normal_rpc_sync_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { aimrt::logger::LoggerRef global_logger; void SetLogger(aimrt::logger::LoggerRef logger) { global_logger = logger; } aimrt::logger::LoggerRef GetLogger() { return global_logger; } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.h b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.h similarity index 56% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.h index 406e9ef86..2bcdb6f85 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_async_server_module/global.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/global.h @@ -5,9 +5,9 @@ #include "aimrt_module_cpp_interface/logger/logger.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { void SetLogger(aimrt::logger::LoggerRef); aimrt::logger::LoggerRef GetLogger(); -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_async_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc similarity index 84% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc index 20b113b0b..4baa1b352 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.cc @@ -4,7 +4,7 @@ #include "normal_rpc_sync_server_module/normal_rpc_sync_server_module.h" #include "normal_rpc_sync_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { bool NormalRpcSyncServerModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -35,4 +35,4 @@ bool NormalRpcSyncServerModule::Start() { return true; } void NormalRpcSyncServerModule::Shutdown() {} -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h similarity index 80% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h index 2a3ade30b..2ec6c82d6 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/normal_rpc_sync_server_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" #include "normal_rpc_sync_server_module/service.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { class NormalRpcSyncServerModule : public aimrt::ModuleBase { public: @@ -30,4 +30,4 @@ class NormalRpcSyncServerModule : public aimrt::ModuleBase { std::shared_ptr service_ptr_; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.cc b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.cc similarity index 87% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.cc rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.cc index 71996e202..dd30c22de 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.cc +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.cc @@ -5,7 +5,7 @@ #include "aimrt_module_protobuf_interface/util/protobuf_tools.h" #include "normal_rpc_sync_server_module/global.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { aimrt::rpc::Status ExampleServiceSyncServiceImpl::GetFooData( aimrt::rpc::ContextRef ctx, @@ -31,4 +31,4 @@ aimrt::rpc::Status ExampleServiceSyncServiceImpl::GetBarData( return aimrt::rpc::Status(); } -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.h b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.h similarity index 81% rename from src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.h rename to src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.h index 78c80f948..e62b6eba2 100644 --- a/src/examples/cpp/protobuf_rpc/module/normal_rpc_sync_server_module/service.h +++ b/src/examples/cpp/pb_rpc/module/normal_rpc_sync_server_module/service.h @@ -5,7 +5,7 @@ #include "rpc.aimrt_rpc.pb.h" -namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module { +namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module { class ExampleServiceSyncServiceImpl : public aimrt::protocols::example::ExampleServiceSyncService { public: @@ -23,4 +23,4 @@ class ExampleServiceSyncServiceImpl : public aimrt::protocols::example::ExampleS ::aimrt::protocols::example::GetBarDataRsp& rsp) override; }; -} // namespace aimrt::examples::cpp::protobuf_rpc::normal_rpc_sync_server_module +} // namespace aimrt::examples::cpp::pb_rpc::normal_rpc_sync_server_module diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_client_pkg/CMakeLists.txt b/src/examples/cpp/pb_rpc/pkg/pb_rpc_client_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_client_pkg/CMakeLists.txt rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_client_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_client_pkg/pkg_main.cc b/src/examples/cpp/pb_rpc/pkg/pb_rpc_client_pkg/pkg_main.cc similarity index 96% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_client_pkg/pkg_main.cc rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_client_pkg/pkg_main.cc index f6ee94b6d..bbc92f658 100644 --- a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_client_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_rpc/pkg/pb_rpc_client_pkg/pkg_main.cc @@ -10,7 +10,7 @@ #include "normal_rpc_future_client_module/normal_rpc_future_client_module.h" #include "normal_rpc_sync_client_module/normal_rpc_sync_client_module.h" -using namespace aimrt::examples::cpp::protobuf_rpc; +using namespace aimrt::examples::cpp::pb_rpc; static std::tuple> aimrt_module_register_array[]{ {"BenchmarkRpcClientModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_pkg/CMakeLists.txt b/src/examples/cpp/pb_rpc/pkg/pb_rpc_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_pkg/CMakeLists.txt rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_pkg/pkg_main.cc b/src/examples/cpp/pb_rpc/pkg/pb_rpc_pkg/pkg_main.cc similarity index 97% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_pkg/pkg_main.cc rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_pkg/pkg_main.cc index 53d063b9f..43747090a 100644 --- a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_rpc/pkg/pb_rpc_pkg/pkg_main.cc @@ -13,7 +13,7 @@ #include "normal_rpc_sync_client_module/normal_rpc_sync_client_module.h" #include "normal_rpc_sync_server_module/normal_rpc_sync_server_module.h" -using namespace aimrt::examples::cpp::protobuf_rpc; +using namespace aimrt::examples::cpp::pb_rpc; static std::tuple> aimrt_module_register_array[]{ {"BenchmarkRpcClientModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_server_pkg/CMakeLists.txt b/src/examples/cpp/pb_rpc/pkg/pb_rpc_server_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_server_pkg/CMakeLists.txt rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_server_pkg/CMakeLists.txt diff --git a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_server_pkg/pkg_main.cc b/src/examples/cpp/pb_rpc/pkg/pb_rpc_server_pkg/pkg_main.cc similarity index 94% rename from src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_server_pkg/pkg_main.cc rename to src/examples/cpp/pb_rpc/pkg/pb_rpc_server_pkg/pkg_main.cc index 924c92d14..c2fd5e923 100644 --- a/src/examples/cpp/protobuf_rpc/pkg/protobuf_rpc_server_pkg/pkg_main.cc +++ b/src/examples/cpp/pb_rpc/pkg/pb_rpc_server_pkg/pkg_main.cc @@ -8,7 +8,7 @@ #include "normal_rpc_co_server_module/normal_rpc_co_server_module.h" #include "normal_rpc_sync_server_module/normal_rpc_sync_server_module.h" -using namespace aimrt::examples::cpp::protobuf_rpc; +using namespace aimrt::examples::cpp::pb_rpc; static std::tuple> aimrt_module_register_array[]{ {"NormalRpcCoServerModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel.sh deleted file mode 100755 index 2d50c2c0a..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_channel_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark.sh deleted file mode 100755 index d3e0a5257..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.sh deleted file mode 100755 index 49e537788..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_publisher_app.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_publisher_app.sh deleted file mode 100755 index 3038b58da..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_publisher_app.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./normal_publisher_app ./cfg/examples_cpp_protobuf_channel_publisher_app_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_single_pkg.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_single_pkg.sh deleted file mode 100755 index ae298b3be..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_single_pkg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_subscriber_app.sh b/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_subscriber_app.sh deleted file mode 100755 index 2f9a50df7..000000000 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/start_examples_cpp_protobuf_channel_subscriber_app.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./normal_subscriber_app ./cfg/examples_cpp_protobuf_channel_subscriber_app_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel.bat b/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel.bat deleted file mode 100644 index a702b5624..000000000 --- a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_channel_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark.bat b/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark.bat deleted file mode 100644 index 875ab34f1..000000000 --- a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_channel_benchmark_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.bat b/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.bat deleted file mode 100644 index e52200317..000000000 --- a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_benchmark_single_pkg.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_channel_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_single_pkg.bat b/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_single_pkg.bat deleted file mode 100644 index c4426bce4..000000000 --- a/src/examples/cpp/protobuf_channel/install/win/bin/start_examples_cpp_protobuf_channel_single_pkg.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_async.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_async.sh deleted file mode 100755 index 3eb4972a2..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_async.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_async_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark.sh deleted file mode 100755 index c46d84ce4..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_benchmark_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark_single_pkg.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark_single_pkg.sh deleted file mode 100755 index 07553c4cd..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_benchmark_single_pkg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_benchmark_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_co.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_co.sh deleted file mode 100755 index e384216ed..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_co.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_co_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_future.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_future.sh deleted file mode 100755 index 835542763..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_future.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_future_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_single_pkg.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_single_pkg.sh deleted file mode 100755 index 11ca16b69..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_single_pkg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_sync.sh b/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_sync.sh deleted file mode 100755 index 6de791fdf..000000000 --- a/src/examples/cpp/protobuf_rpc/install/linux/bin/start_examples_cpp_protobuf_rpc_sync.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_sync_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_co.bat b/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_co.bat deleted file mode 100644 index 40c4b811d..000000000 --- a/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_co.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_co_cfg.yaml diff --git a/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_single_pkg.bat b/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_single_pkg.bat deleted file mode 100644 index d1bb3165c..000000000 --- a/src/examples/cpp/protobuf_rpc/install/win/bin/start_examples_cpp_protobuf_rpc_single_pkg.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_protobuf_rpc_single_pkg_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel.sh b/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel.sh deleted file mode 100755 index 721bfa1da..000000000 --- a/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source install/share/example_ros2/local_setup.bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_ros2_channel_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel_single_pkg.sh b/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel_single_pkg.sh deleted file mode 100755 index 3f41b8abe..000000000 --- a/src/examples/cpp/ros2_channel/install/linux/bin/start_examples_cpp_ros2_channel_single_pkg.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source install/share/example_ros2/local_setup.bash - -./aimrt_main --cfg_file_path=./cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel.bat b/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel.bat deleted file mode 100644 index b46ce6443..000000000 --- a/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_ros2_channel_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel_single_pkg.bat b/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel_single_pkg.bat deleted file mode 100644 index 46122d4f2..000000000 --- a/src/examples/cpp/ros2_channel/install/win/bin/start_examples_cpp_ros2_channel_single_pkg.bat +++ /dev/null @@ -1,2 +0,0 @@ - -.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/CMakeLists.txt b/src/examples/cpp/ros2_chn/CMakeLists.txt similarity index 74% rename from src/examples/cpp/ros2_channel/CMakeLists.txt rename to src/examples/cpp/ros2_chn/CMakeLists.txt index a345162aa..63bb46af0 100644 --- a/src/examples/cpp/ros2_channel/CMakeLists.txt +++ b/src/examples/cpp/ros2_chn/CMakeLists.txt @@ -12,9 +12,9 @@ add_subdirectory(module/normal_publisher_module) add_subdirectory(module/normal_subscriber_module) # pkg -add_subdirectory(pkg/ros2_channel_pkg) -add_subdirectory(pkg/ros2_channel_pub_pkg) -add_subdirectory(pkg/ros2_channel_sub_pkg) +add_subdirectory(pkg/ros2_chn_pkg) +add_subdirectory(pkg/ros2_chn_pub_pkg) +add_subdirectory(pkg/ros2_chn_sub_pkg) # install if(CMAKE_SYSTEM_NAME MATCHES "Linux") @@ -32,6 +32,6 @@ add_custom_target( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CUR_INSTALL_SOURCE_DIR}/bin ${CMAKE_BINARY_DIR} DEPENDS aimrt::runtime::main - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_channel_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_channel_pub_pkg - ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_channel_sub_pkg) + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_chn_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_chn_pub_pkg + ${CUR_SUPERIOR_NAMESPACE}::${CUR_DIR}::ros2_chn_sub_pkg) diff --git a/src/examples/cpp/ros2_channel/README.md b/src/examples/cpp/ros2_chn/README.md similarity index 73% rename from src/examples/cpp/ros2_channel/README.md rename to src/examples/cpp/ros2_chn/README.md index 34e8e87bf..811ea74e9 100644 --- a/src/examples/cpp/ros2_channel/README.md +++ b/src/examples/cpp/ros2_chn/README.md @@ -13,17 +13,17 @@ - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) - [normal_publisher_module.cc](./module/normal_publisher_module/normal_publisher_module.cc) - [normal_subscriber_module.cc](./module/normal_subscriber_module/normal_subscriber_module.cc) -- [ros2_channel_pub_pkg/pkg_main.cc](./pkg/ros2_channel_pub_pkg/pkg_main.cc) -- [ros2_channel_sub_pkg/pkg_main.cc](./pkg/ros2_channel_sub_pkg/pkg_main.cc) +- [ros2_chn_pub_pkg/pkg_main.cc](./pkg/ros2_chn_pub_pkg/pkg_main.cc) +- [ros2_chn_sub_pkg/pkg_main.cc](./pkg/ros2_chn_sub_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_ros2_channel_cfg.yaml](./install/linux/bin/cfg/examples_cpp_ros2_channel_cfg.yaml) +- [examples_cpp_ros2_chn_cfg.yaml](./install/linux/bin/cfg/examples_cpp_ros2_chn_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_ROS2` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_ros2_channel.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_ros2_chn.sh`脚本启动进程; - 键入`ctrl-c`停止进程; @@ -31,7 +31,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `RosTestMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `RosTestMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `ros2_channel_pub_pkg` 和 `ros2_channel_sub_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `ros2_chn_pub_pkg` 和 `ros2_chn_sub_pkg` 两个 Pkg 中,并在配置文件中加载这两个 Pkg 到一个 AimRT 进程中; - 此示例使用 local 类型的 channel 后端进行通信; @@ -50,19 +50,19 @@ - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) - [normal_publisher_module.cc](./module/normal_publisher_module/normal_publisher_module.cc) - [normal_subscriber_module.cc](./module/normal_subscriber_module/normal_subscriber_module.cc) -- [ros2_channel_pkg/pkg_main.cc](./pkg/ros2_channel_pkg/pkg_main.cc) +- [ros2_chn_pkg/pkg_main.cc](./pkg/ros2_chn_pkg/pkg_main.cc) 配置文件: -- [examples_cpp_ros2_channel_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_ros2_channel_single_pkg_cfg.yaml) +- [examples_cpp_ros2_chn_single_pkg_cfg.yaml](./install/linux/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_ROS2` 选项编译 AimRT; -- 直接运行 build 目录下`start_examples_cpp_ros2_channel_single_pkg.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_cpp_ros2_chn_single_pkg.sh`脚本启动进程; - 键入`ctrl-c`停止进程; 说明: -- 此示例与 **ros2 channel** 示例基本一致,唯一的区别是将 `NormalPublisherModule` 和 `NormalSubscriberModule` 集成到 `ros2_channel_pkg` 一个 Pkg 中; +- 此示例与 **ros2 channel** 示例基本一致,唯一的区别是将 `NormalPublisherModule` 和 `NormalSubscriberModule` 集成到 `ros2_chn_pkg` 一个 Pkg 中; diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml b/src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml rename to src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_cfg.yaml index cd24e0894..a5304aa2f 100644 --- a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml +++ b/src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_cfg.yaml @@ -26,9 +26,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./libros2_chn_pub_pkg.so enable_modules: [NormalPublisherModule] - - path: ./protobuf_channel_sub_pkg.dll + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml b/src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml similarity index 96% rename from src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml rename to src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml index 45e965060..7139d4442 100644 --- a/src/examples/cpp/protobuf_channel/install/win/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml +++ b/src/examples/cpp/ros2_chn/install/linux/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_pkg.dll + - path: ./libros2_chn_pkg.so enable_modules: [NormalPublisherModule, NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn.sh b/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn.sh new file mode 100755 index 000000000..3f145eeb8 --- /dev/null +++ b/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_ros2_chn_cfg.yaml diff --git a/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn_single_pkg.sh b/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn_single_pkg.sh new file mode 100755 index 000000000..d094d9ba2 --- /dev/null +++ b/src/examples/cpp/ros2_chn/install/linux/bin/start_examples_cpp_ros2_chn_single_pkg.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml b/src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_cfg.yaml similarity index 91% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml rename to src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_cfg.yaml index fb0256320..09464a591 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_cfg.yaml +++ b/src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_cfg.yaml @@ -26,9 +26,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./ros2_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./ros2_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml b/src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml similarity index 95% rename from src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml rename to src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml index 979df2ed2..2436a150d 100644 --- a/src/examples/cpp/protobuf_channel/install/linux/bin/cfg/examples_cpp_protobuf_channel_single_pkg_cfg.yaml +++ b/src/examples/cpp/ros2_chn/install/win/bin/cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml @@ -26,7 +26,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pkg.so + - path: ./ros2_chn_pkg.dll enable_modules: [NormalPublisherModule, NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn.bat b/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn.bat new file mode 100644 index 000000000..3d2004f29 --- /dev/null +++ b/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_ros2_chn_cfg.yaml diff --git a/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn_single_pkg.bat b/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn_single_pkg.bat new file mode 100644 index 000000000..788a13967 --- /dev/null +++ b/src/examples/cpp/ros2_chn/install/win/bin/start_examples_cpp_ros2_chn_single_pkg.bat @@ -0,0 +1,2 @@ + +.\aimrt_main.exe --cfg_file_path=./cfg/examples_cpp_ros2_chn_single_pkg_cfg.yaml diff --git a/src/examples/cpp/ros2_channel/module/normal_publisher_module/CMakeLists.txt b/src/examples/cpp/ros2_chn/module/normal_publisher_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/ros2_channel/module/normal_publisher_module/CMakeLists.txt rename to src/examples/cpp/ros2_chn/module/normal_publisher_module/CMakeLists.txt diff --git a/src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc b/src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc similarity index 95% rename from src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc rename to src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc index d19147237..f20412de0 100644 --- a/src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc +++ b/src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc @@ -8,7 +8,7 @@ #include "example_ros2/msg/ros_test_msg.hpp" -namespace aimrt::examples::cpp::ros2_channel::normal_publisher_module { +namespace aimrt::examples::cpp::ros2_chn::normal_publisher_module { bool NormalPublisherModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -99,4 +99,4 @@ void NormalPublisherModule::MainLoop() { stop_sig_.set_value(); } -} // namespace aimrt::examples::cpp::ros2_channel::normal_publisher_module +} // namespace aimrt::examples::cpp::ros2_chn::normal_publisher_module diff --git a/src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.h b/src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.h similarity index 85% rename from src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.h rename to src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.h index 3f1346c5b..3194174ef 100644 --- a/src/examples/cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.h +++ b/src/examples/cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.h @@ -8,7 +8,7 @@ #include "aimrt_module_cpp_interface/module_base.h" -namespace aimrt::examples::cpp::ros2_channel::normal_publisher_module { +namespace aimrt::examples::cpp::ros2_chn::normal_publisher_module { class NormalPublisherModule : public aimrt::ModuleBase { public: @@ -42,4 +42,4 @@ class NormalPublisherModule : public aimrt::ModuleBase { aimrt::channel::PublisherRef publisher_; }; -} // namespace aimrt::examples::cpp::ros2_channel::normal_publisher_module +} // namespace aimrt::examples::cpp::ros2_chn::normal_publisher_module diff --git a/src/examples/cpp/ros2_channel/module/normal_subscriber_module/CMakeLists.txt b/src/examples/cpp/ros2_chn/module/normal_subscriber_module/CMakeLists.txt similarity index 100% rename from src/examples/cpp/ros2_channel/module/normal_subscriber_module/CMakeLists.txt rename to src/examples/cpp/ros2_chn/module/normal_subscriber_module/CMakeLists.txt diff --git a/src/examples/cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc b/src/examples/cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc similarity index 90% rename from src/examples/cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc rename to src/examples/cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc index dfe5b52e6..40893494a 100644 --- a/src/examples/cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc +++ b/src/examples/cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc @@ -6,7 +6,7 @@ #include "yaml-cpp/yaml.h" -namespace aimrt::examples::cpp::ros2_channel::normal_subscriber_module { +namespace aimrt::examples::cpp::ros2_chn::normal_subscriber_module { bool NormalSubscriberModule::Initialize(aimrt::CoreRef core) { core_ = core; @@ -46,4 +46,4 @@ void NormalSubscriberModule::EventHandle(const std::shared_ptr> aimrt_module_register_array[]{ {"NormalPublisherModule", []() -> aimrt::ModuleBase* { diff --git a/src/examples/cpp/ros2_channel/pkg/ros2_channel_pub_pkg/CMakeLists.txt b/src/examples/cpp/ros2_chn/pkg/ros2_chn_pub_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/ros2_channel/pkg/ros2_channel_pub_pkg/CMakeLists.txt rename to src/examples/cpp/ros2_chn/pkg/ros2_chn_pub_pkg/CMakeLists.txt diff --git a/src/examples/cpp/ros2_channel/pkg/ros2_channel_pub_pkg/pkg_main.cc b/src/examples/cpp/ros2_chn/pkg/ros2_chn_pub_pkg/pkg_main.cc similarity index 79% rename from src/examples/cpp/ros2_channel/pkg/ros2_channel_pub_pkg/pkg_main.cc rename to src/examples/cpp/ros2_chn/pkg/ros2_chn_pub_pkg/pkg_main.cc index 80b7ed757..11942213d 100644 --- a/src/examples/cpp/ros2_channel/pkg/ros2_channel_pub_pkg/pkg_main.cc +++ b/src/examples/cpp/ros2_chn/pkg/ros2_chn_pub_pkg/pkg_main.cc @@ -8,7 +8,7 @@ static std::tuple> aimrt_module_register_array[]{ {"NormalPublisherModule", []() -> aimrt::ModuleBase* { - return new aimrt::examples::cpp::ros2_channel::normal_publisher_module::NormalPublisherModule(); + return new aimrt::examples::cpp::ros2_chn::normal_publisher_module::NormalPublisherModule(); }}}; AIMRT_PKG_MAIN(aimrt_module_register_array) diff --git a/src/examples/cpp/ros2_channel/pkg/ros2_channel_sub_pkg/CMakeLists.txt b/src/examples/cpp/ros2_chn/pkg/ros2_chn_sub_pkg/CMakeLists.txt similarity index 100% rename from src/examples/cpp/ros2_channel/pkg/ros2_channel_sub_pkg/CMakeLists.txt rename to src/examples/cpp/ros2_chn/pkg/ros2_chn_sub_pkg/CMakeLists.txt diff --git a/src/examples/cpp/ros2_channel/pkg/ros2_channel_sub_pkg/pkg_main.cc b/src/examples/cpp/ros2_chn/pkg/ros2_chn_sub_pkg/pkg_main.cc similarity index 79% rename from src/examples/cpp/ros2_channel/pkg/ros2_channel_sub_pkg/pkg_main.cc rename to src/examples/cpp/ros2_chn/pkg/ros2_chn_sub_pkg/pkg_main.cc index 336e0aea1..ac705188a 100644 --- a/src/examples/cpp/ros2_channel/pkg/ros2_channel_sub_pkg/pkg_main.cc +++ b/src/examples/cpp/ros2_chn/pkg/ros2_chn_sub_pkg/pkg_main.cc @@ -8,7 +8,7 @@ static std::tuple> aimrt_module_register_array[]{ {"NormalSubscriberModule", []() -> aimrt::ModuleBase* { - return new aimrt::examples::cpp::ros2_channel::normal_subscriber_module::NormalSubscriberModule(); + return new aimrt::examples::cpp::ros2_chn::normal_subscriber_module::NormalSubscriberModule(); }}}; AIMRT_PKG_MAIN(aimrt_module_register_array) diff --git a/src/examples/plugins/grpc_plugin/CMakeLists.txt b/src/examples/plugins/grpc_plugin/CMakeLists.txt index 72d92ae24..9c637cf9e 100644 --- a/src/examples/plugins/grpc_plugin/CMakeLists.txt +++ b/src/examples/plugins/grpc_plugin/CMakeLists.txt @@ -27,7 +27,7 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # ) endif() diff --git a/src/examples/plugins/grpc_plugin/README.md b/src/examples/plugins/grpc_plugin/README.md index c55a656fe..6340c1053 100644 --- a/src/examples/plugins/grpc_plugin/README.md +++ b/src/examples/plugins/grpc_plugin/README.md @@ -11,32 +11,32 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) - aimrt code: - - [normal_rpc_co_client_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) - - [normal_rpc_co_server_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) - - [service.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc) + - [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) + - [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) + - [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) - native grpc code: - [client.py](./assistant/client.py) - [server.py](./assistant/server.py) 配置文件: -- [examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml) -- [examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml) +- [examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml) +- [examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_WITH_PROTOBUF`、`AIMRT_BUILD_GRPC_PLUGIN` 选项编译 AimRT; - 如果要运行原生 grpc 服务,需要先安装 `grpcio` 和 `grpcio-tools` 库,可以直接通过`pip install grpcio grpcio-tools`安装,然后运行 assistant 目录下的[build_grpc_native_examples.sh](./assistant/build_grpc_native_examples.sh)脚本; - aimrt client 调用 aimrt server: - - 编译成功后在终端运行 build 目录下`start_examples_plugins_grpc_plugin_protobuf_rpc_server.sh`脚本启动服务端(srv 进程); - - 开启新的终端运行 build 目录下`start_examples_plugins_grpc_plugin_protobuf_rpc_client.sh`脚本启动客户端(cli 进程); + - 编译成功后在终端运行 build 目录下`start_examples_plugins_grpc_plugin_pb_rpc_server.sh`脚本启动服务端(srv 进程); + - 开启新的终端运行 build 目录下`start_examples_plugins_grpc_plugin_pb_rpc_client.sh`脚本启动客户端(cli 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - aimrt client 调用 native grpc server: - 直接运行 assistant 目录下的[start_examples_plugins_grpc_plugin_native_server.sh](./assistant/start_examples_plugins_grpc_plugin_native_server.sh)脚本启动原生 grpc 服务端; - - 开启新的终端运行 build 目录下`start_examples_plugins_grpc_plugin_protobuf_rpc_client.sh`脚本启动客户端(cli 进程); + - 开启新的终端运行 build 目录下`start_examples_plugins_grpc_plugin_pb_rpc_client.sh`脚本启动客户端(cli 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - native ros2 client 调用 aimrt server: - - 编译成功后在终端运行 build 目录下`start_examples_plugins_grpc_plugin_protobuf_rpc_server.sh`脚本启动服务端(srv 进程); + - 编译成功后在终端运行 build 目录下`start_examples_plugins_grpc_plugin_pb_rpc_server.sh`脚本启动服务端(srv 进程); - 直接运行 assistant 目录下的[start_examples_plugins_grpc_plugin_native_client.sh](./assistant/start_examples_plugins_grpc_plugin_native_client.sh)脚本启动原生 grpc 客户端; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -46,7 +46,7 @@ - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; - 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; -- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中, 并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中, 并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; - 此示例还创建了原生 grpc 客户端和服务端,用于展示如何使用原生 grpc 程序与 aimrt 程序通过 grpc 后端通信; - 此示例加载了**grpc_plugin**,并使用 grpc 类型的 rpc 后端进行通信; diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client_cfg.yaml b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_benchmark_client_cfg.yaml similarity index 97% rename from src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client_cfg.yaml rename to src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_benchmark_client_cfg.yaml index 8e959b736..5f686a50c 100644 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client_cfg.yaml +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_benchmark_client_cfg.yaml @@ -44,7 +44,7 @@ aimrt: enable_backends: [grpc] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [BenchmarkRpcClientModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml similarity index 95% rename from src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml rename to src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml index 85ff56e58..591e0456c 100644 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml @@ -29,7 +29,7 @@ aimrt: enable_backends: [grpc] module: pkgs: - - path: ./libprotobuf_rpc_pkg.so + - path: ./libpb_rpc_pkg.so enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml similarity index 93% rename from src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml rename to src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml index 09677a977..1f5eb2c13 100644 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/cfg/examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml @@ -20,7 +20,7 @@ aimrt: enable_backends: [grpc] module: pkgs: - - path: ./libprotobuf_rpc_pkg.so + - path: ./libpb_rpc_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client.sh b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_benchmark_client.sh similarity index 66% rename from src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client.sh rename to src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_benchmark_client.sh index b9f190edd..bce14b4b9 100755 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client.sh +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_benchmark_client.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_protobuf_rpc_benchmark_client_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_pb_rpc_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_client.sh b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_client.sh similarity index 82% rename from src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_client.sh rename to src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_client.sh index 6e04be5d8..047541a8a 100755 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_client.sh +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_client.sh @@ -2,4 +2,4 @@ lsof -i :50051 | awk 'NR!=1 {print $2}' | xargs kill -9 -./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_protobuf_rpc_client_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_pb_rpc_client_cfg.yaml diff --git a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_server.sh b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_server.sh similarity index 82% rename from src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_server.sh rename to src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_server.sh index 28cfbbca7..4a985f5fd 100755 --- a/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_protobuf_rpc_server.sh +++ b/src/examples/plugins/grpc_plugin/install/linux/bin/start_examples_plugins_grpc_plugin_pb_rpc_server.sh @@ -2,4 +2,4 @@ lsof -i :50050 | awk 'NR!=1 {print $2}' | xargs kill -9 -./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_protobuf_rpc_server_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_grpc_plugin_pb_rpc_server_cfg.yaml diff --git a/src/examples/plugins/iceoryx_plugin/CMakeLists.txt b/src/examples/plugins/iceoryx_plugin/CMakeLists.txt index ff1f6493c..61e624336 100644 --- a/src/examples/plugins/iceoryx_plugin/CMakeLists.txt +++ b/src/examples/plugins/iceoryx_plugin/CMakeLists.txt @@ -27,10 +27,10 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() if(AIMRT_BUILD_WITH_ROS2) @@ -38,6 +38,6 @@ if(AIMRT_BUILD_WITH_ROS2) ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # aimrt::examples::cpp::ros2_rpc::ros2_rpc_client_pkg # aimrt::examples::cpp::ros2_rpc::ros2_rpc_server_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_pub_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_sub_pkg) + aimrt::examples::cpp::ros2_chn::ros2_chn_pub_pkg # + aimrt::examples::cpp::ros2_chn::ros2_chn_sub_pkg) endif() diff --git a/src/examples/plugins/iceoryx_plugin/README.md b/src/examples/plugins/iceoryx_plugin/README.md index 7f5903326..c12d34429 100644 --- a/src/examples/plugins/iceoryx_plugin/README.md +++ b/src/examples/plugins/iceoryx_plugin/README.md @@ -9,19 +9,19 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml) -- [examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml) +- [examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml) +- [examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ICEORYX_PLUGIN` 选项编译 AimRT; - 编译成功后,在终端运行 build 目录下 iox-roudi 可执行文件以启动 iceoryx 的守护进程; -- 开启新的终端运行 build 目录下`start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.sh`脚本启动发布端(pub 进程); +- 开启新的终端运行 build 目录下`start_examples_plugins_iceoryx_plugin_pb_chn_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_iceoryx_plugin_pb_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在开启的三个终端键入`ctrl-c`停止对应进程; @@ -29,5 +29,5 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**iceoryx_plugin**,并使用 iceoryx 类型的 channel 后端进行通信; diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub_cfg.yaml similarity index 96% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub_cfg.yaml index 8ef045057..52c68b25f 100644 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub_cfg.yaml @@ -32,7 +32,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub_cfg.yaml similarity index 93% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub_cfg.yaml index e25f9d3d0..5dc56d971 100644 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub_cfg.yaml @@ -21,7 +21,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml similarity index 94% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml index 8189dc201..19aabc6af 100644 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml similarity index 93% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml index ddb79b41a..658f28916 100644 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml @@ -19,7 +19,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_pub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_pub_cfg.yaml new file mode 100644 index 000000000..fc6472ff4 --- /dev/null +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_pub_cfg.yaml @@ -0,0 +1,36 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: iceoryx_plugin + path: ./libaimrt_iceoryx_plugin.so + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + executors: + - name: work_thread_pool + type: asio_thread + options: + thread_num: 2 + channel: + backends: + - type: iceoryx + pub_topics_options: + - topic_name: "(.*)" + enable_backends: [iceoryx] + module: + pkgs: + - path: ./libros2_chn_pub_pkg.so + enable_modules: [NormalPublisherModule] + modules: + - name: NormalPublisherModule + log_lvl: INFO + +# Module custom configuration +NormalPublisherModule: + topic_name: test_topic + channel_frq: 0.5 diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_sub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_sub_cfg.yaml new file mode 100644 index 000000000..7ba6fa32e --- /dev/null +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/cfg/examples_plugins_iceoryx_plugin_ros2_chn_sub_cfg.yaml @@ -0,0 +1,30 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: iceoryx_plugin + path: ./libaimrt_iceoryx_plugin.so + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + channel: + backends: + - type: iceoryx + sub_topics_options: + - topic_name: "(.*)" + enable_backends: [iceoryx] + module: + pkgs: + - path: ./libros2_chn_sub_pkg.so + enable_modules: [NormalSubscriberModule] + modules: + - name: NormalSubscriberModule + log_lvl: INFO + +# Module custom configuration +NormalSubscriberModule: + topic_name: test_topic diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub.sh similarity index 70% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.sh rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub.sh index f33d141f2..28f24c80c 100755 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.sh +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub.sh similarity index 70% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.sh rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub.sh index 4a10f00aa..af10d30d6 100755 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.sh +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_benchmark_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.sh similarity index 65% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub.sh rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.sh index 97e6ae431..0fb47b519 100755 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub.sh +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_pub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.sh similarity index 65% rename from src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub.sh rename to src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.sh index 7588f4a38..e6ac44094 100755 --- a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub.sh +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_benchmark_sub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_pub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_pub.sh new file mode 100755 index 000000000..6eea0ca50 --- /dev/null +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_pub.sh @@ -0,0 +1,5 @@ + +#!/bin/bash +source install/share/ros2_plugin_proto/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_ros2_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_sub.sh b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_sub.sh new file mode 100755 index 000000000..817fc135b --- /dev/null +++ b/src/examples/plugins/iceoryx_plugin/install/linux/bin/start_examples_plugins_iceoryx_plugin_ros2_chn_sub.sh @@ -0,0 +1,5 @@ + +#!/bin/bash +source install/share/ros2_plugin_proto/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_ros2_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml similarity index 94% rename from src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml index a6c48569c..5138230f4 100644 --- a/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml similarity index 93% rename from src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml index d41b6b8ff..b7f9211c9 100644 --- a/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/iceoryx_plugin/install/win/bin/cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml @@ -19,7 +19,7 @@ aimrt: enable_backends: [iceoryx] module: pkgs: - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.bat b/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.bat similarity index 66% rename from src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.bat rename to src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.bat index 14d299286..6c3e7ebce 100755 --- a/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_pub.bat +++ b/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_pub.bat @@ -1 +1 @@ -.\aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_pub_cfg.yaml \ No newline at end of file +.\aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.bat b/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.bat similarity index 66% rename from src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.bat rename to src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.bat index 1f113aa6c..0939d5fc5 100755 --- a/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_protobuf_channel_sub.bat +++ b/src/examples/plugins/iceoryx_plugin/install/win/bin/start_examples_plugins_iceoryx_plugin_pb_chn_sub.bat @@ -1 +1 @@ -.\aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_protobuf_channel_sub_cfg.yaml \ No newline at end of file +.\aimrt_main --cfg_file_path=./cfg/examples_plugins_iceoryx_plugin_pb_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/mqtt_plugin/CMakeLists.txt b/src/examples/plugins/mqtt_plugin/CMakeLists.txt index ff1f6493c..61e624336 100644 --- a/src/examples/plugins/mqtt_plugin/CMakeLists.txt +++ b/src/examples/plugins/mqtt_plugin/CMakeLists.txt @@ -27,10 +27,10 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() if(AIMRT_BUILD_WITH_ROS2) @@ -38,6 +38,6 @@ if(AIMRT_BUILD_WITH_ROS2) ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # aimrt::examples::cpp::ros2_rpc::ros2_rpc_client_pkg # aimrt::examples::cpp::ros2_rpc::ros2_rpc_server_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_pub_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_sub_pkg) + aimrt::examples::cpp::ros2_chn::ros2_chn_pub_pkg # + aimrt::examples::cpp::ros2_chn::ros2_chn_sub_pkg) endif() diff --git a/src/examples/plugins/mqtt_plugin/README.md b/src/examples/plugins/mqtt_plugin/README.md index 5e01d625b..5410ec212 100644 --- a/src/examples/plugins/mqtt_plugin/README.md +++ b/src/examples/plugins/mqtt_plugin/README.md @@ -9,22 +9,22 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [normal_rpc_co_client_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) -- [normal_rpc_co_server_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) -- [service.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc) +- [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) +- [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) +- [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) 配置文件: -- [examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml) -- [examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml) +- [examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml) +- [examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_MQTT_PLUGIN` 选项编译 AimRT; - 在本地启动一个 mqtt broker,也可以使用其他 IP 地址的 mqtt broker,但需要修改示例配置中的 `broker_addr`; -- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_protobuf_rpc_server.sh`脚本启动服务端(srv 进程); -- 开启新的终端运行 build 目录下`start_examples_plugins_mqtt_plugin_protobuf_rpc_client.sh`脚本启动客户端(cli 进程); +- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_pb_rpc_server.sh`脚本启动服务端(srv 进程); +- 开启新的终端运行 build 目录下`start_examples_plugins_mqtt_plugin_pb_rpc_client.sh`脚本启动客户端(cli 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -33,7 +33,7 @@ - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; - 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; -- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; - 此示例加载了**mqtt_plugin**,并使用 mqtt 类型的 rpc 后端进行通信,配置 `tcp://127.0.0.1:1883` 作为 broker 地址,此外还在客户端配置了 `timeout_handle` 执行器作为超时执行器; @@ -80,19 +80,19 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml) -- [examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml) +- [examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml) +- [examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_MQTT_PLUGIN` 选项编译 AimRT; - 在本地启动一个 mqtt broker,也可以使用其他 IP 地址的 mqtt broker,但需要修改示例配置中的 `broker_addr`; -- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_protobuf_channel_sub.sh`脚本启动订阅端(sub进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_mqtt_plugin_protobuf_channel_pub.sh`脚本启动发布端(pub进程); +- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_pb_chn_sub.sh`脚本启动订阅端(sub进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_mqtt_plugin_pb_chn_pub.sh`脚本启动发布端(pub进程); - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -100,7 +100,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**mqtt_plugin**,并使用 mqtt 类型的 channel 后端进行通信,配置 `tcp://127.0.0.1:1883` 作为 broker 地址; @@ -114,20 +114,20 @@ 核心代码: - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) -- [normal_publisher_module.cc](../../cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml) -- [examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml) +- [examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml) +- [examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_MQTT_PLUGIN` 选项编译 AimRT; - 在本地启动一个 mqtt broker,也可以使用其他 IP 地址的 mqtt broker,但需要修改示例配置中的 `broker_addr`; -- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_ros2_channel_sub.sh`脚本启动订阅端(sub进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_mqtt_plugin_ros2_channel_pub.sh`脚本启动发布端(pub进程); +- 在终端运行 build 目录下`start_examples_plugins_mqtt_plugin_ros2_chn_sub.sh`脚本启动订阅端(sub进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_mqtt_plugin_ros2_chn_pub.sh`脚本启动发布端(pub进程); - 分别在两个终端键入`ctrl-c`停止对应进程; diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_pub_cfg.yaml similarity index 92% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_pub_cfg.yaml index 0cc53607c..1d4921a6b 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_pub_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_channel_benchmark_publisher + client_id: example_pb_chn_benchmark_publisher max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -38,7 +38,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_sub_cfg.yaml similarity index 87% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_sub_cfg.yaml index a928d3da7..f048ba5b6 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_sub_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_channel_benchmark_subscriber + client_id: example_pb_chn_benchmark_subscriber max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -27,7 +27,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml similarity index 89% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml index dfeb2b77d..217abb139 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_channel_publisher + client_id: example_pb_chn_publisher max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -28,7 +28,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml similarity index 87% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml index 3f9e36a5a..cb1673408 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml @@ -8,12 +8,13 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_ros2_channel_subscriber + client_id: example_pb_chn_subscriber max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: - type: console + executor: channel: backends: - type: mqtt @@ -22,7 +23,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libros2_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_benchmark_client_cfg.yaml similarity index 93% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_benchmark_client_cfg.yaml index d52b54d5b..d946f9192 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_benchmark_client_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_rpc_benchmark_client + client_id: example_pb_rpc_benchmark_client max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -45,7 +45,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [BenchmarkRpcClientModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml similarity index 91% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml index b6c7465fc..ef9aaa7ea 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_rpc_client + client_id: example_pb_rpc_client max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -37,7 +37,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml similarity index 88% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml index 9dbae025b..3a5895d5c 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_rpc_server + client_id: example_pb_rpc_server max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -26,7 +26,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml similarity index 89% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml index cccc97082..9b512fe44 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_ros2_channel_publisher + client_id: example_ros2_chn_publisher max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -28,7 +28,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libros2_channel_pub_pkg.so + - path: ./libros2_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml similarity index 85% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml index 5c4dbe7bf..7bb89c624 100644 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/cfg/examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml @@ -8,13 +8,12 @@ aimrt: path: ./libaimrt_mqtt_plugin.so options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_channel_subscriber + client_id: example_ros2_chn_subscriber max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: - type: console - executor: channel: backends: - type: mqtt @@ -23,7 +22,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_pub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_pub.sh similarity index 71% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_pub.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_pub.sh index 0abd66016..51e955218 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_pub.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_pub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_channel_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_sub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_sub.sh similarity index 71% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_sub.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_sub.sh index 60883cbf2..d741ef25f 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_sub.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_benchmark_sub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_channel_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_chn_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_server.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_pub.sh similarity index 72% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_server.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_pub.sh index 00d62cfbb..bda0449ea 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_server.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_pub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_chn_pub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_client.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_sub.sh similarity index 72% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_client.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_sub.sh index b96a0e079..6e45f0158 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_client.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_chn_sub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_chn_sub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_benchmark_client.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_benchmark_client.sh new file mode 100755 index 000000000..59bee045a --- /dev/null +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_benchmark_client.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_rpc_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_client.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_client.sh new file mode 100755 index 000000000..e75a68b53 --- /dev/null +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_client.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_server.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_server.sh new file mode 100755 index 000000000..8a232e92b --- /dev/null +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_pb_rpc_server.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub.sh deleted file mode 100755 index d201152ea..000000000 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub.sh deleted file mode 100755 index 94c415608..000000000 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_channel_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client.sh deleted file mode 100755 index bf142bd0d..000000000 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_protobuf_rpc_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_pub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_pub.sh similarity index 83% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_pub.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_pub.sh index 10851a332..a736fce6f 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_pub.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_pub.sh @@ -2,4 +2,4 @@ source install/share/example_ros2/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_ros2_channel_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_ros2_chn_pub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_sub.sh b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_sub.sh similarity index 83% rename from src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_sub.sh rename to src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_sub.sh index c9eceaa69..bbe4bce9a 100755 --- a/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_channel_sub.sh +++ b/src/examples/plugins/mqtt_plugin/install/linux/bin/start_examples_plugins_mqtt_plugin_ros2_chn_sub.sh @@ -2,4 +2,4 @@ source install/share/example_ros2/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_ros2_channel_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_mqtt_plugin_ros2_chn_sub_cfg.yaml diff --git a/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml similarity index 91% rename from src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml index c6ecee0c4..289fda81b 100644 --- a/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_client_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_client_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./aimrt_mqtt_plugin.dll options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_rpc_client + client_id: example_pb_rpc_client max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -37,7 +37,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./protobuf_rpc_client_pkg.dll + - path: ./pb_rpc_client_pkg.dll enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml b/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml similarity index 88% rename from src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml rename to src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml index ddf095010..7cb5357d1 100644 --- a/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_protobuf_rpc_server_cfg.yaml +++ b/src/examples/plugins/mqtt_plugin/install/win/bin/cfg/examples_plugins_mqtt_plugin_pb_rpc_server_cfg.yaml @@ -8,7 +8,7 @@ aimrt: path: ./aimrt_mqtt_plugin.dll options: broker_addr: tcp://127.0.0.1:1883 - client_id: example_protobuf_rpc_server + client_id: example_pb_rpc_server max_pkg_size_k: 1024 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off @@ -26,7 +26,7 @@ aimrt: enable_backends: [mqtt] module: pkgs: - - path: ./protobuf_rpc_server_pkg.dll + - path: ./pb_rpc_server_pkg.dll enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_client.bat b/src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_pb_rpc_client.bat similarity index 100% rename from src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_client.bat rename to src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_pb_rpc_client.bat diff --git a/src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_server.bat b/src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_pb_rpc_server.bat similarity index 100% rename from src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_protobuf_rpc_server.bat rename to src/examples/plugins/mqtt_plugin/install/win/bin/start_examples_plugins_mqtt_plugin_pb_rpc_server.bat diff --git a/src/examples/plugins/net_plugin/CMakeLists.txt b/src/examples/plugins/net_plugin/CMakeLists.txt index ff1f6493c..61e624336 100644 --- a/src/examples/plugins/net_plugin/CMakeLists.txt +++ b/src/examples/plugins/net_plugin/CMakeLists.txt @@ -27,10 +27,10 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() if(AIMRT_BUILD_WITH_ROS2) @@ -38,6 +38,6 @@ if(AIMRT_BUILD_WITH_ROS2) ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # aimrt::examples::cpp::ros2_rpc::ros2_rpc_client_pkg # aimrt::examples::cpp::ros2_rpc::ros2_rpc_server_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_pub_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_sub_pkg) + aimrt::examples::cpp::ros2_chn::ros2_chn_pub_pkg # + aimrt::examples::cpp::ros2_chn::ros2_chn_sub_pkg) endif() diff --git a/src/examples/plugins/net_plugin/README.md b/src/examples/plugins/net_plugin/README.md index c3f9e0142..6fec0c616 100644 --- a/src/examples/plugins/net_plugin/README.md +++ b/src/examples/plugins/net_plugin/README.md @@ -9,21 +9,21 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [normal_rpc_co_client_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) -- [normal_rpc_co_server_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) -- [service.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc) +- [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) +- [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) +- [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) 配置文件: -- [examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml) -- [examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml) +- [examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml) +- [examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_NET_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_net_plugin_protobuf_rpc_http_server.sh`脚本启动服务端(srv 进程); -- 开启新的终端运行 build 目录下`start_examples_plugins_net_plugin_protobuf_rpc_http_client.sh`脚本启动客户端(cli 进程); -- 在服务端开启的状态下,运行[protobuf_rpc_http_client_tool.sh](./install/linux/bin/tools/protobuf_rpc_http_client_tool.sh)脚本向服务端直接发起 RPC 请求; +- 在终端运行 build 目录下`start_examples_plugins_net_plugin_pb_rpc_http_server.sh`脚本启动服务端(srv 进程); +- 开启新的终端运行 build 目录下`start_examples_plugins_net_plugin_pb_rpc_http_client.sh`脚本启动客户端(cli 进程); +- 在服务端开启的状态下,运行[pb_rpc_http_client_tool.sh](./install/linux/bin/tools/pb_rpc_http_client_tool.sh)脚本向服务端直接发起 RPC 请求; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -32,7 +32,7 @@ - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; - 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; -- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; - 此示例加载了**net_plugin**,并使用 http 类型的 rpc 后端进行通信,配置 `127.0.0.1:50080` 作为服务端地址; - 此示例演示了如何通过 curl 命令直接向服务端发起请求; @@ -81,19 +81,19 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml) -- [examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_NET_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_net_plugin_protobuf_channel_http_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_protobuf_channel_http_pub.sh`脚本启动发布端(pub 进程); -- 在订阅端开启的状态下,运行[protobuf_channel_http_pub_tool.sh](./install/linux/bin/tools/protobuf_channel_http_pub_tool.sh)脚本向订阅端直接发布数据; +- 在终端运行 build 目录下`start_examples_plugins_net_plugin_pb_chn_http_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_pb_chn_http_pub.sh`脚本启动发布端(pub 进程); +- 在订阅端开启的状态下,运行[pb_chn_http_pub_tool.sh](./install/linux/bin/tools/pb_chn_http_pub_tool.sh)脚本向订阅端直接发布数据; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -101,7 +101,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**net_plugin**,并使用 http 类型的 channel 后端进行通信,配置 `127.0.0.1:50080` 作为订阅端地址; - 此示例演示了如何通过 curl 命令直接向订阅端直接发布数据; @@ -116,19 +116,19 @@ 核心代码: - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) -- [normal_publisher_module.cc](../../cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml) -- [examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml) +- [examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml) +- [examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_NET_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_net_plugin_ros2_channel_http_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_ros2_channel_http_pub.sh`脚本启动发布端(pub 进程); -- 在订阅端开启的状态下,运行[ros2_channel_http_pub_tool.sh](./install/linux/bin/tools/ros2_channel_http_pub_tool.sh)脚本向订阅端直接发布数据; +- 在终端运行 build 目录下`start_examples_plugins_net_plugin_ros2_chn_http_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_ros2_chn_http_pub.sh`脚本启动发布端(pub 进程); +- 在订阅端开启的状态下,运行[ros2_chn_http_pub_tool.sh](./install/linux/bin/tools/ros2_chn_http_pub_tool.sh)脚本向订阅端直接发布数据; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -146,18 +146,18 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml) -- [examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_NET_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_net_plugin_protobuf_channel_tcp_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_protobuf_channel_tcp_pub.sh`脚本启动发布端(pub 进程); +- 在终端运行 build 目录下`start_examples_plugins_net_plugin_pb_chn_tcp_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_pb_chn_tcp_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -165,7 +165,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**net_plugin**,并使用 tcp 类型的 channel 后端进行通信,配置 `127.0.0.1:50060` 作为订阅端地址; @@ -178,19 +178,19 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml) -- [examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml) +- [examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_NET_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_net_plugin_protobuf_channel_udp_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_protobuf_channel_udp_pub.sh`脚本启动发布端(pub 进程); +- 在终端运行 build 目录下`start_examples_plugins_net_plugin_pb_chn_udp_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_net_plugin_pb_chn_udp_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -198,5 +198,5 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**net_plugin**,并使用 udp 类型的 channel 后端进行通信,配置 `127.0.0.1:50040` 作为订阅端地址; diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_pub_cfg.yaml similarity index 96% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_pub_cfg.yaml index f54df319e..d344f67a7 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_pub_cfg.yaml @@ -39,7 +39,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_sub_cfg.yaml index 913ef0434..a3538c6d9 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_sub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml index 690590f97..8056e6f72 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml @@ -33,7 +33,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libros2_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml index daef98de4..cbc96ed8d 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libros2_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub_cfg.yaml similarity index 96% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub_cfg.yaml index 8d846c160..dca57aaa8 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub_cfg.yaml @@ -39,7 +39,7 @@ aimrt: enable_backends: [tcp] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub_cfg.yaml index 74264a396..01def444f 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [tcp] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml index f5d50a74e..48e2e601e 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml @@ -33,7 +33,7 @@ aimrt: enable_backends: [tcp] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml index ef8a7c4b8..59bbbffe2 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [tcp] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_pub_cfg.yaml similarity index 96% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_pub_cfg.yaml index b831d7876..583c36646 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_pub_cfg.yaml @@ -40,7 +40,7 @@ aimrt: enable_backends: [udp] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_sub_cfg.yaml index 7e52851e6..fbd0241e8 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_sub_cfg.yaml @@ -25,7 +25,7 @@ aimrt: enable_backends: [udp] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml index 375675182..5453274cd 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml @@ -34,7 +34,7 @@ aimrt: enable_backends: [udp] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml index 796709d87..1de94cfed 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml @@ -25,7 +25,7 @@ aimrt: enable_backends: [udp] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_benchmark_client_cfg.yaml similarity index 97% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_benchmark_client_cfg.yaml index d690c44ed..a8695ca4e 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_benchmark_client_cfg.yaml @@ -45,7 +45,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [BenchmarkRpcClientModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml index 77ee1af38..3a95c663f 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml @@ -33,7 +33,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml similarity index 93% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml index 87e052cb2..cf9d610a2 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml index 2ed9e39b2..a42ff07be 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml @@ -33,7 +33,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libros2_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml similarity index 94% rename from src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml rename to src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml index b60c093d6..482af7c41 100644 --- a/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/linux/bin/cfg/examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_pub.sh similarity index 69% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_pub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_pub.sh index 38a8ff509..1184c29ac 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_pub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_pub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_http_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_sub.sh similarity index 69% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_sub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_sub.sh index b15fce9f4..e5ec7a0d8 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_sub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_benchmark_sub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_http_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_http_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_pub.sh similarity index 70% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_pub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_pub.sh index b2ebe64aa..ede4e8f1f 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_pub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_pub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_tcp_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_http_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_sub.sh similarity index 70% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_sub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_sub.sh index 74068a71b..86f275434 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_sub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_http_sub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_tcp_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_http_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub.sh similarity index 70% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_pub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub.sh index f6f8fb38b..3dbd47cb5 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_pub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_udp_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub.sh similarity index 70% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_sub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub.sh index 59017d519..012bbda9f 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_sub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_udp_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_tcp_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_pub.sh new file mode 100755 index 000000000..273e337b3 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_pub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_tcp_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_sub.sh new file mode 100755 index 000000000..084e97fc4 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_tcp_sub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_tcp_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_pub.sh new file mode 100755 index 000000000..3cfd6151f --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_pub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_sub.sh new file mode 100755 index 000000000..f6f577740 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_benchmark_sub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_udp_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_pub.sh new file mode 100755 index 000000000..efe6890c6 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_pub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_udp_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_sub.sh new file mode 100755 index 000000000..1ba389253 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_chn_udp_sub.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_chn_udp_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_benchmark_client.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_benchmark_client.sh new file mode 100755 index 000000000..1f5448db7 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_benchmark_client.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_rpc_http_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.sh new file mode 100755 index 000000000..6554cd848 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.sh new file mode 100755 index 000000000..fb9689373 --- /dev/null +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub.sh deleted file mode 100755 index 5a0441807..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub.sh deleted file mode 100755 index 4f6cfc94e..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_http_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub.sh deleted file mode 100755 index f8f4e6a3a..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub.sh deleted file mode 100755 index 76d38bf44..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_tcp_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub.sh deleted file mode 100755 index d1b6f9acc..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub.sh deleted file mode 100755 index 300578d87..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_channel_udp_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client.sh deleted file mode 100755 index 5794fc74c..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_rpc_http_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.sh deleted file mode 100755 index 969867f80..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.sh deleted file mode 100755 index 66dd07a42..000000000 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_pub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_pub.sh similarity index 81% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_pub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_pub.sh index 047dcc740..13b1e3442 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_pub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_pub.sh @@ -2,4 +2,4 @@ source install/share/example_ros2/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_ros2_channel_http_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_ros2_chn_http_pub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_sub.sh b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_sub.sh similarity index 81% rename from src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_sub.sh rename to src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_sub.sh index f53219317..2cac9f01e 100755 --- a/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_channel_http_sub.sh +++ b/src/examples/plugins/net_plugin/install/linux/bin/start_examples_plugins_net_plugin_ros2_chn_http_sub.sh @@ -2,4 +2,4 @@ source install/share/example_ros2/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_ros2_channel_http_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_net_plugin_ros2_chn_http_sub_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/linux/bin/tools/protobuf_channel_http_pub_tool.sh b/src/examples/plugins/net_plugin/install/linux/bin/tools/pb_chn_http_pub_tool.sh similarity index 100% rename from src/examples/plugins/net_plugin/install/linux/bin/tools/protobuf_channel_http_pub_tool.sh rename to src/examples/plugins/net_plugin/install/linux/bin/tools/pb_chn_http_pub_tool.sh diff --git a/src/examples/plugins/net_plugin/install/linux/bin/tools/protobuf_rpc_http_client_tool.sh b/src/examples/plugins/net_plugin/install/linux/bin/tools/pb_rpc_http_client_tool.sh similarity index 100% rename from src/examples/plugins/net_plugin/install/linux/bin/tools/protobuf_rpc_http_client_tool.sh rename to src/examples/plugins/net_plugin/install/linux/bin/tools/pb_rpc_http_client_tool.sh diff --git a/src/examples/plugins/net_plugin/install/linux/bin/tools/ros2_channel_http_pub_tool.sh b/src/examples/plugins/net_plugin/install/linux/bin/tools/ros2_chn_http_pub_tool.sh similarity index 100% rename from src/examples/plugins/net_plugin/install/linux/bin/tools/ros2_channel_http_pub_tool.sh rename to src/examples/plugins/net_plugin/install/linux/bin/tools/ros2_chn_http_pub_tool.sh diff --git a/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml b/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml similarity index 95% rename from src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml rename to src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml index fb9365b49..6ce032341 100644 --- a/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml @@ -33,7 +33,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./protobuf_rpc_client_pkg.dll + - path: ./pb_rpc_client_pkg.dll enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml b/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml similarity index 93% rename from src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml rename to src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml index e184a3ab2..163b5cdf1 100644 --- a/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml +++ b/src/examples/plugins/net_plugin/install/win/bin/cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./protobuf_rpc_server_pkg.dll + - path: ./pb_rpc_server_pkg.dll enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.bat b/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.bat similarity index 63% rename from src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.bat rename to src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.bat index d7723d03a..b2abb237d 100755 --- a/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_client.bat +++ b/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_client.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_rpc_http_client_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_rpc_http_client_cfg.yaml diff --git a/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.bat b/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.bat similarity index 63% rename from src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.bat rename to src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.bat index 775acf880..686ccbe72 100755 --- a/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_protobuf_rpc_http_server.bat +++ b/src/examples/plugins/net_plugin/install/win/bin/start_examples_plugins_net_plugin_pb_rpc_http_server.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_net_plugin_protobuf_rpc_http_server_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_net_plugin_pb_rpc_http_server_cfg.yaml diff --git a/src/examples/plugins/opentelemetry_plugin/CMakeLists.txt b/src/examples/plugins/opentelemetry_plugin/CMakeLists.txt index fc23ff560..39a761c54 100644 --- a/src/examples/plugins/opentelemetry_plugin/CMakeLists.txt +++ b/src/examples/plugins/opentelemetry_plugin/CMakeLists.txt @@ -27,8 +27,8 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() diff --git a/src/examples/plugins/opentelemetry_plugin/README.md b/src/examples/plugins/opentelemetry_plugin/README.md index 6e128e107..457f62cad 100644 --- a/src/examples/plugins/opentelemetry_plugin/README.md +++ b/src/examples/plugins/opentelemetry_plugin/README.md @@ -11,20 +11,20 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [normal_rpc_co_client_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) -- [normal_rpc_co_server_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) -- [service.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc) +- [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) +- [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) +- [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) 配置文件: -- [examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml](./install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml) +- [examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml](./install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_OPENTELEMETRY_PLUGIN` 选项编译 AimRT; - 将启动配置中的 `trace_otlp_http_exporter_url` 配置为 collector 或 jaejer 的上报地址,详情请参考插件文档; -- 直接运行 build 目录下`start_examples_plugins_opentelemetry_plugin_protobuf_rpc.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_plugins_opentelemetry_plugin_pb_rpc.sh`脚本启动进程; - 在 jaejer 平台上观察 rpc trace 数据; - 键入`ctrl-c`停止进程; @@ -46,13 +46,13 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml](./install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml) +- [examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml](./install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml) @@ -61,7 +61,7 @@ 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_OPENTELEMETRY_PLUGIN` 选项编译 AimRT; - 将启动配置中的 `trace_otlp_http_exporter_url` 配置为 collector 或 jaejer 的上报地址,详情请参考插件文档; -- 直接运行 build 目录下`start_examples_plugins_opentelemetry_plugin_protobuf_channel.sh`脚本启动进程; +- 直接运行 build 目录下`start_examples_plugins_opentelemetry_plugin_pb_chn.sh`脚本启动进程; - 在 jaejer 平台上观察 channel trace 数据; - 键入`ctrl-c`停止进程; diff --git a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml similarity index 93% rename from src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml rename to src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml index 60744b91b..855a6a878 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml +++ b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml @@ -39,9 +39,9 @@ aimrt: enable_filters: [otp_trace] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml similarity index 93% rename from src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml rename to src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml index fe52a800c..b59ec8c05 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml +++ b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml @@ -42,9 +42,9 @@ aimrt: enable_filters: [otp_trace] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcCoClientModule] - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.sh b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.sh similarity index 71% rename from src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.sh rename to src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.sh index 1a70be79d..1199c8652 100755 --- a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.sh +++ b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml diff --git a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.sh b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.sh similarity index 68% rename from src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.sh rename to src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.sh index e16ee5ea0..5ed4dc9ee 100755 --- a/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.sh +++ b/src/examples/plugins/opentelemetry_plugin/install/linux/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.sh @@ -1,3 +1,3 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml diff --git a/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml b/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml similarity index 94% rename from src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml rename to src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml index 53ae96a1c..9eeaf6f24 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml +++ b/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml @@ -39,9 +39,9 @@ aimrt: enable_filters: [otp_trace] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml b/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml similarity index 94% rename from src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml rename to src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml index 4e1930198..bf391c867 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml +++ b/src/examples/plugins/opentelemetry_plugin/install/win/bin/cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml @@ -42,9 +42,9 @@ aimrt: enable_filters: [otp_trace] module: pkgs: - - path: ./protobuf_rpc_client_pkg.dll + - path: ./pb_rpc_client_pkg.dll enable_modules: [NormalRpcCoClientModule] - - path: ./protobuf_rpc_server_pkg.dll + - path: ./pb_rpc_server_pkg.dll enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.bat b/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.bat similarity index 65% rename from src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.bat rename to src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.bat index 828b10245..7e50dfb01 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_rpc.bat +++ b/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_chn.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_protobuf_rpc_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_pb_chn_cfg.yaml diff --git a/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.bat b/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.bat similarity index 62% rename from src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.bat rename to src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.bat index d6c0c2f7d..bf100984f 100644 --- a/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_protobuf_channel.bat +++ b/src/examples/plugins/opentelemetry_plugin/install/win/bin/start_examples_plugins_opentelemetry_plugin_pb_rpc.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_protobuf_channel_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_opentelemetry_plugin_pb_rpc_cfg.yaml diff --git a/src/examples/plugins/record_playback_plugin/CMakeLists.txt b/src/examples/plugins/record_playback_plugin/CMakeLists.txt index b650a5857..8762e2f10 100644 --- a/src/examples/plugins/record_playback_plugin/CMakeLists.txt +++ b/src/examples/plugins/record_playback_plugin/CMakeLists.txt @@ -26,5 +26,5 @@ add_custom_target( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CUR_INSTALL_SOURCE_DIR}/bin ${CMAKE_BINARY_DIR} DEPENDS aimrt::runtime::main # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) diff --git a/src/examples/plugins/record_playback_plugin/README.md b/src/examples/plugins/record_playback_plugin/README.md index 806b43005..5163d2149 100644 --- a/src/examples/plugins/record_playback_plugin/README.md +++ b/src/examples/plugins/record_playback_plugin/README.md @@ -10,8 +10,8 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - [type_support_pkg_main.cc](./example_event_type_support_pkg/type_support_pkg_main.cc) @@ -47,8 +47,8 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - [type_support_pkg_main.cc](./example_event_type_support_pkg/type_support_pkg_main.cc) @@ -85,7 +85,7 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - [type_support_pkg_main.cc](./example_event_type_support_pkg/type_support_pkg_main.cc) @@ -121,7 +121,7 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - [type_support_pkg_main.cc](./example_event_type_support_pkg/type_support_pkg_main.cc) diff --git a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml index 35d91ace9..b1d9214dc 100644 --- a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml @@ -48,7 +48,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml index 877ca08fb..d878a8d5a 100644 --- a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml @@ -59,7 +59,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml index 53162754e..c5745a587 100644 --- a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml @@ -47,9 +47,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml index 47dd24beb..05abc4149 100644 --- a/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/linux/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml @@ -61,9 +61,9 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml index 8dd398ab3..648604299 100644 --- a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_imd_cfg.yaml @@ -48,7 +48,7 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml index 7dec8ded6..eafdfcc13 100644 --- a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_playback_signal_cfg.yaml @@ -59,7 +59,7 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml index 1cac9e81b..43a00ecdd 100644 --- a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_imd_cfg.yaml @@ -47,9 +47,9 @@ aimrt: enable_backends: [local] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml index cf4c2419d..e18bc4ae2 100644 --- a/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml +++ b/src/examples/plugins/record_playback_plugin/install/win/bin/cfg/examples_plugins_record_playback_plugin_record_signal_cfg.yaml @@ -61,9 +61,9 @@ aimrt: enable_backends: [http] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/ros2_plugin/CMakeLists.txt b/src/examples/plugins/ros2_plugin/CMakeLists.txt index d0805ceca..d4f4420a3 100644 --- a/src/examples/plugins/ros2_plugin/CMakeLists.txt +++ b/src/examples/plugins/ros2_plugin/CMakeLists.txt @@ -8,14 +8,14 @@ string(REGEX REPLACE ".*/\(.*\)" "\\1" CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set_namespace() # assistant -add_subdirectory(assistant/native_ros2_channel_publisher) -add_subdirectory(assistant/native_ros2_channel_subscriber) +add_subdirectory(assistant/native_ros2_chn_publisher) +add_subdirectory(assistant/native_ros2_chn_subscriber) add_subdirectory(assistant/native_ros2_rpc_client) add_subdirectory(assistant/native_ros2_rpc_server) -add_subdirectory(assistant/native_ros2_protobuf_channel_publisher) -add_subdirectory(assistant/native_ros2_protobuf_channel_subscriber) -add_subdirectory(assistant/native_ros2_protobuf_rpc_client) -add_subdirectory(assistant/native_ros2_protobuf_rpc_server) +add_subdirectory(assistant/native_ros2_pb_chn_publisher) +add_subdirectory(assistant/native_ros2_pb_chn_subscriber) +add_subdirectory(assistant/native_ros2_pb_rpc_client) +add_subdirectory(assistant/native_ros2_pb_rpc_server) # install if(CMAKE_SYSTEM_NAME MATCHES "Linux") @@ -35,14 +35,14 @@ add_custom_target( DEPENDS aimrt::runtime::main aimrt::examples::cpp::ros2_rpc::ros2_rpc_client_pkg aimrt::examples::cpp::ros2_rpc::ros2_rpc_server_pkg - aimrt::examples::cpp::ros2_channel::ros2_channel_pub_pkg - aimrt::examples::cpp::ros2_channel::ros2_channel_sub_pkg) + aimrt::examples::cpp::ros2_chn::ros2_chn_pub_pkg + aimrt::examples::cpp::ros2_chn::ros2_chn_sub_pkg) if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() diff --git a/src/examples/plugins/ros2_plugin/README.md b/src/examples/plugins/ros2_plugin/README.md index 6f2432a96..38850cbb0 100644 --- a/src/examples/plugins/ros2_plugin/README.md +++ b/src/examples/plugins/ros2_plugin/README.md @@ -11,32 +11,32 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) - aimrt code: - - [normal_rpc_co_client_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) - - [normal_rpc_co_server_module.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) - - [service.cc](../../cpp/protobuf_rpc/module/normal_rpc_co_server_module/service.cc) + - [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) + - [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) + - [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) - native ros2 humble code: - - [native_ros2_protobuf_rpc_client/main.cc](./assistant/native_ros2_protobuf_rpc_client/main.cc) - - [native_ros2_protobuf_rpc_server/main.cc](./assistant/native_ros2_protobuf_rpc_server/main.cc) + - [native_ros2_pb_rpc_client/main.cc](./assistant/native_ros2_pb_rpc_client/main.cc) + - [native_ros2_pb_rpc_server/main.cc](./assistant/native_ros2_pb_rpc_server/main.cc) 配置文件: -- [examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml) -- [examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml) +- [examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml) +- [examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ROS2_PLUGIN` 选项编译 AimRT; - aimrt client 调用 aimrt server: - - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_protobuf_rpc_server.sh`脚本启动服务端(srv 进程); - - 开启新的终端运行 build 目录下`start_examples_plugins_ros2_plugin_protobuf_rpc_client.sh`脚本启动客户端(cli 进程); + - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_pb_rpc_server.sh`脚本启动服务端(srv 进程); + - 开启新的终端运行 build 目录下`start_examples_plugins_ros2_plugin_pb_rpc_client.sh`脚本启动客户端(cli 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - aimrt client 调用 native ros2 server: - - 在终端运行 build 目录下`native_ros2_protobuf_rpc_server`进程启动原生 ros2 服务端; - - 开启新的终端运行 build 目录下`start_examples_plugins_ros2_plugin_protobuf_rpc_client.sh`脚本启动客户端(cli 进程); + - 在终端运行 build 目录下`native_ros2_pb_rpc_server`进程启动原生 ros2 服务端; + - 开启新的终端运行 build 目录下`start_examples_plugins_ros2_plugin_pb_rpc_client.sh`脚本启动客户端(cli 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - native ros2 client 调用 aimrt server: - - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_protobuf_rpc_server.sh`脚本启动服务端(srv 进程); - - 开启新的终端运行 build 目录下`native_ros2_protobuf_rpc_client`进程启动原生 ros2 客户端; + - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_pb_rpc_server.sh`脚本启动服务端(srv 进程); + - 开启新的终端运行 build 目录下`native_ros2_pb_rpc_client`进程启动原生 ros2 客户端; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -46,7 +46,7 @@ - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; - 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; -- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `protobuf_rpc_client_pkg` 和 `protobuf_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; - 此示例加载了**ros2_plugin**,并使用 ros2 类型的 rpc 后端进行通信,并在客户端配置了 `timeout_handle` 执行器作为超时执行器; - 此示例还创建了两个原生 ros2 节点,用于展示如何使用原生 ros2 程序与 aimrt 程序通过 ros2 后端 进行 rpc 通信; @@ -140,33 +140,33 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) - aimrt code: - - [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) - - [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) + - [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) + - [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - native ros2 humble code: - - [native_ros2_protobuf_channel_publisher/main.cc](./assistant/native_ros2_protobuf_channel_publisher/main.cc) - - [native_ros2_protobuf_channel_subscriber/main.cc](./assistant/native_ros2_protobuf_channel_subscriber/main.cc) + - [native_ros2_pb_chn_publisher/main.cc](./assistant/native_ros2_pb_chn_publisher/main.cc) + - [native_ros2_pb_chn_subscriber/main.cc](./assistant/native_ros2_pb_chn_subscriber/main.cc) 配置文件: -- [examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml) -- [examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml) +- [examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml) +- [examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ROS2_PLUGIN` 选项编译 AimRT; - aimrt publisher 向 aimrt subscriber 发布数据: - - 在终端运行 build 目录下`start_examples_plugins_ros_plugin_protobuf_channel_sub.sh`脚本启动订阅端(sub 进程); - - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_protobuf_channel_pub.sh`脚本启动发布端(pub 进程); + - 在终端运行 build 目录下`start_examples_plugins_ros_plugin_pb_chn_sub.sh`脚本启动订阅端(sub 进程); + - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_pb_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - aimrt publisher 向 native ros2 subscriber 发布数据: - - 在终端运行 build 目录下`native_ros2_protobuf_channel_subscriber`进程启动原生 ros2 订阅端; - - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_protobuf_channel_pub.sh`脚本启动发布端(pub 进程); + - 在终端运行 build 目录下`native_ros2_pb_chn_subscriber`进程启动原生 ros2 订阅端; + - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_pb_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - native ros2 publisher 向 aimrt subscriber 发布数据: - - 在终端运行 build 目录下`start_examples_plugins_ros_plugin_protobuf_channel_sub.sh`脚本启动订阅端(sub 进程); - - 开启新的终端运行 build 目录下`native_ros2_protobuf_channel_publisher`进程启动原生 ros2 发布端; + - 在终端运行 build 目录下`start_examples_plugins_ros_plugin_pb_chn_sub.sh`脚本启动订阅端(sub 进程); + - 开启新的终端运行 build 目录下`native_ros2_pb_chn_publisher`进程启动原生 ros2 发布端; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -175,7 +175,7 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**ros2_plugin**,并使用 ros2 类型的 channel 后端进行通信; - 此示例还创建了两个原生 ros2 节点,用于展示如何使用原生 ros2 程序与 aimrt 程序通过 ros2 后端进行 channel 通信; @@ -193,32 +193,32 @@ 核心代码: - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) - aimrt code: - - [normal_publisher_module.cc](../../cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc) - - [normal_subscriber_module.cc](../../cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc) + - [normal_publisher_module.cc](../../cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc) + - [normal_subscriber_module.cc](../../cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc) - native ros2 humble code: - - [native_ros2_channel_publisher/main.cc](./assistant/native_ros2_channel_publisher/main.cc) - - [native_ros2_channel_subscriber/main.cc](./assistant/native_ros2_channel_subscriber/main.cc) + - [native_ros2_chn_publisher/main.cc](./assistant/native_ros2_chn_publisher/main.cc) + - [native_ros2_chn_subscriber/main.cc](./assistant/native_ros2_chn_subscriber/main.cc) 配置文件: -- [examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml) -- [examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml) +- [examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml) +- [examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ROS2_PLUGIN` 选项编译 AimRT; - aimrt publisher 向 aimrt subscriber 发布数据: - - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_channel_sub.sh`脚本启动订阅端(sub 进程); - - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_channel_pub.sh`脚本启动发布端(pub 进程); + - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_chn_sub.sh`脚本启动订阅端(sub 进程); + - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - aimrt publisher 向 native ros2 subscriber 发布数据: - - 在终端运行 build 目录下`native_ros2_channel_subscriber`进程启动原生 ros2 订阅端; - - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_channel_pub.sh`脚本启动发布端(pub 进程); + - 在终端运行 build 目录下`native_ros2_chn_subscriber`进程启动原生 ros2 订阅端; + - 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; - native ros2 publisher 向 aimrt subscriber 发布数据: - - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_channel_sub.sh`脚本启动订阅端(sub 进程); - - 开启新的终端运行 build 目录下`native_ros2_channel_publisher`进程启动原生 ros2 发布端; + - 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_chn_sub.sh`脚本启动订阅端(sub 进程); + - 开启新的终端运行 build 目录下`native_ros2_chn_publisher`进程启动原生 ros2 发布端; - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -238,19 +238,19 @@ 核心代码: - [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) -- [normal_publisher_module.cc](../../cpp/ros2_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/ros2_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml) -- [examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml) +- [examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml) +- [examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml](./install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ROS2_PLUGIN` 选项编译 AimRT; -- 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_channel_sub_with_qos.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_channel_pub_with_qos.sh`脚本启动发布端(pub 进程); +- 在终端运行 build 目录下`start_examples_plugins_ros2_plugin_ros2_chn_sub_with_qos.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_ros2_plugin_ros2_chn_pub_with_qos.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_publisher/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_publisher/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_publisher/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_publisher/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_publisher/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_publisher/main.cc similarity index 95% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_publisher/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_publisher/main.cc index 54b7c0463..45d8024d8 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_publisher/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_publisher/main.cc @@ -11,7 +11,7 @@ class RosTestChannelPublisher : public rclcpp::Node { public: RosTestChannelPublisher() - : Node("native_ros2_channel_publisher") { + : Node("native_ros2_chn_publisher") { using namespace std::chrono_literals; publisher_ = diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_subscriber/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_subscriber/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_subscriber/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_subscriber/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_subscriber/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_subscriber/main.cc similarity index 94% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_subscriber/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_subscriber/main.cc index 10f0fa67a..9b64fc066 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_channel_subscriber/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_chn_subscriber/main.cc @@ -9,7 +9,7 @@ class RosTestChannelSubscriber : public rclcpp::Node { public: RosTestChannelSubscriber() - : Node("native_ros2_channel_subscriber") { + : Node("native_ros2_chn_subscriber") { subscription_ = this->create_subscription( "test_topic", 10, diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_publisher/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_publisher/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_publisher/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_publisher/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_publisher/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_publisher/main.cc similarity index 96% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_publisher/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_publisher/main.cc index d837b4f84..0b74569d1 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_publisher/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_publisher/main.cc @@ -12,7 +12,7 @@ class RosTestWrapperChannelPublisher : public rclcpp::Node { public: RosTestWrapperChannelPublisher() - : Node("native_ros2_protobuf_channel_publisher") { + : Node("native_ros2_pb_chn_publisher") { using namespace std::chrono_literals; publisher_ = this->create_publisher( diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_subscriber/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_subscriber/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_subscriber/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_subscriber/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_subscriber/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_subscriber/main.cc similarity index 96% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_subscriber/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_subscriber/main.cc index c023d185c..7a3b51c6f 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_channel_subscriber/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_chn_subscriber/main.cc @@ -10,7 +10,7 @@ class RosTestWrapperChannelSubscriber : public rclcpp::Node { public: RosTestWrapperChannelSubscriber() - : Node("native_ros2_protobuf_channel_subscriber") { + : Node("native_ros2_pb_chn_subscriber") { subscription_ = this->create_subscription( "test_topic/pb_3Aaimrt_2Eprotocols_2Eexample_2EExampleEventMsg", 10, diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_client/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_client/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_client/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_client/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_client/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_client/main.cc similarity index 99% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_client/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_client/main.cc index 0e019622d..2a3c38428 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_client/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_client/main.cc @@ -108,7 +108,7 @@ class RosTestRpcWrapperClient : public rclcpp::Node { int main(int argc, char *argv[]) { rclcpp::init(argc, argv); - auto node = std::make_shared("native_ros2_protobuf_rpc_client"); + auto node = std::make_shared("native_ros2_pb_rpc_client"); if (!node->wait_for_service_server()) { return 1; diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_server/CMakeLists.txt b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_server/CMakeLists.txt similarity index 100% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_server/CMakeLists.txt rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_server/CMakeLists.txt diff --git a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_server/main.cc b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_server/main.cc similarity index 98% rename from src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_server/main.cc rename to src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_server/main.cc index 9dfde09d0..a8ee9cce8 100644 --- a/src/examples/plugins/ros2_plugin/assistant/native_ros2_protobuf_rpc_server/main.cc +++ b/src/examples/plugins/ros2_plugin/assistant/native_ros2_pb_rpc_server/main.cc @@ -62,7 +62,7 @@ class RosTestRpcWrapperServer : public rclcpp::Node { int main(int argc, char** argv) { rclcpp::init(argc, argv); - auto node = std::make_shared("native_ros2_protobuf_rpc_server"); + auto node = std::make_shared("native_ros2_pb_rpc_server"); rclcpp::spin(node); rclcpp::shutdown(); return 0; diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_pub_cfg.yaml similarity index 91% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_pub_cfg.yaml index 1a6655ed5..882e00ce9 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_pub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_protobuf_channel_benchmark_publisher + node_name: example_pb_chn_benchmark_publisher executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -34,7 +34,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_sub_cfg.yaml similarity index 87% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_sub_cfg.yaml index 7a6c4aee1..13c18b17c 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_sub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_protobuf_channel_benchmark_subscriber + node_name: example_pb_chn_benchmark_subscriber executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -23,7 +23,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml similarity index 89% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml index b89c1ecc0..3a827a8f7 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_publisher_node + node_name: example_ros2_pb_chn_publisher_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -28,7 +28,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libros2_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml similarity index 88% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml index 1a6d160cc..2e28405a2 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_subscriber_node + node_name: example_ros2_pb_chn_subscriber_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -23,7 +23,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libros2_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_benchmark_client_cfg.yaml similarity index 92% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_benchmark_client_cfg.yaml index 3508cc91f..e445b9188 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_benchmark_client_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_protobuf_rpc_benchmark_client_node + node_name: example_ros2_pb_rpc_benchmark_client_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -42,7 +42,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [BenchmarkRpcClientModule] modules: - name: BenchmarkRpcClientModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml similarity index 90% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml index 0d1103ed5..40ef1889f 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_protobuf_rpc_client_node + node_name: example_ros2_pb_rpc_client_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -34,7 +34,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_rpc_client_pkg.so + - path: ./libpb_rpc_client_pkg.so enable_modules: [NormalRpcCoClientModule] modules: - name: NormalRpcCoClientModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml similarity index 86% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml index ce917b5f7..f81bf30e7 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_protobuf_rpc_server_node + node_name: example_ros2_pb_rpc_server_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -23,7 +23,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_rpc_server_pkg.so + - path: ./libpb_rpc_server_pkg.so enable_modules: [NormalRpcCoServerModule] modules: - name: NormalRpcCoServerModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml similarity index 88% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml index 3264c0ee3..78fff8eb1 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_protobuf_channel_publisher_node + node_name: example_ros2_chn_publisher_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -28,7 +28,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libros2_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml similarity index 92% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml index 83447204c..43c7b3fe6 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_publisher_node + node_name: example_ros2_chn_publisher_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -40,7 +40,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libros2_channel_pub_pkg.so + - path: ./libros2_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml similarity index 86% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml index f929dc0ae..8913dc887 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_protobuf_channel_subscriber_node + node_name: example_ros2_chn_subscriber_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -23,7 +23,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml similarity index 91% rename from src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml index 42d2d32f5..ce9920468 100644 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_subscriber_node + node_name: example_ros2_chn_subscriber_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -35,7 +35,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./libros2_channel_sub_pkg.so + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_pub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_pub.sh similarity index 82% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_pub.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_pub.sh index 384de7873..9bce42ae5 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_pub.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_pub.sh @@ -4,4 +4,4 @@ set -e source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_channel_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_sub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_sub.sh similarity index 82% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_sub.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_sub.sh index 5b9ec97fb..a4ac707b4 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_sub.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_benchmark_sub.sh @@ -4,4 +4,4 @@ set -e source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_channel_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_chn_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_server.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_pub.sh similarity index 83% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_server.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_pub.sh index 454a884a5..e70879258 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_server.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_pub.sh @@ -4,4 +4,4 @@ set -e source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_rpc_server_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_chn_pub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_client.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_sub.sh similarity index 83% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_client.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_sub.sh index 369988ba5..0b379f2e8 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_client.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_chn_sub.sh @@ -4,4 +4,4 @@ set -e source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_rpc_client_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_chn_sub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_benchmark_client.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_benchmark_client.sh new file mode 100755 index 000000000..37303ac09 --- /dev/null +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_benchmark_client.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +source install/share/ros2_plugin_proto/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_rpc_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_client.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_client.sh new file mode 100755 index 000000000..1a8f9212c --- /dev/null +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_client.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +source install/share/ros2_plugin_proto/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_rpc_client_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_server.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_server.sh new file mode 100755 index 000000000..b92c65c22 --- /dev/null +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_pb_rpc_server.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +source install/share/ros2_plugin_proto/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_pb_rpc_server_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub.sh deleted file mode 100755 index 047c12cf8..000000000 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -source install/share/ros2_plugin_proto/local_setup.bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_pub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub.sh deleted file mode 100755 index 8f369068f..000000000 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -source install/share/ros2_plugin_proto/local_setup.bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_channel_benchmark_sub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client.sh deleted file mode 100755 index 3f71d8405..000000000 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -e - -source install/share/ros2_plugin_proto/local_setup.bash - -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_protobuf_rpc_benchmark_client_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.sh similarity index 88% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.sh index a21d79cfb..6603de970 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.sh @@ -5,4 +5,4 @@ set -e source install/share/example_ros2/local_setup.bash source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub_with_qos.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub_with_qos.sh similarity index 84% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub_with_qos.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub_with_qos.sh index f93e629dc..8ec934ba1 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub_with_qos.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub_with_qos.sh @@ -5,4 +5,4 @@ set -e source install/share/example_ros2/local_setup.bash source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_pub_with_qos_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_pub_with_qos_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.sh similarity index 88% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.sh index f4563f767..fb96ff1e8 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.sh @@ -5,4 +5,4 @@ set -e source install/share/example_ros2/local_setup.bash source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub_with_qos.sh b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub_with_qos.sh similarity index 84% rename from src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub_with_qos.sh rename to src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub_with_qos.sh index c2f478f22..64cae03a3 100755 --- a/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub_with_qos.sh +++ b/src/examples/plugins/ros2_plugin/install/linux/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub_with_qos.sh @@ -5,4 +5,4 @@ set -e source install/share/example_ros2/local_setup.bash source install/share/ros2_plugin_proto/local_setup.bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_sub_with_qos_cfg.yaml +./aimrt_main --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_sub_with_qos_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml similarity index 90% rename from src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml index c65501ba0..7f927b8fe 100644 --- a/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./aimrt_ros2_plugin.dll options: - node_name: example_ros2_channel_publisher_node + node_name: example_ros2_chn_publisher_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -28,7 +28,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./ros2_channel_pub_pkg.dll + - path: ./ros2_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml b/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml similarity index 88% rename from src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml rename to src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml index a4327865e..2de22af75 100644 --- a/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml +++ b/src/examples/plugins/ros2_plugin/install/win/bin/cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ./aimrt_ros2_plugin.dll options: - node_name: example_ros2_channel_subscriber_node + node_name: example_ros2_chn_subscriber_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: @@ -23,7 +23,7 @@ aimrt: enable_backends: [ros2] module: pkgs: - - path: ./ros2_channel_sub_pkg.dll + - path: ./ros2_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.bat b/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.bat similarity index 68% rename from src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.bat rename to src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.bat index 22914b558..dbcd256c7 100755 --- a/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_pub.bat +++ b/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_pub.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_pub_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_pub_cfg.yaml diff --git a/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.bat b/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.bat similarity index 68% rename from src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.bat rename to src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.bat index 93ed5f0e8..eaec5f6ce 100755 --- a/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_channel_sub.bat +++ b/src/examples/plugins/ros2_plugin/install/win/bin/start_examples_plugins_ros2_plugin_ros2_chn_sub.bat @@ -1,2 +1,2 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_channel_sub_cfg.yaml +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_ros2_plugin_ros2_chn_sub_cfg.yaml diff --git a/src/examples/plugins/zenoh_plugin/CMakeLists.txt b/src/examples/plugins/zenoh_plugin/CMakeLists.txt index ff1f6493c..61e624336 100644 --- a/src/examples/plugins/zenoh_plugin/CMakeLists.txt +++ b/src/examples/plugins/zenoh_plugin/CMakeLists.txt @@ -27,10 +27,10 @@ add_custom_target( if(AIMRT_BUILD_WITH_PROTOBUF) add_dependencies( ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_client_pkg # - aimrt::examples::cpp::protobuf_rpc::protobuf_rpc_server_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_pub_pkg # - aimrt::examples::cpp::protobuf_channel::protobuf_channel_sub_pkg) + aimrt::examples::cpp::pb_rpc::pb_rpc_client_pkg # + aimrt::examples::cpp::pb_rpc::pb_rpc_server_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_pub_pkg # + aimrt::examples::cpp::pb_chn::pb_chn_sub_pkg) endif() if(AIMRT_BUILD_WITH_ROS2) @@ -38,6 +38,6 @@ if(AIMRT_BUILD_WITH_ROS2) ${CUR_SUPERIOR_NAMESPACE_UNDERLINE}_${CUR_DIR}_build_all # aimrt::examples::cpp::ros2_rpc::ros2_rpc_client_pkg # aimrt::examples::cpp::ros2_rpc::ros2_rpc_server_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_pub_pkg # - aimrt::examples::cpp::ros2_channel::ros2_channel_sub_pkg) + aimrt::examples::cpp::ros2_chn::ros2_chn_pub_pkg # + aimrt::examples::cpp::ros2_chn::ros2_chn_sub_pkg) endif() diff --git a/src/examples/plugins/zenoh_plugin/README.md b/src/examples/plugins/zenoh_plugin/README.md index db25f5514..95a8f14b7 100644 --- a/src/examples/plugins/zenoh_plugin/README.md +++ b/src/examples/plugins/zenoh_plugin/README.md @@ -1,5 +1,64 @@ # zenoh plugin examples +## protobuf rpc + +一个基于 protobuf 协议、协程型接口与 zenoh 后端的 rpc 示例,演示内容包括: +- 如何在配置文件中加载**zenoh_plugin**; +- 如何使用 zenoh 类型的 rpc 后端; + +核心代码: +- [rpc.proto](../../../protocols/example/rpc.proto) +- [normal_rpc_co_client_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) +- [normal_rpc_co_server_module.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) +- [service.cc](../../cpp/pb_rpc/module/normal_rpc_co_server_module/service.cc) + + +配置文件: +- [examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml) +- [examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml) + + +运行方式(linux): +- 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ZENOH_PLUGIN` 选项编译 AimRT(编译时需要提前准备好rust编译环境); +- 编译成功后,先运行 build 目录下`start_examples_plugins_zenoh_plugin_pb_rpc_server.sh`脚本启动订阅端(srv 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_zenoh_plugin_pb_rpc_client.sh`脚本启动发布端(cli 进程); +- 分别在两个终端键入`ctrl-c`停止对应进程; + +说明: +- 此示例创建了以下两个模块: + - `NormalRpcCoClientModule`:会基于 `work_thread_pool` 执行器,以配置的频率,通过协程 Client 接口,向 `ExampleService` 发起 RPC 请求; + - `NormalRpcCoServerModule`:会注册 `ExampleService` 服务端,通过协程 Server 接口,提供 echo 功能; +- 此示例在 Rpc Client 端和 Server 端分别注册了两个 Filter 用于打印请求日志和计算耗时; +- 此示例将 `NormalRpcCoClientModule` 和 `NormalRpcCoServerModule` 分别集成到 `pb_rpc_client_pkg` 和 `pb_rpc_server_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 srv 和 cli 进程中; +- 此示例加载了**zenoh_plugin**,并使用 zenoh 类型的 rpc 后端进行通信,此外还在客户端配置了 `timeout_handle` 执行器作为超时执行器; + + +## ros2 rpc + +一个基于 ros2 srv 协议、协程型接口与 zenoh 后端的 rpc 示例,演示内容包括: +- 如何在配置文件中加载**zenoh_plugin**; +- 如何使用 zenoh 类型的 rpc 后端; + +核心代码: +- [example_ros2/srv/RosTestRpc.srv](../../../protocols/example_ros2/srv/RosTestRpc.srv) +- [normal_rpc_co_client_module.cc](../../cpp/ros2_rpc/module/normal_rpc_co_client_module/normal_rpc_co_client_module.cc) +- [normal_rpc_co_server_module.cc](../../cpp/ros2_rpc/module/normal_rpc_co_server_module/normal_rpc_co_server_module.cc) +- [service.cc](../../cpp/ros2_rpc/module/normal_rpc_co_server_module/service.cc) + +配置文件: +- [examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml) +- [examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml) +- + +运行方式(linux): +- 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ZENOH_PLUGIN` 选项编译 AimRT(编译时需要提前准备好rust编译环境); +- 编译成功后,先运行 build 目录下`start_examples_plugins_zenoh_plugin_ros2_rpc_server.sh`脚本启动订阅端(srv 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_zenoh_plugin_ros2_rpc_client.sh`脚本启动发布端(cli 进程); +- 分别在两个终端键入`ctrl-c`停止对应进程; + +说明: +- 本示例与 **protobuf rpc** 示例基本一致,除了业务层使用的是 ros2 srv 形式的协议; + ## protobuf channel 一个基于 protobuf 协议与 zenoh 后端的 channel 示例,演示内容包括: @@ -9,19 +68,19 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [normal_publisher_module.cc](../../cpp/protobuf_channel/module/normal_publisher_module/normal_publisher_module.cc) -- [normal_subscriber_module.cc](../../cpp/protobuf_channel/module/normal_subscriber_module/normal_subscriber_module.cc) +- [normal_publisher_module.cc](../../cpp/pb_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/pb_chn/module/normal_subscriber_module/normal_subscriber_module.cc) 配置文件: -- [examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml) -- [examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml) +- [examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml) +- [examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml) 运行方式(linux): - 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ZENOH_PLUGIN` 选项编译 AimRT(编译时需要提前准备好rust编译环境); -- 编译成功后,先运行 build 目录下`start_examples_plugins_zenoh_plugin_protobuf_channel_sub.sh`脚本启动订阅端(sub 进程); -- 再开启一个新的终端窗口运行`start_examples_plugins_zenoh_plugin_protobuf_channel_pub.sh`脚本启动发布端(pub 进程); +- 编译成功后,先运行 build 目录下`start_examples_plugins_zenoh_plugin_pb_chn_sub.sh`脚本启动订阅端(sub 进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_zenoh_plugin_pb_chn_pub.sh`脚本启动发布端(pub 进程); - 分别在两个终端键入`ctrl-c`停止对应进程; @@ -29,5 +88,34 @@ - 此示例创建了以下两个模块: - `NormalPublisherModule`:会基于 `work_thread_pool` 执行器,以配置的频率、向配置的 topic 中发布 `ExampleEventMsg` 类型的消息; - `NormalSubscriberModule`:会订阅配置的 topic 下的 `ExampleEventMsg` 类型的消息; -- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `protobuf_channel_pub_pkg` 和 `protobuf_channel_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; +- 此示例将 `NormalPublisherModule` 和 `NormalSubscriberModule` 分别集成到 `pb_chn_pub_pkg` 和 `pb_chn_sub_pkg` 两个 Pkg 中,并在两个配置文件中分别加载对应的 Pkg 到 pub 和 sub 进程中; - 此示例加载了**zenoh_plugin**,并使用 zenoh 类型的 channel 后端进行通信; + + +## ros2 channel + +一个基于 ros2 msg 协议与 zenoh 后端的 channel 示例,演示内容包括: +- 如何在配置文件中加载**zenoh_plugin**; +- 如何使用 zenoh 类型的 channel 后端; + + + +核心代码: +- [example_ros2/msg/RosTestMsg.msg](../../../protocols/example_ros2/msg/RosTestMsg.msg) +- [normal_publisher_module.cc](../../cpp/ros2_chn/module/normal_publisher_module/normal_publisher_module.cc) +- [normal_subscriber_module.cc](../../cpp/ros2_chn/module/normal_subscriber_module/normal_subscriber_module.cc) + + +配置文件: +- [examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml) +- [examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml](./install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml) + + +- 开启 `AIMRT_BUILD_EXAMPLES`、`AIMRT_BUILD_ZENOH_PLUGIN` 选项编译 AimRT(编译时需要提前准备好rust编译环境); +- 编译成功后,先运行 build 目录下`start_examples_plugins_zenoh_plugin_ros2_chn_sub.sh`脚本启动订阅端(sub进程); +- 再开启一个新的终端窗口运行`start_examples_plugins_zenoh_plugin_ros2_chn_pub.sh`脚本启动发布端(pub进程); +- 分别在两个终端键入`ctrl-c`停止对应进程; + + +说明: +- 本示例与 **protobuf rpc** 示例基本一致,除了业务层使用的是 ros2 msg 形式的协议; \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_cfg.yaml similarity index 90% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_cfg.yaml index 80a6d5e26..787d8867c 100644 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_cfg.yaml @@ -6,6 +6,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: @@ -30,7 +32,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [BenchmarkPublisherModule] modules: - name: BenchmarkPublisherModule diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_cfg.yaml similarity index 83% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_cfg.yaml index cac6f2a63..a3c7abfb5 100644 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_cfg.yaml @@ -6,6 +6,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: @@ -19,7 +21,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libpb_chn_sub_pkg.so enable_modules: [BenchmarkSubscriberModule] modules: - name: BenchmarkSubscriberModule diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml similarity index 86% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml index 092cf1fa0..e9b06eacb 100644 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml @@ -6,6 +6,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: @@ -24,7 +26,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./libprotobuf_channel_pub_pkg.so + - path: ./libpb_chn_pub_pkg.so enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml new file mode 100644 index 000000000..4d8aaa4fb --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml @@ -0,0 +1,32 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + channel: + backends: + - type: zenoh + sub_topics_options: + - topic_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libpb_chn_sub_pkg.so + enable_modules: [NormalSubscriberModule] + modules: + - name: NormalSubscriberModule + log_lvl: INFO + +# Module custom configuration +NormalSubscriberModule: + topic_name: test_topic diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_benchmark_client_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_benchmark_client_cfg.yaml new file mode 100644 index 000000000..61a08937d --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_benchmark_client_cfg.yaml @@ -0,0 +1,61 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + executors: + - name: client_statistics_executor + type: asio_thread + options: + thread_num: 4 + - name: timeout_handle + type: time_wheel + options: + bind_executor: client_statistics_executor + - name: client_executor_0 + type: asio_thread + - name: client_executor_1 + type: asio_thread + - name: client_executor_2 + type: asio_thread + - name: client_executor_3 + type: asio_thread + rpc: + backends: + - type: zenoh + options: + timeout_executor: timeout_handle + clients_options: + - func_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libpb_rpc_client_pkg.so + enable_modules: [BenchmarkRpcClientModule] + modules: + - name: BenchmarkRpcClientModule + log_lvl: INFO + +# Module custom configuration +BenchmarkRpcClientModule: + max_parallel: 4 + bench_plans: + - perf_mode: bench + msg_size: 256 + parallel: 4 + msg_count: 10000 + - perf_mode: fixed-freq + freq: 1000 + msg_size: 1024 + parallel: 2 + msg_count: 1000 diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml new file mode 100644 index 000000000..17cb1d320 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml @@ -0,0 +1,43 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + executors: + - name: work_thread_pool + type: asio_thread + options: + thread_num: 4 + - name: timeout_handle + type: time_wheel + options: + bind_executor: work_thread_pool + rpc: + backends: + - type: zenoh + options: + timeout_executor: timeout_handle + clients_options: + - func_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libpb_rpc_client_pkg.so + enable_modules: [NormalRpcCoClientModule] + modules: + - name: NormalRpcCoClientModule + log_lvl: INFO + +# Module custom configuration +NormalRpcCoClientModule: + rpc_frq: 0.5 diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml new file mode 100644 index 000000000..eb7525648 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml @@ -0,0 +1,28 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + rpc: + backends: + - type: zenoh + servers_options: + - func_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libpb_rpc_server_pkg.so + enable_modules: [NormalRpcCoServerModule] + modules: + - name: NormalRpcCoServerModule + log_lvl: INFO diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml new file mode 100644 index 000000000..e2fc3e757 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml @@ -0,0 +1,38 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + executors: + - name: work_thread_pool + type: asio_thread + options: + thread_num: 2 + channel: + backends: + - type: zenoh + pub_topics_options: + - topic_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libros2_chn_pub_pkg.so + enable_modules: [NormalPublisherModule] + modules: + - name: NormalPublisherModule + log_lvl: INFO + +# Module custom configuration +NormalPublisherModule: + topic_name: test_topic + channel_frq: 0.5 diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml similarity index 84% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml index 940afb61e..6f41dad80 100644 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml @@ -6,6 +6,8 @@ aimrt: plugins: - name: zenoh_plugin path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 log: core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off backends: @@ -19,7 +21,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./libprotobuf_channel_sub_pkg.so + - path: ./libros2_chn_sub_pkg.so enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml new file mode 100644 index 000000000..9b6654b88 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml @@ -0,0 +1,43 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + executors: + - name: work_thread_pool + type: asio_thread + options: + thread_num: 4 + - name: timeout_handle + type: time_wheel + options: + bind_executor: work_thread_pool + rpc: + backends: + - type: zenoh + options: + timeout_executor: timeout_handle + clients_options: + - func_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libros2_rpc_client_pkg.so + enable_modules: [NormalRpcCoClientModule] + modules: + - name: NormalRpcCoClientModule + log_lvl: INFO + +# Module custom configuration +NormalRpcCoClientModule: + rpc_frq: 0.5 diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml new file mode 100644 index 000000000..24dfb64ba --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2023, AgiBot Inc. +# All rights reserved. + +aimrt: + plugin: + plugins: + - name: zenoh_plugin + path: ./libaimrt_zenoh_plugin.so + options: + native_cfg_path: ./cfg/zenoh_native_config.json5 + log: + core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off + backends: + - type: console + executor: + rpc: + backends: + - type: zenoh + servers_options: + - func_name: "(.*)" + enable_backends: [zenoh] + module: + pkgs: + - path: ./libros2_rpc_server_pkg.so + enable_modules: [NormalRpcCoServerModule] + modules: + - name: NormalRpcCoServerModule + log_lvl: INFO + diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/zenoh_native_config.json5 b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/zenoh_native_config.json5 new file mode 100644 index 000000000..865de7a7e --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/cfg/zenoh_native_config.json5 @@ -0,0 +1,267 @@ +/// This file attempts to list and document available configuration elements. +/// For a more complete view of the configuration's structure, check out `zenoh/src/config.rs`'s `Config` structure. +/// Note that the values here are correctly typed, but may not be sensible, so copying this file to change only the parts that matter to you is not good practice. +{ + /// The identifier (as unsigned 128bit integer in hexadecimal lowercase - leading zeros are not accepted) + /// that zenoh runtime will use. + /// If not set, a random unsigned 128bit integer will be used. + /// WARNING: this id must be unique in your zenoh network. + // id: "1234567890abcdef", + + /// The node's mode (router, peer or client) + mode: "peer", + + /// The node's metadata (name, location, DNS name, etc.) Arbitrary JSON data not interpreted by zenohd and available in admin space @/router/ + metadata: { + name: "strawberry", + location: "Penny Lane" + }, + + /// Which endpoints to connect to. E.g. tcp/localhost:7447. + /// By configuring the endpoints, it is possible to tell zenoh which router/peer to connect to at startup. + // connect: { + // endpoints: [ + // "tcp/localhost:7447" + // ], + // }, + + // /// Which endpoints to listen on. E.g. tcp/localhost:7447. + // /// By configuring the endpoints, it is possible to tell zenoh which are the endpoints that other routers, + // /// peers, or client can use to establish a zenoh session. + // listen: { + // endpoints: [ + // "tcp/localhost:50060" + // ], + // }, + + /// Configure the scouting mechanisms and their behaviours + scouting: { + /// In client mode, the period dedicated to scouting for a router before failing + timeout: 3000, + /// In peer mode, the period dedicated to scouting remote peers before attempting other operations + delay: 200, + /// The multicast scouting configuration. + multicast: { + /// Whether multicast scouting is enabled or not + enabled: true, + /// The socket which should be used for multicast scouting + address: "224.0.0.224:7446", + /// The network interface which should be used for multicast scouting + interface: "auto", // If not set or set to "auto" the interface if picked automatically + /// Which type of Zenoh instances to automatically establish sessions with upon discovery on UDP multicast. + /// Accepts a single value or different values for router, peer and client. + /// Each value is bit-or-like combinations of "peer", "router" and "client". + // autoconnect: { peer: "router|peer" }, + /// Whether or not to listen for scout messages on UDP multicast and reply to them. + listen: true, + }, + // /// The gossip scouting configuration. + gossip: { + /// Whether gossip scouting is enabled or not + enabled: true, + /// When true, gossip scouting informations are propagated multiple hops to all nodes in the local network. + /// When false, gossip scouting informations are only propagated to the next hop. + /// Activating multihop gossip implies more scouting traffic and a lower scalability. + /// It mostly makes sense when using "linkstate" routing mode where all nodes in the subsystem don't have + /// direct connectivity with each other. + multihop: false, + /// Which type of Zenoh instances to automatically establish sessions with upon discovery on gossip. + /// Accepts a single value or different values for router, peer and client. + /// Each value is bit-or-like combinations of "peer", "router" and "client". + // autoconnect: { router: "", peer: "router|peer" }, + }, + }, + + /// Configuration of data messages timestamps management. + timestamping: { + /// Whether data messages should be timestamped if not already. + /// Accepts a single boolean value or different values for router, peer and client. + enabled: { router: true, peer: false, client: false }, + /// Whether data messages with timestamps in the future should be dropped or not. + /// If set to false (default), messages with timestamps in the future are retimestamped. + /// Timestamps are ignored if timestamping is disabled. + drop_future_timestamp: false, + }, + + /// The default timeout to apply to queries in milliseconds. + queries_default_timeout: 10000, + + /// The routing strategy to use and it's configuration. + routing: { + /// The routing strategy to use in routers and it's configuration. + router: { + /// When set to true a router will forward data between two peers + /// directly connected to it if it detects that those peers are not + /// connected to each other. + /// The failover brokering only works if gossip discovery is enabled. + peers_failover_brokering: true, + }, + /// The routing strategy to use in peers and it's configuration. + peer: { + /// The routing strategy to use in peers. ("peer_to_peer" or "linkstate"). + mode: "peer_to_peer", + }, + }, + + /// Configure internal transport parameters + transport: { + unicast: { + /// Timeout in milliseconds when opening a link + accept_timeout: 10000, + /// Maximum number of zenoh session in pending state while accepting + accept_pending: 100, + /// Maximum number of sessions that can be simultaneously alive + max_sessions: 1000, + /// Maximum number of incoming links that are admitted per session + max_links: 1, + /// Enables the LowLatency transport + /// This option does not make LowLatency transport mandatory, the actual implementation of transport + /// used will depend on Establish procedure and other party's settings + /// + /// NOTE: Currently, the LowLatency transport doesn't preserve QoS prioritization. + /// NOTE: Due to the note above, 'lowlatency' is incompatible with 'qos' option, so in order to + /// enable 'lowlatency' you need to explicitly disable 'qos'. + lowlatency: true, + /// Enables QoS on unicast communications. + qos: { + enabled: false, + }, + /// Enables compression on unicast communications. + /// Compression capabilities are negotiated during session establishment. + /// If both Zenoh nodes support compression, then compression is activated. + compression: { + enabled: false, + }, + }, + multicast: { + /// Enables QoS on multicast communication. + /// Default to false for Zenoh-to-Zenoh-Pico out-of-the-box compatibility. + qos: { + enabled: false, + }, + /// Enables compression on multicast communication. + /// Default to false for Zenoh-to-Zenoh-Pico out-of-the-box compatibility. + compression: { + enabled: false, + }, + }, + link: { + /// An optional whitelist of protocols to be used for accepting and opening sessions. + /// If not configured, all the supported protocols are automatically whitelisted. + /// The supported protocols are: ["tcp" , "udp", "tls", "quic", "ws", "unixsock-stream"] + /// For example, to only enable "tls" and "quic": + // protocols: ["tls", "quic"], + /// Configure the zenoh TX parameters of a link + tx: { + /// The resolution in bits to be used for the message sequence numbers. + /// When establishing a session with another Zenoh instance, the lowest value of the two instances will be used. + /// Accepted values: 8bit, 16bit, 32bit, 64bit. + sequence_number_resolution: "32bit", + /// Link lease duration in milliseconds to announce to other zenoh nodes + lease: 10000, + /// Number of keep-alive messages in a link lease duration. If no data is sent, keep alive + /// messages will be sent at the configured time interval. + /// NOTE: In order to consider eventual packet loss and transmission latency and jitter, + /// set the actual keep_alive timeout to one fourth of the lease time. + /// This is in-line with the ITU-T G.8013/Y.1731 specification on continous connectivity + /// check which considers a link as failed when no messages are received in 3.5 times the + /// target interval. + keep_alive: 4, + /// Batch size in bytes is expressed as a 16bit unsigned integer. + /// Therefore, the maximum batch size is 2^16-1 (i.e. 65535). + /// The default batch size value is the maximum batch size: 65535. + batch_size: 65535, + /// Each zenoh link has a transmission queue that can be configured + queue: { + /// The size of each priority queue indicates the number of batches a given queue can contain. + /// The amount of memory being allocated for each queue is then SIZE_XXX * BATCH_SIZE. + /// In the case of the transport link MTU being smaller than the ZN_BATCH_SIZE, + /// then amount of memory being allocated for each queue is SIZE_XXX * LINK_MTU. + /// If qos is false, then only the DATA priority will be allocated. + size: { + control: 1, + real_time: 1, + interactive_high: 1, + interactive_low: 1, + data_high: 2, + data: 4, + data_low: 4, + background: 4, + }, + /// The initial exponential backoff time in nanoseconds to allow the batching to eventually progress. + /// Higher values lead to a more aggressive batching but it will introduce additional latency. + backoff: 100, + // Number of threads dedicated to transmission + // By default, the number of threads is calculated as follows: 1 + ((#cores - 1) / 4) + // threads: 4, + }, + }, + /// Configure the zenoh RX parameters of a link + rx: { + /// Receiving buffer size in bytes for each link + /// The default the rx_buffer_size value is the same as the default batch size: 65335. + /// For very high throughput scenarios, the rx_buffer_size can be increased to accomodate + /// more in-flight data. This is particularly relevant when dealing with large messages. + /// E.g. for 16MiB rx_buffer_size set the value to: 16777216. + buffer_size: 65535, + /// Maximum size of the defragmentation buffer at receiver end. + /// Fragmented messages that are larger than the configured size will be dropped. + /// The default value is 1GiB. This would work in most scenarios. + /// NOTE: reduce the value if you are operating on a memory constrained device. + max_message_size: 1073741824, + }, + /// Configure TLS specific parameters + tls: { + /// Path to the certificate of the certificate authority used to validate either the server + /// or the client's keys and certificates, depending on the node's mode. If not specified + /// on router mode then the default WebPKI certificates are used instead. + root_ca_certificate: null, + /// Path to the TLS server private key + server_private_key: null, + /// Path to the TLS server public certificate + server_certificate: null, + /// Client authentication, if true enables mTLS (mutual authentication) + client_auth: false, + /// Path to the TLS client private key + client_private_key: null, + /// Path to the TLS client public certificate + client_certificate: null, + // Whether or not to use server name verification, if set to false zenoh will disregard the common names of the certificates when verifying servers. + // This could be dangerous because your CA can have signed a server cert for foo.com, that's later being used to host a server at baz.com. If you wan't your + // ca to verify that the server at baz.com is actually baz.com, let this be true (default). + server_name_verification: null, + }, + }, + + /// Access control configuration + auth: { + /// The configuration of authentification. + /// A password implies a username is required. + usrpwd: { + user: null, + password: null, + /// The path to a file containing the user password dictionary + dictionary_file: null, + }, + pubkey: { + public_key_pem: null, + private_key_pem: null, + public_key_file: null, + private_key_file: null, + key_size: null, + known_keys_file: null, + }, + }, + }, + + /// Configure the Admin Space + /// Unstable: this configuration part works as advertised, but may change in a future release + adminspace: { + // read and/or write permissions on the admin space + permissions: { + read: true, + write: false, + }, + }, + +} diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_pub.sh similarity index 72% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.sh rename to src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_pub.sh index 667be02eb..87aa122fa 100755 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.sh +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_pub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_sub.sh similarity index 72% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.sh rename to src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_sub.sh index 3b0ec76c2..6e78d480e 100755 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.sh +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_benchmark_sub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.sh similarity index 66% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub.sh rename to src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.sh index 2c3f5e145..e797d1367 100755 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub.sh +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_pub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.sh similarity index 66% rename from src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub.sh rename to src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.sh index 2f9a15c5b..4f04fab08 100755 --- a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub.sh +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.sh @@ -1,4 +1,4 @@ #!/bin/bash -./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_benchmark_sub_cfg.yaml \ No newline at end of file +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_benchmark_client.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_benchmark_client.sh new file mode 100755 index 000000000..8536c3ad2 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_benchmark_client.sh @@ -0,0 +1,4 @@ + +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_benchmark_client_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_client.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_client.sh new file mode 100755 index 000000000..0d251150a --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_client.sh @@ -0,0 +1,4 @@ + +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_client_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_server.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_server.sh new file mode 100755 index 000000000..faf9372ac --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_pb_rpc_server.sh @@ -0,0 +1,4 @@ + +#!/bin/bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_rpc_server_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_pub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_pub.sh new file mode 100755 index 000000000..6da4ffdd5 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_pub.sh @@ -0,0 +1,6 @@ + +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_ros2_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_sub.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_sub.sh new file mode 100755 index 000000000..ae1d0cad1 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_chn_sub.sh @@ -0,0 +1,6 @@ + +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_ros2_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_client.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_client.sh new file mode 100755 index 000000000..e67f5fc2d --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_client.sh @@ -0,0 +1,6 @@ + +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_ros2_rpc_client_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_server.sh b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_server.sh new file mode 100755 index 000000000..595bb3617 --- /dev/null +++ b/src/examples/plugins/zenoh_plugin/install/linux/bin/start_examples_plugins_zenoh_plugin_ros2_rpc_server.sh @@ -0,0 +1,6 @@ + +#!/bin/bash + +source install/share/example_ros2/local_setup.bash + +./aimrt_main --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_ros2_rpc_server_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml similarity index 94% rename from src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml index 0364965fb..12b496390 100644 --- a/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml @@ -24,7 +24,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./protobuf_channel_pub_pkg.dll + - path: ./pb_chn_pub_pkg.dll enable_modules: [NormalPublisherModule] modules: - name: NormalPublisherModule diff --git a/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml b/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml similarity index 93% rename from src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml rename to src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml index cfcb0eb13..3b4af1f98 100644 --- a/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml +++ b/src/examples/plugins/zenoh_plugin/install/win/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml @@ -19,7 +19,7 @@ aimrt: enable_backends: [zenoh] module: pkgs: - - path: ./protobuf_channel_sub_pkg.dll + - path: ./pb_chn_sub_pkg.dll enable_modules: [NormalSubscriberModule] modules: - name: NormalSubscriberModule diff --git a/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.bat b/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.bat similarity index 65% rename from src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.bat rename to src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.bat index 470fa81da..418cdf452 100644 --- a/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_pub.bat +++ b/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_pub.bat @@ -1 +1 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_pub_cfg.yaml \ No newline at end of file +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_pub_cfg.yaml \ No newline at end of file diff --git a/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.bat b/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.bat similarity index 65% rename from src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.bat rename to src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.bat index e77f93b5f..68353d98f 100644 --- a/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_protobuf_channel_sub.bat +++ b/src/examples/plugins/zenoh_plugin/install/win/bin/start_examples_plugins_zenoh_plugin_pb_chn_sub.bat @@ -1 +1 @@ -.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_protobuf_channel_sub_cfg.yaml \ No newline at end of file +.\aimrt_main.exe --cfg_file_path=./cfg/examples_plugins_zenoh_plugin_pb_chn_sub_cfg.yaml \ No newline at end of file diff --git a/src/examples/py/protobuf_channel/README.md b/src/examples/py/pb_chn/README.md similarity index 56% rename from src/examples/py/protobuf_channel/README.md rename to src/examples/py/pb_chn/README.md index e9e161d86..995599276 100644 --- a/src/examples/py/protobuf_channel/README.md +++ b/src/examples/py/pb_chn/README.md @@ -12,22 +12,22 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [examples_py_protobuf_channel_publisher_app.py](./examples_py_protobuf_channel_publisher_app.py) -- [examples_py_protobuf_channel_subscriber_app.py](./examples_py_protobuf_channel_subscriber_app.py) +- [examples_py_pb_chn_publisher_app.py](./examples_py_pb_chn_publisher_app.py) +- [examples_py_pb_chn_subscriber_app.py](./examples_py_pb_chn_subscriber_app.py) 配置文件: -- [examples_py_protobuf_channel_http_pub_cfg.yaml](./cfg/examples_py_protobuf_channel_http_pub_cfg.yaml) -- [examples_py_protobuf_channel_http_sub_cfg.yaml](./cfg/examples_py_protobuf_channel_http_sub_cfg.yaml) +- [examples_py_pb_chn_http_pub_cfg.yaml](./cfg/examples_py_pb_chn_http_pub_cfg.yaml) +- [examples_py_pb_chn_http_sub_cfg.yaml](./cfg/examples_py_pb_chn_http_sub_cfg.yaml) 运行方式(linux): - 安装 `aimrt_py` 包; -- 运行本目录下的[build_examples_py_protobuf_channel.sh](./build_examples_py_protobuf_channel.sh)脚本,生成协议桩代码文件; +- 运行本目录下的[build_examples_py_pb_chn.sh](./build_examples_py_pb_chn.sh)脚本,生成协议桩代码文件; - 如果本地没有 protoc 或者 protoc 版本小于 3.20,请安装或升级 protoc,或直接修改脚本中的 `protoc_cmd` 变量指向合适的路径; -- 运行本目录下的[start_examples_py_protobuf_channel_http_sub.sh](./start_examples_py_protobuf_channel_http_sub.sh)脚本,启动 subscriber; -- 在新终端里运行本目录下的[start_examples_py_protobuf_channel_http_pub.sh](./start_examples_py_protobuf_channel_http_pub.sh)脚本,启动 publisher 发布一条消息; +- 运行本目录下的[start_examples_py_pb_chn_http_sub.sh](./start_examples_py_pb_chn_http_sub.sh)脚本,启动 subscriber; +- 在新终端里运行本目录下的[start_examples_py_pb_chn_http_pub.sh](./start_examples_py_pb_chn_http_pub.sh)脚本,启动 publisher 发布一条消息; - 向 subscriber 进程所在终端里键入`ctrl-c`以停止进程; @@ -49,22 +49,22 @@ 核心代码: - [event.proto](../../../protocols/example/event.proto) -- [examples_py_protobuf_channel_publisher_app.py](./examples_py_protobuf_channel_publisher_app.py) -- [examples_py_protobuf_channel_subscriber_app.py](./examples_py_protobuf_channel_subscriber_app.py) +- [examples_py_pb_chn_publisher_app.py](./examples_py_pb_chn_publisher_app.py) +- [examples_py_pb_chn_subscriber_app.py](./examples_py_pb_chn_subscriber_app.py) 配置文件: -- [examples_py_protobuf_channel_ros2_pub_cfg.yaml](./cfg/examples_py_protobuf_channel_ros2_pub_cfg.yaml) -- [examples_py_protobuf_channel_ros2_sub_cfg.yaml](./cfg/examples_py_protobuf_channel_ros2_sub_cfg.yaml) +- [examples_py_pb_chn_ros2_pub_cfg.yaml](./cfg/examples_py_pb_chn_ros2_pub_cfg.yaml) +- [examples_py_pb_chn_ros2_sub_cfg.yaml](./cfg/examples_py_pb_chn_ros2_sub_cfg.yaml) 运行方式(linux): - 安装 `aimrt_py` 包; -- 运行本目录下的[build_examples_py_protobuf_channel.sh](./build_examples_py_protobuf_channel.sh)脚本,生成协议桩代码文件; +- 运行本目录下的[build_examples_py_pb_chn.sh](./build_examples_py_pb_chn.sh)脚本,生成协议桩代码文件; - 如果本地没有 protoc 或者 protoc 版本小于 3.20,请安装或升级 protoc,或直接修改脚本中的 `protoc_cmd` 变量指向合适的路径; -- 运行本目录下的[start_examples_py_protobuf_channel_ros2_sub.sh](./start_examples_py_protobuf_channel_ros2_sub.sh)脚本,启动 subscriber; -- 在新终端里运行本目录下的[start_examples_py_protobuf_channel_ros2_pub.sh](./start_examples_py_protobuf_channel_ros2_pub.sh)脚本,启动 publisher 发布一条消息; +- 运行本目录下的[start_examples_py_pb_chn_ros2_sub.sh](./start_examples_py_pb_chn_ros2_sub.sh)脚本,启动 subscriber; +- 在新终端里运行本目录下的[start_examples_py_pb_chn_ros2_pub.sh](./start_examples_py_pb_chn_ros2_pub.sh)脚本,启动 publisher 发布一条消息; - 向 subscriber 进程所在终端里键入`ctrl-c`以停止进程; diff --git a/src/examples/py/protobuf_channel/build_examples_py_protobuf_channel.sh b/src/examples/py/pb_chn/build_examples_py_pb_chn.sh similarity index 100% rename from src/examples/py/protobuf_channel/build_examples_py_protobuf_channel.sh rename to src/examples/py/pb_chn/build_examples_py_pb_chn.sh diff --git a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_http_pub_cfg.yaml b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_http_pub_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_http_pub_cfg.yaml rename to src/examples/py/pb_chn/cfg/examples_py_pb_chn_http_pub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_http_sub_cfg.yaml b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_http_sub_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_http_sub_cfg.yaml rename to src/examples/py/pb_chn/cfg/examples_py_pb_chn_http_sub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_pub_cfg.yaml b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_pub_cfg.yaml similarity index 92% rename from src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_pub_cfg.yaml rename to src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_pub_cfg.yaml index 0725bcb42..b424f6acc 100644 --- a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_pub_cfg.yaml +++ b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_pub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ${AIMRT_PLUGIN_DIR}/libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_py_publisher_node + node_name: example_ros2_chn_py_publisher_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: diff --git a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_sub_cfg.yaml b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_sub_cfg.yaml similarity index 92% rename from src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_sub_cfg.yaml rename to src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_sub_cfg.yaml index 020185596..177951da5 100644 --- a/src/examples/py/protobuf_channel/cfg/examples_py_protobuf_channel_ros2_sub_cfg.yaml +++ b/src/examples/py/pb_chn/cfg/examples_py_pb_chn_ros2_sub_cfg.yaml @@ -7,7 +7,7 @@ aimrt: - name: ros2_plugin path: ${AIMRT_PLUGIN_DIR}/libaimrt_ros2_plugin.so options: - node_name: example_ros2_channel_py_subscriber_node + node_name: example_ros2_chn_py_subscriber_node executor_type: MultiThreaded # SingleThreaded/StaticSingleThreaded/MultiThreaded executor_thread_num: 2 log: diff --git a/src/examples/py/protobuf_channel/examples_py_protobuf_channel_publisher_app.py b/src/examples/py/pb_chn/examples_py_pb_chn_publisher_app.py similarity index 100% rename from src/examples/py/protobuf_channel/examples_py_protobuf_channel_publisher_app.py rename to src/examples/py/pb_chn/examples_py_pb_chn_publisher_app.py diff --git a/src/examples/py/protobuf_channel/examples_py_protobuf_channel_subscriber_app.py b/src/examples/py/pb_chn/examples_py_pb_chn_subscriber_app.py similarity index 100% rename from src/examples/py/protobuf_channel/examples_py_protobuf_channel_subscriber_app.py rename to src/examples/py/pb_chn/examples_py_pb_chn_subscriber_app.py diff --git a/src/examples/py/pb_chn/start_examples_py_pb_chn_http_pub.sh b/src/examples/py/pb_chn/start_examples_py_pb_chn_http_pub.sh new file mode 100755 index 000000000..1f657871c --- /dev/null +++ b/src/examples/py/pb_chn/start_examples_py_pb_chn_http_pub.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_chn_publisher_app.py --cfg_file_path=./cfg/examples_py_pb_chn_http_pub_cfg.yaml diff --git a/src/examples/py/pb_chn/start_examples_py_pb_chn_http_sub.sh b/src/examples/py/pb_chn/start_examples_py_pb_chn_http_sub.sh new file mode 100755 index 000000000..763f90205 --- /dev/null +++ b/src/examples/py/pb_chn/start_examples_py_pb_chn_http_sub.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_chn_subscriber_app.py --cfg_file_path=./cfg/examples_py_pb_chn_http_sub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_pub.sh b/src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_pub.sh similarity index 57% rename from src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_pub.sh rename to src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_pub.sh index e1160723d..f46ee96df 100755 --- a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_pub.sh +++ b/src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_pub.sh @@ -4,4 +4,4 @@ export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/ source ${AIMRT_PLUGIN_DIR}/share/ros2_plugin_proto/local_setup.bash -python3 ./examples_py_protobuf_channel_publisher_app.py --cfg_file_path=./cfg/examples_py_protobuf_channel_ros2_pub_cfg.yaml +python3 ./examples_py_pb_chn_publisher_app.py --cfg_file_path=./cfg/examples_py_pb_chn_ros2_pub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_sub.sh b/src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_sub.sh similarity index 57% rename from src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_sub.sh rename to src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_sub.sh index ed8f95ad5..e816b2b7b 100755 --- a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_ros2_sub.sh +++ b/src/examples/py/pb_chn/start_examples_py_pb_chn_ros2_sub.sh @@ -4,4 +4,4 @@ export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/ source ${AIMRT_PLUGIN_DIR}/share/ros2_plugin_proto/local_setup.bash -python3 ./examples_py_protobuf_channel_subscriber_app.py --cfg_file_path=./cfg/examples_py_protobuf_channel_ros2_sub_cfg.yaml +python3 ./examples_py_pb_chn_subscriber_app.py --cfg_file_path=./cfg/examples_py_pb_chn_ros2_sub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/tools/http_channel_publisher_tool.sh b/src/examples/py/pb_chn/tools/http_channel_publisher_tool.sh similarity index 100% rename from src/examples/py/protobuf_channel/tools/http_channel_publisher_tool.sh rename to src/examples/py/pb_chn/tools/http_channel_publisher_tool.sh diff --git a/src/examples/py/protobuf_rpc/README.md b/src/examples/py/pb_rpc/README.md similarity index 57% rename from src/examples/py/protobuf_rpc/README.md rename to src/examples/py/pb_rpc/README.md index b89d38c78..3e0a19d0b 100644 --- a/src/examples/py/protobuf_rpc/README.md +++ b/src/examples/py/pb_rpc/README.md @@ -12,22 +12,22 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [examples_py_protobuf_rpc_client_app.py](./examples_py_protobuf_rpc_client_app.py) -- [examples_py_protobuf_rpc_server_app.py](./examples_py_protobuf_rpc_server_app.py) +- [examples_py_pb_rpc_client_app.py](./examples_py_pb_rpc_client_app.py) +- [examples_py_pb_rpc_server_app.py](./examples_py_pb_rpc_server_app.py) 配置文件: -- [examples_py_protobuf_rpc_http_client_cfg.yaml](./cfg/examples_py_protobuf_rpc_http_client_cfg.yaml) -- [examples_py_protobuf_rpc_http_server_cfg.yaml](./cfg/examples_py_protobuf_rpc_http_server_cfg.yaml) +- [examples_py_pb_rpc_http_client_cfg.yaml](./cfg/examples_py_pb_rpc_http_client_cfg.yaml) +- [examples_py_pb_rpc_http_server_cfg.yaml](./cfg/examples_py_pb_rpc_http_server_cfg.yaml) 运行方式(linux): - 安装 `aimrt_py` 包; -- 运行本目录下的[build_examples_py_protobuf_rpc.sh](./build_examples_py_protobuf_rpc.sh)脚本,生成协议桩代码文件; +- 运行本目录下的[build_examples_py_pb_rpc.sh](./build_examples_py_pb_rpc.sh)脚本,生成协议桩代码文件; - 如果本地没有 protoc 或者 protoc 版本小于 3.20,请安装或升级 protoc,或直接修改脚本中的 `protoc_cmd` 变量指向合适的路径; -- 运行本目录下的[start_examples_py_protobuf_rpc_http_server.sh](./start_examples_py_protobuf_rpc_http_server.sh)脚本,启动 RPC Server; -- 在新终端里运行本目录下的[start_examples_py_protobuf_rpc_http_client.sh](./start_examples_py_protobuf_rpc_http_client.sh)脚本,启动 Rpc client 发起一次请求; +- 运行本目录下的[start_examples_py_pb_rpc_http_server.sh](./start_examples_py_pb_rpc_http_server.sh)脚本,启动 RPC Server; +- 在新终端里运行本目录下的[start_examples_py_pb_rpc_http_client.sh](./start_examples_py_pb_rpc_http_client.sh)脚本,启动 Rpc client 发起一次请求; - 向 RPC Server 进程所在终端里键入`ctrl-c`以停止进程; @@ -50,22 +50,22 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [examples_py_protobuf_rpc_client_app.py](./examples_py_protobuf_rpc_client_app.py) -- [examples_py_protobuf_rpc_server_app.py](./examples_py_protobuf_rpc_server_app.py) +- [examples_py_pb_rpc_client_app.py](./examples_py_pb_rpc_client_app.py) +- [examples_py_pb_rpc_server_app.py](./examples_py_pb_rpc_server_app.py) 配置文件: -- [examples_py_protobuf_rpc_grpc_client_cfg.yaml](./cfg/examples_py_protobuf_rpc_grpc_client_cfg.yaml) -- [examples_py_protobuf_rpc_grpc_server_cfg.yaml](./cfg/examples_py_protobuf_rpc_grpc_server_cfg.yaml) +- [examples_py_pb_rpc_grpc_client_cfg.yaml](./cfg/examples_py_pb_rpc_grpc_client_cfg.yaml) +- [examples_py_pb_rpc_grpc_server_cfg.yaml](./cfg/examples_py_pb_rpc_grpc_server_cfg.yaml) 运行方式(linux): - 安装 `aimrt_py` 包; -- 运行本目录下的[build_examples_py_protobuf_rpc.sh](./build_examples_py_protobuf_rpc.sh)脚本,生成协议桩代码文件; +- 运行本目录下的[build_examples_py_pb_rpc.sh](./build_examples_py_pb_rpc.sh)脚本,生成协议桩代码文件; - 如果本地没有 protoc 或者 protoc 版本小于 3.20,请安装或升级 protoc,或直接修改脚本中的 `protoc_cmd` 变量指向合适的路径; -- 运行本目录下的[start_examples_py_protobuf_rpc_grpc_server.sh](./start_examples_py_protobuf_rpc_grpc_server.sh)脚本,启动 RPC Server; -- 在新终端里运行本目录下的[start_examples_py_protobuf_rpc_grpc_client.sh](./start_examples_py_protobuf_rpc_grpc_client.sh)脚本,启动 Rpc client 发起一次请求; +- 运行本目录下的[start_examples_py_pb_rpc_grpc_server.sh](./start_examples_py_pb_rpc_grpc_server.sh)脚本,启动 RPC Server; +- 在新终端里运行本目录下的[start_examples_py_pb_rpc_grpc_client.sh](./start_examples_py_pb_rpc_grpc_client.sh)脚本,启动 Rpc client 发起一次请求; - 向 RPC Server 进程所在终端里键入`ctrl-c`以停止进程; @@ -89,22 +89,22 @@ 核心代码: - [rpc.proto](../../../protocols/example/rpc.proto) -- [examples_py_protobuf_rpc_client_app.py](./examples_py_protobuf_rpc_client_app.py) -- [examples_py_protobuf_rpc_server_app.py](./examples_py_protobuf_rpc_server_app.py) +- [examples_py_pb_rpc_client_app.py](./examples_py_pb_rpc_client_app.py) +- [examples_py_pb_rpc_server_app.py](./examples_py_pb_rpc_server_app.py) 配置文件: -- [examples_py_protobuf_rpc_ros2_client_cfg.yaml](./cfg/examples_py_protobuf_rpc_ros2_client_cfg.yaml) -- [examples_py_protobuf_rpc_ros2_server_cfg.yaml](./cfg/examples_py_protobuf_rpc_ros2_server_cfg.yaml) +- [examples_py_pb_rpc_ros2_client_cfg.yaml](./cfg/examples_py_pb_rpc_ros2_client_cfg.yaml) +- [examples_py_pb_rpc_ros2_server_cfg.yaml](./cfg/examples_py_pb_rpc_ros2_server_cfg.yaml) 运行方式(linux): - 安装 `aimrt_py` 包; -- 运行本目录下的[build_examples_py_protobuf_rpc.sh](./build_examples_py_protobuf_rpc.sh)脚本,生成协议桩代码文件; +- 运行本目录下的[build_examples_py_pb_rpc.sh](./build_examples_py_pb_rpc.sh)脚本,生成协议桩代码文件; - 如果本地没有 protoc 或者 protoc 版本小于 3.20,请安装或升级 protoc,或直接修改脚本中的 `protoc_cmd` 变量指向合适的路径; -- 运行本目录下的[start_examples_py_protobuf_rpc_ros2_server.sh](./start_examples_py_protobuf_rpc_ros2_server.sh)脚本,启动 RPC Server; -- 在新终端里运行本目录下的[start_examples_py_protobuf_rpc_ros2_client.sh](./start_examples_py_protobuf_rpc_ros2_client.sh)脚本,启动 Rpc client 发起一次请求; +- 运行本目录下的[start_examples_py_pb_rpc_ros2_server.sh](./start_examples_py_pb_rpc_ros2_server.sh)脚本,启动 RPC Server; +- 在新终端里运行本目录下的[start_examples_py_pb_rpc_ros2_client.sh](./start_examples_py_pb_rpc_ros2_client.sh)脚本,启动 Rpc client 发起一次请求; - 向 RPC Server 进程所在终端里键入`ctrl-c`以停止进程; diff --git a/src/examples/py/protobuf_rpc/build_examples_py_protobuf_rpc.sh b/src/examples/py/pb_rpc/build_examples_py_pb_rpc.sh similarity index 100% rename from src/examples/py/protobuf_rpc/build_examples_py_protobuf_rpc.sh rename to src/examples/py/pb_rpc/build_examples_py_pb_rpc.sh diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_grpc_client_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_grpc_client_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_grpc_client_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_grpc_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_grpc_server_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_grpc_server_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_grpc_server_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_grpc_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_http_client_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_http_client_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_http_client_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_http_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_http_server_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_http_server_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_http_server_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_http_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_ros2_client_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_ros2_client_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_ros2_client_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_ros2_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_ros2_server_cfg.yaml b/src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_ros2_server_cfg.yaml similarity index 100% rename from src/examples/py/protobuf_rpc/cfg/examples_py_protobuf_rpc_ros2_server_cfg.yaml rename to src/examples/py/pb_rpc/cfg/examples_py_pb_rpc_ros2_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_client_app.py b/src/examples/py/pb_rpc/examples_py_pb_rpc_client_app.py similarity index 100% rename from src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_client_app.py rename to src/examples/py/pb_rpc/examples_py_pb_rpc_client_app.py diff --git a/src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_server_app.py b/src/examples/py/pb_rpc/examples_py_pb_rpc_server_app.py similarity index 100% rename from src/examples/py/protobuf_rpc/examples_py_protobuf_rpc_server_app.py rename to src/examples/py/pb_rpc/examples_py_pb_rpc_server_app.py diff --git a/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_client.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_client.sh new file mode 100755 index 000000000..753ebd419 --- /dev/null +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_client.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_rpc_client_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_grpc_client_cfg.yaml diff --git a/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_server.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_server.sh new file mode 100755 index 000000000..6467aaf63 --- /dev/null +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_grpc_server.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_rpc_server_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_grpc_server_cfg.yaml diff --git a/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_client.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_client.sh new file mode 100755 index 000000000..91c7d4fa9 --- /dev/null +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_client.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_rpc_client_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_http_client_cfg.yaml diff --git a/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_server.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_server.sh new file mode 100755 index 000000000..857068ae3 --- /dev/null +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_http_server.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py + +python3 ./examples_py_pb_rpc_server_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_http_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_client.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_client.sh similarity index 65% rename from src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_client.sh rename to src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_client.sh index 85a67c063..7d0cc8c6e 100755 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_client.sh +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_client.sh @@ -5,4 +5,4 @@ export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/ export AMENT_CURRENT_PREFIX=${AIMRT_PLUGIN_DIR} source ${AIMRT_PLUGIN_DIR}/share/ros2_plugin_proto/local_setup.bash -python3 ./examples_py_protobuf_rpc_client_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_ros2_client_cfg.yaml +python3 ./examples_py_pb_rpc_client_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_ros2_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_server.sh b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_server.sh similarity index 65% rename from src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_server.sh rename to src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_server.sh index 1789f3ac9..b6a94dd53 100755 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_ros2_server.sh +++ b/src/examples/py/pb_rpc/start_examples_py_pb_rpc_ros2_server.sh @@ -5,4 +5,4 @@ export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/ export AMENT_CURRENT_PREFIX=${AIMRT_PLUGIN_DIR} source ${AIMRT_PLUGIN_DIR}/share/ros2_plugin_proto/local_setup.bash -python3 ./examples_py_protobuf_rpc_server_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_ros2_server_cfg.yaml +python3 ./examples_py_pb_rpc_server_app.py --cfg_file_path=./cfg/examples_py_pb_rpc_ros2_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/tools/http_rpc_client_tool.sh b/src/examples/py/pb_rpc/tools/http_rpc_client_tool.sh similarity index 100% rename from src/examples/py/protobuf_rpc/tools/http_rpc_client_tool.sh rename to src/examples/py/pb_rpc/tools/http_rpc_client_tool.sh diff --git a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_pub.sh b/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_pub.sh deleted file mode 100755 index 776064c37..000000000 --- a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_pub.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_channel_publisher_app.py --cfg_file_path=./cfg/examples_py_protobuf_channel_http_pub_cfg.yaml diff --git a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_sub.sh b/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_sub.sh deleted file mode 100755 index 0aea3513d..000000000 --- a/src/examples/py/protobuf_channel/start_examples_py_protobuf_channel_http_sub.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_channel_subscriber_app.py --cfg_file_path=./cfg/examples_py_protobuf_channel_http_sub_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_client.sh b/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_client.sh deleted file mode 100755 index e3775e3a9..000000000 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_client.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_rpc_client_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_grpc_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_server.sh b/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_server.sh deleted file mode 100755 index 459cb26d8..000000000 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_grpc_server.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_rpc_server_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_grpc_server_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_client.sh b/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_client.sh deleted file mode 100755 index fb50b4780..000000000 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_client.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_rpc_client_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_http_client_cfg.yaml diff --git a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_server.sh b/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_server.sh deleted file mode 100755 index 3acc8fc57..000000000 --- a/src/examples/py/protobuf_rpc/start_examples_py_protobuf_rpc_http_server.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -export AIMRT_PLUGIN_DIR=$(pip show aimrt_py | grep Location | awk '{print $2}')/aimrt_py - -python3 ./examples_py_protobuf_rpc_server_app.py --cfg_file_path=./cfg/examples_py_protobuf_rpc_http_server_cfg.yaml diff --git a/src/plugins/grpc_plugin/CMakeLists.txt b/src/plugins/grpc_plugin/CMakeLists.txt index 8ec94949e..0ce9b535f 100644 --- a/src/plugins/grpc_plugin/CMakeLists.txt +++ b/src/plugins/grpc_plugin/CMakeLists.txt @@ -41,9 +41,6 @@ target_link_libraries( include(AddWerror) add_werror(${CUR_TARGET_NAME}) -# Add version to target -target_compile_definitions(${CUR_TARGET_NAME} PRIVATE AIMRT_VERSION="${AIMRT_VERSION}") - # Set installation of target if(AIMRT_INSTALL) set_property(TARGET ${CUR_TARGET_NAME} PROPERTY EXPORT_NAME ${CUR_TARGET_ALIAS_NAME}) diff --git a/src/plugins/grpc_plugin/client/connection.h b/src/plugins/grpc_plugin/client/connection.h index cb067d4f8..b872af65c 100644 --- a/src/plugins/grpc_plugin/client/connection.h +++ b/src/plugins/grpc_plugin/client/connection.h @@ -67,7 +67,7 @@ class Connection : public std::enable_shared_from_this { Connection(const Connection&) = delete; Connection& operator=(const Connection&) = delete; - void Initialize(std::shared_ptr& options_ptr) { + void Initialize(const std::shared_ptr& options_ptr) { AIMRT_CHECK_ERROR_THROW( std::atomic_exchange(&state_, ConnectionState::kInit) == ConnectionState::kPreInit, "Method can only be called when state is 'PreInit'."); @@ -207,9 +207,8 @@ class Connection : public std::enable_shared_from_this { cur_duration = chrono::steady_clock::now() - start_time_point; AIMRT_CHECK_ERROR_THROW(cur_duration < timeout, "Timeout."); - // FIXME(zhangyi): The read buffer size is fixed while (nghttp2_session_.ResponseListEmpty()) { - std::array buf; + std::array buf; auto read_timer = asio::steady_timer(socket_strand_, timeout - cur_duration); auto read_result = co_await (socket_.async_read_some(asio::buffer(buf), asio::use_awaitable) || read_timer.async_wait(asio::use_awaitable)); diff --git a/src/plugins/grpc_plugin/grpc_plugin.cc b/src/plugins/grpc_plugin/grpc_plugin.cc index df406e921..351b8c7f8 100644 --- a/src/plugins/grpc_plugin/grpc_plugin.cc +++ b/src/plugins/grpc_plugin/grpc_plugin.cc @@ -100,7 +100,7 @@ bool GrpcPlugin::Initialize(runtime::core::AimRTCore* core_ptr) noexcept { options_.listen_port}, .http2_settings = { .max_concurrent_streams = 100, - .initial_window_size = 65535, + .initial_window_size = (1U << 31) - 1, }}); http2_svr_ptr_->Start(); }); diff --git a/src/plugins/grpc_plugin/grpc_rpc_backend.cc b/src/plugins/grpc_plugin/grpc_rpc_backend.cc index cbe4d1bcc..0b95425a8 100644 --- a/src/plugins/grpc_plugin/grpc_rpc_backend.cc +++ b/src/plugins/grpc_plugin/grpc_rpc_backend.cc @@ -21,6 +21,7 @@ #include "aimrt_module_cpp_interface/rpc/rpc_status.h" #include "core/rpc/rpc_backend_tools.h" #include "core/rpc/rpc_invoke_wrapper.h" +#include "core/util/version.h" #include "grpc_plugin/client/options.h" #include "grpc_plugin/global.h" // IWYU pragma: keep #include "grpc_plugin/grpc/message.h" @@ -87,6 +88,8 @@ namespace asio = boost::asio; namespace util = aimrt::common::util; namespace chrono = std::chrono; +using aimrt::runtime::core::util::GetAimRTVersion; + namespace { void CheckGrpcMessageBody(const http2::SimpleBuffer& buffer) { @@ -367,8 +370,13 @@ void GrpcRpcBackend::Invoke( const auto& info = client_invoke_wrapper_ptr->info; try { - client::ClientOptions cli_options{.host = std::string(url->host), - .service = std::string(url->service)}; + client::ClientOptions cli_options{ + .host = std::string(url->host), + .service = std::string(url->service), + .http2_settings = http2::Session::Http2Settings{ + .max_concurrent_streams = 100, + .initial_window_size = (1U << 31) - 1, + }}; auto client_ptr = co_await http2_cli_pool_ptr->GetClient(cli_options); if (!client_ptr) [[unlikely]] { @@ -382,7 +390,7 @@ void GrpcRpcBackend::Invoke( req_ptr->SetMethod("POST"); req_ptr->AddHeader("content-type", "application/grpc"); req_ptr->AddHeader("te", "trailers"); - req_ptr->AddHeader("user-agent", std::string("grpc-c++-aimrt/") + AIMRT_VERSION); + req_ptr->AddHeader("user-agent", std::string("grpc-c++-aimrt/") + GetAimRTVersion()); auto timeout = client_invoke_wrapper_ptr->ctx_ref.Timeout(); if (timeout <= chrono::nanoseconds(0)) { diff --git a/src/plugins/grpc_plugin/http2/client_session.cc b/src/plugins/grpc_plugin/http2/client_session.cc index a1dec08da..6ccb5e1e4 100644 --- a/src/plugins/grpc_plugin/http2/client_session.cc +++ b/src/plugins/grpc_plugin/http2/client_session.cc @@ -76,6 +76,13 @@ int ClientSession::SubmitSettings(Http2Settings settings) { return -1; } + auto set_ok = nghttp2_session_set_local_window_size(session_, NGHTTP2_FLAG_NONE, 0, + static_cast(settings.initial_window_size)); + if (set_ok != 0) { + AIMRT_ERROR("nghttp2_session_set_local_window_size failed: {}", set_ok); + return -1; + } + return 0; } diff --git a/src/plugins/grpc_plugin/http2/server_session.cc b/src/plugins/grpc_plugin/http2/server_session.cc index 3804b2371..ce87da397 100644 --- a/src/plugins/grpc_plugin/http2/server_session.cc +++ b/src/plugins/grpc_plugin/http2/server_session.cc @@ -148,18 +148,24 @@ int ServerSession::ParseRecvMessage(std::string_view in) { } int ServerSession::SubmitSettings(Http2Settings settings) { - std::vector settings_entries{ + std::vector entries{ {NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, settings.max_concurrent_streams}, {NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, settings.initial_window_size}, }; - auto submit_ok = - nghttp2_submit_settings(session_, NGHTTP2_FLAG_NONE, settings_entries.data(), settings_entries.size()); + auto submit_ok = nghttp2_submit_settings(session_, NGHTTP2_FLAG_NONE, entries.data(), entries.size()); if (submit_ok != 0) { AIMRT_ERROR("nghttp2_submit_settings failed: {}", submit_ok); return -1; } + auto set_ok = nghttp2_session_set_local_window_size(session_, NGHTTP2_FLAG_NONE, 0, + static_cast(settings.initial_window_size)); + if (set_ok != 0) { + AIMRT_ERROR("nghttp2_session_set_local_window_size failed: {}", set_ok); + return -1; + } + return 0; } @@ -260,6 +266,12 @@ int OnFrameRecvCallback(nghttp2_session* session, const nghttp2_frame* frame, vo return 0; } + if (frame->hd.flags & NGHTTP2_FLAG_END_STREAM) { + server_session->OnFullRequest(stream->GetRequest()); + AIMRT_TRACE("stream recv frame, stream id: {}, OnFullRequest", frame->hd.stream_id); + return 0; + } + auto request = stream->GetRequest(); switch (frame->hd.type) { case NGHTTP2_DATA: @@ -292,8 +304,7 @@ int OnFrameRecvCallback(nghttp2_session* session, const nghttp2_frame* frame, vo int OnDataChunkRecvCallback(nghttp2_session* session, uint8_t flags, int32_t stream_id, const uint8_t* data, size_t len, void* user_data) { - AIMRT_TRACE("stream recv data chunk, stream id: {}", stream_id); - AIMRT_TRACE("stream recv data chunk, data: {}", std::string_view(reinterpret_cast(data), len)); + AIMRT_TRACE("stream recv data chunk, stream id: {}, chunk size: {}", stream_id, len); auto* server_session = static_cast(user_data); auto stream = server_session->FindStream(stream_id); if (!stream) { diff --git a/src/plugins/grpc_plugin/http2/session.cc b/src/plugins/grpc_plugin/http2/session.cc index 80f92d665..768daf261 100644 --- a/src/plugins/grpc_plugin/http2/session.cc +++ b/src/plugins/grpc_plugin/http2/session.cc @@ -169,7 +169,7 @@ int Session::GetSendMessage(SimpleBuffer& out) { const uint8_t* buffer = nullptr; ssize_t nwrite = nghttp2_session_mem_send(session_, &buffer); if (nwrite < 0) { - AIMRT_DEBUG("nghttp2_session_mem_send error: {}, {}", nwrite, nghttp2_strerror(nwrite)); + AIMRT_ERROR("nghttp2_session_mem_send error: {}, {}", nwrite, nghttp2_strerror(nwrite)); return -1; } diff --git a/src/plugins/grpc_plugin/http2/session.h b/src/plugins/grpc_plugin/http2/session.h index ef029973d..98416e3f4 100644 --- a/src/plugins/grpc_plugin/http2/session.h +++ b/src/plugins/grpc_plugin/http2/session.h @@ -53,7 +53,7 @@ class Session { public: struct Http2Settings { uint32_t max_concurrent_streams = 100; - uint32_t initial_window_size = 250000000; + uint32_t initial_window_size = (1U << 31) - 1; }; public: diff --git a/src/plugins/grpc_plugin/server/connection.h b/src/plugins/grpc_plugin/server/connection.h index 9d33eda52..60f0d17f7 100644 --- a/src/plugins/grpc_plugin/server/connection.h +++ b/src/plugins/grpc_plugin/server/connection.h @@ -99,8 +99,8 @@ class Connection : public std::enable_shared_from_this { response_ptr->AddHeader("content-type", "application/grpc"); - AIMRT_TRACE("Http svr session send response, remote addr {}, response: {}", - RemoteAddr(), response_ptr->ToString()); + AIMRT_TRACE("Http svr session send response, remote addr {}, response size: {}", RemoteAddr(), + response_ptr->GetBody().GetReadableSize()); nghttp2_session_.SubmitResponse(response_ptr); } full_request_list.clear(); @@ -193,7 +193,7 @@ class Connection : public std::enable_shared_from_this { private: Awaitable ReceiveFromRemote() { - std::array buffer; + std::array buffer; auto nread = co_await socket_.async_read_some(asio::buffer(buffer), asio::use_awaitable); #ifndef NDEBUG diff --git a/src/plugins/mqtt_plugin/mqtt_channel_backend.h b/src/plugins/mqtt_plugin/mqtt_channel_backend.h index bd3a3d5c3..9b8de89fc 100644 --- a/src/plugins/mqtt_plugin/mqtt_channel_backend.h +++ b/src/plugins/mqtt_plugin/mqtt_channel_backend.h @@ -34,10 +34,10 @@ class MqttChannelBackend : public runtime::core::channel::ChannelBackendBase { MqttChannelBackend( MQTTAsync& client, uint32_t max_pkg_size, - std::shared_ptr msg_handle_registry_ptr) + const std::shared_ptr& msg_handle_registry_ptr) : client_(client), max_pkg_size_(max_pkg_size), - msg_handle_registry_ptr_(std::move(msg_handle_registry_ptr)) {} + msg_handle_registry_ptr_(msg_handle_registry_ptr) {} ~MqttChannelBackend() override = default; diff --git a/src/plugins/mqtt_plugin/mqtt_plugin.cc b/src/plugins/mqtt_plugin/mqtt_plugin.cc index b7d1a42dc..26cd4882d 100644 --- a/src/plugins/mqtt_plugin/mqtt_plugin.cc +++ b/src/plugins/mqtt_plugin/mqtt_plugin.cc @@ -7,6 +7,7 @@ #include "core/aimrt_core.h" #include "mqtt_plugin/global.h" +#include "util/url_parser.h" namespace YAML { template <> @@ -19,6 +20,7 @@ struct convert { node["broker_addr"] = rhs.broker_addr; node["client_id"] = rhs.client_id; node["max_pkg_size_k"] = rhs.max_pkg_size_k; + node["truststore"] = rhs.truststore; return node; } @@ -32,6 +34,9 @@ struct convert { if (node["max_pkg_size_k"]) rhs.max_pkg_size_k = node["max_pkg_size_k"].as(); + if (node["truststore"]) + rhs.truststore = node["truststore"].as(); + return true; } }; @@ -51,7 +56,7 @@ bool MqttPlugin::Initialize(runtime::core::AimRTCore *core_ptr) noexcept { init_flag_ = true; - // 初始化mqtt + // initialize mqtt MQTTAsync_create( &client_, options_.broker_addr.c_str(), options_.client_id.c_str(), MQTTCLIENT_PERSISTENCE_NONE, NULL); @@ -70,8 +75,24 @@ bool MqttPlugin::Initialize(runtime::core::AimRTCore *core_ptr) noexcept { std::promise connect_ret_promise; MQTTAsync_connectOptions conn_opts = MQTTAsync_connectOptions_initializer; + MQTTAsync_SSLOptions ssl_opts = MQTTAsync_SSLOptions_initializer; + conn_opts.keepAliveInterval = 20; conn_opts.cleansession = 1; + + // check broker_add protocol is ssl/mqtts or not + auto ret = common::util::ParseUrl(options_.broker_addr); + AIMRT_CHECK_ERROR_THROW(ret != std::nullopt, "Parse broker_addr failed"); + + if (ret->protocol == "ssl" || ret->protocol == "mqtts") { + AIMRT_CHECK_ERROR_THROW(!options_.truststore.empty(), "Use ssl/mqtts must set truststore"); + ssl_opts.trustStore = options_.truststore.c_str(); + conn_opts.ssl = &ssl_opts; + + } else { + AIMRT_CHECK_WARN(options_.truststore.empty(), "Broker protocol is not ssl/mqtts, the truststore you set will be ignored."); + } + conn_opts.onSuccess = [](void *context, MQTTAsync_successData *response) { static_cast *>(context)->set_value(true); }; diff --git a/src/plugins/mqtt_plugin/mqtt_plugin.h b/src/plugins/mqtt_plugin/mqtt_plugin.h index 15c45e9ec..d973f0817 100644 --- a/src/plugins/mqtt_plugin/mqtt_plugin.h +++ b/src/plugins/mqtt_plugin/mqtt_plugin.h @@ -21,6 +21,7 @@ class MqttPlugin : public AimRTCorePluginBase { std::string broker_addr; std::string client_id; uint32_t max_pkg_size_k = 1024; + std::string truststore; }; public: diff --git a/src/plugins/mqtt_plugin/mqtt_rpc_backend.h b/src/plugins/mqtt_plugin/mqtt_rpc_backend.h index 2d3a12185..eee37e0b4 100644 --- a/src/plugins/mqtt_plugin/mqtt_rpc_backend.h +++ b/src/plugins/mqtt_plugin/mqtt_rpc_backend.h @@ -33,14 +33,14 @@ class MqttRpcBackend : public runtime::core::rpc::RpcBackendBase { public: MqttRpcBackend( - std::string client_id, + const std::string& client_id, MQTTAsync& client, uint32_t max_pkg_size, - std::shared_ptr msg_handle_registry_ptr) - : client_id_(std::move(client_id)), + const std::shared_ptr& msg_handle_registry_ptr) + : client_id_(client_id), client_(client), max_pkg_size_(max_pkg_size), - msg_handle_registry_ptr_(std::move(msg_handle_registry_ptr)) {} + msg_handle_registry_ptr_(msg_handle_registry_ptr) {} ~MqttRpcBackend() override = default; diff --git a/src/plugins/record_playback_plugin/type_support_pkg_loader.h b/src/plugins/record_playback_plugin/type_support_pkg_loader.h index d577c37ad..fbc415ca0 100644 --- a/src/plugins/record_playback_plugin/type_support_pkg_loader.h +++ b/src/plugins/record_playback_plugin/type_support_pkg_loader.h @@ -7,7 +7,7 @@ #include "aimrt_module_c_interface/util/type_support_base.h" -#include "util/dynamic_lib.h" +#include "core/util/dynamic_lib.h" #include "util/log_util.h" namespace aimrt::plugins::record_playback_plugin { diff --git a/src/plugins/zenoh_plugin/CMakeLists.txt b/src/plugins/zenoh_plugin/CMakeLists.txt index 455cae495..253335fea 100644 --- a/src/plugins/zenoh_plugin/CMakeLists.txt +++ b/src/plugins/zenoh_plugin/CMakeLists.txt @@ -34,7 +34,8 @@ target_link_libraries( ${CUR_TARGET_NAME} PRIVATE aimrt::interface::aimrt_core_plugin_interface aimrt::runtime::core - zenohc::shared) + zenohc::shared + jsoncpp::jsoncpp) # Add -Werror option include(AddWerror) diff --git a/src/plugins/zenoh_plugin/zenoh_channel_backend.cc b/src/plugins/zenoh_plugin/zenoh_channel_backend.cc index dbf322142..215d3d873 100644 --- a/src/plugins/zenoh_plugin/zenoh_channel_backend.cc +++ b/src/plugins/zenoh_plugin/zenoh_channel_backend.cc @@ -56,7 +56,8 @@ bool ZenohChannelBackend::RegisterPublishType( namespace util = aimrt::common::util; std::string pattern = std::string("channel/") + util::UrlEncode(info.topic_name) + "/" + - util::UrlEncode(info.msg_type); + util::UrlEncode(info.msg_type) + + limit_domain_; zenoh_manager_ptr_->RegisterPublisher(pattern); @@ -80,7 +81,8 @@ bool ZenohChannelBackend::Subscribe( std::string pattern = std::string("channel/") + util::UrlEncode(info.topic_name) + "/" + - util::UrlEncode(info.msg_type); + util::UrlEncode(info.msg_type) + + limit_domain_; auto find_itr = subscribe_wrapper_map_.find(pattern); if (find_itr != subscribe_wrapper_map_.end()) { @@ -200,7 +202,8 @@ void ZenohChannelBackend::Publish(runtime::core::channel::MsgWrapper& msg_wrappe std::string zenoh_pub_topic = std::string("channel/") + util::UrlEncode(info.topic_name) + "/" + - util::UrlEncode(info.msg_type); + util::UrlEncode(info.msg_type) + + limit_domain_; AIMRT_TRACE("Zenoh publish to '{}'", zenoh_pub_topic); diff --git a/src/plugins/zenoh_plugin/zenoh_channel_backend.h b/src/plugins/zenoh_plugin/zenoh_channel_backend.h index b71bc51b5..fa5c15ac8 100644 --- a/src/plugins/zenoh_plugin/zenoh_channel_backend.h +++ b/src/plugins/zenoh_plugin/zenoh_channel_backend.h @@ -19,8 +19,9 @@ class ZenohChannelBackend : public runtime::core::channel::ChannelBackendBase { public: ZenohChannelBackend( - std::shared_ptr& zenoh_util_ptr) - : zenoh_manager_ptr_(zenoh_util_ptr) {} + const std::shared_ptr& zenoh_util_ptr, const std::string& limit_domain) + : zenoh_manager_ptr_(zenoh_util_ptr), + limit_domain_(limit_domain) {} ~ZenohChannelBackend() override = default; @@ -53,6 +54,7 @@ class ZenohChannelBackend : public runtime::core::channel::ChannelBackendBase { const runtime::core::channel::ChannelRegistry* channel_registry_ptr_ = nullptr; std::shared_ptr zenoh_manager_ptr_; + std::string limit_domain_; std::unordered_map< std::string, diff --git a/src/plugins/zenoh_plugin/zenoh_manager.cc b/src/plugins/zenoh_plugin/zenoh_manager.cc index 0894878e9..1b9c96140 100644 --- a/src/plugins/zenoh_plugin/zenoh_manager.cc +++ b/src/plugins/zenoh_plugin/zenoh_manager.cc @@ -3,10 +3,20 @@ #include "zenoh_plugin/zenoh_manager.h" +#include + namespace aimrt::plugins::zenoh_plugin { -void ZenohManager::Initialize() { - z_config_default(&z_config_); +void ZenohManager::Initialize(const std::string &native_cfg_path) { + if (!native_cfg_path.empty() && native_cfg_path.c_str() != nullptr) { + if (zc_config_from_file(&z_config_, native_cfg_path.c_str()) != Z_OK) { + AIMRT_ERROR("Unable to load configuration file: {}", native_cfg_path); + return; + } + PrintZenohCgf(z_config_); + } else { + z_config_default(&z_config_); + } if (z_open(&z_session_, z_move(z_config_)) < 0) { AIMRT_ERROR("Unable to open zenoh session!"); @@ -44,8 +54,6 @@ void ZenohManager::RegisterPublisher(const std::string &keyexpr) { z_pub_registry_.emplace(keyexpr, z_pub); AIMRT_TRACE("Publisher with keyexpr: {} registered successfully.", keyexpr.c_str()); - - return; } void ZenohManager::RegisterSubscriber(const std::string &keyexpr, MsgHandleFunc handle) { @@ -73,8 +81,26 @@ void ZenohManager::RegisterSubscriber(const std::string &keyexpr, MsgHandleFunc z_sub_registry_.emplace(keyexpr, z_sub); AIMRT_TRACE("Subscriber with keyexpr: {} registered successfully.", keyexpr.c_str()); +} - return; +void ZenohManager::RegisterRpcNode(const std::string &keyexpr, MsgHandleFunc handle, const std::string &role) { + std::string pub_keyexpr; + std::string sub_keyexpr; + + if (role == "client") { + pub_keyexpr = "req/" + keyexpr; + sub_keyexpr = "rsp/" + keyexpr; + } else if (role == "server") { + pub_keyexpr = "rsp/" + keyexpr; + sub_keyexpr = "req/" + keyexpr; + } else { + AIMRT_ERROR("Invalid role: {}", role); + return; + } + + RegisterPublisher(pub_keyexpr); + RegisterSubscriber(sub_keyexpr, std::move(handle)); + AIMRT_INFO("{} with keyexpr: {} registered successfully.", role, keyexpr.c_str()); } void ZenohManager::Publish(const std::string &topic, char *serialized_data_ptr, uint64_t serialized_data_len) { @@ -88,8 +114,6 @@ void ZenohManager::Publish(const std::string &topic, char *serialized_data_ptr, z_bytes_from_buf(&z_payload, reinterpret_cast(serialized_data_ptr), serialized_data_len, NULL, NULL); z_publisher_put(z_loan(z_pub_iter->second), z_move(z_payload), &z_pub_options_); - - return; } } // namespace aimrt::plugins::zenoh_plugin \ No newline at end of file diff --git a/src/plugins/zenoh_plugin/zenoh_manager.h b/src/plugins/zenoh_plugin/zenoh_manager.h index 79a74483e..c1f5a3406 100644 --- a/src/plugins/zenoh_plugin/zenoh_manager.h +++ b/src/plugins/zenoh_plugin/zenoh_manager.h @@ -3,6 +3,7 @@ #pragma once +#include "json/json.h" #include "zenoh.h" #include "zenoh_plugin/global.h" @@ -10,24 +11,44 @@ namespace aimrt::plugins::zenoh_plugin { class ZenohManager { public: using MsgHandleFunc = std::function; - ZenohManager() = default; ~ZenohManager() = default; ZenohManager(const ZenohManager&) = delete; ZenohManager& operator=(const ZenohManager&) = delete; - void Initialize(); + void Initialize(const std::string& native_cfg_path); void Shutdown(); - void RegisterSubscriber(const std::string& url, MsgHandleFunc handle); - void RegisterPublisher(const std::string& url); + void RegisterSubscriber(const std::string& keyexpr, MsgHandleFunc handle); + void RegisterPublisher(const std::string& keyexpr); - void Publish(const std::string& url, char* serialized_data_ptr, uint64_t serialized_data_len); + void RegisterRpcNode(const std::string& keyexpr, MsgHandleFunc handle, const std::string& role); + + void Publish(const std::string& topic, char* serialized_data_ptr, uint64_t serialized_data_len); private: + static void PrintZenohCgf(z_owned_config_t z_config) { + z_owned_string_t out_config_string; + zc_config_to_string(z_loan(z_config), &out_config_string); + + Json::CharReaderBuilder reader_builder; + Json::Value json_data; + + std::istringstream s(z_string_data(z_loan(out_config_string))); + Json::parseFromStream(reader_builder, s, &json_data, nullptr); + Json::StreamWriterBuilder writer_builder; + writer_builder["indentation"] = " "; + std::string pretty_json = Json::writeString(writer_builder, json_data); + + AIMRT_INFO("Using custom zenoh native configuration: {}", pretty_json); + + z_drop(z_move(out_config_string)); + } + std::unordered_map z_pub_registry_; std::unordered_map z_sub_registry_; + std::vector> msg_handle_vec_; z_publisher_put_options_t z_pub_options_; diff --git a/src/plugins/zenoh_plugin/zenoh_plugin.cc b/src/plugins/zenoh_plugin/zenoh_plugin.cc index d0633c0ad..83c16a6e9 100644 --- a/src/plugins/zenoh_plugin/zenoh_plugin.cc +++ b/src/plugins/zenoh_plugin/zenoh_plugin.cc @@ -11,11 +11,21 @@ struct convert { static Node encode(const Options &rhs) { Node node; + node["native_cfg_path"] = rhs.native_cfg_path; + node["limit_domain"] = rhs.limit_domain; + return node; } static bool decode(const Node &node, Options &rhs) { if (!node.IsMap()) return false; + + if (node["native_cfg_path"]) + rhs.native_cfg_path = node["native_cfg_path"].as(); + + if (node["limit_domain"]) + rhs.limit_domain = '/' + node["limit_domain"].as(); + return true; } }; @@ -36,7 +46,7 @@ bool ZenohPlugin::Initialize(runtime::core::AimRTCore *core_ptr) noexcept { init_flag_ = true; // todo remove role - zenoh_manager_ptr_->Initialize(); + zenoh_manager_ptr_->Initialize(options_.native_cfg_path); core_ptr_->RegisterHookFunc(runtime::core::AimRTCore::State::kPostInitLog, [this] { SetPluginLogger(); }); @@ -44,6 +54,9 @@ bool ZenohPlugin::Initialize(runtime::core::AimRTCore *core_ptr) noexcept { core_ptr_->RegisterHookFunc(runtime::core::AimRTCore::State::kPreInitChannel, [this] { RegisterZenohChannelBackend(); }); + core_ptr_->RegisterHookFunc(runtime::core::AimRTCore::State::kPreInitRpc, + [this] { RegisterZenohRpcBackend(); }); + plugin_options_node = options_; return true; @@ -74,9 +87,22 @@ void ZenohPlugin::SetPluginLogger() { void ZenohPlugin::RegisterZenohChannelBackend() { std::unique_ptr zenoh_channel_backend_ptr = - std::make_unique(zenoh_manager_ptr_); + std::make_unique(zenoh_manager_ptr_, options_.limit_domain); core_ptr_->GetChannelManager().RegisterChannelBackend(std::move(zenoh_channel_backend_ptr)); } +void ZenohPlugin::RegisterZenohRpcBackend() { + std::unique_ptr zenoh_rpc_backend_ptr = + std::make_unique(zenoh_manager_ptr_, options_.limit_domain); + + static_cast(zenoh_rpc_backend_ptr.get()) + ->RegisterGetExecutorFunc( + [this](std::string_view executor_name) -> aimrt::executor::ExecutorRef { + return core_ptr_->GetExecutorManager().GetExecutor(executor_name); + }); + + core_ptr_->GetRpcManager().RegisterRpcBackend(std::move(zenoh_rpc_backend_ptr)); +} + } // namespace aimrt::plugins::zenoh_plugin \ No newline at end of file diff --git a/src/plugins/zenoh_plugin/zenoh_plugin.h b/src/plugins/zenoh_plugin/zenoh_plugin.h index ced0f130d..0e9d7a87c 100644 --- a/src/plugins/zenoh_plugin/zenoh_plugin.h +++ b/src/plugins/zenoh_plugin/zenoh_plugin.h @@ -9,11 +9,15 @@ #include "aimrt_core_plugin_interface/aimrt_core_plugin_base.h" #include "core/aimrt_core.h" #include "zenoh_plugin/zenoh_channel_backend.h" +#include "zenoh_plugin/zenoh_rpc_backend.h" namespace aimrt::plugins::zenoh_plugin { class ZenohPlugin : public AimRTCorePluginBase { public: - struct Options {}; + struct Options { + std::string native_cfg_path; + std::string limit_domain; + }; public: ZenohPlugin() = default; @@ -27,7 +31,7 @@ class ZenohPlugin : public AimRTCorePluginBase { private: void SetPluginLogger(); void RegisterZenohChannelBackend(); - void RegisterZenohRpcBackend() {} // todo + void RegisterZenohRpcBackend(); private: runtime::core::AimRTCore *core_ptr_ = nullptr; diff --git a/src/plugins/zenoh_plugin/zenoh_rpc_backend.cc b/src/plugins/zenoh_plugin/zenoh_rpc_backend.cc new file mode 100644 index 000000000..bd8df5942 --- /dev/null +++ b/src/plugins/zenoh_plugin/zenoh_rpc_backend.cc @@ -0,0 +1,434 @@ +// Copyright (c) 2023, AgiBot Inc. +// All rights reserved. + +#include "zenoh_plugin/zenoh_rpc_backend.h" + +namespace YAML { +template <> +struct convert { + using Options = aimrt::plugins::zenoh_plugin::ZenohRpcBackend::Options; + + static Node encode(const Options& rhs) { + Node node; + + node["timeout_executor"] = rhs.timeout_executor; + + return node; + } + + static bool decode(const Node& node, Options& rhs) { + if (node["timeout_executor"]) + rhs.timeout_executor = node["timeout_executor"].as(); + + return true; + } +}; +} // namespace YAML + +namespace aimrt::plugins::zenoh_plugin { + +void ZenohRpcBackend::Initialize(YAML::Node options_node) { + AIMRT_CHECK_ERROR_THROW( + std::atomic_exchange(&state_, State::Init) == State::PreInit, + "Zenoh Rpc backend can only be initialized once."); + + if (options_node && !options_node.IsNull()) + options_ = options_node.as(); + + client_tool_ptr_ = + std::make_unique>>(); + + if (!options_.timeout_executor.empty()) { + AIMRT_CHECK_ERROR_THROW( + get_executor_func_, + "Get executor function is not set before initialize."); + + auto timeout_executor = get_executor_func_(options_.timeout_executor); + + AIMRT_CHECK_ERROR_THROW( + timeout_executor, + "Get timeout executor '{}' failed.", options_.timeout_executor); + + client_tool_ptr_->RegisterTimeoutExecutor(timeout_executor); + client_tool_ptr_->RegisterTimeoutHandle( + [](auto&& client_invoke_wrapper_ptr) { + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_TIMEOUT)); + }); + + AIMRT_TRACE("zenoh rpc backend enable the timeout function, use '{}' as timeout executor.", + options_.timeout_executor); + } else { + AIMRT_TRACE("zenoh rpc backend does not enable the timeout function."); + } +} + +void ZenohRpcBackend::Start() { + AIMRT_CHECK_ERROR_THROW( + std::atomic_exchange(&state_, State::Start) == State::Init, + "Method can only be called when state is 'Init'."); +} + +void ZenohRpcBackend::Shutdown() { + if (std::atomic_exchange(&state_, State::Shutdown) == State::Shutdown) + return; + + client_tool_ptr_.reset(); +} + +bool ZenohRpcBackend::RegisterServiceFunc( + const runtime::core::rpc::ServiceFuncWrapper& service_func_wrapper) noexcept { + try { + if (state_.load() != State::Init) { + AIMRT_ERROR("Service func can only be registered when state is 'Init'."); + return false; + } + + namespace util = aimrt::common::util; + const auto& info = service_func_wrapper.info; + + std::string pattern = std::string("aimrt_rpc/") + + util::UrlEncode(GetRealFuncName(info.func_name)) + + limit_domain_; + + auto handle = [this, &service_func_wrapper, pattern](const z_loaned_sample_t* message) { + try { + // create service invoke wrapper + auto service_invoke_wrapper_ptr = std::make_shared( + runtime::core::rpc::InvokeWrapper{.info = service_func_wrapper.info}); + const auto& info = service_invoke_wrapper_ptr->info; + + // create ctx + auto ctx_ptr = std::make_shared(aimrt_rpc_context_type_t::AIMRT_RPC_SERVER_CONTEXT); + service_invoke_wrapper_ptr->ctx_ref = ctx_ptr; + + // read data + const z_loaned_bytes_t* payload = z_sample_payload(message); + size_t serialized_size = z_bytes_len(payload); + z_bytes_reader_t reader = z_bytes_get_reader(payload); + std::vector serialized_data(serialized_size); + + if (z_bytes_reader_read(&reader, reinterpret_cast(serialized_data.data()), serialized_size) >= 0) { + util::ConstBufferOperator buf_oper(serialized_data.data(), serialized_size); + + // deserialize type + std::string serialization_type(buf_oper.GetString(util::BufferLenType::kUInt8)); + ctx_ptr->SetMetaValue(AIMRT_RPC_CONTEXT_KEY_SERIALIZATION_TYPE, serialization_type); + + std::string pattern(buf_oper.GetString(util::BufferLenType::kUInt8)); + char req_id_buf[4]; + buf_oper.GetBuffer(req_id_buf, 4); + + size_t ctx_num = buf_oper.GetUint8(); + for (size_t ii = 0; ii < ctx_num; ++ii) { + auto key = buf_oper.GetString(util::BufferLenType::kUInt16); + auto val = buf_oper.GetString(util::BufferLenType::kUInt16); + ctx_ptr->SetMetaValue(key, val); + } + ctx_ptr->SetFunctionName(info.func_name); + ctx_ptr->SetMetaValue(AIMRT_RPC_CONTEXT_KEY_BACKEND, Name()); + + // deserialize msg + auto remaining_buf = buf_oper.GetRemainingBuffer(); + aimrt_buffer_view_t buffer_view{ + .data = remaining_buf.data(), + .len = remaining_buf.size()}; + + aimrt_buffer_array_view_t buffer_array_view{ + .data = &buffer_view, + .len = 1}; + + std::shared_ptr service_req_ptr = info.req_type_support_ref.CreateSharedPtr(); + service_invoke_wrapper_ptr->req_ptr = service_req_ptr.get(); + + bool deserialize_ret = info.req_type_support_ref.Deserialize( + serialization_type, buffer_array_view, service_req_ptr.get()); + + AIMRT_CHECK_ERROR_THROW(deserialize_ret, "Zenoh req deserialize failed."); + + // create service rsp + std::shared_ptr service_rsp_ptr = info.rsp_type_support_ref.CreateSharedPtr(); + service_invoke_wrapper_ptr->rsp_ptr = service_rsp_ptr.get(); + + // set callback + service_invoke_wrapper_ptr->callback = + [this, + service_invoke_wrapper_ptr, + ctx_ptr, + service_req_ptr, + service_rsp_ptr, + serialization_type{std::move(serialization_type)}, + pattern{std::move(pattern)}, + req_id_buf](aimrt::rpc::Status status) { + if (!status.OK()) [[unlikely]] { + ReturnRspWithStatusCode( + pattern, serialization_type, req_id_buf, status.Code()); + return; + } + + // serivice rsp serialize + auto buffer_array_view_ptr = aimrt::runtime::core::rpc::TrySerializeRspWithCache( + *service_invoke_wrapper_ptr, serialization_type); + if (!buffer_array_view_ptr) [[unlikely]] { + ReturnRspWithStatusCode( + pattern, serialization_type, req_id_buf, AIMRT_RPC_STATUS_SVR_SERIALIZATION_FAILED); + + return; + } + const auto* buffer_array_data = buffer_array_view_ptr->Data(); + const size_t buffer_array_len = buffer_array_view_ptr->Size(); + size_t rsp_size = buffer_array_view_ptr->BufferSize(); + + size_t pkg_size = 1 + serialization_type.size() + 4 + 4 + rsp_size; + + std::vector msg_buf_vec(pkg_size); + util::BufferOperator buf_oper(msg_buf_vec.data(), msg_buf_vec.size()); + buf_oper.SetString(serialization_type, util::BufferLenType::kUInt8); + buf_oper.SetBuffer(req_id_buf, sizeof(req_id_buf)); + buf_oper.SetUint32(0); + + for (size_t ii = 0; ii < buffer_array_len; ++ii) { + buf_oper.SetBuffer( + static_cast(buffer_array_data[ii].data), + buffer_array_data[ii].len); + } + + zenoh_manager_ptr_->Publish("rsp/" + pattern, msg_buf_vec.data(), pkg_size); + }; + // call service + service_func_wrapper.service_func(service_invoke_wrapper_ptr); + + } else { + AIMRT_ERROR("Zenoh Plugin Read payload failed!"); + } + } catch (const std::exception& e) { + AIMRT_WARN("Handle zenoh rpc msg failed, exception info: {}", e.what()); + } + }; + zenoh_manager_ptr_->RegisterRpcNode(pattern, std::move(handle), "server"); + return true; + } catch (const std::exception& e) { + AIMRT_ERROR("{}", e.what()); + return false; + } +} + +bool ZenohRpcBackend::RegisterClientFunc( + const runtime::core::rpc::ClientFuncWrapper& client_func_wrapper) noexcept { + try { + if (state_.load() != State::Init) { + AIMRT_ERROR("Client func can only be registered when state is 'Init'."); + return false; + } + + namespace util = aimrt::common::util; + + const auto& info = client_func_wrapper.info; + + std::string pattern = std::string("aimrt_rpc/") + + util::UrlEncode(GetRealFuncName(info.func_name)) + + limit_domain_; + auto handle = [this](const z_loaned_sample_t* message) { + std::shared_ptr client_invoke_wrapper_ptr; + try { + // read data + const z_loaned_bytes_t* payload = z_sample_payload(message); + size_t serialized_size = z_bytes_len(payload); + z_bytes_reader_t reader = z_bytes_get_reader(payload); + std::vector serialized_data(serialized_size); + + auto read_ret = z_bytes_reader_read(&reader, reinterpret_cast(serialized_data.data()), serialized_size); + if (read_ret < 0) { + AIMRT_ERROR("Zenoh Plugin Read payload failed!"); + return; + } + + util::ConstBufferOperator buf_oper(serialized_data.data(), serialized_size); + + std::string serialization_type(buf_oper.GetString(util::BufferLenType::kUInt8)); + uint32_t req_id = buf_oper.GetUint32(); + uint32_t code = buf_oper.GetUint32(); + + auto msg_recorder = client_tool_ptr_->GetRecord(req_id); + if (!msg_recorder) [[unlikely]] { + // can't find recorder, which means timeout + AIMRT_TRACE("Can not get req id {} from recorder.", req_id); + return; + } + + // find record + client_invoke_wrapper_ptr = std::move(*msg_recorder); + + if (code) [[unlikely]] { + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(code)); + return; + } + + const auto& info = client_invoke_wrapper_ptr->info; + + // client rsp deserialize + auto remaining_buf = buf_oper.GetRemainingBuffer(); + aimrt_buffer_view_t buffer_view{ + .data = remaining_buf.data(), + .len = remaining_buf.size()}; + + aimrt_buffer_array_view_t buffer_array_view{ + .data = &buffer_view, + .len = 1}; + + bool deserialize_ret = info.rsp_type_support_ref.Deserialize( + serialization_type, buffer_array_view, client_invoke_wrapper_ptr->rsp_ptr); + + if (!deserialize_ret) { + // deserialize failed + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_DESERIALIZATION_FAILED)); + return; + } + + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_OK)); + return; + } catch (const std::exception& e) { + AIMRT_WARN("Handle zenoh rpc msg failed, exception info: {}", e.what()); + } + + if (client_invoke_wrapper_ptr) + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_BACKEND_INTERNAL_ERROR)); + }; + + zenoh_manager_ptr_->RegisterRpcNode(pattern, std::move(handle), "client"); + } catch (const std::exception& e) { + AIMRT_ERROR("{}", e.what()); + return false; + } + return true; +} + +void ZenohRpcBackend::Invoke( + const std::shared_ptr& client_invoke_wrapper_ptr) noexcept { + try { + if (state_.load() != State::Start) [[unlikely]] { + AIMRT_WARN("Method can only be called when state is 'Start'."); + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_BACKEND_INTERNAL_ERROR)); + return; + } + + namespace util = aimrt::common::util; + + const auto& info = client_invoke_wrapper_ptr->info; + + std::string pattern = std::string("aimrt_rpc/") + + util::UrlEncode(GetRealFuncName(info.func_name)) + + limit_domain_; + + uint32_t cur_req_id = req_id_++; + + auto serialization_type = + client_invoke_wrapper_ptr->ctx_ref.GetMetaValue(AIMRT_RPC_CONTEXT_KEY_SERIALIZATION_TYPE); + + if (serialization_type.size() > 255) [[unlikely]] { + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_UNKNOWN)); + return; + } + + // client req serialize + auto buffer_array_view_ptr = aimrt::runtime::core::rpc::TrySerializeReqWithCache( + *client_invoke_wrapper_ptr, serialization_type); + if (!buffer_array_view_ptr) [[unlikely]] { + // serialize failed + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_SERIALIZATION_FAILED)); + return; + } + + const auto* buffer_array_data = buffer_array_view_ptr->Data(); + const size_t buffer_array_len = buffer_array_view_ptr->Size(); + size_t req_size = buffer_array_view_ptr->BufferSize(); + + // context + const auto& keys = client_invoke_wrapper_ptr->ctx_ref.GetMetaKeys(); + if (keys.size() > 255) [[unlikely]] { + AIMRT_WARN("Too much context meta, require less than 255, but actually {}.", keys.size()); + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_BACKEND_INTERNAL_ERROR)); + return; + } + + std::vector context_meta_kv; + size_t context_meta_kv_size = 1; + for (const auto& key : keys) { + context_meta_kv_size += (2 + key.size()); + context_meta_kv.emplace_back(key); + + auto val = client_invoke_wrapper_ptr->ctx_ref.GetMetaValue(key); + context_meta_kv_size += (2 + val.size()); + context_meta_kv.emplace_back(val); + } + // padding zenoh pkg + size_t z_pkg_size = 1 + serialization_type.size() + + 1 + pattern.size() + + 4 + + context_meta_kv_size + + req_size; + + auto timeout = client_invoke_wrapper_ptr->ctx_ref.Timeout(); + auto record_ptr = client_invoke_wrapper_ptr; + + bool ret = client_tool_ptr_->Record(cur_req_id, timeout, std::move(record_ptr)); + + if (!ret) [[unlikely]] { + AIMRT_ERROR("Failed to record msg."); + client_invoke_wrapper_ptr->callback(aimrt::rpc::Status(AIMRT_RPC_STATUS_CLI_BACKEND_INTERNAL_ERROR)); + return; + } + + std::vector msg_buf_vec(z_pkg_size); + util::BufferOperator buf_oper(msg_buf_vec.data(), msg_buf_vec.size()); + + buf_oper.SetString(serialization_type, util::BufferLenType::kUInt8); + buf_oper.SetString(pattern, util::BufferLenType::kUInt8); + buf_oper.SetUint32(cur_req_id); + + buf_oper.SetUint8(static_cast(keys.size())); + for (const auto& s : context_meta_kv) { + buf_oper.SetString(s, util::BufferLenType::kUInt16); + } + + // data + for (size_t ii = 0; ii < buffer_array_len; ++ii) { + buf_oper.SetBuffer( + static_cast(buffer_array_data[ii].data), + buffer_array_data[ii].len); + } + + // send data + zenoh_manager_ptr_->Publish("req/" + pattern, msg_buf_vec.data(), z_pkg_size); + + } catch (const std::exception& e) { + AIMRT_ERROR("{}", e.what()); + } +} + +void ZenohRpcBackend::RegisterGetExecutorFunc( + const std::function& get_executor_func) { + AIMRT_CHECK_ERROR_THROW( + state_.load() == State::PreInit, + "Method can only be called when state is 'PreInit'."); + get_executor_func_ = get_executor_func; +} + +void ZenohRpcBackend::ReturnRspWithStatusCode( + const std::string& pattern, + std::string_view serialization_type, + const char* req_id_buf, + uint32_t code) { + namespace util = aimrt::common::util; + + int pkg_size = 1 + serialization_type.size() + 4 + 4; + std::vector msg_buf_vec(pkg_size); + util::BufferOperator buf_oper(msg_buf_vec.data(), msg_buf_vec.size()); + + buf_oper.SetString(serialization_type, util::BufferLenType::kUInt8); + buf_oper.SetBuffer(req_id_buf, 4); + buf_oper.SetUint32(code); + + zenoh_manager_ptr_->Publish("rsp/" + pattern, msg_buf_vec.data(), pkg_size); +} + +} // namespace aimrt::plugins::zenoh_plugin \ No newline at end of file diff --git a/src/plugins/zenoh_plugin/zenoh_rpc_backend.h b/src/plugins/zenoh_plugin/zenoh_rpc_backend.h new file mode 100644 index 000000000..4f9a6bf87 --- /dev/null +++ b/src/plugins/zenoh_plugin/zenoh_rpc_backend.h @@ -0,0 +1,79 @@ +// Copyright (c) 2023, AgiBot Inc. +// All rights reserved. + +#pragma once + +#include "aimrt_module_cpp_interface/rpc/rpc_status.h" +#include "aimrt_module_cpp_interface/util/type_support.h" +#include "core/rpc/rpc_backend_base.h" +#include "core/rpc/rpc_backend_tools.h" +#include "core/util/rpc_client_tool.h" +#include "util/buffer_util.h" +#include "util/url_encode.h" +#include "zenoh.h" +#include "zenoh_plugin/zenoh_manager.h" + +namespace aimrt::plugins::zenoh_plugin { +class ZenohRpcBackend : public runtime::core::rpc::RpcBackendBase { + public: + struct Options { + std::string timeout_executor; + }; + + public: + ZenohRpcBackend( + std::shared_ptr& zenoh_manager_ptr, std::string& limit_domain) + : zenoh_manager_ptr_(zenoh_manager_ptr), + limit_domain_(limit_domain) {} + ~ZenohRpcBackend() = default; + + std::string_view Name() const noexcept override { return "zenoh"; } + + void Initialize(YAML::Node options_node) override; + void Start() override; + void Shutdown() override; + + bool RegisterServiceFunc( + const runtime::core::rpc::ServiceFuncWrapper& service_func_wrapper) noexcept override; + bool RegisterClientFunc( + const runtime::core::rpc::ClientFuncWrapper& client_func_wrapper) noexcept override; + void Invoke( + const std::shared_ptr& client_invoke_wrapper_ptr) noexcept override; + + void RegisterGetExecutorFunc(const std::function& get_executor_func); + + private: + static std::string_view GetRealFuncName(std::string_view func_name) { + if (func_name.substr(0, 5) == "ros2:") return func_name.substr(5); + if (func_name.substr(0, 3) == "pb:") return func_name.substr(3); + return func_name; + } + + void ReturnRspWithStatusCode( + const std::string& pattern, + std::string_view serialization_type, + const char* req_id_buf, + uint32_t code); + + enum class State : uint32_t { + PreInit, + Init, + Start, + Shutdown, + }; + + Options options_; + std::atomic state_ = State::PreInit; + const runtime::core::rpc::RpcRegistry* rpc_registry_ptr_ = nullptr; + + std::function get_executor_func_; + + std::atomic_uint32_t req_id_ = 0; + + std::shared_ptr zenoh_manager_ptr_; + std::string limit_domain_; + + std::unique_ptr>> client_tool_ptr_; +}; + +} // namespace aimrt::plugins::zenoh_plugin \ No newline at end of file diff --git a/src/runtime/common/net/asio_http_svr.h b/src/runtime/common/net/asio_http_svr.h index cfb687e7d..5cbff6c1d 100644 --- a/src/runtime/common/net/asio_http_svr.h +++ b/src/runtime/common/net/asio_http_svr.h @@ -293,12 +293,12 @@ class AsioHttpServer : public std::enable_shared_from_this { Session(const Session&) = delete; Session& operator=(const Session&) = delete; - void Initialize(std::shared_ptr session_options_ptr) { + void Initialize(const std::shared_ptr& session_options_ptr) { AIMRT_CHECK_ERROR_THROW( std::atomic_exchange(&state_, SessionState::kInit) == SessionState::kPreInit, "Method can only be called when state is 'PreInit'."); - session_options_ptr_ = std::move(session_options_ptr); + session_options_ptr_ = session_options_ptr; } void Start() { diff --git a/src/runtime/common/net/asio_udp_cli.h b/src/runtime/common/net/asio_udp_cli.h index ada063175..868caba38 100644 --- a/src/runtime/common/net/asio_udp_cli.h +++ b/src/runtime/common/net/asio_udp_cli.h @@ -146,12 +146,12 @@ class AsioUdpClient : public std::enable_shared_from_this { Session(const Session&) = delete; Session& operator=(const Session&) = delete; - void Initialize(std::shared_ptr session_options_ptr) { + void Initialize(const std::shared_ptr& session_options_ptr) { AIMRT_CHECK_ERROR_THROW( std::atomic_exchange(&state_, SessionState::kInit) == SessionState::kPreInit, "Method can only be called when state is 'PreInit'."); - session_options_ptr_ = std::move(session_options_ptr); + session_options_ptr_ = session_options_ptr; } void Start() { diff --git a/src/runtime/common/net/asio_udp_svr.h b/src/runtime/common/net/asio_udp_svr.h index 9cb1088d3..c6b0684d6 100644 --- a/src/runtime/common/net/asio_udp_svr.h +++ b/src/runtime/common/net/asio_udp_svr.h @@ -155,7 +155,7 @@ class AsioUdpServer : public std::enable_shared_from_this { session_ptr_map_.emplace(remote_ep, session_ptr); } - session_ptr->HandleMsg(std::move(msg_buf)); + session_ptr->HandleMsg(msg_buf); } catch (const std::exception& e) { AIMRT_TRACE( @@ -271,12 +271,12 @@ class AsioUdpServer : public std::enable_shared_from_this { Session(const Session&) = delete; Session& operator=(const Session&) = delete; - void Initialize(std::shared_ptr session_options_ptr) { + void Initialize(const std::shared_ptr& session_options_ptr) { AIMRT_CHECK_ERROR_THROW( std::atomic_exchange(&state_, SessionState::kInit) == SessionState::kPreInit, "Method can only be called when state is 'PreInit'."); - session_options_ptr_ = std::move(session_options_ptr); + session_options_ptr_ = session_options_ptr; } void Start() { @@ -345,11 +345,11 @@ class AsioUdpServer : public std::enable_shared_from_this { }); } - void HandleMsg(std::shared_ptr&& msg_buf_ptr) { + void HandleMsg(const std::shared_ptr& msg_buf_ptr) { auto self = shared_from_this(); boost::asio::dispatch( *io_ptr_, - [this, self, msg_buf_ptr{std::move(msg_buf_ptr)}]() { + [this, self, msg_buf_ptr]() { tick_has_data_ = true; (*msg_handle_ptr_)(remote_ep_, msg_buf_ptr); diff --git a/src/runtime/common/net/asio_ws_svr.h b/src/runtime/common/net/asio_ws_svr.h index 0eb712c42..8e101ee4d 100644 --- a/src/runtime/common/net/asio_ws_svr.h +++ b/src/runtime/common/net/asio_ws_svr.h @@ -300,12 +300,12 @@ class AsioWebSocketServer : public std::enable_shared_from_this session_options_ptr) { + void Initialize(const std::shared_ptr& session_options_ptr) { AIMRT_CHECK_ERROR_THROW( std::atomic_exchange(&state_, SessionState::kInit) == SessionState::kPreInit, "Method can only be called when state is 'PreInit'."); - session_options_ptr_ = std::move(session_options_ptr); + session_options_ptr_ = session_options_ptr; } void Start() { diff --git a/src/runtime/core/CMakeLists.txt b/src/runtime/core/CMakeLists.txt index 1db6328be..28fed6d43 100644 --- a/src/runtime/core/CMakeLists.txt +++ b/src/runtime/core/CMakeLists.txt @@ -34,7 +34,8 @@ target_include_directories( # Set link libraries of target target_link_libraries( ${CUR_TARGET_NAME} - PUBLIC Boost::asio + PUBLIC ${CMAKE_DL_LIBS} + Boost::asio yaml-cpp::yaml-cpp TBB::tbb aimrt::interface::aimrt_module_cpp_interface @@ -45,6 +46,9 @@ target_link_libraries( include(AddWerror) add_werror(${CUR_TARGET_NAME}) +# Set version of target +target_compile_definitions(${CUR_TARGET_NAME} PUBLIC AIMRT_VERSION="${AIMRT_VERSION}") + # Set test of target if(AIMRT_BUILD_TESTS AND test_files) add_gtest_target(TEST_TARGET ${CUR_TARGET_NAME} TEST_SRC ${test_files}) diff --git a/src/runtime/core/aimrt_core.cc b/src/runtime/core/aimrt_core.cc index a9f2b31d8..ba666eaf7 100644 --- a/src/runtime/core/aimrt_core.cc +++ b/src/runtime/core/aimrt_core.cc @@ -6,6 +6,7 @@ #include #include +#include "core/util/version.h" #include "core/util/yaml_tools.h" namespace aimrt::runtime::core { @@ -333,6 +334,8 @@ std::string AimRTCore::GenInitializationReport() const { std::stringstream result; result << "\n----------------------- AimRT Initialization Report Begin ----------------------\n\n"; + result << "AimRT Version: " << util::GetAimRTVersion() << "\n\n"; + size_t count = 0; for (auto& itr : report) { ++count; diff --git a/src/runtime/core/module/module_loader.h b/src/runtime/core/module/module_loader.h index 5a41d3ae5..32d84ee49 100644 --- a/src/runtime/core/module/module_loader.h +++ b/src/runtime/core/module/module_loader.h @@ -8,7 +8,7 @@ #include #include "aimrt_module_c_interface/module_base.h" -#include "util/dynamic_lib.h" +#include "core/util/dynamic_lib.h" #include "util/log_util.h" #include "util/string_util.h" diff --git a/src/runtime/core/plugin/plugin_loader.h b/src/runtime/core/plugin/plugin_loader.h index ffdb29acd..072c05fbc 100644 --- a/src/runtime/core/plugin/plugin_loader.h +++ b/src/runtime/core/plugin/plugin_loader.h @@ -6,7 +6,7 @@ #include #include "aimrt_core_plugin_interface/aimrt_core_plugin_base.h" -#include "util/dynamic_lib.h" +#include "core/util/dynamic_lib.h" #include "util/log_util.h" namespace aimrt::runtime::core::plugin { diff --git a/src/common/util/dynamic_lib.h b/src/runtime/core/util/dynamic_lib.h similarity index 100% rename from src/common/util/dynamic_lib.h rename to src/runtime/core/util/dynamic_lib.h diff --git a/src/runtime/core/util/version.h b/src/runtime/core/util/version.h new file mode 100644 index 000000000..79528b7d8 --- /dev/null +++ b/src/runtime/core/util/version.h @@ -0,0 +1,11 @@ +// Copyright (c) 2023, AgiBot Inc. +// All rights reserved. + +#pragma once + +namespace aimrt::runtime::core::util { + +inline const char* GetAimRTVersion() { + return AIMRT_VERSION; +} +} // namespace aimrt::runtime::core::util diff --git a/src/runtime/main/CMakeLists.txt b/src/runtime/main/CMakeLists.txt index 64688068f..5fc01307a 100644 --- a/src/runtime/main/CMakeLists.txt +++ b/src/runtime/main/CMakeLists.txt @@ -37,9 +37,6 @@ target_link_libraries( include(AddWerror) add_werror(${CUR_TARGET_NAME}) -# Add version to target -target_compile_definitions(${CUR_TARGET_NAME} PRIVATE AIMRT_VERSION="${AIMRT_VERSION}") - # Set installation of target if(AIMRT_INSTALL) set_property(TARGET ${CUR_TARGET_NAME} PROPERTY EXPORT_NAME ${CUR_TARGET_ALIAS_NAME}) diff --git a/src/runtime/main/main.cc b/src/runtime/main/main.cc index 5248a084f..d5832c617 100644 --- a/src/runtime/main/main.cc +++ b/src/runtime/main/main.cc @@ -8,6 +8,7 @@ #include "gflags/gflags.h" #include "core/aimrt_core.h" +#include "core/util/version.h" DEFINE_string(cfg_file_path, "", "config file path"); @@ -40,13 +41,14 @@ void SignalHandler(int sig) { }; void PrintVersion() { - std::cout << "AimRT Version: " << AIMRT_VERSION << std::endl; + std::cout << "AimRT Version: " << util::GetAimRTVersion() << std::endl; } void PrintUsage() { std::cout << "OVERVIEW: AimRT is a high-performance runtime framework for modern robotics.\n\n" - "VERSION: " AIMRT_VERSION - "\n\nUSAGE: aimrt_main --cfg_file_path= [options]\n\n" + "VERSION: " + << util::GetAimRTVersion() + << "\n\nUSAGE: aimrt_main --cfg_file_path= [options]\n\n" "OPTIONS:\n\n" "Generic Options:\n\n" " --version - Show version\n" @@ -86,6 +88,7 @@ int32_t main(int32_t argc, char** argv) { } std::cout << "AimRT start." << std::endl; + PrintVersion(); try { AimRTCore core; diff --git a/src/tools/package_aimrt_py/CMakeLists.txt b/src/tools/package_aimrt_py/CMakeLists.txt index ee9cc974b..3b3caf428 100644 --- a/src/tools/package_aimrt_py/CMakeLists.txt +++ b/src/tools/package_aimrt_py/CMakeLists.txt @@ -2,7 +2,7 @@ # All rights reserved. get_target_property(py_files aimrt::runtime::python_runtime PY_FILES) -file(GLOB_RECURSE gencode_file ${CMAKE_SOURCE_DIR}/src/tools/protoc_plugin_py_gen_aimrt_py_rpc/*.py) # TODO +file(GLOB_RECURSE gencode_file ${PROJECT_SOURCE_DIR}/src/tools/protoc_plugin_py_gen_aimrt_py_rpc/*.py) # TODO list(APPEND py_files ${gencode_file}) set(AIMRT_PY_PKG_DIR ${CMAKE_BINARY_DIR}/aimrt_py_pkg) @@ -28,7 +28,7 @@ add_custom_target( create_python_pkg COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/pyproject.toml ${CMAKE_CURRENT_SOURCE_DIR}/setup.py ${CMAKE_CURRENT_SOURCE_DIR}/MANIFEST.in ${AIMRT_PY_PKG_DIR} - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/VERSION ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_SOURCE_DIR}/LICENSE ${AIMRT_PY_PKG_DIR} + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/LICENSE ${AIMRT_PY_PKG_DIR} COMMAND ${Python3_EXECUTABLE} -m build --wheel --no-isolation -v COMMENT "Creating python package" DEPENDS copy_python_runtime @@ -39,7 +39,7 @@ if(AIMRT_BUILD_WITH_ROS2 AND AIMRT_BUILD_ROS2_PLUGIN) endif() include(PluginDetectTool) -get_subdirectories(${CMAKE_SOURCE_DIR}/src/plugins PLUGIN_LIST) +get_subdirectories(${PROJECT_SOURCE_DIR}/src/plugins PLUGIN_LIST) message(STATUS "Detected plugins: ${PLUGIN_LIST}") function(copy_plugin_if_enabled PLUGIN_NAME) diff --git a/test.bat b/test.bat index ddfa8202d..07d7c2e69 100644 --- a/test.bat +++ b/test.bat @@ -30,7 +30,17 @@ cmake -B build ^ -DAIMRT_BUILD_PYTHON_PACKAGE=ON ^ %* +if %errorlevel% neq 0 ( + echo cmake failed + exit /b 1 +) + cmake --build build --config Release --parallel %NUMBER_OF_PROCESSORS% +if %errorlevel% neq 0 ( + echo build failed + exit /b 1 +) + cd build ctest -C Release \ No newline at end of file