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

Assign WifiRadioEnergyModel to wifi devices. More...

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

+ Inheritance diagram for ns3::WifiRadioEnergyModelHelper:
+ Collaboration diagram for ns3::WifiRadioEnergyModelHelper:

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< 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 m_depletionCallback, m_radioEnergy, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

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
privatevirtual
Parameters
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(), m_depletionCallback, m_radioEnergy, NS_ASSERT, and NS_FATAL_ERROR.

+ Here is the call graph for this function:

void ns3::WifiRadioEnergyModelHelper::Set ( std::string  name,
const AttributeValue v 
)
virtual
Parameters
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 m_radioEnergy, and ns3::ObjectFactory::Set().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References m_depletionCallback.

Referenced by BasicEnergyDepletionTest::DepletionTestCase().

+ Here is the caller graph for this function:

Member Data Documentation

WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback ns3::WifiRadioEnergyModelHelper::m_depletionCallback
private
ObjectFactory ns3::WifiRadioEnergyModelHelper::m_radioEnergy
private

Definition at line 77 of file wifi-radio-energy-model-helper.h.

Referenced by DoInstall(), Set(), and WifiRadioEnergyModelHelper().


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