src/energy/model/rv-battery-model.cc
changeset 9281 6b83f7ad7fad
parent 9063 32755d0516f4
child 9703 681f35b212ff
--- a/src/energy/model/rv-battery-model.cc	Thu Apr 04 21:35:09 2013 +0200
+++ b/src/energy/model/rv-battery-model.cc	Thu Apr 04 22:25:44 2013 +0200
@@ -86,6 +86,7 @@
 
 RvBatteryModel::RvBatteryModel ()
 {
+  NS_LOG_FUNCTION (this);
   m_lastSampleTime = Seconds (0.0);
   m_previousLoad = 0.0;
   m_batteryLevel = 1; // fully charged
@@ -94,17 +95,20 @@
 
 RvBatteryModel::~RvBatteryModel ()
 {
+  NS_LOG_FUNCTION (this);
 }
 
 double
 RvBatteryModel::GetInitialEnergy (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_alpha * GetSupplyVoltage ();
 }
 
 double
 RvBatteryModel::GetSupplyVoltage (void) const
 {
+  NS_LOG_FUNCTION (this);
   // average of Voc and Vcutoff
   return (m_openCircuitVoltage - m_cutoffVoltage) / 2 + m_cutoffVoltage;
 }
@@ -120,6 +124,7 @@
 double
 RvBatteryModel::GetEnergyFraction (void)
 {
+  NS_LOG_FUNCTION (this);
   return GetBatteryLevel ();
 }
 
@@ -184,6 +189,7 @@
 Time
 RvBatteryModel::GetSamplingInterval (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_samplingInterval;
 }
 
@@ -198,6 +204,7 @@
 double
 RvBatteryModel::GetOpenCircuitVoltage (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_openCircuitVoltage;
 }
 
@@ -212,6 +219,7 @@
 double
 RvBatteryModel::GetCutoffVoltage (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_cutoffVoltage;
 }
 
@@ -226,6 +234,7 @@
 double
 RvBatteryModel::GetAlpha (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_alpha;
 }
 
@@ -240,6 +249,7 @@
 double
 RvBatteryModel::GetBeta (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_beta;
 }
 
@@ -254,6 +264,7 @@
 Time
 RvBatteryModel::GetLifetime (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_lifetime;
 }
 
@@ -267,6 +278,7 @@
 int
 RvBatteryModel::GetNumOfTerms (void) const
 {
+  NS_LOG_FUNCTION (this);
   return m_numOfTerms;
 }
 
@@ -277,6 +289,7 @@
 void
 RvBatteryModel::DoStart (void)
 {
+  NS_LOG_FUNCTION (this);
   NS_LOG_DEBUG ("RvBatteryModel:Starting battery level update!");
   UpdateEnergySource ();  // start periodic sampling of load (total current)
 }
@@ -284,6 +297,7 @@
 void
 RvBatteryModel::DoDispose (void)
 {
+  NS_LOG_FUNCTION (this);
   BreakDeviceEnergyModelRefCycle ();  // break reference cycle
 }