Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a add_route with s4u::Link instead of LinkInRoute
[simgrid.git] / examples / cpp / comm-failure / s4u-comm-failure.cpp
index 8544a4c..0ce5522 100644 (file)
@@ -82,12 +82,11 @@ int main(int argc, char** argv)
   auto* host1 = zone->create_host("Host1", "1f");
   auto* host2 = zone->create_host("Host2", "1f");
   auto* host3 = zone->create_host("Host3", "1f");
+  auto* link2 = zone->create_link("linkto2", "1bps")->seal();
+  auto* link3 = zone->create_link("linkto3", "1bps")->seal();
 
-  sg4::LinkInRoute linkto2{zone->create_link("linkto2", "1bps")->seal()};
-  sg4::LinkInRoute linkto3{zone->create_link("linkto3", "1bps")->seal()};
-
-  zone->add_route(host1, host2, {linkto2}, false);
-  zone->add_route(host1, host3, {linkto3}, false);
+  zone->add_route(host1, host2, {link2});
+  zone->add_route(host1, host3, {link3});
   zone->seal();
 
   sg4::Actor::create("Sender", host1, Sender("mailbox2", "mailbox3"));