Assign WifiRadioEnergyModel to wifi devices. More...
#include <wifi-radio-energy-model-helper.h>
Private Member Functions | |
virtual Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
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 31 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().
ns3::WifiRadioEnergyModelHelper::~WifiRadioEnergyModelHelper | ( | ) |
Destroy a RadioEnergy Helper.
Definition at line 38 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 92 of file wifi-radio-energy-model-helper.cc.
References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), ns3::ObjectFactory::GetTypeId(), ns3::TypeId::GetUid(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_depletionCallback, m_radioEnergy, m_rechargedCallback, m_txCurrentModel, ns3::MakeCallback(), NS_ASSERT, NS_FATAL_ERROR, ns3::WifiPhy::ResumeFromSleep(), and ns3::WifiPhy::SetSleepMode().
|
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 43 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 49 of file wifi-radio-energy-model-helper.cc.
References m_depletionCallback.
Referenced by BasicEnergyDepletionTest::DepletionTestCase().
void ns3::WifiRadioEnergyModelHelper::SetRechargedCallback | ( | WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback | callback | ) |
callback | Callback function for energy recharged handling. |
Sets the callback to be invoked when energy is recharged.
Definition at line 56 of file wifi-radio-energy-model-helper.cc.
References m_rechargedCallback.
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 () |
||
) |
name | the name of the model to set |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
Configure a propagation delay for this channel.
Definition at line 63 of file wifi-radio-energy-model-helper.cc.
References m_txCurrentModel, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by main().
|
private |
Definition at line 116 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), SetDepletionCallback(), and WifiRadioEnergyModelHelper().
|
private |
Definition at line 115 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), Set(), and WifiRadioEnergyModelHelper().
|
private |
Definition at line 117 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), SetRechargedCallback(), and WifiRadioEnergyModelHelper().
|
private |
Definition at line 118 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), and SetTxCurrentModel().