A Discrete-Event Network Simulator
API
ns3::BasicEnergySourceHelper Class Reference

Creates a BasicEnergySource object. More...

#include "basic-energy-source-helper.h"

+ Inheritance diagram for ns3::BasicEnergySourceHelper:
+ Collaboration diagram for ns3::BasicEnergySourceHelper:

Public Member Functions

 BasicEnergySourceHelper ()
 
 ~BasicEnergySourceHelper () override
 
void Set (std::string name, const AttributeValue &v) override
 
- Public Member Functions inherited from ns3::EnergySourceHelper
virtual ~EnergySourceHelper ()
 
EnergySourceContainer Install (NodeContainer c) const
 
EnergySourceContainer Install (Ptr< Node > node) const
 
EnergySourceContainer Install (std::string nodeName) const
 
EnergySourceContainer InstallAll () const
 This function installs an EnergySource on all nodes in simulation. More...
 

Private Member Functions

Ptr< EnergySourceDoInstall (Ptr< Node > node) const override
 

Private Attributes

ObjectFactory m_basicEnergySource
 Energy source factory. More...
 

Detailed Description

Creates a BasicEnergySource object.

Definition at line 35 of file basic-energy-source-helper.h.

Constructor & Destructor Documentation

◆ BasicEnergySourceHelper()

ns3::BasicEnergySourceHelper::BasicEnergySourceHelper ( )

Definition at line 27 of file basic-energy-source-helper.cc.

References m_basicEnergySource, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~BasicEnergySourceHelper()

ns3::BasicEnergySourceHelper::~BasicEnergySourceHelper ( )
override

Definition at line 32 of file basic-energy-source-helper.cc.

Member Function Documentation

◆ DoInstall()

Ptr< EnergySource > ns3::BasicEnergySourceHelper::DoInstall ( Ptr< Node node) const
overrideprivatevirtual
Parameters
nodePointer to node where the energy source is to be installed.
Returns
Pointer to the created EnergySource.

Child classes of EnergySourceHelper only have to implement this function, to create and aggregate an EnergySource object onto a single node. Rest of the installation process (eg. installing EnergySource on set of nodes) is implemented in the EnergySourceHelper base class.

Implements ns3::EnergySourceHelper.

Definition at line 43 of file basic-energy-source-helper.cc.

References ns3::ObjectFactory::Create(), m_basicEnergySource, and NS_ASSERT.

+ Here is the call graph for this function:

◆ Set()

void ns3::BasicEnergySourceHelper::Set ( std::string  name,
const AttributeValue v 
)
overridevirtual
Parameters
nameName of attribute to set.
vValue of the attribute.

Sets one of the attributes of underlying EnergySource.

Implements ns3::EnergySourceHelper.

Definition at line 37 of file basic-energy-source-helper.cc.

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

Referenced by BasicEnergyDepletionTest::DepletionTestCase(), AcousticModemEnergyTestCase::DoRun(), AcousticModemEnergyDepletionTestCase::DoRun(), and UanExperiment::SetupEnergy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_basicEnergySource

ObjectFactory ns3::BasicEnergySourceHelper::m_basicEnergySource
private

Energy source factory.

Definition at line 47 of file basic-energy-source-helper.h.

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


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