--- /dev/null
+/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include "src/surf/link_wifi.hpp"
+
+namespace simgrid {
+namespace kernel {
+namespace resource {
+
+void NetworkWifiLink::set_host_rate(sg_host_t host, int rate_level)
+{
+ host_rates.insert(std::make_pair(host->get_name(), rate_level));
+}
+} // namespace resource
+} // namespace kernel
+} // namespace simgrid
--- /dev/null
+/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#ifndef SURF_LINK_WIFI_HPP_
+#define SURF_LINK_WIFI_HPP_
+
+#include "network_cm02.hpp"
+#include "network_interface.hpp"
+#include "src/surf/HostImpl.hpp"
+#include "xbt/string.hpp"
+
+namespace simgrid {
+namespace kernel {
+namespace resource {
+
+class NetworkWifiLink : public NetworkCm02Link {
+ /** @brief Hold every rates association between host and links (host name, rates id) */
+ std::map<xbt::string, int> host_rates;
+
+ /** @brief Hold every rates available for this Access Point */
+ double* rates;
+
+public:
+ void set_host_rate(sg_host_t host, int rate_level);
+};
+
+} // namespace resource
+} // namespace kernel
+} // namespace simgrid
+
+#endif
: NetworkCm02Link(model, name, 0, 0, policy, system)
{
/* Setup Metrics for bandwidths_ */
- for (auto bandwith : bandwidths) {
- bandwidths_.push_back({bandwith, 1.0, nullptr});
+ for (auto bandwidth : bandwidths) {
+ bandwidths_.push_back({bandwidth, 1.0, nullptr});
}
}
src/surf/cpu_interface.cpp
src/surf/cpu_ti.cpp
src/surf/network_cm02.cpp
+ src/surf/link_wifi.cpp
src/surf/network_constant.cpp
src/surf/network_interface.cpp
src/surf/PropertyHolder.cpp