Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u::NetZone::create_router.
authorBruno Donassolo <bruno.donassolo@inria.fr>
Thu, 15 Apr 2021 13:33:43 +0000 (15:33 +0200)
committerBruno Donassolo <bruno.donassolo@inria.fr>
Thu, 15 Apr 2021 13:33:43 +0000 (15:33 +0200)
Export create_router to s4u so we can use in C++ platforms.

include/simgrid/s4u/NetZone.hpp
src/s4u/s4u_Netzone.cpp

index 08e9c2a..4964591 100644 (file)
@@ -123,6 +123,13 @@ public:
   /** @brief Create a link (string version) */
   s4u::Link* create_link(const std::string& name, const std::vector<std::string>& bandwidths);
 
+  /**
+   * @brief Make a router within that NetZone
+   *
+   * @param name Router name
+   */
+  kernel::routing::NetPoint* create_router(const std::string& name);
+
   /** @brief Seal this netzone configuration */
   NetZone* seal();
 
index 377577d..2298be5 100644 (file)
@@ -174,6 +174,11 @@ s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::
   return create_link(name, bw);
 }
 
+kernel::routing::NetPoint* NetZone::create_router(const std::string& name)
+{
+  return kernel::actor::simcall([this, &name] { return pimpl_->create_router(name); });
+}
+
 } // namespace s4u
 } // namespace simgrid