A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::AcousticModemEnergyModelHelper Class Reference

Assign AcousticModemEnergyModel to uan devices. More...

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

+ Inheritance diagram for ns3::AcousticModemEnergyModelHelper:
+ Collaboration diagram for ns3::AcousticModemEnergyModelHelper:

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

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 31 of file acoustic-modem-energy-model-helper.cc.

References m_depletionCallback, m_modemEnergy, ns3::Callback< R, UArgs >::Nullify(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~AcousticModemEnergyModelHelper()

ns3::AcousticModemEnergyModelHelper::~AcousticModemEnergyModelHelper ( )
override

Destroy an AcousticModemEnergy Helper.

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

Member Function Documentation

◆ DoInstall()

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

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

+ Here is the call graph for this function:

◆ Set()

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

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 42 of file acoustic-modem-energy-model-helper.cc.

References m_modemEnergy, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

◆ 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 48 of file acoustic-modem-energy-model-helper.cc.

References m_depletionCallback.

Referenced by AcousticModemEnergyDepletionTestCase::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_depletionCallback

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

Callback for energy depletion.

Definition at line 82 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 79 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: