-void surf_workstation_set_power_peak_at(surf_resource_t resource, int pstate_index){
- return get_casted_workstation(resource)->setPowerPeakAt(pstate_index);
+using simgrid::energy::HostEnergy;
+using simgrid::energy::surf_energy;
+
+double surf_host_get_wattmin_at(sg_host_t resource, int pstate){
+ xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
+ std::map<simgrid::surf::Host*, HostEnergy*>::iterator hostIt = surf_energy->find(get_casted_host(resource));
+ return hostIt->second->getWattMinAt(pstate);
+}
+double surf_host_get_wattmax_at(sg_host_t resource, int pstate){
+ xbt_assert(surf_energy!=NULL, "The Energy plugin is not active. Please call sg_energy_plugin_init() during initialization.");
+ std::map<simgrid::surf::Host*, HostEnergy*>::iterator hostIt = surf_energy->find(get_casted_host(resource));
+ return hostIt->second->getWattMaxAt(pstate);