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 
45 class ComponentCarrier : public Object
46 {
47 public:
52  static TypeId GetTypeId (void);
53 
55 
56  virtual ~ComponentCarrier (void);
57  virtual void DoDispose (void);
58 
62  uint8_t GetUlBandwidth () const;
63 
67  void SetUlBandwidth (uint8_t bw);
68 
72  uint8_t GetDlBandwidth () const;
73 
77  void SetDlBandwidth (uint8_t bw);
78 
82  uint32_t GetDlEarfcn () const;
83 
87  void SetDlEarfcn (uint32_t earfcn);
88 
92  uint32_t GetUlEarfcn () const;
93 
97  void SetUlEarfcn (uint32_t earfcn);
98 
104  uint32_t GetCsgId () const;
105 
118  void SetCsgId (uint32_t csgId);
119 
125  bool GetCsgIndication () const;
126 
142  void SetCsgIndication (bool csgIndication);
143 
148  void SetAsPrimary (bool primaryCarrier);
149 
154  bool IsPrimary () const;
155 
156 
157  uint8_t m_dlBandwidth;
158  uint8_t m_ulBandwidth;
160  uint32_t m_dlEarfcn;
161  uint32_t m_ulEarfcn;
163 protected:
164  // inherited from Object
165  virtual void DoInitialize (void);
166  uint16_t m_csgId;
168 
171 // bool m_isConfigured;
172 
173 };
174 
175 
176 
177 } // namespace ns3
178 
179 
180 
181 #endif /* COMPONENT_CARRIER_H */
void SetAsPrimary(bool primaryCarrier)
Set as primary carrier.
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
uint8_t GetDlBandwidth() const
uint32_t GetUlEarfcn() const
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
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 SetDlBandwidth(uint8_t bw)
uint16_t m_csgId
CSG ID.
void SetUlBandwidth(uint8_t bw)
static TypeId GetTypeId(void)
Get the type ID.
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