- link.properties = current_property_set;
-
- link.id = A_surfxml_link_id;
- link.bandwidth = surf_parse_get_bandwidth(A_surfxml_link_bandwidth, "bandwidth of link", link.id);
- //printf("Link bandwidth [%g]\n", link.bandwidth);
- link.bandwidth_trace = tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file);
- link.latency = surf_parse_get_time(A_surfxml_link_latency, "latency of link", link.id);
- //printf("Link latency [%g]\n", link.latency);
- link.latency_trace = tmgr_trace_new_from_file(A_surfxml_link_latency___file);
-
- switch (A_surfxml_link_state) {
- case A_surfxml_link_state_ON:
- link.initiallyOn = 1;
- break;
- case A_surfxml_link_state_OFF:
- link.initiallyOn = 0;
- break;
- default:
- surf_parse_error("invalid state for link %s", link.id);
- break;
- }
- link.state_trace = tmgr_trace_new_from_file(A_surfxml_link_state___file);
+ link.properties = current_property_set;
+ link.id = A_surfxml_link_id;
+ link.bandwidth = surf_parse_get_bandwidth(A_surfxml_link_bandwidth, "bandwidth of link", link.id);
+ link.bandwidth_trace = A_surfxml_link_bandwidth___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_bandwidth___file) : NULL;
+ link.latency = surf_parse_get_time(A_surfxml_link_latency, "latency of link", link.id);
+ link.latency_trace = A_surfxml_link_latency___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_latency___file) : NULL;
+ link.state_trace = A_surfxml_link_state___file[0] ? tmgr_trace_new_from_file(A_surfxml_link_state___file):NULL;