lua_pushstring(L, "id");
lua_gettable(L, -2);
- router.V_router_id = lua_tostring(L, -1);
+ router.id = lua_tostring(L, -1);
lua_pop(L,1);
lua_pushstring(L,"coord");
lua_gettable(L,-2);
- router.V_router_coord = lua_tostring(L, -1);
+ router.coord = lua_tostring(L, -1);
lua_pop(L,1);
sg_platf_new_router(&router);
static void instr_routing_parse_start_router (sg_platf_router_cbarg_t router)
{
container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
- newContainer (router->V_router_id, INSTR_ROUTER, father);
+ newContainer (router->id, INSTR_ROUTER, father);
}
static void instr_routing_parse_end_platform ()
network_element_info_t info = NULL;
if (current_routing->hierarchy == SURF_ROUTING_NULL)
current_routing->hierarchy = SURF_ROUTING_BASE;
- xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->V_router_id, ROUTING_ASR_LEVEL),
+ xbt_assert(!xbt_lib_get_or_null(as_router_lib,router->id, ROUTING_ASR_LEVEL),
"Reading a router, processing unit \"%s\" already exists",
- router->V_router_id);
+ router->id);
xbt_assert(current_routing->set_processing_unit,
"no defined method \"set_processing_unit\" in \"%s\"",
current_routing->name);
- (*(current_routing->set_processing_unit)) (current_routing,
- router->V_router_id);
+ (*(current_routing->set_processing_unit)) (current_routing, router->id);
info = xbt_new0(s_network_element_info_t, 1);
info->rc_component = current_routing;
info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
- xbt_lib_set(as_router_lib,router->V_router_id,ROUTING_ASR_LEVEL,(void *) info);
+ xbt_lib_set(as_router_lib,router->id,ROUTING_ASR_LEVEL,(void *) info);
if (strcmp(A_surfxml_router_coordinates,"")) {
if(!COORD_ASR_LEVEL) xbt_die("To use coordinates, you must set configuration 'coordinates' to 'yes'");
xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
xbt_dynar_shrink(ctn, 0);
- xbt_lib_set(as_router_lib,router->V_router_id,COORD_ASR_LEVEL,(void *) ctn);
+ xbt_lib_set(as_router_lib,router->id,COORD_ASR_LEVEL,(void *) ctn);
}
}
static void parse_S_router_lua(const char* router_id) {
s_sg_platf_router_cbarg_t router;
memset(&router,0,sizeof(router));
- router.V_router_id = router_id;
- router.V_router_coord = "";
+ router.id = router_id;
+ router.coord = "";
return parse_S_router(&router);
}
s_sg_platf_router_cbarg_t router;
memset(&router, 0, sizeof(router));
- router.V_router_id = A_surfxml_router_id;
- router.V_router_coord = A_surfxml_router_coordinates;
+ router.id = A_surfxml_router_id;
+ router.coord = A_surfxml_router_coordinates;
sg_platf_new_router(&router);
}