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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
7
*/
8
9
#ifndef COMPONENT_CARRIER_H
10
#define COMPONENT_CARRIER_H
11
12
#include <ns3/object.h>
13
14
namespace
ns3
15
{
16
17
/**
18
* \ingroup lte
19
*
20
* ComponentCarrier Object, it defines a single Carrier
21
* This is the parent class for both ComponentCarrierBaseStation
22
* and ComponentCarrierUe.
23
* This class contains the main physical configuration
24
* parameters for a carrier. Does not contain pointers to
25
* the MAC/PHY objects of the carrier.
26
*/
27
class
ComponentCarrier
:
public
Object
28
{
29
public
:
30
/**
31
* \brief Get the type ID.
32
* \return the object TypeId
33
*/
34
static
TypeId
GetTypeId
();
35
36
ComponentCarrier
();
37
38
~ComponentCarrier
()
override
;
39
void
DoDispose
()
override
;
40
41
/**
42
* \return the uplink bandwidth in RBs
43
*/
44
uint16_t
GetUlBandwidth
()
const
;
45
46
/**
47
* \param bw the uplink bandwidth in RBs
48
*/
49
virtual
void
SetUlBandwidth
(uint16_t bw);
50
51
/**
52
* \return the downlink bandwidth in RBs
53
*/
54
uint16_t
GetDlBandwidth
()
const
;
55
56
/**
57
* \param bw the downlink bandwidth in RBs
58
*/
59
virtual
void
SetDlBandwidth
(uint16_t bw);
60
61
/**
62
* \return the downlink carrier frequency (EARFCN)
63
*/
64
uint32_t
GetDlEarfcn
()
const
;
65
66
/**
67
* \param earfcn the downlink carrier frequency (EARFCN)
68
*/
69
void
SetDlEarfcn
(
uint32_t
earfcn);
70
71
/**
72
* \return the uplink carrier frequency (EARFCN)
73
*/
74
uint32_t
GetUlEarfcn
()
const
;
75
76
/**
77
* \param earfcn the uplink carrier frequency (EARFCN)
78
*/
79
void
SetUlEarfcn
(
uint32_t
earfcn);
80
81
/**
82
* \brief Returns the CSG ID of the eNodeB.
83
* \return the Closed Subscriber Group identity
84
* \sa LteEnbNetDevice::SetCsgId
85
*/
86
uint32_t
GetCsgId
()
const
;
87
88
/**
89
* \brief Associate the eNodeB device with a particular CSG.
90
* \param csgId the intended Closed Subscriber Group identity
91
*
92
* CSG identity is a number identifying a Closed Subscriber Group which the
93
* cell belongs to. eNodeB is associated with a single CSG identity.
94
*
95
* The same CSG identity can also be associated to several UEs, which is
96
* equivalent as enlisting these UEs as the members of this particular CSG.
97
*
98
* \sa LteEnbNetDevice::SetCsgIndication
99
*/
100
void
SetCsgId
(
uint32_t
csgId);
101
102
/**
103
* \brief Returns the CSG indication flag of the eNodeB.
104
* \return the CSG indication flag
105
* \sa LteEnbNetDevice::SetCsgIndication
106
*/
107
bool
GetCsgIndication
()
const
;
108
109
/**
110
* \brief Enable or disable the CSG indication flag.
111
* \param csgIndication if TRUE, only CSG members are allowed to access this
112
* cell
113
*
114
* When the CSG indication field is set to TRUE, only UEs which are members of
115
* the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
116
* enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
117
* cell and implements open access mode.
118
*
119
* \note This restriction only applies to initial cell selection and
120
* EPC-enabled simulation.
121
*
122
* \sa LteEnbNetDevice::SetCsgIndication
123
*/
124
void
SetCsgIndication
(
bool
csgIndication);
125
126
/**
127
* \brief Set as primary carrier
128
* \param primaryCarrier true to set as primary carrier
129
*/
130
void
SetAsPrimary
(
bool
primaryCarrier);
131
132
/**
133
* \brief Checks if the carrier is the primary carrier
134
* \returns true if the carrier is primary
135
*/
136
bool
IsPrimary
()
const
;
137
138
protected
:
139
uint32_t
m_csgId
{0};
///< CSG ID
140
bool
m_csgIndication
{
false
};
///< CSG indication
141
142
bool
m_primaryCarrier
{
false
};
///< whether the carrier is primary
143
144
uint16_t
m_dlBandwidth
{0};
///< downlink bandwidth in RBs */
145
uint16_t
m_ulBandwidth
{0};
///< uplink bandwidth in RBs */
146
147
uint32_t
m_dlEarfcn
{0};
///< downlink carrier frequency */
148
uint32_t
m_ulEarfcn
{0};
///< uplink carrier frequency */
149
};
150
151
/**
152
* \ingroup lte
153
*
154
* Defines a Base station, that is a ComponentCarrier but with a cell Id.
155
*
156
*/
157
class
ComponentCarrierBaseStation
:
public
ComponentCarrier
158
{
159
public
:
160
/**
161
* \brief Get the type ID.
162
* \return the object TypeId
163
*/
164
static
TypeId
GetTypeId
();
165
166
/**
167
* \brief Constructor
168
*/
169
ComponentCarrierBaseStation
();
170
171
/**
172
* \brief ~ComponentCarrierBaseStation
173
*/
174
~ComponentCarrierBaseStation
()
override
;
175
176
/**
177
* Get cell identifier
178
* \return cell identifier
179
*/
180
uint16_t
GetCellId
()
const
;
181
182
/**
183
* Set physical cell identifier
184
* \param cellId cell identifier
185
*/
186
void
SetCellId
(uint16_t cellId);
187
188
protected
:
189
uint16_t
m_cellId
{0};
///< Cell identifier
190
};
191
192
}
// namespace ns3
193
194
#endif
/* COMPONENT_CARRIER_H */
ns3::ComponentCarrierBaseStation
Defines a Base station, that is a ComponentCarrier but with a cell Id.
Definition
component-carrier.h:158
ns3::ComponentCarrierBaseStation::~ComponentCarrierBaseStation
~ComponentCarrierBaseStation() override
~ComponentCarrierBaseStation
Definition
component-carrier.cc:239
ns3::ComponentCarrierBaseStation::GetCellId
uint16_t GetCellId() const
Get cell identifier.
Definition
component-carrier.cc:245
ns3::ComponentCarrierBaseStation::ComponentCarrierBaseStation
ComponentCarrierBaseStation()
Constructor.
Definition
component-carrier.cc:233
ns3::ComponentCarrierBaseStation::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
component-carrier.cc:225
ns3::ComponentCarrierBaseStation::SetCellId
void SetCellId(uint16_t cellId)
Set physical cell identifier.
Definition
component-carrier.cc:251
ns3::ComponentCarrierBaseStation::m_cellId
uint16_t m_cellId
Cell identifier.
Definition
component-carrier.h:189
ns3::ComponentCarrier
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Definition
component-carrier.h:28
ns3::ComponentCarrier::SetCsgIndication
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
Definition
component-carrier.cc:201
ns3::ComponentCarrier::SetDlEarfcn
void SetDlEarfcn(uint32_t earfcn)
Definition
component-carrier.cc:162
ns3::ComponentCarrier::GetDlEarfcn
uint32_t GetDlEarfcn() const
Definition
component-carrier.cc:156
ns3::ComponentCarrier::GetUlBandwidth
uint16_t GetUlBandwidth() const
Definition
component-carrier.cc:102
ns3::ComponentCarrier::GetCsgIndication
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Definition
component-carrier.cc:195
ns3::ComponentCarrier::GetDlBandwidth
uint16_t GetDlBandwidth() const
Definition
component-carrier.cc:129
ns3::ComponentCarrier::m_csgIndication
bool m_csgIndication
CSG indication.
Definition
component-carrier.h:140
ns3::ComponentCarrier::~ComponentCarrier
~ComponentCarrier() override
Definition
component-carrier.cc:89
ns3::ComponentCarrier::ComponentCarrier
ComponentCarrier()
Definition
component-carrier.cc:83
ns3::ComponentCarrier::SetUlEarfcn
void SetUlEarfcn(uint32_t earfcn)
Definition
component-carrier.cc:175
ns3::ComponentCarrier::GetCsgId
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
Definition
component-carrier.cc:182
ns3::ComponentCarrier::SetAsPrimary
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
Definition
component-carrier.cc:214
ns3::ComponentCarrier::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
component-carrier.cc:24
ns3::ComponentCarrier::m_dlBandwidth
uint16_t m_dlBandwidth
downlink bandwidth in RBs */
Definition
component-carrier.h:144
ns3::ComponentCarrier::DoDispose
void DoDispose() override
Destructor implementation.
Definition
component-carrier.cc:95
ns3::ComponentCarrier::SetCsgId
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
Definition
component-carrier.cc:188
ns3::ComponentCarrier::m_ulEarfcn
uint32_t m_ulEarfcn
uplink carrier frequency */
Definition
component-carrier.h:148
ns3::ComponentCarrier::GetUlEarfcn
uint32_t GetUlEarfcn() const
Definition
component-carrier.cc:169
ns3::ComponentCarrier::SetUlBandwidth
virtual void SetUlBandwidth(uint16_t bw)
Definition
component-carrier.cc:108
ns3::ComponentCarrier::m_primaryCarrier
bool m_primaryCarrier
whether the carrier is primary
Definition
component-carrier.h:142
ns3::ComponentCarrier::IsPrimary
bool IsPrimary() const
Checks if the carrier is the primary carrier.
Definition
component-carrier.cc:208
ns3::ComponentCarrier::m_ulBandwidth
uint16_t m_ulBandwidth
uplink bandwidth in RBs */
Definition
component-carrier.h:145
ns3::ComponentCarrier::m_dlEarfcn
uint32_t m_dlEarfcn
downlink carrier frequency */
Definition
component-carrier.h:147
ns3::ComponentCarrier::SetDlBandwidth
virtual void SetDlBandwidth(uint16_t bw)
Definition
component-carrier.cc:135
ns3::ComponentCarrier::m_csgId
uint32_t m_csgId
CSG ID.
Definition
component-carrier.h:139
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
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
component-carrier.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0