A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ue-net-device.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Giuseppe Piro <g.piro@poliba.it>
7 * Nicola Baldo <nbaldo@cttc.es>
8 * Modified by:
9 * Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
10 * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
11 */
12
13#ifndef LTE_UE_NET_DEVICE_H
14#define LTE_UE_NET_DEVICE_H
15
17#include "lte-net-device.h"
18
19#include "ns3/event-id.h"
20#include "ns3/nstime.h"
21#include "ns3/traced-callback.h"
22
23#include <map>
24#include <vector>
25
26namespace ns3
27{
28
29class Packet;
30class PacketBurst;
31class Node;
32class LtePhy;
33class LteUePhy;
34class LteEnbNetDevice;
35class LteUeMac;
36class LteUeRrc;
37class EpcUeNas;
38class EpcTft;
39class LteUeComponentCarrierManager;
40
41/**
42 * \ingroup lte
43 * The LteUeNetDevice class implements the UE net device
44 */
46{
47 public:
48 /**
49 * \brief Get the type ID.
50 * \return the object TypeId
51 */
52 static TypeId GetTypeId();
53
55 ~LteUeNetDevice() override;
56 void DoDispose() override;
57
58 // inherited from NetDevice
59 bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) override;
60
61 /**
62 * \brief Get the MAC.
63 * \return the LTE UE MAC
64 */
65 Ptr<LteUeMac> GetMac() const;
66
67 /**
68 * \brief Get the RRC.
69 * \return the LTE UE RRC
70 */
71 Ptr<LteUeRrc> GetRrc() const;
72
73 /**
74 * \brief Get the Phy.
75 * \return the LTE UE Phy
76 */
77 Ptr<LteUePhy> GetPhy() const;
78
79 /**
80 * \brief Get the NAS.
81 * \return the LTE UE NAS
82 */
83 Ptr<EpcUeNas> GetNas() const;
84
85 /**
86 * \brief Get the componentn carrier manager.
87 * \return the LTE UE component carrier manager
88 */
90
91 /**
92 * \brief Get the IMSI.
93 * \return the IMSI
94 */
95 uint64_t GetImsi() const;
96
97 /**
98 * \return the downlink carrier frequency (EARFCN)
99 *
100 * Note that real-life handset typically supports more than one EARFCN, but
101 * the sake of simplicity we assume only one EARFCN is supported.
102 */
103 uint32_t GetDlEarfcn() const;
104
105 /**
106 * \param earfcn the downlink carrier frequency (EARFCN)
107 *
108 * Note that real-life handset typically supports more than one EARFCN, but
109 * the sake of simplicity we assume only one EARFCN is supported.
110 */
111 void SetDlEarfcn(uint32_t earfcn);
112
113 /**
114 * \brief Returns the CSG ID the UE is currently a member of.
115 * \return the Closed Subscriber Group identity
116 */
117 uint32_t GetCsgId() const;
118
119 /**
120 * \brief Enlist the UE device as a member of a particular CSG.
121 * \param csgId the intended Closed Subscriber Group identity
122 *
123 * UE is associated with a single CSG identity, and thus becoming a member of
124 * this particular CSG. As a result, the UE may gain access to cells which
125 * belong to this CSG. This does not revoke the UE's access to non-CSG cells.
126 *
127 * \note This restriction only applies to initial cell selection and
128 * EPC-enabled simulation.
129 */
130 void SetCsgId(uint32_t csgId);
131
132 /**
133 * \brief Set the target eNB where the UE is registered
134 * \param enb
135 */
137
138 /**
139 * \brief Get the target eNB where the UE is registered
140 * \return the pointer to the enb
141 */
143
144 /**
145 * \brief Set the ComponentCarrier Map for the UE
146 * \param ccm the map of ComponentCarrierUe
147 */
148 void SetCcMap(std::map<uint8_t, Ptr<ComponentCarrierUe>> ccm);
149
150 /**
151 * \brief Get the ComponentCarrier Map for the UE
152 * \returns the map of ComponentCarrierUe
153 */
154 std::map<uint8_t, Ptr<ComponentCarrierUe>> GetCcMap();
155
156 protected:
157 // inherited from Object
158 void DoInitialize() override;
159
160 private:
161 bool m_isConstructed; ///< is constructed?
162
163 /**
164 * \brief Propagate attributes and configuration to sub-modules.
165 *
166 * Several attributes (e.g., the IMSI) are exported as the attributes of the
167 * LteUeNetDevice from a user perspective, but are actually used also in other
168 * sub-modules (the RRC, the PHY, etc.). This method takes care of updating
169 * the configuration of all these sub-modules so that their copy of attribute
170 * values are in sync with the one in the LteUeNetDevice.
171 */
172 void UpdateConfig();
173
175
176 Ptr<LteUeRrc> m_rrc; ///< the RRC
177 Ptr<EpcUeNas> m_nas; ///< the NAS
179
180 uint64_t m_imsi; ///< the IMSI
181
182 uint32_t m_dlEarfcn; /**< downlink carrier frequency */
183
184 uint32_t m_csgId; ///< the CSG ID
185
186 std::map<uint8_t, Ptr<ComponentCarrierUe>> m_ccMap; ///< CC map
187
188}; // end of class LteUeNetDevice
189
190} // namespace ns3
191
192#endif /* LTE_UE_NET_DEVICE_H */
a polymophic address class
Definition address.h:90
LteNetDevice provides basic implementation for all LTE network devices.
The LteUeNetDevice class implements the UE net device.
uint32_t m_csgId
the CSG ID
void DoInitialize() override
Initialize() implementation.
Ptr< LteUeRrc > m_rrc
the RRC
uint64_t m_imsi
the IMSI
static TypeId GetTypeId()
Get the type ID.
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
std::map< uint8_t, Ptr< ComponentCarrierUe > > m_ccMap
CC map.
Ptr< LteUeComponentCarrierManager > GetComponentCarrierManager() const
Get the componentn carrier manager.
Ptr< LteEnbNetDevice > GetTargetEnb()
Get the target eNB where the UE is registered.
Ptr< LteUeRrc > GetRrc() const
Get the RRC.
Ptr< EpcUeNas > GetNas() const
Get the NAS.
uint64_t GetImsi() const
Get the IMSI.
void SetCsgId(uint32_t csgId)
Enlist the UE device as a member of a particular CSG.
Ptr< LteUeComponentCarrierManager > m_componentCarrierManager
the component carrier manager
Ptr< LteUePhy > GetPhy() const
Get the Phy.
uint32_t m_dlEarfcn
downlink carrier frequency
void SetDlEarfcn(uint32_t earfcn)
Ptr< LteUeMac > GetMac() const
Get the MAC.
Ptr< EpcUeNas > m_nas
the NAS
bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override
std::map< uint8_t, Ptr< ComponentCarrierUe > > GetCcMap()
Get the ComponentCarrier Map for the UE.
void SetTargetEnb(Ptr< LteEnbNetDevice > enb)
Set the target eNB where the UE is registered.
void DoDispose() override
Destructor implementation.
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierUe > > ccm)
Set the ComponentCarrier Map for the UE.
uint32_t GetDlEarfcn() const
Ptr< LteEnbNetDevice > m_targetEnb
target ENB
uint32_t GetCsgId() const
Returns the CSG ID the UE is currently a member of.
bool m_isConstructed
is constructed?
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.