- double power_scale = 0.0;
- double power_initial = 0.0;
- tmgr_trace_t power_trace = NULL;
- e_surf_cpu_state_t state_initial = SURF_CPU_OFF;
- tmgr_trace_t state_trace = NULL;
-
- power_scale = get_cpu_power(A_surfxml_host_power);
- surf_parse_get_double(&power_initial, A_surfxml_host_availability);
- surf_parse_get_trace(&power_trace, A_surfxml_host_availability_file);
-
- xbt_assert0((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)
- state_initial = SURF_CPU_ON;
- if (A_surfxml_host_state == A_surfxml_host_state_OFF)
- state_initial = SURF_CPU_OFF;
- surf_parse_get_trace(&state_trace, A_surfxml_host_state_file);
-
- current_property_set = xbt_dict_new();
- cpu_new(xbt_strdup(A_surfxml_host_id), power_scale, power_initial,
- power_trace, state_initial, state_trace, current_property_set);
-
+ if(strcmp(struct_host->V_host_coord,"")) xbt_die("Coordinates not implemented yet!");
+
+ cpu_create_resource(struct_host->V_host_id,
+ struct_host->V_host_power_peak,
+ struct_host->V_host_power_scale,
+ struct_host->V_host_power_trace,
+ struct_host->V_host_core,
+ struct_host->V_host_state_initial,
+ struct_host->V_host_state_trace,
+ current_property_set);
+ current_property_set = NULL;