X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c04075c49b6bc68df4f37240b4ac53e7a108abaa..f9b13d923d31bb0336aeeaab6d5b7ba33812f3f7:/src/plugins/link_energy_wifi.cpp diff --git a/src/plugins/link_energy_wifi.cpp b/src/plugins/link_energy_wifi.cpp index bee75ade7b..2a57a2b21f 100644 --- a/src/plugins/link_energy_wifi.cpp +++ b/src/plugins/link_energy_wifi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2017-2022. 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. */ @@ -8,8 +8,8 @@ #include #include "src/kernel/activity/CommImpl.hpp" -#include "src/surf/network_interface.hpp" -#include "src/surf/network_wifi.hpp" +#include "src/kernel/resource/StandardLinkImpl.hpp" +#include "src/kernel/resource/WifiLinkImpl.hpp" #include #include @@ -20,14 +20,14 @@ SIMGRID_REGISTER_PLUGIN(link_energy_wifi, "Energy wifi test", &sg_wifi_energy_pl * This is the WiFi energy plugin, accounting for the dissipated energy of WiFi links. */ -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy_wifi, surf, "Logging specific to the link energy wifi plugin"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(link_energy_wifi, kernel, "Logging specific to the link energy wifi plugin"); namespace simgrid { namespace plugin { class XBT_PRIVATE LinkEnergyWifi { // associative array keeping size of data already sent for a given flow (required for interleaved actions) - std::map> flowTmp{}; + std::map> flowTmp{}; // WiFi link the plugin instance is attached to s4u::Link* link_{}; @@ -98,7 +98,7 @@ xbt::Extension LinkEnergyWifi::EXTENSION_ID; void LinkEnergyWifi::update_destroy() { - auto const* wifi_link = static_cast(link_->get_impl()); + auto const* wifi_link = static_cast(link_->get_impl()); double duration = simgrid::s4u::Engine::get_clock() - prev_update_; prev_update_ = simgrid::s4u::Engine::get_clock(); @@ -122,7 +122,7 @@ void LinkEnergyWifi::update() if(duration < 1e-6) return; - auto const* wifi_link = static_cast(link_->get_impl()); + auto const* wifi_link = static_cast(link_->get_impl()); const kernel::lmm::Element* elem = nullptr; @@ -137,7 +137,7 @@ void LinkEnergyWifi::update() */ double durUsage = 0; while (const auto* var = wifi_link->get_constraint()->get_variable(&elem)) { - auto* action = static_cast(var->get_id()); + auto* action = static_cast(var->get_id()); XBT_DEBUG("cost: %f action value: %f link rate 1: %f link rate 2: %f", action->get_cost(), action->get_rate(), wifi_link->get_host_rate(&action->get_src()), wifi_link->get_host_rate(&action->get_dst()));