Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename the property used by the energy plugin for clarity
[simgrid.git] / src / surf / plugins / energy.cpp
index 993ac0b..6c55cf4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2012-2014. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,9 +8,9 @@
 #include "../cpu_cas01.hpp"
 
 /** @addtogroup SURF_plugin_energy
- *    
- *  
- *  BlaBla energy
+ *
+ *
+ *  This is the energy plugin, enabling to account not only for computation time, but also for the dissipated energy in the simulated platform.
  */
 
 XBT_LOG_EXTERNAL_CATEGORY(surf_kernel);
@@ -31,7 +31,7 @@ static void energyCpuDestructedCallback(CpuPtr cpu){
   surf_energy->erase(cpuIt);
 }
 
-static void energyCpuActionStateChangedCallback(CpuActionPtr action){
+static void energyCpuActionStateChangedCallback(CpuActionPtr action, e_surf_action_state_t old, e_surf_action_state_t cur){
   CpuPtr cpu  = getActionCpu(action);
   CpuEnergyPtr cpu_energy = (*surf_energy)[cpu];
 
@@ -144,7 +144,7 @@ xbt_dynar_t CpuEnergy::getWattsRangeList()
        if (cpu->getProperties() == NULL)
                return NULL;
 
-       char* all_power_values_str = (char*)xbt_dict_get_or_null(cpu->getProperties(), "power_per_state");
+       char* all_power_values_str = (char*)xbt_dict_get_or_null(cpu->getProperties(), "watt_per_state");
 
        if (all_power_values_str == NULL)
                return NULL;