Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
don't mark inline the functions that are exported
[simgrid.git] / src / surf / network_ns3.cpp
index 28d43b1..7a62ae1 100644 (file)
@@ -8,6 +8,7 @@
 #include "src/surf/surf_private.h"
 #include "src/surf/host_interface.hpp"
 #include "simgrid/sg_config.h"
+#include "src/surf/platform.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ns3);
 
@@ -39,9 +40,9 @@ static void replace_lat_ns3(char ** lat)
   xbt_free(temp);
 }
 
-static void simgrid_ns3_add_host(simgrid::Host& host)
+static void simgrid_ns3_add_host(simgrid::s4u::Host& host)
 {
-  const char* id = host.getName().c_str();
+  const char* id = host.name().c_str();
   XBT_DEBUG("NS3_ADD_HOST '%s'", id);
   host.extension_set(NS3_EXTENSION_ID, ns3_add_host(id));
 }
@@ -230,13 +231,13 @@ static void parse_ns3_end_platform(void)
 
 static void define_callbacks_ns3(void)
 {
-  simgrid::Host::onCreation.connect(simgrid_ns3_add_host);
-  simgrid::surf::routingEdgeCreatedCallbacks.connect(simgrid_ns3_add_router);
-  sg_platf_link_add_cb (&parse_ns3_add_link);
-  sg_platf_cluster_add_cb (&parse_ns3_add_cluster);
+  simgrid::s4u::Host::onCreation.connect(simgrid_ns3_add_host);
+  simgrid::surf::netcardCreatedCallbacks.connect(simgrid_ns3_add_router);
+  simgrid::surf::on_link.connect (&parse_ns3_add_link);
+  simgrid::surf::on_cluster.connect (&parse_ns3_add_cluster);
   simgrid::surf::asCreatedCallbacks.connect(parse_ns3_add_AS);
-  sg_platf_postparse_add_cb(&create_ns3_topology); //get_one_link_routes
-  sg_platf_postparse_add_cb(&parse_ns3_end_platform); //InitializeRoutes
+  simgrid::surf::on_postparse.connect(&create_ns3_topology); //get_one_link_routes
+  simgrid::surf::on_postparse.connect(&parse_ns3_end_platform); //InitializeRoutes
 }
 
 /*********
@@ -427,7 +428,7 @@ NetworkNS3Link::~NetworkNS3Link()
 {
 }
 
-void NetworkNS3Link::updateState(tmgr_trace_event_t event_type, double value, double date)
+void NetworkNS3Link::updateState(tmgr_trace_iterator_t event_type, double value, double date)
 {
 
 }