Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Please sonar
[simgrid.git] / src / surf / network_wifi.cpp
index ccbbf0aea83e2312d3a79753f7ce47da1cd43c9b..e9eb61d4272dd692085a97df6d8998b24c3ba3d0 100644 (file)
@@ -18,8 +18,9 @@ namespace resource {
  ************/
 
 NetworkWifiLink::NetworkWifiLink(const std::string& name, std::vector<double> bandwidths, lmm::System* system)
-    : LinkImpl(name, system->constraint_new(this, 1))
+    : LinkImpl(name)
 {
+  this->set_constraint(system->constraint_new(this, 1));
   for (auto bandwidth : bandwidths)
     bandwidths_.push_back({bandwidth, 1.0, nullptr});
 }
@@ -87,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