Assign WifiRadioEnergyModel to wifi devices. More...
#include <wifi-radio-energy-model-helper.h>
Public Member Functions | |
WifiRadioEnergyModelHelper () | |
Construct a helper which is used to add a radio energy model to a node. More... | |
~WifiRadioEnergyModelHelper () | |
Destroy a RadioEnergy Helper. More... | |
void | Set (std::string name, const AttributeValue &v) |
void | SetDepletionCallback (WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback) |
Public Member Functions inherited from ns3::DeviceEnergyModelHelper | |
virtual | ~DeviceEnergyModelHelper () |
DeviceEnergyModelContainer | Install (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
DeviceEnergyModelContainer | Install (NetDeviceContainer deviceContainer, EnergySourceContainer sourceContainer) const |
Private Member Functions | |
virtual Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
Private Attributes | |
WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback | m_depletionCallback |
ObjectFactory | m_radioEnergy |
Assign WifiRadioEnergyModel to wifi devices.
This installer installs WifiRadioEnergyModel for only WifiNetDevice objects.
Definition at line 36 of file wifi-radio-energy-model-helper.h.
ns3::WifiRadioEnergyModelHelper::WifiRadioEnergyModelHelper | ( | ) |
Construct a helper which is used to add a radio energy model to a node.
Definition at line 30 of file wifi-radio-energy-model-helper.cc.
References m_depletionCallback, m_radioEnergy, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify(), and ns3::ObjectFactory::SetTypeId().
ns3::WifiRadioEnergyModelHelper::~WifiRadioEnergyModelHelper | ( | ) |
Destroy a RadioEnergy Helper.
Definition at line 36 of file wifi-radio-energy-model-helper.cc.
|
privatevirtual |
device | Pointer to the NetDevice to install DeviceEnergyModel. |
source | Pointer to EnergySource to install. |
Implements DeviceEnergyModel::Install.
Implements ns3::DeviceEnergyModelHelper.
Definition at line 58 of file wifi-radio-energy-model-helper.cc.
References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), m_depletionCallback, m_radioEnergy, NS_ASSERT, and NS_FATAL_ERROR.
|
virtual |
name | the name of the attribute to set |
v | the value of the attribute |
Sets an attribute of the underlying PHY object.
Implements ns3::DeviceEnergyModelHelper.
Definition at line 41 of file wifi-radio-energy-model-helper.cc.
References m_radioEnergy, and ns3::ObjectFactory::Set().
Referenced by BatteryLifetimeTest::ConstantLoadTest(), main(), and BatteryLifetimeTest::VariableLoadTest().
void ns3::WifiRadioEnergyModelHelper::SetDepletionCallback | ( | WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback | callback | ) |
callback | Callback function for energy depletion handling. |
Sets the callback to be invoked when energy is depleted.
Definition at line 47 of file wifi-radio-energy-model-helper.cc.
References m_depletionCallback.
Referenced by BasicEnergyDepletionTest::DepletionTestCase().
|
private |
Definition at line 78 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), SetDepletionCallback(), and WifiRadioEnergyModelHelper().
|
private |
Definition at line 77 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), Set(), and WifiRadioEnergyModelHelper().