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
simple-device-energy-model.h
Go to the documentation of this file.
1
/*
2
* simple-device-energy-model.h
3
*
4
* Created on: 09/ago/2010
5
* Author: socket
6
*/
7
8
#ifndef SIMPLE_DEVICE_ENERGY_MODEL_H
9
#define SIMPLE_DEVICE_ENERGY_MODEL_H
10
11
#include "ns3/device-energy-model.h"
12
#include "ns3/nstime.h"
13
#include "ns3/traced-value.h"
14
15
namespace
ns3 {
16
25
class
SimpleDeviceEnergyModel
:
public
DeviceEnergyModel
26
{
27
public
:
28
static
TypeId
GetTypeId
(
void
);
29
SimpleDeviceEnergyModel
();
30
virtual
~SimpleDeviceEnergyModel
();
31
39
virtual
void
SetNode
(
Ptr<Node>
node);
40
48
virtual
Ptr<Node>
GetNode
(
void
)
const
;
49
57
virtual
void
SetEnergySource
(
Ptr<EnergySource>
source);
58
64
virtual
double
GetTotalEnergyConsumption
(
void
)
const
;
65
71
virtual
void
ChangeState
(
int
newState)
72
{
73
}
74
80
virtual
void
HandleEnergyDepletion
(
void
)
81
{
82
}
83
89
void
SetCurrentA
(
double
current);
90
private
:
91
void
DoDispose
(
void
);
92
98
virtual
double
DoGetCurrentA
(
void
)
const
;
99
100
Time
m_lastUpdateTime
;
101
double
m_actualCurrentA
;
102
Ptr<EnergySource>
m_source
;
103
Ptr<Node>
m_node
;
104
TracedValue<double>
m_totalEnergyConsumption
;
105
};
106
107
}
// namespace ns3
108
109
#endif
/* SIMPLE_DEVICE_ENERGY_MODEL_H */
src
energy
model
simple-device-energy-model.h
Generated on Fri Dec 21 2012 19:00:35 for ns-3 by
1.8.1.2