/*
* Callbacks
*/
-static void instr_routing_parse_start_AS ()
+static void instr_routing_parse_start_AS (const char*id,const char*routing)
{
if (getRootContainer() == NULL){
- container_t root = newContainer (A_surfxml_AS_id, INSTR_AS, NULL);
+ container_t root = newContainer (id, INSTR_AS, NULL);
instr_paje_init (root);
if (TRACE_smpi_is_enabled()) {
if (TRACE_needs_platform()){
container_t father = *(container_t*)xbt_dynar_get_ptr(currentContainer, xbt_dynar_length(currentContainer)-1);
- container_t new = newContainer (A_surfxml_AS_id, INSTR_AS, father);
+ container_t new = newContainer (id, INSTR_AS, father);
xbt_dynar_push (currentContainer, &new);
}
}
src,dst,src_as->name, dst_as->name,rc->name);
}
-void routing_parse_Scluster(void)
-{
- static int AX_ptr = 0;
+void routing_parse_Scluster(void) {
char *host_id, *groups, *link_id = NULL;
s_sg_platf_host_cbarg_t host;
xbt_dynar_t radical_elements;
xbt_dynar_t radical_ends;
- static unsigned int surfxml_buffer_stack_stack_ptr = 1;
- static unsigned int surfxml_buffer_stack_stack[1024];
-
- surfxml_buffer_stack_stack[0] = 0;
- surfxml_bufferstack_push(1);
-
- SURFXML_BUFFER_SET(AS_id, struct_cluster->id);
- SURFXML_BUFFER_SET(AS_routing, "Cluster");
XBT_DEBUG("<AS id=\"%s\"\trouting=\"Cluster\">", struct_cluster->id);
- SURFXML_START_TAG(AS);
+ sg_platf_new_AS_open(struct_cluster->id,"Cluster");
//Make all hosts
radical_elements = xbt_str_split(struct_cluster->radical, ",");
host_id = bprintf("%s%d%s", struct_cluster->prefix, i, struct_cluster->suffix);
link_id = bprintf("%s_link_%d", struct_cluster->id, i);
- A_surfxml_host_state = A_surfxml_host_state_ON;
-
XBT_DEBUG("<host\tid=\"%s\"\tpower=\"%f\">", host_id, struct_cluster->power);
host.id = host_id;
if(strcmp(struct_cluster->availability_trace,"")){
link.latency = struct_cluster->bb_lat;
link.state = SURF_RESOURCE_ON;
- switch (AX_surfxml_cluster_bb_sharing_policy) {
+ switch (struct_cluster->bb_sharing_policy) {
case A_surfxml_cluster_bb_sharing_policy_FATPIPE:
link.policy = SURF_LINK_FATPIPE;
break;
xbt_dict_free(&patterns);
XBT_DEBUG("</AS>");
- SURFXML_END_TAG(AS);
+ sg_platf_new_AS_close();
XBT_DEBUG(" ");
-
- surfxml_bufferstack_pop(1);
}
/*
* This function take a string and replace parameters from patterns dict.