-/* 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. */
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;
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();
}