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
component-carrier-enb.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Danilo Abrignani
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7
*/
8
9
#include "
component-carrier-enb.h
"
10
11
#include "
ff-mac-scheduler.h
"
12
#include "
lte-enb-mac.h
"
13
#include "
lte-enb-phy.h
"
14
#include "
lte-ffr-algorithm.h
"
15
16
#include <ns3/abort.h>
17
#include <ns3/boolean.h>
18
#include <ns3/log.h>
19
#include <ns3/pointer.h>
20
#include <ns3/simulator.h>
21
#include <ns3/uinteger.h>
22
23
namespace
ns3
24
{
25
26
NS_LOG_COMPONENT_DEFINE
(
"ComponentCarrierEnb"
);
27
NS_OBJECT_ENSURE_REGISTERED
(ComponentCarrierEnb);
28
29
TypeId
30
ComponentCarrierEnb::GetTypeId
()
31
{
32
static
TypeId
tid =
TypeId
(
"ns3::ComponentCarrierEnb"
)
33
.
SetParent
<
ComponentCarrier
>()
34
.AddConstructor<ComponentCarrierEnb>()
35
.AddAttribute(
"LteEnbPhy"
,
36
"The PHY associated to this EnbNetDevice"
,
37
PointerValue
(),
38
MakePointerAccessor
(&
ComponentCarrierEnb::m_phy
),
39
MakePointerChecker<LteEnbPhy>
())
40
.AddAttribute(
"LteEnbMac"
,
41
"The MAC associated to this EnbNetDevice"
,
42
PointerValue
(),
43
MakePointerAccessor
(&
ComponentCarrierEnb::m_mac
),
44
MakePointerChecker<LteEnbMac>
())
45
.AddAttribute(
"FfMacScheduler"
,
46
"The scheduler associated to this EnbNetDevice"
,
47
PointerValue
(),
48
MakePointerAccessor
(&
ComponentCarrierEnb::m_scheduler
),
49
MakePointerChecker<FfMacScheduler>
())
50
.AddAttribute(
"LteFfrAlgorithm"
,
51
"The FFR algorithm associated to this EnbNetDevice"
,
52
PointerValue
(),
53
MakePointerAccessor
(&
ComponentCarrierEnb::m_ffrAlgorithm
),
54
MakePointerChecker<LteFfrAlgorithm>
());
55
return
tid;
56
}
57
58
ComponentCarrierEnb::ComponentCarrierEnb
()
59
{
60
NS_LOG_FUNCTION
(
this
);
61
}
62
63
ComponentCarrierEnb::~ComponentCarrierEnb
()
64
{
65
NS_LOG_FUNCTION
(
this
);
66
}
67
68
void
69
ComponentCarrierEnb::DoDispose
()
70
{
71
NS_LOG_FUNCTION
(
this
);
72
if
(
m_phy
)
73
{
74
m_phy
->Dispose();
75
m_phy
=
nullptr
;
76
}
77
if
(
m_mac
)
78
{
79
m_mac
->Dispose();
80
m_mac
=
nullptr
;
81
}
82
if
(
m_scheduler
)
83
{
84
m_scheduler
->Dispose();
85
m_scheduler
=
nullptr
;
86
}
87
if
(
m_ffrAlgorithm
)
88
{
89
m_ffrAlgorithm
->Dispose();
90
m_ffrAlgorithm
=
nullptr
;
91
}
92
93
Object::DoDispose
();
94
}
95
96
void
97
ComponentCarrierEnb::DoInitialize
()
98
{
99
NS_LOG_FUNCTION
(
this
);
100
m_phy
->Initialize();
101
m_mac
->Initialize();
102
m_ffrAlgorithm
->Initialize();
103
m_scheduler
->Initialize();
104
}
105
106
Ptr<LteEnbPhy>
107
ComponentCarrierEnb::GetPhy
()
108
{
109
NS_LOG_FUNCTION
(
this
);
110
return
m_phy
;
111
}
112
113
void
114
ComponentCarrierEnb::SetPhy
(
Ptr<LteEnbPhy>
s)
115
{
116
NS_LOG_FUNCTION
(
this
);
117
m_phy
= s;
118
}
119
120
Ptr<LteEnbMac>
121
ComponentCarrierEnb::GetMac
()
122
{
123
NS_LOG_FUNCTION
(
this
);
124
return
m_mac
;
125
}
126
127
void
128
ComponentCarrierEnb::SetMac
(
Ptr<LteEnbMac>
s)
129
{
130
NS_LOG_FUNCTION
(
this
);
131
m_mac
= s;
132
}
133
134
Ptr<LteFfrAlgorithm>
135
ComponentCarrierEnb::GetFfrAlgorithm
()
136
{
137
NS_LOG_FUNCTION
(
this
);
138
return
m_ffrAlgorithm
;
139
}
140
141
void
142
ComponentCarrierEnb::SetFfrAlgorithm
(
Ptr<LteFfrAlgorithm>
s)
143
{
144
NS_LOG_FUNCTION
(
this
);
145
m_ffrAlgorithm
= s;
146
}
147
148
Ptr<FfMacScheduler>
149
ComponentCarrierEnb::GetFfMacScheduler
()
150
{
151
NS_LOG_FUNCTION
(
this
);
152
return
m_scheduler
;
153
}
154
155
void
156
ComponentCarrierEnb::SetFfMacScheduler
(
Ptr<FfMacScheduler>
s)
157
{
158
NS_LOG_FUNCTION
(
this
);
159
m_scheduler
= s;
160
}
161
162
}
// namespace ns3
ns3::ComponentCarrierEnb::DoInitialize
void DoInitialize() override
Initialize() implementation.
Definition
component-carrier-enb.cc:97
ns3::ComponentCarrierEnb::DoDispose
void DoDispose() override
Destructor implementation.
Definition
component-carrier-enb.cc:69
ns3::ComponentCarrierEnb::GetFfrAlgorithm
Ptr< LteFfrAlgorithm > GetFfrAlgorithm()
Definition
component-carrier-enb.cc:135
ns3::ComponentCarrierEnb::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
component-carrier-enb.cc:30
ns3::ComponentCarrierEnb::m_scheduler
Ptr< FfMacScheduler > m_scheduler
the scheduler instance of this eNodeB component carrier
Definition
component-carrier-enb.h:97
ns3::ComponentCarrierEnb::m_mac
Ptr< LteEnbMac > m_mac
the MAC instance of this eNodeB component carrier
Definition
component-carrier-enb.h:96
ns3::ComponentCarrierEnb::ComponentCarrierEnb
ComponentCarrierEnb()
Definition
component-carrier-enb.cc:58
ns3::ComponentCarrierEnb::SetFfrAlgorithm
void SetFfrAlgorithm(Ptr< LteFfrAlgorithm > s)
Set the LteFfrAlgorithm.
Definition
component-carrier-enb.cc:142
ns3::ComponentCarrierEnb::m_ffrAlgorithm
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
the FFR algorithm instance of this eNodeB component carrier
Definition
component-carrier-enb.h:99
ns3::ComponentCarrierEnb::SetMac
void SetMac(Ptr< LteEnbMac > s)
Set the LteEnbMac.
Definition
component-carrier-enb.cc:128
ns3::ComponentCarrierEnb::SetFfMacScheduler
void SetFfMacScheduler(Ptr< FfMacScheduler > s)
Set the FfMacScheduler Algorithm.
Definition
component-carrier-enb.cc:156
ns3::ComponentCarrierEnb::GetFfMacScheduler
Ptr< FfMacScheduler > GetFfMacScheduler()
Definition
component-carrier-enb.cc:149
ns3::ComponentCarrierEnb::~ComponentCarrierEnb
~ComponentCarrierEnb() override
Definition
component-carrier-enb.cc:63
ns3::ComponentCarrierEnb::GetPhy
Ptr< LteEnbPhy > GetPhy()
Definition
component-carrier-enb.cc:107
ns3::ComponentCarrierEnb::m_phy
Ptr< LteEnbPhy > m_phy
the Phy instance of this eNodeB component carrier
Definition
component-carrier-enb.h:95
ns3::ComponentCarrierEnb::SetPhy
void SetPhy(Ptr< LteEnbPhy > s)
Set the LteEnbPhy.
Definition
component-carrier-enb.cc:114
ns3::ComponentCarrierEnb::GetMac
Ptr< LteEnbMac > GetMac()
Definition
component-carrier-enb.cc:121
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition
component-carrier.h:28
ns3::Object::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition
object.cc:433
ns3::PointerValue
AttributeValue implementation for Pointer.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
component-carrier-enb.h
ff-mac-scheduler.h
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition
pointer.h:248
ns3::MakePointerChecker
Ptr< AttributeChecker > MakePointerChecker()
Create a PointerChecker for a type.
Definition
pointer.h:269
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
lte-enb-mac.h
lte-enb-phy.h
lte-ffr-algorithm.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
component-carrier-enb.cc
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0