Skip to content

Commit

Permalink
Merge commit '7450bb26cfbf8e811c9404d5e535dfd5f51402ae'
Browse files Browse the repository at this point in the history
Conflicts:
	rmw_zenoh_cpp/src/detail/rmw_context_impl_s.cpp
	rmw_zenoh_cpp/src/detail/rmw_context_impl_s.hpp
	rmw_zenoh_cpp/src/detail/shm_context.hpp
  • Loading branch information
yellowhatter committed Nov 20, 2024
2 parents 3054ba6 + 7450bb2 commit 50e4b69
Show file tree
Hide file tree
Showing 26 changed files with 1,342 additions and 1,217 deletions.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ add_library(rmw_zenoh_cpp SHARED
src/detail/logging.cpp
src/detail/message_type_support.cpp
src/detail/qos.cpp
src/detail/rmw_client_data.cpp
src/detail/rmw_context_impl_s.cpp
src/detail/rmw_data_types.cpp
src/detail/rmw_publisher_data.cpp
src/detail/rmw_node_data.cpp
src/detail/rmw_service_data.cpp
Expand Down
8 changes: 4 additions & 4 deletions rmw_zenoh_cpp/src/detail/attachment_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace rmw_zenoh_cpp
{

attachement_data_t::attachement_data_t(
attachment_data_t::attachment_data_t(
const int64_t _sequence_number,
const int64_t _source_timestamp,
const uint8_t _source_gid[RMW_GID_STORAGE_SIZE])
Expand All @@ -37,14 +37,14 @@ attachement_data_t::attachement_data_t(
memcpy(source_gid, _source_gid, RMW_GID_STORAGE_SIZE);
}

attachement_data_t::attachement_data_t(attachement_data_t && data)
attachment_data_t::attachment_data_t(attachment_data_t && data)
{
sequence_number = std::move(data.sequence_number);
source_timestamp = std::move(data.source_timestamp);
memcpy(source_gid, data.source_gid, RMW_GID_STORAGE_SIZE);
}

void attachement_data_t::serialize_to_zbytes(z_owned_bytes_t * attachment)
void attachment_data_t::serialize_to_zbytes(z_owned_bytes_t * attachment)
{
ze_owned_serializer_t serializer;
ze_serializer_empty(&serializer);
Expand All @@ -57,7 +57,7 @@ void attachement_data_t::serialize_to_zbytes(z_owned_bytes_t * attachment)
ze_serializer_finish(z_move(serializer), attachment);
}

attachement_data_t::attachement_data_t(const z_loaned_bytes_t * attachment)
attachment_data_t::attachment_data_t(const z_loaned_bytes_t * attachment)
{
ze_deserializer_t deserializer = ze_deserializer_from_bytes(attachment);
z_owned_string_t key;
Expand Down
8 changes: 4 additions & 4 deletions rmw_zenoh_cpp/src/detail/attachment_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
namespace rmw_zenoh_cpp
{

class attachement_data_t final
class attachment_data_t final
{
public:
explicit attachement_data_t(
explicit attachment_data_t(
const int64_t _sequence_number,
const int64_t _source_timestamp,
const uint8_t _source_gid[RMW_GID_STORAGE_SIZE]);
explicit attachement_data_t(const z_loaned_bytes_t *);
explicit attachement_data_t(attachement_data_t && data);
explicit attachment_data_t(const z_loaned_bytes_t *);
explicit attachment_data_t(attachment_data_t && data);

int64_t sequence_number;
int64_t source_timestamp;
Expand Down
9 changes: 4 additions & 5 deletions rmw_zenoh_cpp/src/detail/graph_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include "graph_cache.hpp"
#include "logging_macros.hpp"
#include "rmw_data_types.hpp"

namespace rmw_zenoh_cpp
{
Expand Down Expand Up @@ -1182,15 +1181,15 @@ rmw_ret_t GraphCache::get_entities_info_by_topic(

///=============================================================================
rmw_ret_t GraphCache::service_server_is_available(
const char * service_name,
const char * service_type,
const liveliness::TopicInfo & client_topic_info,
bool * is_available) const
{
*is_available = false;
std::lock_guard<std::mutex> lock(graph_mutex_);
GraphNode::TopicMap::const_iterator service_it = graph_services_.find(service_name);
GraphNode::TopicMap::const_iterator service_it = graph_services_.find(client_topic_info.name_);
if (service_it != graph_services_.end()) {
GraphNode::TopicTypeMap::const_iterator type_it = service_it->second.find(service_type);
GraphNode::TopicTypeMap::const_iterator type_it =
service_it->second.find(client_topic_info.type_);
if (type_it != service_it->second.end()) {
for (const auto & [_, topic_data] : type_it->second) {
if (topic_data->subs_.size() > 0) {
Expand Down
3 changes: 1 addition & 2 deletions rmw_zenoh_cpp/src/detail/graph_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ class GraphCache final
rmw_topic_endpoint_info_array_t * endpoints_info) const;

rmw_ret_t service_server_is_available(
const char * service_name,
const char * service_type,
const liveliness::TopicInfo & client_topic_info,
bool * is_available) const;

/// Set a qos event callback for an entity from the current session.
Expand Down
Loading

0 comments on commit 50e4b69

Please sign in to comment.