Skip to content

Commit

Permalink
Bump up zenoh version (#347)
Browse files Browse the repository at this point in the history
* deps: bump up zenoh-cpp and zenoh-c
  • Loading branch information
YuanYuYuan authored Dec 18, 2024
1 parent f683ad8 commit 86ccf3f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions rmw_zenoh_cpp/src/detail/rmw_publisher_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,17 @@ std::shared_ptr<PublisherData> PublisherData::make(
zenoh::KeyExpr pub_ke(entity->topic_info()->topic_keyexpr_);
// Create a Publication Cache if durability is transient_local.
if (adapted_qos_profile.durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL) {
zenoh::Session::PublicationCacheOptions pub_cache_opts =
zenoh::Session::PublicationCacheOptions::create_default();
zenoh::ext::SessionExt::PublicationCacheOptions pub_cache_opts =
zenoh::ext::SessionExt::PublicationCacheOptions::create_default();

pub_cache_opts.history = adapted_qos_profile.depth;
pub_cache_opts.queryable_complete = true;

std::string queryable_prefix = entity->zid();
pub_cache_opts.queryable_prefix = zenoh::KeyExpr(queryable_prefix);

pub_cache = session->declare_publication_cache(pub_ke, std::move(pub_cache_opts), &result);
pub_cache = session->ext().declare_publication_cache(
pub_ke, std::move(pub_cache_opts), &result);

if (result != Z_OK) {
RMW_SET_ERROR_MSG("unable to create zenoh publisher cache");
Expand Down
6 changes: 3 additions & 3 deletions rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ bool SubscriptionData::init()
// TODO(Yadunund): Rely on a separate function to return the sub
// as we start supporting more qos settings.
if (entity_->topic_info()->qos_.durability == RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL) {
zenoh::Session::QueryingSubscriberOptions sub_options =
zenoh::Session::QueryingSubscriberOptions::create_default();
zenoh::ext::SessionExt::QueryingSubscriberOptions sub_options =
zenoh::ext::SessionExt::QueryingSubscriberOptions::create_default();
const std::string selector = "*/" + entity_->topic_info()->topic_keyexpr_;
zenoh::KeyExpr selector_ke(selector);
sub_options.query_keyexpr = std::move(selector_ke);
Expand All @@ -200,7 +200,7 @@ bool SubscriptionData::init()
zenoh::QueryConsolidation(zenoh::ConsolidationMode::Z_CONSOLIDATION_MODE_NONE);

std::weak_ptr<SubscriptionData> data_wp = shared_from_this();
auto sub = context_impl->session()->declare_querying_subscriber(
auto sub = context_impl->session()->ext().declare_querying_subscriber(
sub_ke,
[data_wp](const zenoh::Sample & sample) {
auto sub_data = data_wp.lock();
Expand Down
4 changes: 2 additions & 2 deletions zenoh_cpp_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ set(ZENOHC_CARGO_FLAGS "--no-default-features$<SEMICOLON>--features=shared-memor
# - https://github.com/eclipse-zenoh/zenoh-c/pull/620 (fix ze_querying_subscriber_get API to query newly discovered publishers)
ament_vendor(zenoh_c_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-c.git
VCS_VERSION 42e717ff7b633649f11ebb7800b71d4939cd21c7
VCS_VERSION 2f389597264c200d9ddf72bbabbfea878abd5179
CMAKE_ARGS
"-DZENOHC_CARGO_FLAGS=${ZENOHC_CARGO_FLAGS}"
"-DZENOHC_BUILD_WITH_UNSTABLE_API=TRUE"
Expand All @@ -37,7 +37,7 @@ ament_export_dependencies(zenohc)

ament_vendor(zenoh_cpp_vendor
VCS_URL https://github.com/eclipse-zenoh/zenoh-cpp
VCS_VERSION e8eca99b4eaff0963e52aefd8405909c1552080d
VCS_VERSION c549fbdf54e866b9d8f29c883e66359fcac88ed4
CMAKE_ARGS
-DZENOHCXX_ZENOHC=OFF
)
Expand Down

0 comments on commit 86ccf3f

Please sign in to comment.