1 /* Copyright (c) 2009-2011, 2013-2015. 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"
9 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
11 AS_t model_none_create(void)
16 xbt_dynar_t AsNone::getOneLinkRoutes() {
20 void AsNone::getRouteAndLatency(RoutingEdge */*src*/, RoutingEdge */*dst*/,
21 sg_platf_route_cbarg_t /*res*/, double *lat)
26 void AsNone::getGraph(xbt_graph_t /*graph*/, xbt_dict_t /*nodes*/, xbt_dict_t /*edges*/)
28 XBT_INFO("No routing no graph");
31 sg_platf_route_cbarg_t AsNone::getBypassRoute(RoutingEdge */*src*/, RoutingEdge */*dst*/, double */*lat*/) {
35 int AsNone::parsePU(RoutingEdge *elm) {
36 XBT_DEBUG("Load process unit \"%s\"", elm->getName());
37 xbt_dynar_push_as(p_indexNetworkElm, RoutingEdge*, elm);
38 /* don't care about PUs */
42 int AsNone::parseAS(RoutingEdge *elm) {
43 XBT_DEBUG("Load Autonomous system \"%s\"", elm->getName());
44 xbt_dynar_push_as(p_indexNetworkElm, RoutingEdge*, elm);
45 /* even don't care about sub-ASes -- I'm as nihilist as an old punk*/
49 void AsNone::parseRoute(sg_platf_route_cbarg_t /*route*/){
53 void AsNone::parseASroute(sg_platf_route_cbarg_t /*route*/){
56 void AsNone::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
60 /* Creation routing model functions */
62 p_routingSons = xbt_dict_new_homogeneous(NULL);
63 p_indexNetworkElm = xbt_dynar_new(sizeof(char*),NULL);
64 p_linkUpDownList = NULL;
68 xbt_dict_free(&p_routingSons);
69 xbt_dynar_free(&p_indexNetworkElm);
70 xbt_dynar_free(&p_linkUpDownList);