// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2009 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// by the GNU General Public License. This exception does not
// however invalidate any other reasons why the executable file might be
// covered by the GNU Public License.
-// As a special exception, if you include this header file into source
-// files to be compiled, this header file does not by itself cause
-// the resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
// -----------------------------------------------------------------------
//frsh_energy_management.h
frsh_resource_id_t resource_id,
frsh_power_level_t *power_level);
+/**
+ * frsh_resource_get_speed()
+ *
+ * Get in speed_ratio representative value for the speed of the specified
+ * resource, with respect to the maximum possible speed for such resource.
+ *
+ * @note
+ * Only implementation for resource_type = FRSH_RT_PROCESSOR is mandatory,
+ * if the energy management module is present.
+ **/
+int frsh_resource_get_speed(frsh_resource_type_t resource_type,
+ frsh_resource_id_t resource_id,
+ frsh_power_level_t power_level,
+ double *speed_ratio);
+
/**
* frsh_resource_get_num_power_levels()
*
*/
int frsh_resource_get_num_power_levels(frsh_resource_type_t resource_type,
frsh_resource_id_t resource_id,
- frsh_power_level_t *num_power_levels);
+ int *num_power_levels);
//////////////////////////////////////////////////////////////////////
// BATTERY EXPIRATION AND MANAGING POWER LEVELS