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 () override | |
Destroy a RadioEnergy Helper. More... | |
void | Set (std::string name, const AttributeValue &v) override |
void | SetDepletionCallback (WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback) |
void | SetRechargedCallback (WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback) |
template<typename... Ts> | |
void | SetTxCurrentModel (std::string name, Ts &&... args) |
Public Member Functions inherited from ns3::DeviceEnergyModelHelper | |
virtual | ~DeviceEnergyModelHelper () |
DeviceEnergyModelContainer | Install (NetDeviceContainer deviceContainer, EnergySourceContainer sourceContainer) const |
DeviceEnergyModelContainer | Install (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
Private Member Functions | |
Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const override |
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... | |
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 29 of file wifi-radio-energy-model-helper.cc.
References m_depletionCallback, m_radioEnergy, m_rechargedCallback, ns3::Callback< R, UArgs >::Nullify(), and ns3::ObjectFactory::SetTypeId().
|
override |
Destroy a RadioEnergy Helper.
Definition at line 36 of file wifi-radio-energy-model-helper.cc.
|
overrideprivatevirtual |
device | Pointer to the NetDevice to install DeviceEnergyModel. |
source | Pointer to EnergySource to install. |
Implements DeviceEnergyModel::Install.
Implements ns3::DeviceEnergyModelHelper.
Definition at line 65 of file wifi-radio-energy-model-helper.cc.
References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), ns3::WifiNetDevice::GetPhy(), ns3::ObjectFactory::GetTypeId(), ns3::TypeId::GetUid(), ns3::Callback< R, UArgs >::IsNull(), m_depletionCallback, m_radioEnergy, m_rechargedCallback, m_txCurrentModel, ns3::MakeCallback(), NS_ASSERT, NS_FATAL_ERROR, ns3::WifiPhy::RegisterListener(), ns3::WifiPhy::ResumeFromOff(), ns3::WifiPhy::SetOffMode(), and ns3::WifiPhy::SetWifiRadioEnergyModel().
|
overridevirtual |
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(), 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().
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 54 of file wifi-radio-energy-model-helper.cc.
References m_rechargedCallback.
void ns3::WifiRadioEnergyModelHelper::SetTxCurrentModel | ( | std::string | name, |
Ts &&... | args | ||
) |
Ts | [deduced] Argument types |
name | the name of the model to set | |
[in] | args | Name and AttributeValue pairs to set. |
Configure a Transmission Current model for this EnergySource.
Definition at line 107 of file wifi-radio-energy-model-helper.h.
References check-style-clang-format::args, and m_txCurrentModel.
|
private |
radio energy depletion callback
Definition at line 95 of file wifi-radio-energy-model-helper.h.
Referenced by WifiRadioEnergyModelHelper(), DoInstall(), and SetDepletionCallback().
|
private |
radio energy
Definition at line 93 of file wifi-radio-energy-model-helper.h.
Referenced by WifiRadioEnergyModelHelper(), DoInstall(), and Set().
|
private |
radio energy recharged callback
Definition at line 97 of file wifi-radio-energy-model-helper.h.
Referenced by WifiRadioEnergyModelHelper(), DoInstall(), and SetRechargedCallback().
|
private |
transmit current model
Definition at line 98 of file wifi-radio-energy-model-helper.h.
Referenced by DoInstall(), and SetTxCurrentModel().