A Discrete-Event Network Simulator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::RvBatteryModelHelper Class Reference

Creates a RvBatteryModel object. More...

#include <rv-battery-model-helper.h>

+ Inheritance diagram for ns3::RvBatteryModelHelper:

Public Member Functions

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

Private Member Functions

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

Private Attributes

ObjectFactory m_rvBatteryModel

Detailed Description

Creates a RvBatteryModel object.

Definition at line 34 of file rv-battery-model-helper.h.

Member Function Documentation

Ptr< EnergySource > ns3::RvBatteryModelHelper::DoInstall ( Ptr< Node node) const
nodePointer to node where the energy source is to be installed.
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 42 of file rv-battery-model-helper.cc.

References ns3::ObjectFactory::Create(), ns3::Object::GetObject(), NS_ASSERT, and NS_FATAL_ERROR.

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

Sets one of the attributes of underlying EnergySource.

Implements ns3::EnergySourceHelper.

Definition at line 36 of file rv-battery-model-helper.cc.

References ns3::ObjectFactory::Set().

Referenced by BatteryLifetimeTest::ConstantLoadTest(), and BatteryLifetimeTest::VariableLoadTest().

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