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 alternative domain API configuration #186

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions rmw_microxrcedds_c/src/rmw_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ rmw_init(
return RMW_RET_INCORRECT_RMW_IMPLEMENTATION);
context->instance_id = options->instance_id;
context->implementation_identifier = eprosima_microxrcedds_identifier;
context->options.domain_id = options->domain_id;

rmw_uxrce_init_session_memory(&session_memory, custom_sessions, RMW_UXRCE_MAX_SESSIONS);
rmw_uxrce_init_static_input_buffer_memory(
Expand Down
4 changes: 3 additions & 1 deletion rmw_microxrcedds_c/src/rmw_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,16 @@ rmw_create_node(
size_t domain_id,
bool localhost_only)
{
(void)context;
(void)localhost_only;
rmw_node_t * rmw_node = NULL;
if (!name || strlen(name) == 0) {
RMW_SET_ERROR_MSG("name is null");
} else if (!namespace_ || strlen(namespace_) == 0) {
RMW_SET_ERROR_MSG("namespace is null");
} else {
if (domain_id == 0 && context->options.domain_id != 0) {
domain_id = context->options.domain_id;
}
rmw_node = create_node(name, namespace_, domain_id, context);
}
return rmw_node;
Expand Down