Skip to content
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
11 changes: 11 additions & 0 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,17 @@ typedef struct RMW_PUBLIC_TYPE rmw_subscription_options_s

/// Used to create a content filter options during subscription creation.
rmw_subscription_content_filter_options_t * content_filter_options;

/// Comma-separated list of acceptable buffer backend names for this endpoint.
/**
* NULL, empty string, or "cpu" all mean CPU-only (default for backward compat).
* "any" means all installed backends are acceptable.
* Comma-separated for specific backends, e.g. "cuda,demo".
* CPU is always implicitly acceptable regardless of this value.
* The RMW will validate that each specified backend is installed and will
* report an error if any are not available.
*/
const char * acceptable_buffer_backends;
} rmw_subscription_options_t;

typedef struct RMW_PUBLIC_TYPE rmw_subscription_s
Expand Down
1 change: 1 addition & 0 deletions rmw/src/subscription_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rmw_get_default_subscription_options(void)
.ignore_local_publications = false,
.require_unique_network_flow_endpoints = RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED,
.content_filter_options = NULL,
.acceptable_buffer_backends = NULL,
};
return subscription_options;
}
Expand Down
1 change: 1 addition & 0 deletions rmw/test/test_subscription_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ TEST(rmw_subscription_options, get_default_subscription_options)
options.require_unique_network_flow_endpoints,
RMW_UNIQUE_NETWORK_FLOW_ENDPOINTS_NOT_REQUIRED);
EXPECT_EQ(options.content_filter_options, nullptr);
EXPECT_EQ(options.acceptable_buffer_backends, nullptr);
}