File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,14 @@ RCLCPP_PUBLIC
330
330
std::vector<const char *>
331
331
get_c_vector_string (const std::vector<std::string> & strings_in);
332
332
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
+
333
341
} // namespace rclcpp
334
342
335
343
#endif // RCLCPP__UTILITIES_HPP_
Original file line number Diff line number Diff line change 26
26
27
27
#include " rcl/error_handling.h"
28
28
#include " rcl/rcl.h"
29
+ #include " rcl/node.h"
29
30
30
31
namespace rclcpp
31
32
{
@@ -227,4 +228,15 @@ get_c_vector_string(const std::vector<std::string> & strings_in)
227
228
return cstrings;
228
229
}
229
230
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
+
230
242
} // namespace rclcpp
You can’t perform that action at this time.
0 commit comments