#include "simgrid/s4u/Host.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
+#include "surf/surf.hpp"
#include <boost/algorithm/string.hpp>
{
simgrid::kernel::routing::vivaldi::Coords* coords = np->extension<simgrid::kernel::routing::vivaldi::Coords>();
xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)",
- (np->isNetZone() ? "Netzone" : (np->isHost() ? "Host" : "Router")), np->get_cname(), np);
+ (np->is_netzone() ? "Netzone" : (np->is_host() ? "Host" : "Router")), np->get_cname(), np);
return &coords->coords;
}
void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord)
{
- xbt_assert(netpoint->netzone() == this, "Cannot add a peer link to a netpoint that is not in this netzone");
+ xbt_assert(netpoint->get_englobing_zone() == this,
+ "Cannot add a peer link to a netpoint that is not in this netzone");
new simgrid::kernel::routing::vivaldi::Coords(netpoint, coord);
std::string link_up = "link_" + netpoint->get_name() + "_UP";
std::string link_down = "link_" + netpoint->get_name() + "_DOWN";
- surf::LinkImpl* linkUp = surf_network_model->createLink(link_up, bw_out, 0, SURF_LINK_SHARED);
- surf::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, SURF_LINK_SHARED);
+ resource::LinkImpl* linkUp = surf_network_model->createLink(link_up, bw_out, 0, s4u::Link::SharingPolicy::SHARED);
+ resource::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, s4u::Link::SharingPolicy::SHARED);
private_links_.insert({netpoint->id(), {linkUp, linkDown}});
}
-void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
+void VivaldiZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
{
XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id());
- if (src->isNetZone()) {
+ if (src->is_netzone()) {
std::string srcName = "router_" + src->get_name();
std::string dstName = "router_" + dst->get_name();
route->gw_src = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(srcName.c_str());
/* Retrieve the private links */
auto src_link = private_links_.find(src->id());
if (src_link != private_links_.end()) {
- std::pair<surf::LinkImpl*, surf::LinkImpl*> info = src_link->second;
+ std::pair<resource::LinkImpl*, resource::LinkImpl*> info = src_link->second;
if (info.first) {
route->link_list.push_back(info.first);
if (lat)
auto dst_link = private_links_.find(dst->id());
if (dst_link != private_links_.end()) {
- std::pair<surf::LinkImpl*, surf::LinkImpl*> info = dst_link->second;
+ std::pair<resource::LinkImpl*, resource::LinkImpl*> info = dst_link->second;
if (info.second) {
route->link_list.push_back(info.second);
if (lat)