Revision: 7560
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7560&view=rev
Author:   rtv
Date:     2009-03-30 18:27:45 +0000 (Mon, 30 Mar 2009)

Log Message:
-----------
added more powerpack API

Modified Paths:
--------------
    code/stage/trunk/libstage/powerpack.cc
    code/stage/trunk/libstage/stage.hh

Modified: code/stage/trunk/libstage/powerpack.cc
===================================================================
--- code/stage/trunk/libstage/powerpack.cc      2009-03-30 06:57:21 UTC (rev 
7559)
+++ code/stage/trunk/libstage/powerpack.cc      2009-03-30 18:27:45 UTC (rev 
7560)
@@ -205,6 +205,11 @@
   return stored;
 }
 
+stg_joules_t PowerPack::GetDissipated() const
+{
+  return dissipated;
+}
+
 void PowerPack::SetStored( stg_joules_t j ) 
 {
   global_stored -= stored;
@@ -217,6 +222,7 @@
   stg_joules_t amount = MIN( stored, j );
   
   Subtract( amount );
+  dissipated += amount;
   global_dissipated += amount;
 
   //stg_watts_t w = j / (interval / 1e6);

Modified: code/stage/trunk/libstage/stage.hh
===================================================================
--- code/stage/trunk/libstage/stage.hh  2009-03-30 06:57:21 UTC (rev 7559)
+++ code/stage/trunk/libstage/stage.hh  2009-03-30 18:27:45 UTC (rev 7560)
@@ -1465,6 +1465,8 @@
         /** TRUE iff the device is receiving energy */
         bool charging;
         
+        /** Energy dissipated */
+        stg_joules_t dissipated;
 
         static stg_joules_t global_stored;
         static stg_joules_t global_capacity;
@@ -1505,6 +1507,7 @@
         
         stg_joules_t GetStored() const;
         stg_joules_t GetCapacity() const;
+        stg_joules_t GetDissipated() const;
         void SetCapacity( stg_joules_t j );
         void SetStored( stg_joules_t j );      
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to