#include "simgrid/simix.hpp"
#include "src/kernel/lmm/maxmin.hpp"
#include "src/surf/network_interface.hpp"
+#include "src/surf/network_wifi.hpp"
#include "xbt/log.h"
namespace simgrid {
return this->pimpl_->get_sharing_policy();
}
+void Link::set_host_wifi_rate(s4u::Host* host, int level)
+{
+ xbt_assert(pimpl_->get_sharing_policy() == Link::SharingPolicy::WIFI, "Link %s does not seem to be a wifi link.",
+ get_cname());
+ auto* wlink = dynamic_cast<kernel::resource::NetworkWifiLink*>(pimpl_);
+ xbt_assert(wlink != nullptr, "Cannot convert link %s into a wifi link.", get_cname());
+ wlink->set_host_rate(host, level);
+}
+
double Link::get_usage() const
{
return this->pimpl_->get_constraint()->get_usage();