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 #include <ns3/packet.h>
27 #include <ns3/nstime.h>
28 #include "ns3/lte-phy.h"
29 #include <ns3/lte-enb-phy.h>
30 #include <ns3/pointer.h>
31 
32 namespace ns3 {
33 
44 class ComponentCarrier : public Object
45 {
46 public:
51  static TypeId GetTypeId (void);
52 
54 
55  virtual ~ComponentCarrier (void);
56  virtual void DoDispose (void);
57 
61  uint8_t GetUlBandwidth () const;
62 
66  virtual void SetUlBandwidth (uint8_t bw);
67 
71  uint8_t GetDlBandwidth () const;
72 
76  virtual void SetDlBandwidth (uint8_t bw);
77 
81  uint32_t GetDlEarfcn () const;
82 
86  void SetDlEarfcn (uint32_t earfcn);
87 
91  uint32_t GetUlEarfcn () const;
92 
96  void SetUlEarfcn (uint32_t earfcn);
97 
103  uint32_t GetCsgId () const;
104 
117  void SetCsgId (uint32_t csgId);
118 
124  bool GetCsgIndication () const;
125 
141  void SetCsgIndication (bool csgIndication);
142 
147  void SetAsPrimary (bool primaryCarrier);
148 
153  bool IsPrimary () const;
154 
155 
156  uint8_t m_dlBandwidth;
157  uint8_t m_ulBandwidth;
159  uint32_t m_dlEarfcn;
160  uint32_t m_ulEarfcn;
162 protected:
163  // inherited from Object
164  virtual void DoInitialize (void);
165  uint16_t m_csgId;
167 
170 // bool m_isConfigured;
171 
172 };
173 
181 {
182 public:
187  static TypeId GetTypeId (void);
188 
190 
191  virtual ~ComponentCarrierBaseStation (void);
192 
197  uint16_t GetCellId ();
198 
203  void SetCellId (uint16_t cellId);
204 
205 protected:
206  uint16_t m_cellId;
207 };
208 
209 } // namespace ns3
210 
211 
212 
213 #endif /* COMPONENT_CARRIER_H */
static TypeId GetTypeId(void)
Get the type ID.
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
uint8_t GetDlBandwidth() const
uint16_t m_cellId
Cell identifier.
uint32_t GetUlEarfcn() const
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.
uint8_t GetUlBandwidth() const
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
bool m_isConstructed
whether the instance is constructed
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.
uint8_t m_dlBandwidth
downlink bandwidth in RBs
void SetCellId(uint16_t cellId)
Set physical cell identifier.
virtual void SetDlBandwidth(uint8_t bw)
uint16_t m_csgId
CSG ID.
virtual void SetUlBandwidth(uint8_t bw)
static TypeId GetTypeId(void)
Get the type ID.
uint16_t GetCellId()
Get cell identifier.
virtual void DoInitialize(void)
Initialize() implementation.
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
uint8_t m_ulBandwidth
uplink bandwidth in RBs
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_ulEarfcn
uplink carrier frequency
uint32_t GetDlEarfcn() const