]> rtime.felk.cvut.cz Git - frescor/frsh-include.git/blobdiff - frsh_energy_management.h
Update transaction API
[frescor/frsh-include.git] / frsh_energy_management.h
index 78326393b68b07ef95e3cca57ff167b828351484..d1e5beb63403758afbf6cef3b29e75f2ec6c215c 100644 (file)
@@ -1,5 +1,5 @@
 // -----------------------------------------------------------------------
-//  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
 
@@ -265,6 +259,21 @@ int frsh_resource_get_power_level(frsh_resource_type_t resource_type,
                                  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()
  *
@@ -286,7 +295,7 @@ int frsh_resource_get_power_level(frsh_resource_type_t resource_type,
  */
 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