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

Add set/get domain API configuration #14

Closed
wants to merge 3 commits into from
Closed
Changes from all 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
10 changes: 9 additions & 1 deletion rcl/src/rcl/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,14 @@ rcl_node_init(
node->impl->logger_name, "creating logger name failed", goto fail);
#endif // RCL_LOGGING_ENABLED

domain_id = node->impl->options.domain_id;
if (RCL_DEFAULT_DOMAIN_ID != node->impl->options.domain_id) {
domain_id = node->impl->options.domain_id;
} else {
if (RCL_RET_OK != rcl_init_options_get_domain_id(&context->impl->init_options, &domain_id)) {
goto fail;
}
}

if (RCL_DEFAULT_DOMAIN_ID == domain_id) {
if (RCL_RET_OK != rcl_get_default_domain_id(&domain_id)) {
goto fail;
Expand All @@ -273,6 +280,7 @@ rcl_node_init(
if (RMW_DEFAULT_DOMAIN_ID == domain_id) {
domain_id = 0u;
}

RCUTILS_LOG_DEBUG_NAMED(ROS_PACKAGE_NAME, "Using domain ID of '%zu'", domain_id);
node->impl->actual_domain_id = domain_id;

Expand Down