Test case of energy depletion handling for BasicEnergySource and WifiRadioEnergyModel. More...
Collaboration diagram for BasicEnergyDepletionTest:Public Member Functions | |
| BasicEnergyDepletionTest () | |
| virtual | ~BasicEnergyDepletionTest () |
| bool | DoRun () |
| Performs some tests involving energy depletion. | |
Private Member Functions | |
| void | DepletionHandler () |
| Callback invoked when energy is drained from source. | |
| bool | DepletionTestCase (double simTimeS, double updateIntervalS) |
Private Attributes | |
| int | m_callbackCount |
| counter for # of callbacks invoked | |
| int | m_numOfNodes |
| number of nodes in simulation | |
| double | m_simTimeS |
| maximum simulation time, in seconds | |
| double | m_timeStepS |
| simulation time step size, in seconds | |
| double | m_updateIntervalS |
| update interval of each device model | |
Test case of energy depletion handling for BasicEnergySource and WifiRadioEnergyModel.
Definition at line 251 of file basic-energy-model-test.cc.
| BasicEnergyDepletionTest::BasicEnergyDepletionTest | ( | ) |
Definition at line 286 of file basic-energy-model-test.cc.
References m_callbackCount, m_numOfNodes, m_simTimeS, m_timeStepS, and m_updateIntervalS.
|
virtual |
Definition at line 295 of file basic-energy-model-test.cc.
|
private |
Callback invoked when energy is drained from source.
Definition at line 325 of file basic-energy-model-test.cc.
References m_callbackCount.
Referenced by DepletionTestCase().
Here is the caller graph for this function:
|
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 331 of file basic-energy-model-test.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), DepletionHandler(), ns3::Simulator::Destroy(), ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, ns3::DeviceEnergyModelHelper::Install(), ns3::EnergySourceHelper::Install(), m_callbackCount, m_numOfNodes, ns3::MakeCallback(), NS_LOG_DEBUG, ns3::Simulator::Run(), ns3::Seconds(), ns3::WifiPhyHelper::Set(), ns3::BasicEnergySourceHelper::Set(), ns3::YansWifiPhyHelper::SetChannel(), ns3::Config::SetDefault(), ns3::WifiRadioEnergyModelHelper::SetDepletionCallback(), ns3::WifiPhyHelper::SetPcapDataLinkType(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::WifiMacHelper::SetType(), ns3::Simulator::Stop(), and ns3::WIFI_STANDARD_80211b.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| bool BasicEnergyDepletionTest::DoRun | ( | ) |
Performs some tests involving energy depletion.
Definition at line 300 of file basic-energy-model-test.cc.
References DepletionTestCase(), m_callbackCount, m_simTimeS, m_timeStepS, and m_updateIntervalS.
Here is the call graph for this function:
|
private |
counter for # of callbacks invoked
Definition at line 280 of file basic-energy-model-test.cc.
Referenced by BasicEnergyDepletionTest(), DepletionHandler(), DepletionTestCase(), and DoRun().
|
private |
number of nodes in simulation
Definition at line 279 of file basic-energy-model-test.cc.
Referenced by BasicEnergyDepletionTest(), and DepletionTestCase().
|
private |
maximum simulation time, in seconds
Definition at line 281 of file basic-energy-model-test.cc.
Referenced by BasicEnergyDepletionTest(), and DoRun().
|
private |
simulation time step size, in seconds
Definition at line 282 of file basic-energy-model-test.cc.
Referenced by BasicEnergyDepletionTest(), and DoRun().
|
private |
update interval of each device model
Definition at line 283 of file basic-energy-model-test.cc.
Referenced by BasicEnergyDepletionTest(), and DoRun().