A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BatteryLifetimeTest Class Reference
+ Inheritance diagram for BatteryLifetimeTest:
+ Collaboration diagram for BatteryLifetimeTest:

Public Member Functions

 BatteryLifetimeTest ()
virtual ~BatteryLifetimeTest ()
- Public Member Functions inherited from ns3::TestCase
virtual ~TestCase ()

Private Member Functions

bool ConstantLoadTest (double load, Time expLifetime)
void CreateLoadProfiles (void)
void DoRun (void)
bool VariableLoadTest (std::vector< double > loads, std::vector< Time > timeStamps, Time expLifetime)

Private Attributes

double m_alpha
double m_beta
std::vector< LoadProfilem_loadProfiles

Additional Inherited Members

- Protected Member Functions inherited from ns3::TestCase
 TestCase (std::string name)
void AddTestCase (TestCase *testCase)
 Add an individual test case to this test suite.
std::string CreateDataDirFilename (std::string filename)
std::string CreateTempDirFilename (std::string filename)
bool GetErrorStatus (void) const NS_DEPRECATED
std::string GetName (void) const
bool IsStatusFailure (void) const
bool IsStatusSuccess (void) const
bool MustAssertOnFailure (void) const
bool MustContinueOnFailure (void) const
void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line)
void SetDataDir (std::string directory)

Detailed Description

Test case of update remaining energy for RvBatteryModel and WifiRadioEnergyModel.

Definition at line 46 of file rv-battery-model-test.cc.

Constructor & Destructor Documentation

BatteryLifetimeTest::BatteryLifetimeTest ( )

Definition at line 104 of file rv-battery-model-test.cc.

References m_alpha, and m_beta.

BatteryLifetimeTest::~BatteryLifetimeTest ( )
virtual

Definition at line 112 of file rv-battery-model-test.cc.

Member Function Documentation

void BatteryLifetimeTest::CreateLoadProfiles ( void  )
private

Creates load profiles according to "Battery Lifetime Prediction for Energy- Aware Computing" paper.

Definition at line 117 of file rv-battery-model-test.cc.

References LoadProfile::dualFoilLifeTime, LoadProfile::itsyLifetime, LoadProfile::loads, m_loadProfiles, ns3::Seconds(), and LoadProfile::timeStamps.

Referenced by DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BatteryLifetimeTest::DoRun ( void  )
private
Returns
False if no error occurs.

Runs test.

Definition at line 641 of file rv-battery-model-test.cc.

References ConstantLoadTest(), CreateLoadProfiles(), m_alpha, m_beta, m_loadProfiles, NS_LOG_DEBUG, NS_TEST_ASSERT_MSG_EQ, ns3::Seconds(), and VariableLoadTest().

+ Here is the call graph for this function:

Member Data Documentation

double BatteryLifetimeTest::m_alpha
private
double BatteryLifetimeTest::m_beta
private
std::vector<LoadProfile> BatteryLifetimeTest::m_loadProfiles
private

Definition at line 99 of file rv-battery-model-test.cc.

Referenced by CreateLoadProfiles(), and DoRun().


The documentation for this class was generated from the following file: