- RoutingEdgePtr info = new RoutingEdgeImpl(xbt_strdup(router->id),
- -1,
- SURF_NETWORK_ELEMENT_ROUTER,
- current_routing);
- info->setId(current_routing->parsePU(info));
- xbt_lib_set(as_router_lib, router->id, ROUTING_ASR_LEVEL, (void *) info);
- XBT_DEBUG("Having set name '%s' id '%d'", router->id, info->getId());
-
- if (router->coord && strcmp(router->coord, "")) {
- unsigned int cursor;
- char*str;
-
- if (!COORD_ASR_LEVEL)
- xbt_die ("To use host coordinates, please add --cfg=network/coordinates:yes to your command line");
- /* Pre-parse the host coordinates */
- xbt_dynar_t ctn_str = xbt_str_split_str(router->coord, " ");
- xbt_dynar_t ctn = xbt_dynar_new(sizeof(double),NULL);
- xbt_dynar_foreach(ctn_str,cursor, str) {
- double val = atof(str);
- xbt_dynar_push(ctn,&val);
- }
- xbt_dynar_shrink(ctn, 0);
- xbt_dynar_free(&ctn_str);
- xbt_lib_set(as_router_lib, router->id, COORD_ASR_LEVEL, (void *) ctn);
- XBT_DEBUG("Having set router coordinates for '%s'",router->id);
- }
-}
-
-/**
- * \brief Store the route by calling the set_route function of the current routing component
- */
-static void parse_E_route(sg_platf_route_cbarg_t route)
-{
- /*FIXME:REMOVE:xbt_assert(current_routing->parse_route,
- "no defined method \"set_route\" in \"%s\"",
- current_routing->name);*/
-
- current_routing->parseRoute(route);