A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
device-energy-model.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2010 Network Security Lab, University of Washington, Seattle.
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Sidharth Nabar <snabar@uw.edu>, He Wu <mdzz@u.washington.edu>
7
*/
8
9
#include "
device-energy-model.h
"
10
11
#include "ns3/log.h"
12
13
namespace
ns3
14
{
15
namespace
energy
16
{
17
18
NS_LOG_COMPONENT_DEFINE
(
"DeviceEnergyModel"
);
19
NS_OBJECT_ENSURE_REGISTERED
(DeviceEnergyModel);
20
21
TypeId
22
DeviceEnergyModel::GetTypeId
()
23
{
24
static
TypeId
tid =
TypeId
(
"ns3::energy::DeviceEnergyModel"
)
25
.
AddDeprecatedName
(
"ns3::DeviceEnergyModel"
)
26
.
SetParent
<
Object
>()
27
.SetGroupName(
"Energy"
);
28
return
tid;
29
}
30
31
DeviceEnergyModel::DeviceEnergyModel
()
32
{
33
NS_LOG_FUNCTION
(
this
);
34
}
35
36
DeviceEnergyModel::~DeviceEnergyModel
()
37
{
38
NS_LOG_FUNCTION
(
this
);
39
}
40
41
double
42
DeviceEnergyModel::GetCurrentA
()
const
43
{
44
NS_LOG_FUNCTION
(
this
);
45
return
DoGetCurrentA
();
46
}
47
48
/*
49
* Private function starts here.
50
*/
51
52
double
53
DeviceEnergyModel::DoGetCurrentA
()
const
54
{
55
NS_LOG_FUNCTION
(
this
);
56
return
0.0;
57
}
58
59
}
// namespace energy
60
}
// namespace ns3
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::AddDeprecatedName
TypeId AddDeprecatedName(const std::string &name)
Add an deprecated name for a TypeId.
Definition
type-id.cc:862
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::energy::DeviceEnergyModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
device-energy-model.cc:22
ns3::energy::DeviceEnergyModel::GetCurrentA
double GetCurrentA() const
Definition
device-energy-model.cc:42
ns3::energy::DeviceEnergyModel::DeviceEnergyModel
DeviceEnergyModel()
Definition
device-energy-model.cc:31
ns3::energy::DeviceEnergyModel::DoGetCurrentA
virtual double DoGetCurrentA() const
Definition
device-energy-model.cc:53
ns3::energy::DeviceEnergyModel::~DeviceEnergyModel
~DeviceEnergyModel() override
Definition
device-energy-model.cc:36
device-energy-model.h
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
energy
model
device-energy-model.cc
Generated on Fri Nov 8 2024 13:59:00 for ns-3 by
1.11.0