X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe45c9fee67e0b37665de17ee009844a115778d3..2c5c14ffd2b2af540f201434bd4d32f9c197507f:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index abe5856b4e..ce491e3cc8 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -405,6 +405,21 @@ void ETag_surfxml_host(void) { current_property_set = NULL; } +void STag_surfxml_host_link(void){ + XBT_DEBUG("Create a Host_link for %s",A_surfxml_host_link_id); + s_sg_platf_host_link_cbarg_t host_link; + memset(&host_link,0,sizeof(host_link)); + + host_link.id = A_surfxml_host_link_id; + host_link.link_up = A_surfxml_host_link_up; + host_link.link_down = A_surfxml_host_link_down; + sg_platf_new_host_link(&host_link); +} + +void ETag_surfxml_host_link(void){ + XBT_DEBUG("End create a Host_link for %s",A_surfxml_host_link_id); +} + void STag_surfxml_router(void){ s_sg_platf_router_cbarg_t router; memset(&router, 0, sizeof(router)); @@ -468,6 +483,23 @@ void ETag_surfxml_cluster(void){ /* nothing I can think of */ } +void STag_surfxml_cabinet(void){ + s_sg_platf_cabinet_cbarg_t cabinet; + memset(&cabinet,0,sizeof(cabinet)); + cabinet.id = A_surfxml_cabinet_id; + cabinet.prefix = A_surfxml_cabinet_prefix; + cabinet.suffix = A_surfxml_cabinet_suffix; + cabinet.power = surf_parse_get_double(A_surfxml_cabinet_power); + cabinet.bw = surf_parse_get_double(A_surfxml_cabinet_bw); + cabinet.lat = surf_parse_get_double(A_surfxml_cabinet_lat); + cabinet.radical = A_surfxml_cabinet_radical; + + sg_platf_new_cabinet(&cabinet); +} +void ETag_surfxml_cabinet(void){ + /* nothing I can think of */ +} + void STag_surfxml_peer(void){ s_sg_platf_peer_cbarg_t peer; memset(&peer,0,sizeof(peer)); @@ -480,7 +512,6 @@ void STag_surfxml_peer(void){ peer.availability_trace = tmgr_trace_new_from_file(A_surfxml_peer_availability_file); peer.state_trace = tmgr_trace_new_from_file(A_surfxml_peer_state_file); - surfxml_call_cb_functions(STag_surfxml_peer_cb_list); sg_platf_new_peer(&peer); } void ETag_surfxml_peer(void){ @@ -489,6 +520,11 @@ void ETag_surfxml_peer(void){ void STag_surfxml_link(void){ xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)"); } + +void STag_surfxml_backbone(void){ + /* nothing to do here */ +} + void ETag_surfxml_link(void){ s_sg_platf_link_cbarg_t link; memset(&link,0,sizeof(link)); @@ -534,6 +570,23 @@ void ETag_surfxml_link(void){ current_property_set = NULL; } +void ETag_surfxml_backbone(void){ + s_sg_platf_link_cbarg_t link; + memset(&link,0,sizeof(link)); + + link.properties = NULL; + + link.id = A_surfxml_backbone_id; + link.bandwidth = surf_parse_get_double(A_surfxml_backbone_bandwidth); + link.latency = surf_parse_get_double(A_surfxml_backbone_latency); + link.state = SURF_RESOURCE_ON; + link.policy = SURF_LINK_SHARED; + + sg_platf_new_link(&link); + routing_cluster_add_backbone(xbt_lib_get_or_null(link_lib, A_surfxml_backbone_id, SURF_LINK_LEVEL)); + current_property_set = NULL; +} + void STag_surfxml_route(void){ surfxml_call_cb_functions(STag_surfxml_route_cb_list); }