X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b7630a950a6b865fcc195c58e39e6c3cfa550ccb..6badbbf58554a35b03f58509b0b18cf606c38f5e:/src/simgrid/host.cpp diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 7f8881b646..af13e1a514 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -137,8 +137,8 @@ double sg_host_get_available_speed(sg_host_t host){ /** @brief Returns the state of a host. * @return 1 if the host is active or 0 if it has crashed. */ -int sg_host_get_state(sg_host_t host) { - return host->p_cpu->getState(); +int sg_host_is_on(sg_host_t host) { + return host->p_cpu->isOn(); } /** @brief Returns the total energy consumed by the host (in Joules). @@ -190,8 +190,11 @@ void Host::off() simgrid::simix::simcall(SIMCALL_HOST_OFF, this); } -e_surf_resource_state_t Host::getState() { - return p_cpu->getState(); +bool Host::isOn() { + return p_cpu->isOn(); +} +bool Host::isOff() { + return ! p_cpu->isOn(); }