* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/routing/AsDijkstra.hpp"
+#include "src/kernel/routing/NetCard.hpp"
+
#include "src/surf/network_interface.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
xbt_graph_new_edge(routeGraph_, src, dst, e_route);
}
-void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
+void AsDijkstra::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
{
getRouteCheckParams(src, dst);
int src_id = src->id();
int dst_id = dst->id();
int *pred_arr = nullptr;
- sg_platf_route_cbarg_t e_route;
int size = 0;
xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
if (edge == nullptr)
THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
- e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
for (auto link: *e_route->link_list) {
route->link_list->insert(route->link_list->begin(), link);
prev_gw_src = gw_src;
- e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
gw_src = e_route->gw_src;
gw_dst = e_route->gw_dst;
strcmp(gw_dst->name().c_str(), prev_gw_src->name().c_str())) {
std::vector<Link*> *e_route_as_to_as = new std::vector<Link*>();
- routing_platf->getRouteAndLatency(gw_dst_net_elm, prev_gw_src_net_elm, e_route_as_to_as, nullptr);
+ getGlobalRoute(gw_dst_net_elm, prev_gw_src_net_elm, e_route_as_to_as, nullptr);
auto pos = route->link_list->begin();
for (auto link : *e_route_as_to_as) {
route->link_list->insert(pos, link);