A Discrete-Event Network Simulator
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
14namespace 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 */
28{
29 public:
30 /**
31 * \brief Get the type ID.
32 * \return the object TypeId
33 */
34 static TypeId GetTypeId();
35
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 */
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 */
170
171 /**
172 * \brief ~ComponentCarrierBaseStation
173 */
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 */
Defines a Base station, that is a ComponentCarrier but with a cell Id.
~ComponentCarrierBaseStation() override
~ComponentCarrierBaseStation
uint16_t GetCellId() const
Get cell identifier.
static TypeId GetTypeId()
Get the type ID.
void SetCellId(uint16_t cellId)
Set physical cell identifier.
uint16_t m_cellId
Cell identifier.
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
void SetDlEarfcn(uint32_t earfcn)
uint32_t GetDlEarfcn() const
uint16_t GetUlBandwidth() const
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
uint16_t GetDlBandwidth() const
bool m_csgIndication
CSG indication.
void SetUlEarfcn(uint32_t earfcn)
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
static TypeId GetTypeId()
Get the type ID.
uint16_t m_dlBandwidth
downlink bandwidth in RBs *‍/
void DoDispose() override
Destructor implementation.
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
uint32_t m_ulEarfcn
uplink carrier frequency *‍/
uint32_t GetUlEarfcn() const
virtual void SetUlBandwidth(uint16_t bw)
bool m_primaryCarrier
whether the carrier is primary
bool IsPrimary() const
Checks if the carrier is the primary carrier.
uint16_t m_ulBandwidth
uplink bandwidth in RBs *‍/
uint32_t m_dlEarfcn
downlink carrier frequency *‍/
virtual void SetDlBandwidth(uint16_t bw)
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.