Skip to content

Commit

Permalink
Implement rmw_get_gid_for_client.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette committed Feb 19, 2024
1 parent 08f5c30 commit 079b5cc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3542,9 +3542,15 @@ rmw_get_gid_for_publisher(const rmw_publisher_t * publisher, rmw_gid_t * gid)
rmw_ret_t
rmw_get_gid_for_client(const rmw_client_t * client, rmw_gid_t * gid)
{
static_cast<void>(client);
static_cast<void>(gid);
return RMW_RET_UNSUPPORTED;
RMW_CHECK_ARGUMENT_FOR_NULL(client, RMW_RET_INVALID_ARGUMENT);
RMW_CHECK_ARGUMENT_FOR_NULL(gid, RMW_RET_INVALID_ARGUMENT);

rmw_client_data_t * client_data = static_cast<rmw_client_data_t *>(client->data);

gid->implementation_identifier = rmw_zenoh_identifier;
memcpy(gid->data, client_data->client_guid, RMW_GID_STORAGE_SIZE);

return RMW_RET_OK;
}

//==============================================================================
Expand Down

0 comments on commit 079b5cc

Please sign in to comment.