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.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Danilo Abrignani
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
18
*/
19
20
#ifndef COMPONENT_CARRIER_H
21
#define COMPONENT_CARRIER_H
22
23
#include <ns3/object.h>
24
25
namespace
ns3
26
{
27
28
/**
29
* \ingroup lte
30
*
31
* ComponentCarrier Object, it defines a single Carrier
32
* This is the parent class for both ComponentCarrierBaseStation
33
* and ComponentCarrierUe.
34
* This class contains the main physical configuration
35
* parameters for a carrier. Does not contain pointers to
36
* the MAC/PHY objects of the carrier.
37
*/
38
class
ComponentCarrier
:
public
Object
39
{
40
public
:
41
/**
42
* \brief Get the type ID.
43
* \return the object TypeId
44
*/
45
static
TypeId
GetTypeId
();
46
47
ComponentCarrier
();
48
49
~ComponentCarrier
()
override
;
50
void
DoDispose
()
override
;
51
52
/**
53
* \return the uplink bandwidth in RBs
54
*/
55
uint16_t
GetUlBandwidth
()
const
;
56
57
/**
58
* \param bw the uplink bandwidth in RBs
59
*/
60
virtual
void
SetUlBandwidth
(uint16_t bw);
61
62
/**
63
* \return the downlink bandwidth in RBs
64
*/
65
uint16_t
GetDlBandwidth
()
const
;
66
67
/**
68
* \param bw the downlink bandwidth in RBs
69
*/
70
virtual
void
SetDlBandwidth
(uint16_t bw);
71
72
/**
73
* \return the downlink carrier frequency (EARFCN)
74
*/
75
uint32_t
GetDlEarfcn
()
const
;
76
77
/**
78
* \param earfcn the downlink carrier frequency (EARFCN)
79
*/
80
void
SetDlEarfcn
(
uint32_t
earfcn);
81
82
/**
83
* \return the uplink carrier frequency (EARFCN)
84
*/
85
uint32_t
GetUlEarfcn
()
const
;
86
87
/**
88
* \param earfcn the uplink carrier frequency (EARFCN)
89
*/
90
void
SetUlEarfcn
(
uint32_t
earfcn);
91
92
/**
93
* \brief Returns the CSG ID of the eNodeB.
94
* \return the Closed Subscriber Group identity
95
* \sa LteEnbNetDevice::SetCsgId
96
*/
97
uint32_t
GetCsgId
()
const
;
98
99
/**
100
* \brief Associate the eNodeB device with a particular CSG.
101
* \param csgId the intended Closed Subscriber Group identity
102
*
103
* CSG identity is a number identifying a Closed Subscriber Group which the
104
* cell belongs to. eNodeB is associated with a single CSG identity.
105
*
106
* The same CSG identity can also be associated to several UEs, which is
107
* equivalent as enlisting these UEs as the members of this particular CSG.
108
*
109
* \sa LteEnbNetDevice::SetCsgIndication
110
*/
111
void
SetCsgId
(
uint32_t
csgId);
112
113
/**
114
* \brief Returns the CSG indication flag of the eNodeB.
115
* \return the CSG indication flag
116
* \sa LteEnbNetDevice::SetCsgIndication
117
*/
118
bool
GetCsgIndication
()
const
;
119
120
/**
121
* \brief Enable or disable the CSG indication flag.
122
* \param csgIndication if TRUE, only CSG members are allowed to access this
123
* cell
124
*
125
* When the CSG indication field is set to TRUE, only UEs which are members of
126
* the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
127
* enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
128
* cell and implements open access mode.
129
*
130
* \note This restriction only applies to initial cell selection and
131
* EPC-enabled simulation.
132
*
133
* \sa LteEnbNetDevice::SetCsgIndication
134
*/
135
void
SetCsgIndication
(
bool
csgIndication);
136
137
/**
138
* \brief Set as primary carrier
139
* \param primaryCarrier true to set as primary carrier
140
*/
141
void
SetAsPrimary
(
bool
primaryCarrier);
142
143
/**
144
* \brief Checks if the carrier is the primary carrier
145
* \returns true if the carrier is primary
146
*/
147
bool
IsPrimary
()
const
;
148
149
protected
:
150
uint32_t
m_csgId
{0};
///< CSG ID
151
bool
m_csgIndication
{
false
};
///< CSG indication
152
153
bool
m_primaryCarrier
{
false
};
///< whether the carrier is primary
154
155
uint16_t
m_dlBandwidth
{0};
///< downlink bandwidth in RBs */
156
uint16_t
m_ulBandwidth
{0};
///< uplink bandwidth in RBs */
157
158
uint32_t
m_dlEarfcn
{0};
///< downlink carrier frequency */
159
uint32_t
m_ulEarfcn
{0};
///< uplink carrier frequency */
160
};
161
162
/**
163
* \ingroup lte
164
*
165
* Defines a Base station, that is a ComponentCarrier but with a cell Id.
166
*
167
*/
168
class
ComponentCarrierBaseStation
:
public
ComponentCarrier
169
{
170
public
:
171
/**
172
* \brief Get the type ID.
173
* \return the object TypeId
174
*/
175
static
TypeId
GetTypeId
();
176
177
/**
178
* \brief Constructor
179
*/
180
ComponentCarrierBaseStation
();
181
182
/**
183
* \brief ~ComponentCarrierBaseStation
184
*/
185
~ComponentCarrierBaseStation
()
override
;
186
187
/**
188
* Get cell identifier
189
* \return cell identifier
190
*/
191
uint16_t
GetCellId
()
const
;
192
193
/**
194
* Set physical cell identifier
195
* \param cellId cell identifier
196
*/
197
void
SetCellId
(uint16_t cellId);
198
199
protected
:
200
uint16_t
m_cellId
{0};
///< Cell identifier
201
};
202
203
}
// namespace ns3
204
205
#endif
/* COMPONENT_CARRIER_H */
ns3::ComponentCarrierBaseStation
Defines a Base station, that is a ComponentCarrier but with a cell Id.
Definition:
component-carrier.h:169
ns3::ComponentCarrierBaseStation::~ComponentCarrierBaseStation
~ComponentCarrierBaseStation() override
~ComponentCarrierBaseStation
Definition:
component-carrier.cc:250
ns3::ComponentCarrierBaseStation::GetCellId
uint16_t GetCellId() const
Get cell identifier.
Definition:
component-carrier.cc:256
ns3::ComponentCarrierBaseStation::ComponentCarrierBaseStation
ComponentCarrierBaseStation()
Constructor.
Definition:
component-carrier.cc:244
ns3::ComponentCarrierBaseStation::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
component-carrier.cc:236
ns3::ComponentCarrierBaseStation::SetCellId
void SetCellId(uint16_t cellId)
Set physical cell identifier.
Definition:
component-carrier.cc:262
ns3::ComponentCarrierBaseStation::m_cellId
uint16_t m_cellId
Cell identifier.
Definition:
component-carrier.h:200
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition:
component-carrier.h:39
ns3::ComponentCarrier::SetCsgIndication
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
Definition:
component-carrier.cc:212
ns3::ComponentCarrier::SetDlEarfcn
void SetDlEarfcn(uint32_t earfcn)
Definition:
component-carrier.cc:173
ns3::ComponentCarrier::GetDlEarfcn
uint32_t GetDlEarfcn() const
Definition:
component-carrier.cc:167
ns3::ComponentCarrier::GetUlBandwidth
uint16_t GetUlBandwidth() const
Definition:
component-carrier.cc:113
ns3::ComponentCarrier::GetCsgIndication
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Definition:
component-carrier.cc:206
ns3::ComponentCarrier::GetDlBandwidth
uint16_t GetDlBandwidth() const
Definition:
component-carrier.cc:140
ns3::ComponentCarrier::m_csgIndication
bool m_csgIndication
CSG indication.
Definition:
component-carrier.h:151
ns3::ComponentCarrier::~ComponentCarrier
~ComponentCarrier() override
Definition:
component-carrier.cc:100
ns3::ComponentCarrier::ComponentCarrier
ComponentCarrier()
Definition:
component-carrier.cc:94
ns3::ComponentCarrier::SetUlEarfcn
void SetUlEarfcn(uint32_t earfcn)
Definition:
component-carrier.cc:186
ns3::ComponentCarrier::GetCsgId
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
Definition:
component-carrier.cc:193
ns3::ComponentCarrier::SetAsPrimary
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
Definition:
component-carrier.cc:225
ns3::ComponentCarrier::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
component-carrier.cc:35
ns3::ComponentCarrier::m_dlBandwidth
uint16_t m_dlBandwidth
downlink bandwidth in RBs */
Definition:
component-carrier.h:155
ns3::ComponentCarrier::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
component-carrier.cc:106
ns3::ComponentCarrier::SetCsgId
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
Definition:
component-carrier.cc:199
ns3::ComponentCarrier::m_ulEarfcn
uint32_t m_ulEarfcn
uplink carrier frequency */
Definition:
component-carrier.h:159
ns3::ComponentCarrier::GetUlEarfcn
uint32_t GetUlEarfcn() const
Definition:
component-carrier.cc:180
ns3::ComponentCarrier::SetUlBandwidth
virtual void SetUlBandwidth(uint16_t bw)
Definition:
component-carrier.cc:119
ns3::ComponentCarrier::m_primaryCarrier
bool m_primaryCarrier
whether the carrier is primary
Definition:
component-carrier.h:153
ns3::ComponentCarrier::IsPrimary
bool IsPrimary() const
Checks if the carrier is the primary carrier.
Definition:
component-carrier.cc:219
ns3::ComponentCarrier::m_ulBandwidth
uint16_t m_ulBandwidth
uplink bandwidth in RBs */
Definition:
component-carrier.h:156
ns3::ComponentCarrier::m_dlEarfcn
uint32_t m_dlEarfcn
downlink carrier frequency */
Definition:
component-carrier.h:158
ns3::ComponentCarrier::SetDlBandwidth
virtual void SetDlBandwidth(uint16_t bw)
Definition:
component-carrier.cc:146
ns3::ComponentCarrier::m_csgId
uint32_t m_csgId
CSG ID.
Definition:
component-carrier.h:150
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
component-carrier.h
Generated on Tue May 28 2024 23:37:06 for ns-3 by
1.9.6