Test case of energy depletion handling for BasicEnergySource and WifiRadioEnergyModel. More...
Public Member Functions | |
BasicEnergyDepletionTest () | |
virtual | ~BasicEnergyDepletionTest () |
bool | DoRun (void) |
Performs some tests involving energy depletion. More... | |
Private Member Functions | |
void | DepletionHandler (void) |
Callback invoked when energy is drained from source. More... | |
bool | DepletionTestCase (double simTimeS, double updateIntervalS) |
Private Attributes | |
int | m_callbackCount |
int | m_numOfNodes |
double | m_simTimeS |
double | m_timeStepS |
double | m_updateIntervalS |
Test case of energy depletion handling for BasicEnergySource and WifiRadioEnergyModel.
Definition at line 256 of file basic-energy-model-test.cc.
BasicEnergyDepletionTest::BasicEnergyDepletionTest | ( | ) |
Definition at line 292 of file basic-energy-model-test.cc.
|
virtual |
Definition at line 301 of file basic-energy-model-test.cc.
|
private |
Callback invoked when energy is drained from source.
Definition at line 331 of file basic-energy-model-test.cc.
Referenced by DepletionTestCase().
|
private |
simTimeS | Simulation time, in seconds. |
updateIntervalS | Device model update interval, in seconds. |
Runs simulation with specified simulation time and update interval.
Definition at line 337 of file basic-energy-model-test.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), ns3::YansWifiPhyHelper::Default(), DepletionHandler(), ns3::Simulator::Destroy(), first::devices, ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, ns3::EnergySourceHelper::Install(), ns3::DeviceEnergyModelHelper::Install(), ns3::MakeCallback(), NS_LOG_DEBUG, ns3::Simulator::Run(), ns3::Seconds(), ns3::BasicEnergySourceHelper::Set(), ns3::WifiPhyHelper::Set(), ns3::YansWifiPhyHelper::SetChannel(), ns3::Config::SetDefault(), ns3::WifiRadioEnergyModelHelper::SetDepletionCallback(), ns3::WifiPhyHelper::SetPcapDataLinkType(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiMacHelper::SetType(), ns3::Simulator::Stop(), third::wifi, and ns3::WIFI_PHY_STANDARD_80211b.
bool BasicEnergyDepletionTest::DoRun | ( | void | ) |
Performs some tests involving energy depletion.
Definition at line 306 of file basic-energy-model-test.cc.
|
private |
Definition at line 285 of file basic-energy-model-test.cc.
|
private |
Definition at line 284 of file basic-energy-model-test.cc.
|
private |
Definition at line 286 of file basic-energy-model-test.cc.
|
private |
Definition at line 287 of file basic-energy-model-test.cc.
|
private |
Definition at line 288 of file basic-energy-model-test.cc.