1 /* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "surf_routing_none.hpp"
8 #include "surf_routing_private.h"
11 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
14 AS_t model_none_create(void)
18 xbt_dynar_t AsNone::getOneLinkRoutes() {
22 void AsNone::getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst,
23 sg_platf_route_cbarg_t res, double *lat)
28 void AsNone::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
30 XBT_INFO("No routing no graph");
33 sg_platf_route_cbarg_t AsNone::getBypassRoute(RoutingEdgePtr src, RoutingEdgePtr dst, double *lat) {
37 int AsNone::parsePU(RoutingEdgePtr elm) {
38 XBT_DEBUG("Load process unit \"%s\"", elm->p_name);
39 xbt_dynar_push_as(p_indexNetworkElm, RoutingEdgePtr, elm);
40 /* don't care about PUs */
44 int AsNone::parseAS(RoutingEdgePtr elm) {
45 XBT_DEBUG("Load Autonomous system \"%s\"", elm->p_name);
46 xbt_dynar_push_as(p_indexNetworkElm, RoutingEdgePtr, elm);
47 /* even don't care about sub-ASes -- I'm as nihilist as an old punk*/
51 void AsNone::parseRoute(sg_platf_route_cbarg_t route){
55 void AsNone::parseASroute(sg_platf_route_cbarg_t route){
58 void AsNone::parseBypassroute(sg_platf_route_cbarg_t e_route){
62 /* Creation routing model functions */
64 p_routingSons = xbt_dict_new_homogeneous(NULL);
65 p_indexNetworkElm = xbt_dynar_new(sizeof(char*),NULL);
69 xbt_dict_free(&p_routingSons);
70 xbt_dynar_free(&p_indexNetworkElm);
71 xbt_dynar_free(&p_linkUpDownList);