A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
energy-model-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2010 Network Security Lab, University of Washington, Seattle.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Sidharth Nabar <snabar@uw.edu>, He Wu <mdzz@u.washington.edu>
19
*/
20
21
#ifndef ENERGY_MODEL_HELPER_H
22
#define ENERGY_MODEL_HELPER_H
23
24
#include "ns3/attribute.h"
25
#include "ns3/object-factory.h"
26
#include "ns3/node-container.h"
27
#include "ns3/ptr.h"
28
#include "ns3/net-device.h"
29
#include "ns3/net-device-container.h"
30
#include "ns3/energy-source.h"
31
#include "ns3/device-energy-model.h"
32
#include "ns3/device-energy-model-container.h"
33
#include "
energy-source-container.h
"
34
35
namespace
ns3 {
36
45
class
EnergySourceHelper
46
{
47
public
:
48
virtual
~EnergySourceHelper
();
49
56
virtual
void
Set
(std::string name,
const
AttributeValue
&v) = 0;
57
64
EnergySourceContainer
Install
(
Ptr<Node>
node)
const
;
65
72
EnergySourceContainer
Install
(
NodeContainer
c)
const
;
73
80
EnergySourceContainer
Install
(std::string nodeName)
const
;
81
87
EnergySourceContainer
InstallAll
(
void
)
const
;
88
89
90
private
:
100
virtual
Ptr<EnergySource>
DoInstall
(
Ptr<Node>
node)
const
= 0;
101
102
};
103
104
116
class
DeviceEnergyModelHelper
117
{
118
public
:
119
virtual
~DeviceEnergyModelHelper
();
120
127
virtual
void
Set
(std::string name,
const
AttributeValue
&v) = 0;
128
137
DeviceEnergyModelContainer
Install
(
Ptr<NetDevice>
device,
138
Ptr<EnergySource>
source)
const
;
139
150
DeviceEnergyModelContainer
Install
(
NetDeviceContainer
deviceContainer,
151
EnergySourceContainer
sourceContainer)
const
;
152
153
154
private
:
165
virtual
Ptr<DeviceEnergyModel>
DoInstall
(
Ptr<NetDevice>
device,
166
Ptr<EnergySource>
source)
const
= 0;
167
168
};
169
170
}
// namespace ns3
171
172
#endif
/* ENERGY_MODEL_HELPER_H */
src
energy
helper
energy-model-helper.h
Generated on Fri Dec 21 2012 19:00:35 for ns-3 by
1.8.1.2