-/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2022. 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 <xbt/config.hpp>
#include <xbt/parse_units.hpp>
-#include "src/surf/SplitDuplexLinkImpl.hpp"
-#include "src/surf/network_interface.hpp"
-#include "src/surf/network_wifi.hpp"
+#include "src/kernel/resource/LinkImpl.hpp"
+#include "src/kernel/resource/SplitDuplexLinkImpl.hpp"
+#include "src/kernel/resource/WifiLinkImpl.hpp"
namespace simgrid {
return Engine::get_instance()->link_by_name(name);
}
-kernel::resource::LinkImpl* Link::get_impl() const
+kernel::resource::StandardLinkImpl* Link::get_impl() const
{
- auto* link_impl = dynamic_cast<kernel::resource::LinkImpl*>(pimpl_);
+ auto* link_impl = dynamic_cast<kernel::resource::StandardLinkImpl*>(pimpl_);
xbt_assert(link_impl != nullptr, "Impossible to get a LinkImpl* from link. %s.",
(get_sharing_policy() == SharingPolicy::SPLITDUPLEX
? "For a Split-Duplex link, you should call this method to each UP/DOWN member"
void Link::set_host_wifi_rate(const s4u::Host* host, int level) const
{
- auto* wlink = dynamic_cast<kernel::resource::NetworkWifiLink*>(pimpl_);
+ auto* wlink = dynamic_cast<kernel::resource::WifiLinkImpl*>(pimpl_);
xbt_assert(wlink != nullptr, "Link %s does not seem to be a wifi link.", get_cname());
wlink->set_host_rate(host, level);
}
void* sg_link_get_data(const_sg_link_t link)
{
- return link->get_data();
+ return link->get_data<void>();
}
void sg_link_set_data(sg_link_t link, void* data)