From c199a3936b13b2cc521c006ac538af329edac3ad Mon Sep 17 00:00:00 2001 From: yuanyuyuan Date: Wed, 22 Jan 2025 16:40:27 +0800 Subject: [PATCH] style: ament_cpplint + ament_uncrustify --- rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp | 11 +++++++---- rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp index 5a1937c8..ce3e6b36 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp @@ -115,16 +115,19 @@ std::shared_ptr PublisherData::make( adv_pub_opts.publisher_detection = true; } - if (adapted_qos_profile.durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL - || adapted_qos_profile.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) { + if (adapted_qos_profile.durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL || + adapted_qos_profile.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) + { adv_pub_opts.cache = AdvancedPublisherOptions::CacheOptions::create_default(); adv_pub_opts.cache->max_samples = adapted_qos_profile.depth; } if (adapted_qos_profile.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) { // Allow matching Subscribers to detect lost samples and ask for retransimission. - adv_pub_opts.sample_miss_detection = AdvancedPublisherOptions::SampleMissDetectionOptions::create_default(); - // The period of publisher heartbeats in ms, used by ``AdvancedSubscriber`` with heartbeat-based recovery enabled for missed sample retransimission. + adv_pub_opts.sample_miss_detection = + AdvancedPublisherOptions::SampleMissDetectionOptions::create_default(); + // The period of publisher heartbeats in ms, used by ``AdvancedSubscriber`` with + // heartbeat-based recovery enabled for missed sample retransimission. adv_pub_opts.sample_miss_detection->heartbeat_period_ms = 1000; } diff --git a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp index cdf0d36c..695c98a5 100644 --- a/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp +++ b/rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp @@ -184,14 +184,15 @@ bool SubscriptionData::init() // Enable detection of late joiner publishers and query for their historical data. adv_sub_opts.history->detect_late_publishers = true; adv_sub_opts.history->max_samples = entity_->topic_info()->qos_.depth; - } if (entity_->topic_info()->qos_.reliability == RMW_QOS_POLICY_RELIABILITY_RELIABLE) { - // Retransmission of detected lost Samples. This requires publishers to enable caching and sample_miss_detection. + // Retransmission of detected lost Samples. This requires publishers to enable caching + // and sample_miss_detection. adv_sub_opts.recovery = AdvancedSubscriberOptions::RecoveryOptions::create_default(); // Heartbeat-based last sample detection. - adv_sub_opts.recovery->last_sample_miss_detection = AdvancedSubscriberOptions::RecoveryOptions::Heartbeat{}; + adv_sub_opts.recovery->last_sample_miss_detection = + AdvancedSubscriberOptions::RecoveryOptions::Heartbeat{}; } std::weak_ptr data_wp = shared_from_this();