Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
instr: objectifies another method
[simgrid.git] / src / surf / instr_surf.cpp
index d82ef1b..83f7e1e 100644 (file)
@@ -13,7 +13,7 @@ void TRACE_surf_host_set_speed(double date, const char *resource, double speed)
 {
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
-    simgrid::instr::Type* type = PJ_type_get("power", container->type_);
+    simgrid::instr::Type* type = container->type_->getChild("power");
     new simgrid::instr::SetVariableEvent(date, container, type, speed);
   }
 }
@@ -22,7 +22,7 @@ void TRACE_surf_link_set_bandwidth(double date, const char *resource, double ban
 {
   if (TRACE_categorized() || TRACE_uncategorized() || TRACE_platform()) {
     container_t container = PJ_container_get(resource);
-    simgrid::instr::Type* type = PJ_type_get("bandwidth", container->type_);
+    simgrid::instr::Type* type = container->type_->getChild("bandwidth");
     new simgrid::instr::SetVariableEvent(date, container, type, bandwidth);
   }
 }