X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/38f246c4c46920a78ea0af8233449f402c178f04..3667666354096f7b49be2bac1f9f7e789197b91b:/src/surf/network_constant.cpp diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 7d36babf7f..4f6e486575 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -1,14 +1,14 @@ -/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-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. */ -#include "network_constant.hpp" -#include "simgrid/kernel/routing/NetZoneImpl.hpp" -#include "simgrid/s4u/Engine.hpp" +#include +#include + #include "src/kernel/EngineImpl.hpp" +#include "src/surf/network_constant.hpp" #include "src/surf/surf_interface.hpp" -#include "surf/surf.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network); @@ -27,7 +27,7 @@ namespace simgrid { namespace kernel { namespace resource { -LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector& /*bandwidth*/) +StandardLinkImpl* NetworkConstantModel::create_link(const std::string& name, const std::vector& /*bandwidth*/) { xbt_die("Refusing to create the link %s: there is no link in the Constant network model. " "Please remove any link from your platform (and switch to routing='None')", @@ -35,7 +35,7 @@ LinkImpl* NetworkConstantModel::create_link(const std::string& name, const std:: return nullptr; } -LinkImpl* NetworkConstantModel::create_wifi_link(const std::string& name, const std::vector& bandwidths) +StandardLinkImpl* NetworkConstantModel::create_wifi_link(const std::string& name, const std::vector& bandwidths) { return create_link(name, bandwidths); } @@ -75,10 +75,7 @@ void NetworkConstantModel::update_actions_state(double /*now*/, double delta) Action* NetworkConstantModel::communicate(s4u::Host* src, s4u::Host* dst, double size, double /*rate*/) { - auto* action = new NetworkConstantAction(this, *src, *dst, size); - - s4u::Link::on_communicate(*action); - return action; + return (new NetworkConstantAction(this, *src, *dst, size)); } /**********