return action;
}
-Host *HostL07Model::createHost(const char *name)
+Host *HostL07Model::createHost(const char *name,RoutingEdge *netElm, Cpu *cpu)
{
- HostL07 *wk = NULL;
- sg_host_t sg_host = sg_host_by_name(name);
-
- xbt_assert(!surf_host_resource_priv(sg_host),
- "Host '%s' declared several times in the platform file.",
- name);
+ HostL07 *host = new HostL07(this, name, NULL, netElm, cpu);
- wk = new HostL07(this, name, NULL,
- sg_host_edge(sg_host),
- sg_host_surfcpu(sg_host));
- surf_callback_emit(hostCreatedCallbacks, wk);
- xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
+ surf_callback_emit(hostCreatedCallbacks, host);
+ xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, host);
- return wk;
+ return host;
}
Action *NetworkL07Model::communicate(RoutingEdge *src, RoutingEdge *dst,
double power_initial = xbt_dynar_get_as(powerPeak, pstate, double);
sg_host_t sg_host = sg_host_by_name(name);
- xbt_assert(!surf_host_resource_priv(sg_host),
- "Host '%s' declared several times in the platform file.",
- name);
-
CpuL07 *cpu = new CpuL07(this, name, cpu_properties,
power_initial, power_scale, power_trace,
core, state_initial, state_trace);
}
-bool LinkL07::isShared()
+int LinkL07::sharingPolicy()
{
- return lmm_constraint_is_shared(getConstraint());
+ return lmm_constraint_sharing_policy(getConstraint());
}
/**********