]> 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 1c834a24d52b85445609181049752bec4b03586c..d1e5beb63403758afbf6cef3b29e75f2ec6c215c 100644 (file)
@@ -1,5 +1,5 @@
 // -----------------------------------------------------------------------
-//  Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+//  Copyright (C) 2006 - 2009 FRESCOR consortium partners:
 //
 //    Universidad de Cantabria,              SPAIN
 //    University of York,                    UK
@@ -12,7 +12,7 @@
 //    Visual Tools S.A.                      SPAIN
 //    Rapita Systems Ltd                     UK
 //    Evidence                               ITALY
-//    
+//
 //    See http://www.frescor.org for a link to partners' websites
 //
 //           FRESCOR project (FP6/2005/IST/5-034026) is funded
@@ -22,7 +22,7 @@
 //
 //
 //  based on previous work (FSF) done in the FIRST project
-//                       
+//
 //   Copyright (C) 2005  Mälardalen University, SWEDEN
 //                       Scuola Superiore S.Anna, ITALY
 //                       Universidad de Cantabria, SPAIN
 //   FSF API web pages: http://marte.unican.es/fsf/docs
 //                      http://shark.sssup.it/contrib/first/docs/
 //
-//  This file is part of FRSH API
-//
-//  FRSH API is free software; you can  redistribute it and/or  modify
-//  it under the terms of  the GNU General Public License as published by
-//  the Free Software Foundation;  either  version 2, or (at  your option)
-//  any later version.
+//   This file is part of FRSH (FRescor ScHeduler)
 //
-//  FRSH API  is distributed  in  the hope  that  it  will  be useful,  but
-//  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
-//  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
-//  General Public License for more details.
+//  FRSH is free software; you can redistribute it and/or modify it
+//  under terms of the GNU General Public License as published by the
+//  Free Software Foundation; either version 2, or (at your option) any
+//  later version.  FRSH is distributed in the hope that it will be
+//  useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+//  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//  General Public License for more details. You should have received a
+//  copy of the GNU General Public License along with FRSH; see file
+//  COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+//  Cambridge, MA 02139, USA.
 //
-//  You should have  received a  copy of  the  GNU  General Public License
-//  distributed  with  FRSH API;  see file COPYING.   If not,  write to the
-//  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
-//  02111-1307, USA.
-//
-//  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.
+//  As a special exception, including FRSH header files in a file,
+//  instantiating FRSH generics or templates, or linking other files
+//  with FRSH objects to produce an executable application, does not
+//  by itself cause the resulting executable application 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 Public License.
 // -----------------------------------------------------------------------
 //frsh_energy_management.h
 
@@ -262,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()
  *
@@ -283,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