X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a39a90a68780cd9dd43fadcacf9bce1d3c3df26d..c7105342b4fb5087b59c68f45dd347537cb58ef6:/src/surf/network_wifi.cpp diff --git a/src/surf/network_wifi.cpp b/src/surf/network_wifi.cpp index 8fd7e08051..e9eb61d427 100644 --- a/src/surf/network_wifi.cpp +++ b/src/surf/network_wifi.cpp @@ -17,10 +17,10 @@ namespace resource { * Resource * ************/ -NetworkWifiLink::NetworkWifiLink(NetworkCm02Model* model, const std::string& name, std::vector bandwidths, - lmm::System* system) - : LinkImpl(model, name, system->constraint_new(this, 1)) +NetworkWifiLink::NetworkWifiLink(const std::string& name, std::vector bandwidths, lmm::System* system) + : LinkImpl(name) { + this->set_constraint(system->constraint_new(this, 1)); for (auto bandwidth : bandwidths) bandwidths_.push_back({bandwidth, 1.0, nullptr}); } @@ -88,10 +88,14 @@ void NetworkWifiLink::refresh_decay_bandwidths(){ bool NetworkWifiLink::toggle_decay_model(){ use_decay_model_=!use_decay_model_; - return(use_decay_model_); + return use_decay_model_; } - +LinkImpl* NetworkWifiLink::set_latency(double value) +{ + xbt_assert(value == 0, "Latency cannot be set for WiFi Links."); + return this; +} } // namespace resource } // namespace kernel } // namespace simgrid