From 3f7bd895f10eb1d085e981f0d6d2682118181a98 Mon Sep 17 00:00:00 2001 From: Sebastian Jakymiw Date: Mon, 9 Jan 2023 11:35:15 -0500 Subject: [PATCH] add dynamic network notify function Signed-off-by: Sebastian Jakymiw --- rcl/include/rcl/node.h | 5 +++++ rcl/src/rcl/node.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/rcl/include/rcl/node.h b/rcl/include/rcl/node.h index b9b864358..6c101788c 100644 --- a/rcl/include/rcl/node.h +++ b/rcl/include/rcl/node.h @@ -549,6 +549,11 @@ RCL_PUBLIC rcl_ret_t rcl_get_disable_loaned_message(bool * disable_loaned_message); +RCL_PUBLIC +RCL_WARN_UNUSED +rcl_ret_t +rcl_notify_participant_dynamic_network_interface(rcl_context_t * context); + #ifdef __cplusplus } #endif diff --git a/rcl/src/rcl/node.c b/rcl/src/rcl/node.c index 4afc40f53..d6db89cf5 100644 --- a/rcl/src/rcl/node.c +++ b/rcl/src/rcl/node.c @@ -536,6 +536,16 @@ rcl_get_disable_loaned_message(bool * disable_loaned_message) *disable_loaned_message = (strcmp(env_val, "1") == 0); return RCL_RET_OK; } + +rcl_ret_t +rcl_notify_participant_dynamic_network_interface(rcl_context_t * context) +{ + if(!rcl_context_is_valid(context)) + { + return RCL_RET_NODE_INVALID; + } + return rmw_notify_participant_dynamic_network_interface(&(context->impl->rmw_context)); +} #ifdef __cplusplus } #endif