e_surf_resource_state_t V_host_state_initial; //state
tmgr_trace_t V_host_state_trace; //state file
const char* V_host_coord;
+ xbt_dict_t properties;
} s_sg_platf_host_cbarg_t, *sg_platf_host_cbarg_t;
typedef struct {
host->V_host_core,
host->V_host_state_initial,
host->V_host_state_trace,
- current_property_set);
- current_property_set = NULL;
+ host->properties);
}
static void add_traces_cpu(void)
host->V_host_core,
host->V_host_state_initial,
host->V_host_state_trace,
- current_property_set);
- current_property_set = NULL;
+ host->properties);
}
static void cpu_im_add_traces_cpu(void)
host->V_host_core,
host->V_host_state_initial,
host->V_host_state_trace,
- current_property_set);
- current_property_set = NULL;
+ host->properties);
}
static random_data_t random_latency = NULL;
static int host_number_int = 0;
-static void netcste_count_hosts(sg_platf_host_cbarg_t h)
-{
+static void netcste_count_hosts(sg_platf_host_cbarg_t h) {
host_number_int++;
}
-static void netcste_define_callbacks(void)
-{
+static void netcste_define_callbacks(void) {
sg_platf_host_add_cb(netcste_count_hosts);
}
s_sg_platf_host_cbarg_t host;
memset(&host,0,sizeof(host));
+ 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);
sg_platf_new_host(&host);
}
void ETag_surfxml_host(void){
+ current_property_set = NULL;
surfxml_call_cb_functions(ETag_surfxml_host_cb_list);
}
host->V_host_power_trace,
host->V_host_state_initial,
host->V_host_state_trace,
- current_property_set);
- current_property_set=NULL;
+ host->properties);
}
static void* ptask_link_create_resource(const char *name,