 Inheritance diagram for BatteryLifetimeTest:
 Inheritance diagram for BatteryLifetimeTest:| 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< LoadProfile > | m_loadProfiles | 
| Additional Inherited Members | |
|  Public Types inherited from ns3::TestCase | |
| enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } | 
| How long the test takes to execute.  More... | |
|  Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| void | AddTestCase (TestCase *testCase) NS_DEPRECATED | 
| Add an individual test case to this test suite.  More... | |
| void | AddTestCase (TestCase *testCase, enum TestDuration duration) | 
| Add an individual test case to this test suite.  More... | |
| 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) | 
Test case of update remaining energy for RvBatteryModel and WifiRadioEnergyModel.
Definition at line 46 of file rv-battery-model-test.cc.
| 
 | private | 
| load | Load value, in Amperes (A). | 
| expLifetime | Expected lifetime. | 
Runs simulation with constant load and checks the battery lifetime with known results.
Definition at line 693 of file rv-battery-model-test.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::EnergySourceContainer::Get(), ns3::RvBatteryModel::GetLifetime(), ns3::Time::GetSeconds(), ns3::EnergySourceHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::WifiHelper::Install(), NS_LOG_DEBUG, ns3::Seconds(), ns3::RvBatteryModelHelper::Set(), ns3::WifiRadioEnergyModelHelper::Set(), ns3::YansWifiPhyHelper::Set(), ns3::YansWifiPhyHelper::SetChannel(), ns3::YansWifiPhyHelper::SetPcapDataLinkType(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::NqosWifiMacHelper::SetType(), and ns3::WIFI_PHY_STANDARD_80211b.
Referenced by DoRun().
| 
 | 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 ns3::Seconds().
Referenced by DoRun().
| 
 | privatevirtual | 
Runs test.
Implements ns3::TestCase.
Definition at line 641 of file rv-battery-model-test.cc.
References ConstantLoadTest(), CreateLoadProfiles(), NS_LOG_DEBUG, ns3::Seconds(), and VariableLoadTest().
| 
 | private | 
| loads | Load profile. | 
| timeStamps | Time stamps. | 
| expLifetime | Expected lifetime. | 
Runs simulation with variable load and checks the battery lifetime with known results.
Definition at line 776 of file rv-battery-model-test.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::DeviceEnergyModelContainer::Get(), ns3::EnergySourceContainer::Get(), ns3::RvBatteryModel::GetLifetime(), ns3::Time::GetSeconds(), ns3::EnergySourceHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::WifiHelper::Install(), NS_ASSERT, NS_LOG_DEBUG, ns3::Seconds(), ns3::RvBatteryModelHelper::Set(), ns3::WifiRadioEnergyModelHelper::Set(), ns3::YansWifiPhyHelper::Set(), ns3::YansWifiPhyHelper::SetChannel(), ns3::YansWifiPhyHelper::SetPcapDataLinkType(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiHelper::SetRemoteStationManager(), ns3::WifiHelper::SetStandard(), ns3::NqosWifiMacHelper::SetType(), and ns3::WIFI_PHY_STANDARD_80211b.
Referenced by DoRun().