A Discrete-Event Network Simulator
API
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 
38 class ComponentCarrier : public Object
39 {
40  public:
45  static TypeId GetTypeId();
46 
48 
49  ~ComponentCarrier() override;
50  void DoDispose() override;
51 
55  uint16_t GetUlBandwidth() const;
56 
60  virtual void SetUlBandwidth(uint16_t bw);
61 
65  uint16_t GetDlBandwidth() const;
66 
70  virtual void SetDlBandwidth(uint16_t bw);
71 
75  uint32_t GetDlEarfcn() const;
76 
80  void SetDlEarfcn(uint32_t earfcn);
81 
85  uint32_t GetUlEarfcn() const;
86 
90  void SetUlEarfcn(uint32_t earfcn);
91 
97  uint32_t GetCsgId() const;
98 
111  void SetCsgId(uint32_t csgId);
112 
118  bool GetCsgIndication() const;
119 
135  void SetCsgIndication(bool csgIndication);
136 
141  void SetAsPrimary(bool primaryCarrier);
142 
147  bool IsPrimary() const;
148 
149  protected:
150  uint32_t m_csgId{0};
151  bool m_csgIndication{false};
152 
153  bool m_primaryCarrier{false};
154 
155  uint16_t m_dlBandwidth{0};
156  uint16_t m_ulBandwidth{0};
157 
158  uint32_t m_dlEarfcn{0};
159  uint32_t m_ulEarfcn{0};
160 };
161 
169 {
170  public:
175  static TypeId GetTypeId();
176 
181 
185  ~ComponentCarrierBaseStation() override;
186 
191  uint16_t GetCellId() const;
192 
197  void SetCellId(uint16_t cellId);
198 
199  protected:
200  uint16_t m_cellId{0};
201 };
202 
203 } // namespace ns3
204 
205 #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:89
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.