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. More... | |
~AcousticModemEnergyModelHelper () | |
Destroy an AcousticModemEnergy Helper. More... | |
void | Set (std::string name, const AttributeValue &v) |
Sets an attribute of the underlying energy model object. More... | |
void | SetDepletionCallback (AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback callback) |
Sets the callback to be invoked when energy is depleted. More... | |
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 | |
virtual Ptr< DeviceEnergyModel > | DoInstall (Ptr< NetDevice > device, Ptr< EnergySource > source) const |
Implements DeviceEnergyModel::Install. More... | |
Private Attributes | |
AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback | m_depletionCallback |
Callback for energy depletion. More... | |
ObjectFactory | m_modemEnergy |
Energy model factory. More... | |
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 30 of file acoustic-modem-energy-model-helper.cc.
References m_depletionCallback, m_modemEnergy, ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::Nullify(), and ns3::ObjectFactory::SetTypeId().
ns3::AcousticModemEnergyModelHelper::~AcousticModemEnergyModelHelper | ( | ) |
Destroy an AcousticModemEnergy Helper.
Definition at line 36 of file acoustic-modem-energy-model-helper.cc.
|
privatevirtual |
Implements DeviceEnergyModel::Install.
device | Pointer to the NetDevice to install DeviceEnergyModel. |
source | Pointer to EnergySource installed on node. |
Implements ns3::DeviceEnergyModelHelper.
Definition at line 58 of file acoustic-modem-energy-model-helper.cc.
References ns3::DeviceEnergyModel::ChangeState(), ns3::ObjectFactory::Create(), ns3::Object::GetInstanceTypeId(), ns3::TypeId::GetName(), ns3::NetDevice::GetNode(), m_depletionCallback, m_modemEnergy, ns3::MakeCallback(), NS_ASSERT, and NS_FATAL_ERROR.
|
virtual |
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 41 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 47 of file acoustic-modem-energy-model-helper.cc.
References m_depletionCallback.
Referenced by AcousticModemEnergyDepletionTestCase::DoRun().
|
private |
Callback for energy depletion.
Definition at line 83 of file acoustic-modem-energy-model-helper.h.
Referenced by AcousticModemEnergyModelHelper(), DoInstall(), and SetDepletionCallback().
|
private |
Energy model factory.
Definition at line 80 of file acoustic-modem-energy-model-helper.h.
Referenced by AcousticModemEnergyModelHelper(), DoInstall(), and Set().