simgrid.platf.link_new{id=linkname .. "_loopback",bandwidth=args.loopback_bw,latency=args.loopback_lat,sharing_policy="FATPIPE"}
end
end
- simgrid.platf.AS_close()
+ simgrid.platf.AS_seal()
end
end
simgrid.platf.backbone_new{id="backbone1",bandwidth="2.25GBps",lat="500us"};
- simgrid.platf.AS_close()
+ simgrid.platf.AS_seal()
simgrid.platf.AS_open{id="my_cluster2",mode="Cluster"}
simgrid.platf.router_new{id="router2"}
simgrid.platf.backbone_new{id="backbone2",bandwidth="2.25GBps",lat="500us"}
- simgrid.platf.AS_close()
+ simgrid.platf.AS_seal()
simgrid.platf.link_new{id="link1-2",bandwidth="2.25GBps",lat="500us"};
simgrid.platf.ASroute_new{src="my_cluster1", dst="my_cluster2",
gw_src="router1", gw_dst="router2", links="link1-2"}
-simgrid.platf.AS_close()
+simgrid.platf.AS_seal()
simgrid.platf.close()
simgrid.platf.route_new{AS="AS0",src="Ginette",dest="Bourassa",links="5,2,0,1,6,7"};
- simgrid.platf.AS_close();
+ simgrid.platf.AS_seal();
simgrid.platf.close();
{"open", console_open},
{"close", console_close},
{"AS_open", console_AS_open},
- {"AS_close", console_AS_close},
+ {"AS_seal", console_AS_seal},
{"backbone_new", console_add_backbone},
{"host_link_new", console_add_host___link},
{"host_new", console_add_host},
return 0;
}
-int console_AS_close(lua_State *L) {
- XBT_DEBUG("Closing AS");
- sg_platf_new_AS_end();
+int console_AS_seal(lua_State *L) {
+ XBT_DEBUG("Sealing AS");
+ sg_platf_new_AS_seal();
return 0;
}
int console_add_route(lua_State*);
int console_add_ASroute(lua_State*);
int console_AS_open(lua_State*);
-int console_AS_close(lua_State *L);
+int console_AS_seal(lua_State *L);
int console_set_function(lua_State*);
int console_host_set_property(lua_State*);
}
}
XBT_DEBUG("</AS>");
- sg_platf_new_AS_end();
+ sg_platf_new_AS_seal();
simgrid::surf::on_cluster(cluster);
}
static_cast<AsCluster*>(current_routing)->router_ = static_cast<NetCard*>(xbt_lib_get_or_null(as_router_lib, router.id, ROUTING_ASR_LEVEL));
XBT_DEBUG("</AS>");
- sg_platf_new_AS_end();
+ sg_platf_new_AS_seal();
XBT_DEBUG(" ");
free(router_id);
*
* Add a new autonomous system to the platform. Any elements (such as host,
* router or sub-AS) added after this call and before the corresponding call
- * to sg_platf_new_AS_close() will be added to this AS.
+ * to sg_platf_new_AS_seal() will be added to this AS.
*
* Once this function was called, the configuration concerning the used
* models cannot be changed anymore.
}
/**
- * \brief Specify that the current description of AS is finished
+ * \brief Specify that the description of the current AS is finished
*
- * Once you've declared all the content of your AS, you have to close
+ * Once you've declared all the content of your AS, you have to seal
* it with this call. Your AS is not usable until you call this function.
*/
-void sg_platf_new_AS_end()
+void sg_platf_new_AS_seal()
{
xbt_assert(current_routing, "Cannot seal the current AS: none under construction");
current_routing->seal();
XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform
XBT_PUBLIC(void) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS
-XBT_PUBLIC(void) sg_platf_new_AS_end(void); // That AS is fully described
+XBT_PUBLIC(void) sg_platf_new_AS_seal(void); // That AS is fully described
XBT_PUBLIC(void) sg_platf_new_host (sg_platf_host_cbarg_t host); // Add an host to the currently described AS
XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS
void STag_surfxml_prop(void)
{
- if(AS_TAG){
+ if(AS_TAG){ // We need a stack here to retrieve the most recently opened AS
if (!as_current_property_set){
xbt_assert(as_prop_nb < 1024, "Number of AS property reach the limit!!!");
as_current_property_set = xbt_dict_new_homogeneous(xbt_free_f); // Maybe, it should raise an error
xbt_dict_t dict = (xbt_dict_t) as_dict_tab[as_prop_nb-1];
as_prop_nb--;
XBT_DEBUG("POP prop %p for AS '%s'",dict,name);
- xbt_lib_set(as_router_lib,
- name,
- ROUTING_PROP_ASR_LEVEL,
- dict);
+ xbt_lib_set(as_router_lib, name, ROUTING_PROP_ASR_LEVEL, dict);
xbt_free(name);
}
- sg_platf_new_AS_end();
+ sg_platf_new_AS_seal();
}
void STag_surfxml_config(void){