A Discrete-Event Network Simulator
API
component-carrier.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Danilo Abrignani
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Danilo Abrignani <danilo.abrignani@unibo.it>
19  */
20 
21 
22 #ifndef COMPONENT_CARRIER_H
23 #define COMPONENT_CARRIER_H
24 
25 #include <ns3/object.h>
26 
27 namespace ns3 {
28 
39 class ComponentCarrier : public Object
40 {
41 public:
46  static TypeId GetTypeId (void);
47 
49 
50  virtual ~ComponentCarrier (void);
51  virtual void DoDispose (void);
52 
56  uint16_t GetUlBandwidth () const;
57 
61  virtual void SetUlBandwidth (uint16_t bw);
62 
66  uint16_t GetDlBandwidth () const;
67 
71  virtual void SetDlBandwidth (uint16_t bw);
72 
76  uint32_t GetDlEarfcn () const;
77 
81  void SetDlEarfcn (uint32_t earfcn);
82 
86  uint32_t GetUlEarfcn () const;
87 
91  void SetUlEarfcn (uint32_t earfcn);
92 
98  uint32_t GetCsgId () const;
99 
112  void SetCsgId (uint32_t csgId);
113 
119  bool GetCsgIndication () const;
120 
136  void SetCsgIndication (bool csgIndication);
137 
142  void SetAsPrimary (bool primaryCarrier);
143 
148  bool IsPrimary () const;
149 
150 protected:
151  uint32_t m_csgId {0};
152  bool m_csgIndication {false};
153 
154  bool m_primaryCarrier {false};
155 
156  uint16_t m_dlBandwidth {0};
157  uint16_t m_ulBandwidth {0};
158 
159  uint32_t m_dlEarfcn {0};
160  uint32_t m_ulEarfcn {0};
161 };
162 
170 {
171 public:
176  static TypeId GetTypeId (void);
177 
182 
186  virtual ~ComponentCarrierBaseStation (void) override;
187 
192  uint16_t GetCellId ();
193 
198  void SetCellId (uint16_t cellId);
199 
200 protected:
201  uint16_t m_cellId {0};
202 };
203 
204 } // namespace ns3
205 
206 
207 
208 #endif /* COMPONENT_CARRIER_H */
static TypeId GetTypeId(void)
Get the type ID.
virtual void SetUlBandwidth(uint16_t bw)
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
virtual void SetDlBandwidth(uint16_t bw)
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
uint16_t m_dlBandwidth
downlink bandwidth in RBs */
uint16_t m_cellId
Cell identifier.
uint32_t GetUlEarfcn() const
uint16_t m_ulBandwidth
uplink bandwidth in RBs */
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Defines a Base station, that is a ComponentCarrier but with a cell Id.
bool m_primaryCarrier
whether the carrier is primary
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
virtual ~ComponentCarrierBaseStation(void) override
~ComponentCarrierBaseStation
virtual ~ComponentCarrier(void)
void SetDlEarfcn(uint32_t earfcn)
virtual void DoDispose(void)
Destructor implementation.
uint32_t m_dlEarfcn
downlink carrier frequency */
void SetUlEarfcn(uint32_t earfcn)
bool IsPrimary() const
Checks if the carrier is the primary carrier.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetCellId(uint16_t cellId)
Set physical cell identifier.
uint16_t GetUlBandwidth() const
uint32_t m_csgId
CSG ID.
static TypeId GetTypeId(void)
Get the type ID.
uint16_t GetCellId()
Get cell identifier.
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
bool m_csgIndication
CSG indication.
A base class which provides memory management and object aggregation.
Definition: object.h:87
uint16_t GetDlBandwidth() const
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_ulEarfcn
uplink carrier frequency */
uint32_t GetDlEarfcn() const