Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make WifiLink depend on LinkImpl directly
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 21 Oct 2019 12:13:47 +0000 (14:13 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 21 Oct 2019 12:13:47 +0000 (14:13 +0200)
src/surf/network_wifi.cpp
src/surf/network_wifi.hpp

index 50529b3..10eb70b 100644 (file)
@@ -19,13 +19,12 @@ namespace resource {
 
 NetworkWifiLink::NetworkWifiLink(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
                                  lmm::System* system)
-    : NetworkCm02Link(model, name, 1 / sg_bandwidth_factor, 0, s4u::Link::SharingPolicy::WIFI, system)
-//   : LinkImpl(model, name, system->constraint_new(this, 1))
+    : LinkImpl(model, name, system->constraint_new(this, 1))
 {
   for (auto bandwidth : bandwidths)
     bandwidths_.push_back({bandwidth, 1.0, nullptr});
 
-  //  simgrid::s4u::Link::on_creation(this->piface_);
+  simgrid::s4u::Link::on_creation(this->piface_);
 }
 
 void NetworkWifiLink::set_host_rate(s4u::Host* host, int rate_level)
index a1cd907..c84527b 100644 (file)
@@ -19,7 +19,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-class NetworkWifiLink : public NetworkCm02Link {
+class NetworkWifiLink : public LinkImpl {
   /** @brief Hold every rates association between host and links (host name, rates id) */
   std::map<xbt::string, int> host_rates_;