- 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(host->coord,"")) xbt_die("Coordinates not implemented yet!");
+
+ cpu_create_resource(host->id,
+ host->power_peak,
+ host->power_scale,
+ host->power_trace,
+ host->core_amount,
+ host->initial_state,
+ host->state_trace,
+ host->properties);