A Discrete-Event Network Simulator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::WifiRadioEnergyModelHelper Class Reference

Assign WifiRadioEnergyModel to wifi devices. More...

#include <wifi-radio-energy-model-helper.h>

+ Inheritance diagram for ns3::WifiRadioEnergyModelHelper:

Public Member Functions

 WifiRadioEnergyModelHelper ()
 ~WifiRadioEnergyModelHelper ()
void Set (std::string name, const AttributeValue &v)
void SetDepletionCallback (WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback)
- Public Member Functions inherited from ns3::DeviceEnergyModelHelper
DeviceEnergyModelContainer Install (Ptr< NetDevice > device, Ptr< EnergySource > source) const
DeviceEnergyModelContainer Install (NetDeviceContainer deviceContainer, EnergySourceContainer sourceContainer) const

Private Member Functions

virtual Ptr< DeviceEnergyModelDoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const

Private Attributes

WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback m_depletionCallback
ObjectFactory m_radioEnergy

Detailed Description

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.

Constructor & Destructor Documentation

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 ns3::ObjectFactory::SetTypeId().

ns3::WifiRadioEnergyModelHelper::~WifiRadioEnergyModelHelper ( )

Destroy a RadioEnergy Helper

Definition at line 36 of file wifi-radio-energy-model-helper.cc.

Member Function Documentation

Ptr< DeviceEnergyModel > ns3::WifiRadioEnergyModelHelper::DoInstall ( Ptr< NetDevice device,
Ptr< EnergySource source 
) const
devicePointer to the NetDevice to install DeviceEnergyModel.
sourcePointer 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(), NS_ASSERT, and NS_FATAL_ERROR.

void ns3::WifiRadioEnergyModelHelper::Set ( std::string  name,
const AttributeValue v 
namethe name of the attribute to set
vthe 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 ns3::ObjectFactory::Set().

Referenced by BatteryLifetimeTest::ConstantLoadTest(), and BatteryLifetimeTest::VariableLoadTest().

void ns3::WifiRadioEnergyModelHelper::SetDepletionCallback ( WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback  callback)
callbackCallback 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.

Referenced by BasicEnergyDepletionTest::DepletionTestCase().

The documentation for this class was generated from the following files: