Assign AcousticModemEnergyModel to uan devices. More...
#include "acoustic-modem-energy-model-helper.h"
Public Member Functions | |
AcousticModemEnergyModelHelper () | |
Construct a helper which is used to add a radio energy model to a node. | |
~AcousticModemEnergyModelHelper () override | |
Destroy an AcousticModemEnergy Helper. | |
void | Set (std::string name, const AttributeValue &v) override |
Sets an attribute of the underlying energy model object. | |
void | SetDepletionCallback (AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback callback) |
Sets the callback to be invoked when energy is depleted. | |
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 |
virtual void | Set (std::string name, const AttributeValue &v)=0 |
Private Member Functions | |
Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const override |
Implements DeviceEnergyModel::Install. | |
Private Attributes | |
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback | m_depletionCallback |
Callback for energy depletion. | |
ObjectFactory | m_modemEnergy |
Energy model factory. | |
Assign AcousticModemEnergyModel to uan devices.
This installer installs AcousticModemEnergyModel for only UanNetDevice objects.
Definition at line 37 of file acoustic-modem-energy-model-helper.h.
ns3::AcousticModemEnergyModelHelper::AcousticModemEnergyModelHelper | ( | ) |
Construct a helper which is used to add a radio energy model to a node.
Definition at line 31 of file acoustic-modem-energy-model-helper.cc.
References m_depletionCallback, m_modemEnergy, ns3::Callback< R, UArgs >::Nullify(), and ns3::ObjectFactory::SetTypeId().
|
override |
Destroy an AcousticModemEnergy Helper.
Definition at line 37 of file acoustic-modem-energy-model-helper.cc.
|
overrideprivatevirtual |
Implements DeviceEnergyModel::Install.
device | Pointer to the NetDevice to install DeviceEnergyModel. |
source | Pointer to EnergySource installed on node. |
Implements ns3::DeviceEnergyModelHelper.
Definition at line 59 of file acoustic-modem-energy-model-helper.cc.
References ns3::DeviceEnergyModel::ChangeState(), ns3::ObjectFactory::Create(), m_depletionCallback, m_modemEnergy, ns3::MakeCallback(), NS_ASSERT, and NS_FATAL_ERROR.
|
overridevirtual |
Sets an attribute of the underlying energy model object.
name | The name of the attribute to set. |
v | The value of the attribute. |
Implements ns3::DeviceEnergyModelHelper.
Definition at line 42 of file acoustic-modem-energy-model-helper.cc.
References m_modemEnergy, and ns3::ObjectFactory::Set().
void ns3::AcousticModemEnergyModelHelper::SetDepletionCallback | ( | AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback | callback | ) |
Sets the callback to be invoked when energy is depleted.
callback | Callback function for energy depletion handling. |
Definition at line 48 of file acoustic-modem-energy-model-helper.cc.
References m_depletionCallback.
Referenced by AcousticModemEnergyDepletionTestCase::DoRun().
|
private |
Callback for energy depletion.
Definition at line 82 of file acoustic-modem-energy-model-helper.h.
Referenced by AcousticModemEnergyModelHelper(), DoInstall(), and SetDepletionCallback().
|
private |
Energy model factory.
Definition at line 79 of file acoustic-modem-energy-model-helper.h.
Referenced by AcousticModemEnergyModelHelper(), DoInstall(), and Set().