+ if (connect_element == A_surfxml_trace_c_connect_element_HOST) {
+ xbt_assert1((host = xbt_dict_get_or_null(cpu_set, connector_id)), "Host %s undefined", connector_id);
+ switch (connect_kind) {
+ case A_surfxml_trace_c_connect_kind_AVAILABILITY: host->state_event = tmgr_history_add_trace(history, trace, 0.0, 0, host); break;
+ case A_surfxml_trace_c_connect_kind_POWER: host->power_event = tmgr_history_add_trace(history, trace, 0.0, 0, host); break;
+ }
+ }
+
+ if (connect_element == A_surfxml_trace_c_connect_element_LINK) {
+ xbt_assert1((link = xbt_dict_get_or_null(link_set, connector_id)), "Link %s undefined", connector_id);
+ switch (connect_kind) {
+ case A_surfxml_trace_c_connect_kind_AVAILABILITY: link->state_event = tmgr_history_add_trace(history, trace, 0.0, 0, link); break;
+ case A_surfxml_trace_c_connect_kind_BANDWIDTH: link->bw_event = tmgr_history_add_trace(history, trace, 0.0, 0, link); break;
+ case A_surfxml_trace_c_connect_kind_LATENCY: link->lat_event = tmgr_history_add_trace(history, trace, 0.0, 0, link); break;
+ }
+ }
+ }
+
+ xbt_dynar_free(&trace_connect);
+ xbt_dynar_free(&traces_connect_list);
+ xbt_dict_free(&traces_set_list);
+}
+
+static void define_callbacks(const char *file)
+{
+ /* Figuring out the network links */
+ surfxml_add_callback(STag_surfxml_host_cb_list, &count_hosts);
+ surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
+ surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);