Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
also cleanup the field names of s_sg_platf_router_cbarg_t
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Nov 2011 10:48:32 +0000 (11:48 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Nov 2011 10:48:32 +0000 (11:48 +0100)
Still manual, so atomic commits to avoid issues

include/simgrid/platf.h
src/bindings/lua/lua_console.c
src/instr/instr_routing.c
src/surf/surf_routing.c
src/surf/surfxml_parse.c

index a10f884..3837ac9 100644 (file)
@@ -43,8 +43,8 @@ typedef struct {
 } s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t;
 
 typedef struct {
 } s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t;
 
 typedef struct {
-  const char* V_router_id;
-  const char* V_router_coord;
+  const char* id;
+  const char* coord;
 } s_sg_platf_router_cbarg_t, *sg_platf_router_cbarg_t;
 
 typedef struct {
 } s_sg_platf_router_cbarg_t, *sg_platf_router_cbarg_t;
 
 typedef struct {
index 6749e65..c62713f 100644 (file)
@@ -179,12 +179,12 @@ int console_add_router(lua_State* L) {
 
   lua_pushstring(L, "id");
   lua_gettable(L, -2);
 
   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);
   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);
   lua_pop(L,1);
 
   sg_platf_new_router(&router);
index e764a6a..1eed752 100644 (file)
@@ -269,7 +269,7 @@ static void instr_routing_parse_start_host (sg_platf_host_cbarg_t host)
 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);
 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 ()
 }
 
 static void instr_routing_parse_end_platform ()
index d81bfe5..24f8467 100644 (file)
@@ -132,24 +132,23 @@ static void parse_S_router(sg_platf_router_cbarg_t router)
   network_element_info_t info = NULL;
   if (current_routing->hierarchy == SURF_ROUTING_NULL)
     current_routing->hierarchy = SURF_ROUTING_BASE;
   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",
               "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);
   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;
 
   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);
   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);
   }
 }
 
   }
 }
 
@@ -159,8 +158,8 @@ static void parse_S_router(sg_platf_router_cbarg_t router)
 static void parse_S_router_lua(const char* router_id) {
   s_sg_platf_router_cbarg_t router;
   memset(&router,0,sizeof(router));
 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);
 }
 
        return parse_S_router(&router);
 }
 
index 1f110ec..48cbb04 100644 (file)
@@ -301,8 +301,8 @@ void STag_surfxml_router(void){
   s_sg_platf_router_cbarg_t router;
   memset(&router, 0, sizeof(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);
 }
 
        sg_platf_new_router(&router);
 }