X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d7312117918307ea0ee4dd49ccb225b83ceff212..f5b15e157009dbaef93d579aaf5f093864fc7cc7:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index e18e079a53..d9a920695e 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -277,19 +277,19 @@ void STag_surfxml_host(void){ xbt_assert(current_property_set == NULL, "Someone forgot to reset the property set to NULL in its closing tag (or XML malformed)"); host.properties = current_property_set = xbt_dict_new(); - host.V_host_id = A_surfxml_host_id; - host.V_host_power_peak = get_cpu_power(A_surfxml_host_power); - host.V_host_power_scale = surf_parse_get_double( A_surfxml_host_availability); - host.V_host_core = surf_parse_get_int(A_surfxml_host_core); - host.V_host_power_trace = tmgr_trace_new(A_surfxml_host_availability_file); - host.V_host_state_trace = tmgr_trace_new(A_surfxml_host_state_file); + host.id = A_surfxml_host_id; + host.power_peak = get_cpu_power(A_surfxml_host_power); + host.power_scale = surf_parse_get_double( A_surfxml_host_availability); + host.core_amount = surf_parse_get_int(A_surfxml_host_core); + host.power_trace = tmgr_trace_new(A_surfxml_host_availability_file); + host.state_trace = tmgr_trace_new(A_surfxml_host_state_file); xbt_assert((A_surfxml_host_state == A_surfxml_host_state_ON) || (A_surfxml_host_state == A_surfxml_host_state_OFF), "Invalid state"); if (A_surfxml_host_state == A_surfxml_host_state_ON) - host.V_host_state_initial = SURF_RESOURCE_ON; + host.initial_state = SURF_RESOURCE_ON; if (A_surfxml_host_state == A_surfxml_host_state_OFF) - host.V_host_state_initial = SURF_RESOURCE_OFF; - host.V_host_coord = A_surfxml_host_coordinates; + host.initial_state = SURF_RESOURCE_OFF; + host.coord = A_surfxml_host_coordinates; sg_platf_new_host(&host); } @@ -301,8 +301,8 @@ void STag_surfxml_router(void){ 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); } @@ -377,28 +377,29 @@ 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)"); link.properties = current_property_set = xbt_dict_new(); - link.V_link_id = A_surfxml_link_id; - link.V_link_bandwidth = surf_parse_get_double(A_surfxml_link_bandwidth); - link.V_link_bandwidth_file = tmgr_trace_new(A_surfxml_link_bandwidth_file); - link.V_link_latency = surf_parse_get_double(A_surfxml_link_latency); - link.V_link_latency_file = tmgr_trace_new(A_surfxml_link_latency_file); + link.id = A_surfxml_link_id; + link.bandwidth = surf_parse_get_double(A_surfxml_link_bandwidth); + link.bandwidth_trace = tmgr_trace_new(A_surfxml_link_bandwidth_file); + link.latency = surf_parse_get_double(A_surfxml_link_latency); + link.latency_trace = tmgr_trace_new(A_surfxml_link_latency_file); + /* FIXME: use a switch here */ xbt_assert((A_surfxml_link_state == A_surfxml_link_state_ON) || (A_surfxml_link_state == A_surfxml_link_state_OFF), "Invalid state"); if (A_surfxml_link_state == A_surfxml_link_state_ON) - link.V_link_state = SURF_RESOURCE_ON; + link.state = SURF_RESOURCE_ON; if (A_surfxml_link_state == A_surfxml_link_state_OFF) - link.V_link_state = SURF_RESOURCE_OFF; - link.V_link_state_file = tmgr_trace_new(A_surfxml_link_state_file); - link.V_link_sharing_policy = A_surfxml_link_sharing_policy; + link.state = SURF_RESOURCE_OFF; + link.state_trace = tmgr_trace_new(A_surfxml_link_state_file); + /* FIXME: use a switch here */ if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_SHARED) - link.V_policy_initial_link = SURF_LINK_SHARED; + link.policy = SURF_LINK_SHARED; else { if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FATPIPE) - link.V_policy_initial_link = SURF_LINK_FATPIPE; + link.policy = SURF_LINK_FATPIPE; else if (A_surfxml_link_sharing_policy == A_surfxml_link_sharing_policy_FULLDUPLEX) - link.V_policy_initial_link = SURF_LINK_FULLDUPLEX; + link.policy = SURF_LINK_FULLDUPLEX; } sg_platf_new_link(&link);