forked from AimRT/AimRT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: zenoh plugin with shm (AimRT#96)
* add zenoh-shm API * use zenoh shm-api for channel and rpc * set z_alloc_result as a local variable. * add zenoh_buffer_array_allocator * avoid copy opreation when pub data with shm * if shm pool size is not enough, use net buffer instead * add z_pub_shm_size_map_ to store topic-loan_size * little fix * remove client send data 's copying * remove server send data 's copy * add doc * change benchamrk item * minor modification --------- Co-authored-by: hanjun <hanjun@agibot.com>
- Loading branch information
1 parent
5c0e63c
commit 062ffad
Showing
29 changed files
with
1,378 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...nstall/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_pub_with_shm_cfg.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# 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 | ||
shm_pool_size: 10240000 | ||
log: | ||
core_lvl: INFO # Trace/Debug/Info/Warn/Error/Fatal/Off | ||
backends: | ||
- type: console | ||
executor: | ||
executors: | ||
- name: publish_control_executor | ||
type: simple_thread | ||
- name: publish_executor_0 | ||
type: simple_thread | ||
- name: publish_executor_1 | ||
type: simple_thread | ||
- name: publish_executor_2 | ||
type: simple_thread | ||
- name: publish_executor_3 | ||
type: simple_thread | ||
channel: | ||
backends: | ||
- type: zenoh | ||
options: | ||
pub_topics_options: | ||
- topic_name: "(.*)" | ||
shm_enabled: true | ||
pub_topics_options: | ||
- topic_name: "(.*)" | ||
enable_backends: [zenoh] | ||
module: | ||
pkgs: | ||
- path: ./libpb_chn_pub_pkg.so | ||
enable_modules: [BenchmarkPublisherModule] | ||
modules: | ||
- name: BenchmarkPublisherModule | ||
log_lvl: INFO | ||
|
||
# Module custom configuration | ||
BenchmarkPublisherModule: | ||
max_topic_number: 4 | ||
bench_plans: | ||
- channel_frq: 1000 | ||
msg_size: 512 | ||
topic_number: 4 | ||
msg_count: 5000 | ||
- channel_frq: 1000 | ||
msg_size: 4096 | ||
topic_number: 1 | ||
msg_count: 1000 |
32 changes: 32 additions & 0 deletions
32
...nstall/linux/bin/cfg/examples_plugins_zenoh_plugin_pb_chn_benchmark_sub_with_shm_cfg.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: [BenchmarkSubscriberModule] | ||
modules: | ||
- name: BenchmarkSubscriberModule | ||
log_lvl: INFO | ||
|
||
# Module custom configuration | ||
BenchmarkSubscriberModule: | ||
max_topic_number: 4 |
Oops, something went wrong.