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 */
Defines a Base station, that is a ComponentCarrier but with a cell Id.
uint16_t GetCellId()
Get cell identifier.
virtual ~ComponentCarrierBaseStation(void) override
~ComponentCarrierBaseStation
void SetCellId(uint16_t cellId)
Set physical cell identifier.
uint16_t m_cellId
Cell identifier.
static TypeId GetTypeId(void)
Get the type ID.
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)
virtual ~ComponentCarrier(void)
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.
static TypeId GetTypeId(void)
Get the type ID.
void SetUlEarfcn(uint32_t earfcn)
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
virtual void DoDispose(void)
Destructor implementation.
uint16_t m_dlBandwidth
downlink bandwidth in RBs *‍/
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:88
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.