A Discrete-Event Network Simulator
API
Public Member Functions | Private Member Functions | List of all members
ns3::EnergyHarvesterHelper Class Referenceabstract

Creates EnergyHarvester objects. More...

#include "energy-harvester-helper.h"

+ Inheritance diagram for ns3::EnergyHarvesterHelper:

Public Member Functions

virtual ~EnergyHarvesterHelper ()
 
EnergyHarvesterContainer Install (Ptr< EnergySource > source) const
 
EnergyHarvesterContainer Install (EnergySourceContainer sourceContainer) const
 
EnergyHarvesterContainer Install (std::string sourceName) const
 
virtual void Set (std::string name, const AttributeValue &v)=0
 

Private Member Functions

virtual Ptr< EnergyHarvesterDoInstall (Ptr< EnergySource > source) const =0
 

Detailed Description

Creates EnergyHarvester objects.

This class creates and installs energy harvesters onto network nodes.

Definition at line 45 of file energy-harvester-helper.h.

Constructor & Destructor Documentation

◆ ~EnergyHarvesterHelper()

ns3::EnergyHarvesterHelper::~EnergyHarvesterHelper ( )
virtual

Definition at line 31 of file energy-harvester-helper.cc.

Member Function Documentation

◆ DoInstall()

virtual Ptr<EnergyHarvester> ns3::EnergyHarvesterHelper::DoInstall ( Ptr< EnergySource source) const
privatepure virtual
Parameters
nodePointer to node where the energy harvester is to be installed.
Returns
Pointer to the created EnergyHarvester.

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

Implemented in ns3::BasicEnergyHarvesterHelper.

Referenced by Install().

◆ Install() [1/3]

EnergyHarvesterContainer ns3::EnergyHarvesterHelper::Install ( Ptr< EnergySource source) const
Parameters
sourcePointer to the energy source where EnergyHarvester will be installed.
Returns
An EnergyHarvesterContainer which contains all the EnergyHarvesters.

This function installs an EnergyHarvester onto an energy source.

Definition at line 36 of file energy-harvester-helper.cc.

Referenced by Install().

◆ Install() [2/3]

EnergyHarvesterContainer ns3::EnergyHarvesterHelper::Install ( EnergySourceContainer  sourceContainer) const
Parameters
sourceContainerList of nodes where EnergyHarvester will be installed.
Returns
An EnergyHarvesterContainer which contains all the EnergyHarvester.

This function installs an EnergyHarvester onto a list of energy sources.

Definition at line 42 of file energy-harvester-helper.cc.

References ns3::EnergyHarvesterContainer::Add(), ns3::Object::AggregateObject(), ns3::EnergySourceContainer::Begin(), ns3::ObjectFactory::Create(), DoInstall(), ns3::EnergySourceContainer::End(), ns3::Object::GetObject(), and ns3::ObjectFactory::SetTypeId().

◆ Install() [3/3]

EnergyHarvesterContainer ns3::EnergyHarvesterHelper::Install ( std::string  sourceName) const
Parameters
nodeNameName of node where EnergyHarvester will be installed.
Returns
An EnergyHarvesterContainer which contains all the EnergyHarvesters.

This function installs an EnergyHarvester onto a node.

Definition at line 73 of file energy-harvester-helper.cc.

References Install().

◆ Set()

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

Sets one of the attributes of underlying EnergyHarvester.

Implemented in ns3::BasicEnergyHarvesterHelper.


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