-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2018. 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 <boost/algorithm/string.hpp>
-
+#include "simgrid/kernel/routing/VivaldiZone.hpp"
+#include "simgrid/kernel/routing/NetPoint.hpp"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
-
-#include "src/kernel/routing/NetPoint.hpp"
-#include "src/kernel/routing/VivaldiZone.hpp"
#include "src/surf/network_interface.hpp"
+#include "src/surf/xml/platf_private.hpp"
+
+#include <boost/algorithm/string.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf");
std::string link_down = "link_" + netpoint->getName() + "_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);
- privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
+ private_links_.insert({netpoint->id(), {linkUp, linkDown}});
}
-void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat)
+void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
{
XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
}
/* Retrieve the private links */
- auto src_link = privateLinks_.find(src->id());
- if (src_link != privateLinks_.end()) {
+ auto src_link = private_links_.find(src->id());
+ if (src_link != private_links_.end()) {
std::pair<surf::LinkImpl*, surf::LinkImpl*> info = src_link->second;
if (info.first) {
route->link_list.push_back(info.first);
XBT_DEBUG("Source of private link (%u) doesn't exist", src->id());
}
- auto dst_link = privateLinks_.find(dst->id());
- if (dst_link != privateLinks_.end()) {
+ auto dst_link = private_links_.find(dst->id());
+ if (dst_link != private_links_.end()) {
std::pair<surf::LinkImpl*, surf::LinkImpl*> info = dst_link->second;
if (info.second) {
route->link_list.push_back(info.second);