A Discrete-Event Network Simulator
API
lte-ue-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  * Nicola Baldo <nbaldo@cttc.es>
20  * Modified by:
21  * Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
22  * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
23  */
24 
25 #ifndef LTE_UE_NET_DEVICE_H
26 #define LTE_UE_NET_DEVICE_H
27 
28 #include "ns3/lte-net-device.h"
29 #include "ns3/event-id.h"
30 #include "ns3/mac48-address.h"
31 #include "ns3/traced-callback.h"
32 #include "ns3/nstime.h"
33 #include "ns3/lte-phy.h"
34 #include "ns3/eps-bearer.h"
35 #include "ns3/component-carrier-ue.h"
36 #include <vector>
37 #include <map>
38 
39 namespace ns3 {
40 
41 class Packet;
42 class PacketBurst;
43 class Node;
44 class LtePhy;
45 class LteUePhy;
46 class LteEnbNetDevice;
47 class LteUeMac;
48 class LteUeRrc;
49 class EpcUeNas;
50 class EpcTft;
51 class LteUeComponentCarrierManager;
52 
58 {
59 
60 public:
65  static TypeId GetTypeId (void);
66 
67  LteUeNetDevice (void);
68  virtual ~LteUeNetDevice (void);
69  virtual void DoDispose ();
70 
71 
72  // inherited from NetDevice
73  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
74 
79  Ptr<LteUeMac> GetMac (void) const;
80 
85  Ptr<LteUeRrc> GetRrc () const;
86 
91  Ptr<LteUePhy> GetPhy (void) const;
92 
97  Ptr<EpcUeNas> GetNas (void) const;
98 
104 
109  uint64_t GetImsi () const;
110 
117  uint32_t GetDlEarfcn () const;
118 
125  void SetDlEarfcn (uint32_t earfcn);
126 
131  uint32_t GetCsgId () const;
132 
144  void SetCsgId (uint32_t csgId);
145 
151 
157 
162  void SetCcMap (std::map< uint8_t, Ptr<ComponentCarrierUe> > ccm);
163 
168  std::map< uint8_t, Ptr<ComponentCarrierUe> > GetCcMap (void);
169 
170 
171 
172 protected:
173  // inherited from Object
174  virtual void DoInitialize (void);
175 
176 
177 private:
179 
189  void UpdateConfig ();
190 
192 
196 
197  uint64_t m_imsi;
198 
199  uint32_t m_dlEarfcn;
201  uint32_t m_csgId;
202 
203  std::map < uint8_t, Ptr<ComponentCarrierUe> > m_ccMap;
204 
205 }; // end of class LteUeNetDevice
206 
207 } // namespace ns3
208 
209 #endif /* LTE_UE_NET_DEVICE_H */
Ptr< LteUeRrc > m_rrc
the RRC
virtual ~LteUeNetDevice(void)
Ptr< LteUeRrc > GetRrc() const
Get the RRC.
uint64_t GetImsi() const
Get the IMSI.
std::map< uint8_t, Ptr< ComponentCarrierUe > > GetCcMap(void)
Get the ComponentCarrier Map for the UE.
Ptr< LteEnbNetDevice > m_targetEnb
target ENB
uint64_t m_imsi
the IMSI
uint32_t m_csgId
the CSG ID
std::map< uint8_t, Ptr< ComponentCarrierUe > > m_ccMap
CC map.
a polymophic address class
Definition: address.h:90
Ptr< EpcUeNas > m_nas
the NAS
static TypeId GetTypeId(void)
Get the type ID.
virtual void DoDispose()
Destructor implementation.
Ptr< LteUeComponentCarrierManager > GetComponentCarrierManager(void) const
Get the componentn carrier manager.
void SetTargetEnb(Ptr< LteEnbNetDevice > enb)
Set the targer eNB where the UE is registered.
virtual void DoInitialize(void)
Initialize() implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetCsgId(uint32_t csgId)
Enlist the UE device as a member of a particular CSG.
uint32_t m_dlEarfcn
downlink carrier frequency
void SetDlEarfcn(uint32_t earfcn)
Ptr< LteEnbNetDevice > GetTargetEnb(void)
Get the targer eNB where the UE is registered.
Ptr< EpcUeNas > GetNas(void) const
Get the NAS.
uint32_t GetDlEarfcn() const
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierUe > > ccm)
Set the ComponentCarrier Map for the UE.
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
Ptr< LteUePhy > GetPhy(void) const
Get the Phy.
LteNetDevice provides basic implementation for all LTE network devices.
uint32_t GetCsgId() const
Returns the CSG ID the UE is currently a member of.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< LteUeMac > GetMac(void) const
Get the MAC.
bool m_isConstructed
is constructed?
Ptr< LteUeComponentCarrierManager > m_componentCarrierManager
the component carrier manager
The LteUeNetDevice class implements the UE net device.