* 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. */
* 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 "surf_routing_full.hpp"
-#include "network_interface.hpp"
+#include "src/surf/surf_routing_private.hpp"
+#include "src/surf/surf_routing_full.hpp"
+#include "src/surf/network_interface.hpp"
#define TO_ROUTE_FULL(i,j) p_routingTable[(i)+(j)*table_size]
AS_t model_full_create(void)
{
#define TO_ROUTE_FULL(i,j) p_routingTable[(i)+(j)*table_size]
AS_t model_full_create(void)
{
if (route) {
if (xbt_dynar_length(route->link_list) == 1) {
void *link = *(void **) xbt_dynar_get_ptr(route->link_list, 0);
if (route) {
if (xbt_dynar_length(route->link_list) == 1) {
void *link = *(void **) xbt_dynar_get_ptr(route->link_list, 0);
tmp_dst->setId(dst);
onelink = new Onelink(link, tmp_src, tmp_dst);
} else if (p_hierarchy == SURF_ROUTING_RECURSIVE)
tmp_dst->setId(dst);
onelink = new Onelink(link, tmp_src, tmp_dst);
} else if (p_hierarchy == SURF_ROUTING_RECURSIVE)
-void AsFull::getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t res, double *lat)
+void AsFull::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t res, double *lat)
xbt_dynar_foreach(e_route->link_list, cpt, link) {
xbt_dynar_push(res->link_list, &link);
if (lat)
xbt_dynar_foreach(e_route->link_list, cpt, link) {
xbt_dynar_push(res->link_list, &link);
if (lat)
- RoutingEdgePtr src_net_elm, dst_net_elm;
- src_net_elm = sg_routing_edge_by_name_or_null(src);
- dst_net_elm = sg_routing_edge_by_name_or_null(dst);
+ NetCard *src_net_elm, *dst_net_elm;
+ src_net_elm = sg_netcard_by_name_or_null(src);
+ dst_net_elm = sg_netcard_by_name_or_null(dst);
xbt_assert(src_net_elm, "Network elements %s not found", src);
xbt_assert(dst_net_elm, "Network elements %s not found", dst);
xbt_assert(src_net_elm, "Network elements %s not found", src);
xbt_assert(dst_net_elm, "Network elements %s not found", dst);
xbt_dynar_t link_route_to_test =
xbt_dynar_new(sizeof(sg_routing_link_t), NULL);
xbt_dynar_foreach(route->link_list, i, link_name) {
xbt_dynar_t link_route_to_test =
xbt_dynar_new(sizeof(sg_routing_link_t), NULL);
xbt_dynar_foreach(route->link_list, i, link_name) {
xbt_assert(link, "Link : '%s' doesn't exists.", link_name);
xbt_dynar_push(link_route_to_test, &link);
}
xbt_assert(link, "Link : '%s' doesn't exists.", link_name);
xbt_dynar_push(link_route_to_test, &link);
}
xbt_dynar_new(sizeof(sg_routing_link_t), NULL);
for (i = xbt_dynar_length(route->link_list); i > 0; i--) {
link_name = xbt_dynar_get_as(route->link_list, i - 1, char *);
xbt_dynar_new(sizeof(sg_routing_link_t), NULL);
for (i = xbt_dynar_length(route->link_list); i > 0; i--) {
link_name = xbt_dynar_get_as(route->link_list, i - 1, char *);
xbt_assert(link, "Link : '%s' doesn't exists.", link_name);
xbt_dynar_push(link_route_to_test, &link);
}
xbt_assert(link, "Link : '%s' doesn't exists.", link_name);
xbt_dynar_push(link_route_to_test, &link);
}