1 /* Copyright (c) 2019-2020. 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 #ifndef SURF_NETWORK_WIFI_HPP_
7 #define SURF_NETWORK_WIFI_HPP_
11 #include "network_cm02.hpp"
12 #include "xbt/string.hpp"
22 class NetworkWifiLink : public LinkImpl {
23 /** @brief Hold every rates association between host and links (host name, rates id) */
24 std::map<xbt::string, int> host_rates_;
26 /** @brief A link can have several bandwith attach to it (mostly use by wifi model) */
27 std::vector<Metric> bandwidths_;
30 NetworkWifiLink(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
33 void set_host_rate(const s4u::Host* host, int rate_level);
34 /** @brief Get the AP rate associated to the host (or -1 if not associated to the AP) */
35 double get_host_rate(const s4u::Host* host);
37 s4u::Link::SharingPolicy get_sharing_policy() override;
38 void apply_event(kernel::profile::Event*, double) override { THROW_UNIMPLEMENTED; }
39 void set_bandwidth(double) override { THROW_UNIMPLEMENTED; }
40 void set_latency(double) override { THROW_UNIMPLEMENTED; }
43 } // namespace resource
45 } // namespace simgrid
46 #endif /* SURF_NETWORK_WIFI_HPP_ */