A Discrete-Event Network Simulator
API
lte-enb-net-device.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
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: Giuseppe Piro <g.piro@poliba.it>
19  * Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture
20  */
21 
22 #ifndef LTE_ENB_NET_DEVICE_H
23 #define LTE_ENB_NET_DEVICE_H
24 
25 #include "ns3/lte-net-device.h"
26 #include "ns3/event-id.h"
27 #include "ns3/mac48-address.h"
28 #include "ns3/traced-callback.h"
29 #include "ns3/nstime.h"
30 #include "ns3/lte-phy.h"
31 #include <vector>
32 
33 namespace ns3 {
34 
35 class Packet;
36 class PacketBurst;
37 class Node;
38 class LtePhy;
39 class LteEnbPhy;
40 class LteEnbMac;
41 class LteEnbRrc;
42 class FfMacScheduler;
43 class LteHandoverAlgorithm;
44 class LteAnr;
45 class LteFfrAlgorithm;
46 
53 {
54 public:
55  static TypeId GetTypeId (void);
56 
57  LteEnbNetDevice ();
58 
59  virtual ~LteEnbNetDevice (void);
60  virtual void DoDispose (void);
61 
62  // inherited from NetDevice
63  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
64 
68  Ptr<LteEnbMac> GetMac (void) const;
69 
73  Ptr<LteEnbPhy> GetPhy (void) const;
74 
78  Ptr<LteEnbRrc> GetRrc () const;
79 
83  uint16_t GetCellId () const;
84 
88  uint8_t GetUlBandwidth () const;
89 
93  void SetUlBandwidth (uint8_t bw);
94 
98  uint8_t GetDlBandwidth () const;
99 
103  void SetDlBandwidth (uint8_t bw);
104 
108  uint16_t GetDlEarfcn () const;
109 
113  void SetDlEarfcn (uint16_t earfcn);
114 
118  uint16_t GetUlEarfcn () const;
119 
123  void SetUlEarfcn (uint16_t earfcn);
124 
130  uint32_t GetCsgId () const;
131 
144  void SetCsgId (uint32_t csgId);
145 
151  bool GetCsgIndication () const;
152 
168  void SetCsgIndication (bool csgIndication);
169 
170 protected:
171  // inherited from Object
172  virtual void DoInitialize (void);
173 
174 
175 private:
178 
189  void UpdateConfig ();
190 
192 
194 
196 
198 
200 
202 
204 
205  uint16_t m_cellId;
207  uint8_t m_dlBandwidth;
208  uint8_t m_ulBandwidth;
210  uint16_t m_dlEarfcn;
211  uint16_t m_ulEarfcn;
213  uint16_t m_csgId;
215 
216 }; // end of class LteEnbNetDevice
217 
218 } // namespace ns3
219 
220 #endif /* LTE_ENB_NET_DEVICE_H */
uint16_t GetDlEarfcn() const
uint16_t GetCellId() const
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint8_t GetUlBandwidth() const
uint8_t m_dlBandwidth
downlink bandwidth in RBs
Ptr< LteEnbPhy > GetPhy(void) const
uint16_t m_dlEarfcn
downlink carrier frequency
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
Ptr< LteEnbMac > m_mac
a polymophic address class
Definition: address.h:90
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
void SetUlBandwidth(uint8_t bw)
Ptr< LteEnbRrc > m_rrc
virtual void DoInitialize(void)
Initialize() implementation.
static TypeId GetTypeId(void)
Ptr< LteEnbPhy > m_phy
Ptr< LteEnbRrc > GetRrc() const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetDlBandwidth(uint8_t bw)
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
void SetDlEarfcn(uint16_t earfcn)
virtual void DoDispose(void)
Destructor implementation.
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
uint16_t GetUlEarfcn() const
uint16_t m_ulEarfcn
uplink carrier frequency
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Ptr< LteHandoverAlgorithm > m_handoverAlgorithm
uint16_t m_cellId
Cell Identifer.
uint8_t GetDlBandwidth() const
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Ptr< FfMacScheduler > m_scheduler
virtual ~LteEnbNetDevice(void)
void SetUlEarfcn(uint16_t earfcn)
LteNetDevice provides basic implementation for all LTE network devices.
The eNodeB device implementation.
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< LteEnbMac > GetMac(void) const