Public Member Functions | |
BasicEnergyUpdateTest () | |
virtual | ~BasicEnergyUpdateTest () |
![]() | |
virtual | ~TestCase () |
Private Member Functions | |
void | DoRun (void) |
bool | StateSwitchTest (WifiPhy::State state) |
Private Attributes | |
ObjectFactory | m_deviceEnergyModel |
ObjectFactory | m_energySource |
double | m_timeS |
double | m_tolerance |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
void | AddTestCase (TestCase *testCase) NS_DEPRECATED |
Add an individual test case to this test suite. | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
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) |
Test case of update remaining energy for BasicEnergySource and WifiRadioEnergyModel.
Definition at line 46 of file basic-energy-model-test.cc.
BasicEnergyUpdateTest::BasicEnergyUpdateTest | ( | ) |
Definition at line 72 of file basic-energy-model-test.cc.
References m_timeS, and m_tolerance.
|
virtual |
Definition at line 79 of file basic-energy-model-test.cc.
|
private |
Definition at line 84 of file basic-energy-model-test.cc.
References ns3::IDLE, m_deviceEnergyModel, m_energySource, NS_TEST_ASSERT_MSG_EQ, ns3::ObjectFactory::SetTypeId(), and StateSwitchTest().
|
private |
state | Radio state to switch to. |
Runs simulation for a while, check if final state & remaining energy is correctly updated.
Definition at line 99 of file basic-energy-model-test.cc.
References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), ns3::DeviceEnergyModelContainer::Get(), ns3::WifiRadioEnergyModel::GetCcaBusyCurrentA(), ns3::WifiRadioEnergyModel::GetCurrentState(), ns3::WifiRadioEnergyModel::GetIdleCurrentA(), ns3::DeviceEnergyModelContainer::GetN(), ns3::WifiRadioEnergyModel::GetRxCurrentA(), ns3::WifiRadioEnergyModel::GetSwitchingCurrentA(), ns3::WifiRadioEnergyModel::GetTxCurrentA(), ns3::IDLE, m_deviceEnergyModel, m_energySource, m_timeS, m_tolerance, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL, NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL, NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL, ns3::TestCase::Run(), ns3::Seconds(), and ns3::WifiRadioEnergyModel::SetEnergySource().
Referenced by DoRun().
|
private |
Definition at line 69 of file basic-energy-model-test.cc.
Referenced by DoRun(), and StateSwitchTest().
|
private |
Definition at line 68 of file basic-energy-model-test.cc.
Referenced by DoRun(), and StateSwitchTest().
|
private |
Definition at line 65 of file basic-energy-model-test.cc.
Referenced by BasicEnergyUpdateTest(), and StateSwitchTest().
|
private |
Definition at line 66 of file basic-energy-model-test.cc.
Referenced by BasicEnergyUpdateTest(), and StateSwitchTest().