A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 ()
 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)
 
void SetRechargedCallback (WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback)
 
void SetTxCurrentModel (std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
 
- 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
 radio energy depletion callback More...
 
ObjectFactory m_radioEnergy
 radio energy More...
 
WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback m_rechargedCallback
 radio energy recharged callback More...
 
ObjectFactory m_txCurrentModel
 transmit current model More...
 

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

◆ WifiRadioEnergyModelHelper()

ns3::WifiRadioEnergyModelHelper::WifiRadioEnergyModelHelper ( )

Construct a helper which is used to add a radio energy model to a node.

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

References m_depletionCallback, m_radioEnergy, m_rechargedCallback, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify(), and ns3::ObjectFactory::SetTypeId().

◆ ~WifiRadioEnergyModelHelper()

ns3::WifiRadioEnergyModelHelper::~WifiRadioEnergyModelHelper ( )

Destroy a RadioEnergy Helper.

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

Member Function Documentation

◆ DoInstall()

Ptr< DeviceEnergyModel > ns3::WifiRadioEnergyModelHelper::DoInstall ( Ptr< NetDevice device,
Ptr< EnergySource source 
) const
privatevirtual

◆ Set()

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 40 of file wifi-radio-energy-model-helper.cc.

References m_radioEnergy, and ns3::ObjectFactory::Set().

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

◆ SetDepletionCallback()

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 46 of file wifi-radio-energy-model-helper.cc.

References m_depletionCallback.

Referenced by BasicEnergyDepletionTest::DepletionTestCase().

◆ SetRechargedCallback()

void ns3::WifiRadioEnergyModelHelper::SetRechargedCallback ( WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback  callback)
Parameters
callbackCallback function for energy recharged handling.

Sets the callback to be invoked when energy is recharged.

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

References m_rechargedCallback.

◆ SetTxCurrentModel()

void ns3::WifiRadioEnergyModelHelper::SetTxCurrentModel ( std::string  name,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue () 
)
Parameters
namethe name of the model to set
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set

Configure a Transmission Current model for this EnergySource.

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

References m_txCurrentModel, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

Member Data Documentation

◆ m_depletionCallback

WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback ns3::WifiRadioEnergyModelHelper::m_depletionCallback
private

radio energy depletion callback

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

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

◆ m_radioEnergy

ObjectFactory ns3::WifiRadioEnergyModelHelper::m_radioEnergy
private

radio energy

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

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

◆ m_rechargedCallback

WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback ns3::WifiRadioEnergyModelHelper::m_rechargedCallback
private

radio energy recharged callback

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

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

◆ m_txCurrentModel

ObjectFactory ns3::WifiRadioEnergyModelHelper::m_txCurrentModel
private

transmit current model

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

Referenced by DoInstall(), and SetTxCurrentModel().


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