return this;
}
+Link* Link::set_sharing_policy(Link::SharingPolicy policy)
+{
+ kernel::actor::simcall([this, policy] { pimpl_->set_sharing_policy(policy); });
+ return this;
+}
Link::SharingPolicy Link::get_sharing_policy() const
{
return this->pimpl_->get_sharing_policy();
void Link::set_host_wifi_rate(const s4u::Host* host, int level) const
{
- 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());
+ xbt_assert(wlink != nullptr, "Link %s does not seem to be a wifi link.", get_cname());
wlink->set_host_rate(host, level);
}
{
kernel::actor::simcall([this]() { this->pimpl_->turn_off(); });
}
-void Link::seal()
+Link* Link::seal()
{
kernel::actor::simcall([this]() { this->pimpl_->seal(); });
+ return this;
}
bool Link::is_on() const