1 /* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/surf/link_wifi.hpp"
12 NetworkWifiLink::NetworkWifiLink(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
13 s4u::Link::SharingPolicy policy, lmm::System* system)
14 : NetworkCm02Link(model, name, 0, 0, policy, system)
16 for (auto bandwith : bandwidths) {
17 bandwidths_.push_back({bandwith, 1.0, nullptr});
21 void NetworkWifiLink::set_host_rate(sg_host_t host, int rate_level)
23 host_rates_.insert(std::make_pair(host->get_name(), rate_level));
25 } // namespace resource
27 } // namespace simgrid