- A_surfxml_host_state = A_surfxml_host_state_ON;
- SURFXML_BUFFER_SET(host_id, host_id);
- SURFXML_BUFFER_SET(host_power, struct_peer->power);
- SURFXML_BUFFER_SET(host_availability, "1.0");
- SURFXML_BUFFER_SET(host_availability_file, struct_peer->availability_trace);
- SURFXML_BUFFER_SET(host_state_file, struct_peer->state_trace);
- SURFXML_BUFFER_SET(host_coordinates, "");
- SURFXML_BUFFER_SET(host_core, "1.0");
- SURFXML_START_TAG(host);
- SURFXML_END_TAG(host);
+ s_sg_platf_host_cbarg_t host;
+ memset(&host,0,sizeof(host));
+ host.initial_state = SURF_RESOURCE_ON;
+ host.id = host_id;
+ host.power_peak = surf_parse_get_double(struct_peer->power);
+ host.power_scale = 1.0;
+ host.power_trace = tmgr_trace_new(struct_peer->availability_trace);
+ host.state_trace = tmgr_trace_new(struct_peer->state_trace);
+ host.core_amount = 1;
+ sg_platf_new_host(&host);
+