diff --git a/third-party/realdds/py/pyrealdds.cpp b/third-party/realdds/py/pyrealdds.cpp index 4af8316c508..1b63be380e8 100644 --- a/third-party/realdds/py/pyrealdds.cpp +++ b/third-party/realdds/py/pyrealdds.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -120,6 +121,17 @@ json load_rs_settings( json const & local_settings ) } +py::list adapter_list() +{ + auto const ips = realdds::dds_adapter_watcher::current_ips(); + py::list obj( ips.size() ); + int i = 0; + for( auto & ip : ips ) + obj[i++] = ip; + return std::move( obj ); +} + + } // namespace @@ -225,6 +237,9 @@ PYBIND11_MODULE(NAME, m) { m.def( "timestr", []( dds_time t ) { return timestr( t ).to_string(); } ); + m.def( "adapter_list", &adapter_list ); + + py::class_< dds_participant::listener, std::shared_ptr< dds_participant::listener > // handled with a shared_ptr >