A Discrete-Event Network Simulator
API
cc-helper.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#ifndef CC_HELPER_H
22#define CC_HELPER_H
23
24#include <ns3/config.h>
25#include <ns3/simulator.h>
26#include <ns3/names.h>
27#include <ns3/net-device.h>
28#include <ns3/net-device-container.h>
29#include <ns3/node.h>
30#include <ns3/node-container.h>
31#include <ns3/component-carrier.h>
32#include <map>
33
34namespace ns3 {
35
36
57class CcHelper : public Object
58{
59public:
60 CcHelper (void);
61 virtual ~CcHelper (void);
62
67 static TypeId GetTypeId (void);
68 virtual void DoDispose (void);
69
80 ComponentCarrier DoCreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary);
81
88 void SetCcAttribute (std::string n, const AttributeValue &v);
89
104 std::map< uint8_t, ComponentCarrier > EquallySpacedCcs ();
105
111 void SetNumberOfComponentCarriers (uint16_t nCc);
117 void SetUlEarfcn (uint32_t ulEarfcn);
123 void SetDlEarfcn (uint32_t dlEarfcn);
129 void SetDlBandwidth (uint16_t dlBandwidth);
135 void SetUlBandwidth (uint16_t ulBandwidth);
159 uint16_t GetDlBandwidth ();
165 uint16_t GetUlBandwidth ();
166
167protected:
168 // inherited from Object
169 virtual void DoInitialize (void);
170
171private:
182 ComponentCarrier CreateSingleCc (uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary);
183
186
189 uint16_t m_dlBandwidth;
190 uint16_t m_ulBandwidth;
192
193
194}; // end of `class LteHelper`
195
196
197} // namespace ns3
198
199
200
201#endif // LTE_HELPER_H
Hold a value for an Attribute.
Definition: attribute.h:69
Creation and configuration of Component Carrier entities.
Definition: cc-helper.h:58
uint32_t GetDlEarfcn()
Get DL EARFCN.
Definition: cc-helper.cc:150
virtual void DoDispose(void)
Destructor implementation.
Definition: cc-helper.cc:96
uint16_t GetDlBandwidth()
Get DL bandwidth.
Definition: cc-helper.cc:155
ObjectFactory m_ccFactory
Factory for each Carrier Component.
Definition: cc-helper.h:185
void SetNumberOfComponentCarriers(uint16_t nCc)
Set number of CCs.
Definition: cc-helper.cc:110
virtual void DoInitialize(void)
Initialize() implementation.
Definition: cc-helper.cc:47
uint16_t GetUlBandwidth()
Get UL bandwidth.
Definition: cc-helper.cc:160
ComponentCarrier DoCreateSingleCc(uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
Create single CC.
Definition: cc-helper.cc:166
void SetDlEarfcn(uint32_t dlEarfcn)
Set DL EARFCN.
Definition: cc-helper.cc:122
void SetUlBandwidth(uint16_t ulBandwidth)
Set UL bandwidth.
Definition: cc-helper.cc:134
CcHelper(void)
Definition: cc-helper.cc:40
void SetDlBandwidth(uint16_t dlBandwidth)
Set DL bandwidth.
Definition: cc-helper.cc:128
uint16_t m_numberOfComponentCarriers
Number of component carriers.
Definition: cc-helper.h:191
uint16_t m_ulBandwidth
Uplink Bandwidth.
Definition: cc-helper.h:190
uint16_t m_dlBandwidth
Downlink Bandwidth.
Definition: cc-helper.h:189
uint32_t GetUlEarfcn()
Get UL EARFCN.
Definition: cc-helper.cc:145
std::map< uint8_t, ComponentCarrier > EquallySpacedCcs()
EquallySpacedCcs() create a valid std::map< uint8_t, Ptr<ComponentCarrier> > The Primary Component Ca...
Definition: cc-helper.cc:172
void SetUlEarfcn(uint32_t ulEarfcn)
Set UL EARFCN.
Definition: cc-helper.cc:116
uint16_t GetNumberOfComponentCarriers()
Get number of component carriers.
Definition: cc-helper.cc:140
uint32_t m_ulEarfcn
Uplink EARFCN.
Definition: cc-helper.h:187
uint32_t m_dlEarfcn
Downlink EARFCN.
Definition: cc-helper.h:188
virtual ~CcHelper(void)
Definition: cc-helper.cc:90
void SetCcAttribute(std::string n, const AttributeValue &v)
Set an attribute for the Component Carrier to be created.
Definition: cc-helper.cc:103
static TypeId GetTypeId(void)
Register this type.
Definition: cc-helper.cc:52
ComponentCarrier CreateSingleCc(uint16_t ulBandwidth, uint16_t dlBandwidth, uint32_t ulEarfcn, uint32_t dlEarfcn, bool isPrimary)
Create a single component carrier.
Definition: cc-helper.cc:221
ComponentCarrier Object, it defines a single Carrier This is the parent class for both ComponentCarri...
Instantiate subclasses of ns3::Object.
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.