Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching subscriptions to consider only remote ones #8

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion zenoh-plugin-ros2dds/src/route_publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ impl RoutePublisher<'_> {
let publisher: Arc<Publisher<'static>> = context
.zsession
.declare_publisher(zenoh_key_expr.clone())
.allowed_destination(Locality::Remote)
.congestion_control(congestion_ctrl)
.res_async()
.await
Expand Down Expand Up @@ -508,7 +509,7 @@ fn deactivate_dds_reader(

fn do_route_message(sample: &DDSRawSample, publisher: &Arc<Publisher>, route_id: &str) {
if *LOG_PAYLOAD {
log::trace!("{route_id}: routing message - payload: {:02x?}", sample);
log::debug!("{route_id}: routing message - payload: {:02x?}", sample);
} else {
log::trace!("{route_id}: routing message - {} bytes", sample.len());
}
Expand Down
4 changes: 2 additions & 2 deletions zenoh-plugin-ros2dds/src/route_service_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn do_route_request(
zenoh_req_buf.push_zslice(slice.subslice(20, slice.len()).unwrap());

if *LOG_PAYLOAD {
log::trace!("{route_id}: routing request {request_id:02x?} to Zenoh - payload: {zenoh_req_buf:02x?}");
log::debug!("{route_id}: routing request {request_id:02x?} to Zenoh - payload: {zenoh_req_buf:02x?}");
} else {
log::trace!(
"{route_id}: routing request {request_id:02x?} to Zenoh - {} bytes",
Expand Down Expand Up @@ -330,7 +330,7 @@ fn do_route_reply(route_id: String, reply: Reply, request_id: [u8; 16], rep_writ
dds_rep_buf.extend_from_slice(&zenoh_rep_buf[4..]);

if *LOG_PAYLOAD {
log::trace!("{route_id}: routing reply for {request_id:02x?} to Client - payload: {dds_rep_buf:02x?}");
log::debug!("{route_id}: routing reply for {request_id:02x?} to Client - payload: {dds_rep_buf:02x?}");
} else {
log::trace!(
"{route_id}: routing reply for {request_id:02x?} to Client - {} bytes",
Expand Down
4 changes: 2 additions & 2 deletions zenoh-plugin-ros2dds/src/route_service_srv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ fn do_route_request(
};

if *LOG_PAYLOAD {
log::trace!("{route_id}: routing request #{n} to Service - payload: {dds_req_buf:02x?}");
log::debug!("{route_id}: routing request #{n} to Service - payload: {dds_req_buf:02x?}");
} else {
log::trace!(
"{route_id}: routing request #{n} to Service - {} bytes",
Expand Down Expand Up @@ -448,7 +448,7 @@ fn do_route_reply(
zenoh_rep_buf.push_zslice(slice.subslice(20, slice.len()).unwrap());

if *LOG_PAYLOAD {
log::trace!("{route_id}: routing reply #{seq_num} to Client - payload: {zenoh_rep_buf:02x?}");
log::debug!("{route_id}: routing reply #{seq_num} to Client - payload: {zenoh_rep_buf:02x?}");
} else {
log::trace!(
"{route_id}: routing reply #{seq_num} to Client - {} bytes",
Expand Down
2 changes: 1 addition & 1 deletion zenoh-plugin-ros2dds/src/route_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl RouteSubscriber<'_> {

fn do_route_data(s: Sample, ros2_name: &str, data_writer: dds_entity_t) {
if *LOG_PAYLOAD {
log::trace!(
log::debug!(
"Route Subscriber (Zenoh:{} -> ROS:{}): routing data - payload: {:02x?}",
s.key_expr,
&ros2_name,
Expand Down
Loading