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

print router id on startup #189

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions rmw_zenoh_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ install(
add_executable(rmw_zenohd
src/zenohd/main.cpp
src/detail/zenoh_config.cpp
src/detail/liveliness_utils.cpp
)

target_link_libraries(rmw_zenohd
PRIVATE
ament_index_cpp::ament_index_cpp
rcutils::rcutils
rcpputils::rcpputils
rmw::rmw
zenohc::lib
)
Expand Down
5 changes: 4 additions & 1 deletion rmw_zenoh_cpp/src/zenohd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <ament_index_cpp/get_package_share_directory.hpp>

#include "../detail/zenoh_config.hpp"
#include "../detail/liveliness_utils.hpp"

#include "rmw/error_handling.h"

Expand Down Expand Up @@ -188,7 +189,9 @@ int main(int argc, char ** argv)
printf("Unable to open router session!\n");
return 1;
}

printf(
"Started Zenoh router with id: %s.\n",
rmw_zenoh_cpp::liveliness::zid_to_str(z_info_zid(z_session_loan(&s))).c_str());
#ifdef _WIN32
SetConsoleCtrlHandler(quit, TRUE);
#else
Expand Down
Loading