A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
li-ion-energy-source-helper.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Wireless Communications and Networking Group (WCNG),
3 * University of Rochester, Rochester, NY, USA.
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors: Hoda Ayatollahi <hayatoll@ur.rochester.edu>
8 * Cristiano Tapparello <cristiano.tapparello@rochester.edu>
9 */
10
12
13#include "ns3/energy-source.h"
14
15namespace ns3
16{
17
22
26
27void
29{
30 m_liIonEnergySource.Set(name, v);
31}
32
35{
36 NS_ASSERT(node);
38 NS_ASSERT(source);
39 source->SetNode(node);
40 return source;
41}
42
43} // namespace ns3
Hold a value for an Attribute.
Definition attribute.h:59
ObjectFactory m_liIonEnergySource
LiIon Battery factory.
Ptr< energy::EnergySource > DoInstall(Ptr< Node > node) const override
void Set(std::string name, const AttributeValue &v) override
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Smart pointer class similar to boost::intrusive_ptr.
Energy source base class.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition assert.h:55
Every class exported by the ns3 library is enclosed in the ns3 namespace.