A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ns3::AcousticModemEnergyModelHelper Class Reference

Assign AcousticModemEnergyModel to uan devices. More...

#include "acoustic-modem-energy-model-helper.h"

+ Inheritance diagram for ns3::AcousticModemEnergyModelHelper:

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 (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
 Implements DeviceEnergyModel::Install. More...
 

Private Attributes

AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback m_depletionCallback
 Callback for energy depletion. More...
 
ObjectFactory m_modemEnergy
 Energy model factory. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AcousticModemEnergyModelHelper()

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().

◆ ~AcousticModemEnergyModelHelper()

ns3::AcousticModemEnergyModelHelper::~AcousticModemEnergyModelHelper ( )

Destroy an AcousticModemEnergy Helper.

Definition at line 36 of file acoustic-modem-energy-model-helper.cc.

Member Function Documentation

◆ DoInstall()

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

Implements DeviceEnergyModel::Install.

Parameters
devicePointer to the NetDevice to install DeviceEnergyModel.
sourcePointer to EnergySource installed on node.
Returns
The energy model.

Implements ns3::DeviceEnergyModelHelper.

Definition at line 58 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.

◆ Set()

void ns3::AcousticModemEnergyModelHelper::Set ( std::string  name,
const AttributeValue v 
)
virtual

Sets an attribute of the underlying energy model object.

Parameters
nameThe name of the attribute to set.
vThe 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().

◆ SetDepletionCallback()

void ns3::AcousticModemEnergyModelHelper::SetDepletionCallback ( AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback  callback)

Sets the callback to be invoked when energy is depleted.

Parameters
callbackCallback function for energy depletion handling.

Definition at line 47 of file acoustic-modem-energy-model-helper.cc.

References m_depletionCallback.

Referenced by AcousticModemEnergyDepletionTestCase::DoRun().

Member Data Documentation

◆ m_depletionCallback

AcousticModemEnergyModel::AcousticModemEnergyDepletionCallback ns3::AcousticModemEnergyModelHelper::m_depletionCallback
private

Callback for energy depletion.

Definition at line 83 of file acoustic-modem-energy-model-helper.h.

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

◆ m_modemEnergy

ObjectFactory ns3::AcousticModemEnergyModelHelper::m_modemEnergy
private

Energy model factory.

Definition at line 80 of file acoustic-modem-energy-model-helper.h.

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


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