Creates a BasicEnergySource object. More...
#include "basic-energy-source-helper.h"
Public Member Functions | |
BasicEnergySourceHelper () | |
~BasicEnergySourceHelper () override | |
void | Set (std::string name, const AttributeValue &v) override |
Public Member Functions inherited from ns3::EnergySourceHelper | |
virtual | ~EnergySourceHelper () |
energy::EnergySourceContainer | Install (NodeContainer c) const |
energy::EnergySourceContainer | Install (Ptr< Node > node) const |
energy::EnergySourceContainer | Install (std::string nodeName) const |
energy::EnergySourceContainer | InstallAll () const |
This function installs an EnergySource on all nodes in simulation. | |
Private Member Functions | |
Ptr< energy::EnergySource > | DoInstall (Ptr< Node > node) const override |
Private Attributes | |
ObjectFactory | m_basicEnergySource |
Energy source factory. | |
Creates a BasicEnergySource object.
Definition at line 24 of file basic-energy-source-helper.h.
ns3::BasicEnergySourceHelper::BasicEnergySourceHelper | ( | ) |
Definition at line 16 of file basic-energy-source-helper.cc.
References m_basicEnergySource, and ns3::ObjectFactory::SetTypeId().
|
override |
Definition at line 21 of file basic-energy-source-helper.cc.
|
overrideprivatevirtual |
node | Pointer to node where the energy source is to be installed. |
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 32 of file basic-energy-source-helper.cc.
References ns3::ObjectFactory::Create(), m_basicEnergySource, and NS_ASSERT.
|
overridevirtual |
name | Name of attribute to set. |
v | Value of the attribute. |
Sets one of the attributes of underlying EnergySource.
Implements ns3::EnergySourceHelper.
Definition at line 26 of file basic-energy-source-helper.cc.
References m_basicEnergySource, and ns3::ObjectFactory::Set().
Referenced by BasicEnergyDepletionTest::DepletionTestCase(), AcousticModemEnergyDepletionTestCase::DoRun(), AcousticModemEnergyTestCase::DoRun(), and UanExperiment::SetupEnergy().
|
private |
Energy source factory.
Definition at line 36 of file basic-energy-source-helper.h.
Referenced by BasicEnergySourceHelper(), DoInstall(), and Set().