File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,14 @@ RCLCPP_PUBLIC
330330std::vector<const char *>
331331get_c_vector_string (const std::vector<std::string> & strings_in);
332332
333+ // / Call dds to notify about new network interfaces.
334+ /* *
335+ * \param[in] context is the default ROS context.
336+ */
337+ RCLCPP_PUBLIC
338+ void
339+ notify_new_networks (Context::SharedPtr context);
340+
333341} // namespace rclcpp
334342
335343#endif // RCLCPP__UTILITIES_HPP_
Original file line number Diff line number Diff line change 2626
2727#include " rcl/error_handling.h"
2828#include " rcl/rcl.h"
29+ #include " rcl/node.h"
2930
3031namespace rclcpp
3132{
@@ -227,4 +228,15 @@ get_c_vector_string(const std::vector<std::string> & strings_in)
227228 return cstrings;
228229}
229230
231+ void
232+ notify_new_networks (Context::SharedPtr context)
233+ {
234+ rcl_ret_t ret = rcl_notify_participant_dynamic_network_interface (context->get_rcl_context ().get ());
235+ if (RCL_RET_OK != ret)
236+ {
237+ exceptions::throw_from_rcl_error (
238+ ret, " failed to notify networks" );
239+ }
240+ }
241+
230242} // namespace rclcpp
You can’t perform that action at this time.
0 commit comments