Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright headers.
[simgrid.git] / src / surf / plugins / link_energy.cpp
index dbe5c8f..062502b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017, 2018. The SimGrid Team. All rights reserved.               */
+/* Copyright (c) 2017-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -145,10 +145,11 @@ double LinkEnergy::getConsumedEnergy()
 using simgrid::plugin::LinkEnergy;
 
 /* **************************** events  callback *************************** */
-static void onCommunicate(simgrid::surf::NetworkAction* action, simgrid::s4u::Host* src, simgrid::s4u::Host* dst)
+static void onCommunicate(simgrid::kernel::resource::NetworkAction* action, simgrid::s4u::Host* src,
+                          simgrid::s4u::Host* dst)
 {
   XBT_DEBUG("onCommunicate is called");
-  for (simgrid::surf::LinkImpl* link : action->links()) {
+  for (simgrid::kernel::resource::LinkImpl* link : action->links()) {
 
     if (link == nullptr)
       continue;
@@ -206,8 +207,8 @@ void sg_link_energy_plugin_init()
                link.extension<LinkEnergy>()->getConsumedEnergy());
   });
 
-  simgrid::s4u::Link::onCommunicationStateChange.connect([](simgrid::surf::NetworkAction* action) {
-    for (simgrid::surf::LinkImpl* link : action->links()) {
+  simgrid::s4u::Link::onCommunicationStateChange.connect([](simgrid::kernel::resource::NetworkAction* action) {
+    for (simgrid::kernel::resource::LinkImpl* link : action->links()) {
       if (link != nullptr)
         link->piface_.extension<LinkEnergy>()->update();
     }