Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
improve verification of crashing programs
[simgrid.git] / src / surf / link_wifi.hpp
1 /* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 #ifndef SURF_LINK_WIFI_HPP_
7 #define SURF_LINK_WIFI_HPP_
8
9 #include "network_cm02.hpp"
10 #include "network_interface.hpp"
11 #include "src/surf/HostImpl.hpp"
12 #include "xbt/string.hpp"
13
14 namespace simgrid {
15 namespace kernel {
16 namespace resource {
17
18 class NetworkWifiLink : public NetworkCm02Link {
19   /** @brief Hold every rates association between host and links (host name, rates id) */
20   std::map<xbt::string, int> host_rates_;
21
22   /** @brief Hold every rates available for this Access Point */
23   // double* rates; FIXME: unused
24
25   /** @brief A link can have several bandwith attach to it (mostly use by wifi model) */
26   std::vector<Metric> bandwidths_;
27
28 public:
29   NetworkWifiLink(NetworkCm02Model* model, const std::string& name, std::vector<double> bandwidths,
30                   s4u::Link::SharingPolicy policy, lmm::System* system);
31
32   void set_host_rate(sg_host_t host, int rate_level);
33 };
34
35 } // namespace resource
36 } // namespace kernel
37 } // namespace simgrid
38
39 #endif