- host->setPState(pstate);
-}
-
-namespace simgrid {
-
-Host::Host(std::string const& id)
- : name_(id)
-{
-}
-
-Host::~Host()
-{
-}
-
-/** Start the host if it is off */
-void Host::turnOn()
-{
- simgrid::simix::kernel(std::bind(SIMIX_host_on, this));
-}
-
-/** Stop the host if it is on */
-void Host::turnOff()
-{
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_host_off(&SIMIX_process_self()->simcall, this);
- simgrid::simix::simcall<void>(SIMCALL_HOST_OFF, this);
-}
-
-bool Host::isOn() {
- return pimpl_cpu->isOn();
-}
-bool Host::isOff() {
- return ! pimpl_cpu->isOn();
-}
-
-
-/** Get the properties assigned to a host */
-xbt_dict_t Host::getProperties()
-{
- return simgrid::simix::kernel(std::bind(sg_host_get_properties, this));
-}
-
-/** Get the processes attached to the host */
-xbt_swag_t Host::getProcessList()
-{
- return simgrid::simix::kernel([&]() {
- return ((smx_host_priv_t)this->extension(SIMIX_HOST_LEVEL))->process_list;
- });
-}
-
-/** Get the peak power of a host */
-double Host::getCurrentPowerPeak()
-{
- return simgrid::simix::kernel(
- std::bind(surf_host_get_current_power_peak, this));