xbt_dynar_t ETag_surfxml_trace_connect_cb_list = NULL;
xbt_dynar_t STag_surfxml_random_cb_list = NULL;
xbt_dynar_t ETag_surfxml_random_cb_list = NULL;
-xbt_dynar_t STag_surfxml_AS_cb_list = NULL;
-xbt_dynar_t ETag_surfxml_AS_cb_list = NULL;
xbt_dynar_t STag_surfxml_ASroute_cb_list = NULL;
xbt_dynar_t ETag_surfxml_ASroute_cb_list = NULL;
xbt_dynar_t STag_surfxml_bypassRoute_cb_list = NULL;
xbt_dynar_new(sizeof(void_f_void_t), NULL);
STag_surfxml_random_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
ETag_surfxml_random_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
- STag_surfxml_AS_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
- ETag_surfxml_AS_cb_list = xbt_dynar_new(sizeof(void_f_void_t), NULL);
STag_surfxml_ASroute_cb_list =
xbt_dynar_new(sizeof(void_f_void_t), NULL);
ETag_surfxml_ASroute_cb_list =
xbt_dynar_free(&ETag_surfxml_trace_connect_cb_list);
xbt_dynar_free(&STag_surfxml_random_cb_list);
xbt_dynar_free(&ETag_surfxml_random_cb_list);
- xbt_dynar_free(&STag_surfxml_AS_cb_list);
- xbt_dynar_free(&ETag_surfxml_AS_cb_list);
xbt_dynar_free(&STag_surfxml_ASroute_cb_list);
xbt_dynar_free(&ETag_surfxml_ASroute_cb_list);
xbt_dynar_free(&STag_surfxml_bypassRoute_cb_list);
}
void STag_surfxml_peer(void){
- struct_peer = xbt_new0(s_surf_parsing_peer_arg_t, 1);
- struct_peer->id = A_surfxml_peer_id;
- struct_peer->power = surf_parse_get_double(A_surfxml_peer_power);
- struct_peer->bw_in = surf_parse_get_double(A_surfxml_peer_bw_in);
- struct_peer->bw_out = surf_parse_get_double(A_surfxml_peer_bw_out);
- struct_peer->lat = surf_parse_get_double(A_surfxml_peer_lat);
- struct_peer->coord = A_surfxml_peer_coordinates;
- struct_peer->availability_trace = tmgr_trace_new(A_surfxml_peer_availability_file);
- struct_peer->state_trace = tmgr_trace_new(A_surfxml_peer_state_file);
+ s_sg_platf_peer_cbarg_t peer;
+ memset(&peer,0,sizeof(peer));
+ peer.id = A_surfxml_peer_id;
+ peer.power = surf_parse_get_double(A_surfxml_peer_power);
+ peer.bw_in = surf_parse_get_double(A_surfxml_peer_bw_in);
+ peer.bw_out = surf_parse_get_double(A_surfxml_peer_bw_out);
+ peer.lat = surf_parse_get_double(A_surfxml_peer_lat);
+ peer.coord = A_surfxml_peer_coordinates;
+ peer.availability_trace = tmgr_trace_new(A_surfxml_peer_availability_file);
+ peer.state_trace = tmgr_trace_new(A_surfxml_peer_state_file);
+
surfxml_call_cb_functions(STag_surfxml_peer_cb_list);
+ sg_platf_new_peer(&peer);
}
void ETag_surfxml_peer(void){
- surfxml_call_cb_functions(ETag_surfxml_peer_cb_list);
- xbt_free(struct_peer);
+ /* nothing to do here */
}
void STag_surfxml_link(void){
s_sg_platf_link_cbarg_t link;
surfxml_call_cb_functions(STag_surfxml_trace_connect_cb_list);
}
void STag_surfxml_AS(void){
- surfxml_call_cb_functions(STag_surfxml_AS_cb_list);
+ sg_platf_new_AS_open(A_surfxml_AS_id,A_surfxml_AS_routing);
+}
+void ETag_surfxml_AS(void){
+ sg_platf_new_AS_close();
}
void STag_surfxml_ASroute(void){
surfxml_call_cb_functions(STag_surfxml_ASroute_cb_list);
parse_method(E, trace);
parse_method(E, trace_connect);
parse_method(E, random);
-parse_method(E, AS);
parse_method(E, ASroute);
parse_method(E, bypassRoute);