Test case of energy depletion handling for BasicEnergySource and WifiRadioEnergyModel. More...
Public Member Functions | |
BasicEnergyDepletionTest () | |
virtual | ~BasicEnergyDepletionTest () |
bool | DoRun () |
Performs some tests involving energy depletion. More... | |
Private Member Functions | |
void | DepletionHandler () |
Callback invoked when energy is drained from source. More... | |
bool | DepletionTestCase (double simTimeS, double updateIntervalS) |
Private Attributes | |
int | m_callbackCount |
counter for # of callbacks invoked More... | |
int | m_numOfNodes |
number of nodes in simulation More... | |
double | m_simTimeS |
maximum simulation time, in seconds More... | |
double | m_timeStepS |
simulation time step size, in seconds More... | |
double | m_updateIntervalS |
update interval of each device model More... | |
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.
|
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.
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 331 of file basic-energy-model-test.cc.
References ns3::YansWifiChannelHelper::Create(), ns3::NodeContainer::Create(), DepletionHandler(), ns3::Simulator::Destroy(), first::devices, ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, ns3::DeviceEnergyModelHelper::Install(), ns3::EnergySourceHelper::Install(), 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(), third::wifi, and ns3::WIFI_STANDARD_80211b.
bool BasicEnergyDepletionTest::DoRun | ( | void | ) |
Performs some tests involving energy depletion.
Definition at line 300 of file basic-energy-model-test.cc.
|
private |
counter for # of callbacks invoked
Definition at line 280 of file basic-energy-model-test.cc.
|
private |
number of nodes in simulation
Definition at line 279 of file basic-energy-model-test.cc.
|
private |
maximum simulation time, in seconds
Definition at line 281 of file basic-energy-model-test.cc.
|
private |
simulation time step size, in seconds
Definition at line 282 of file basic-energy-model-test.cc.
|
private |
update interval of each device model
Definition at line 283 of file basic-energy-model-test.cc.