5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-ue-net-device.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_UE_NET_DEVICE_H
6#define NR_UE_NET_DEVICE_H
7
8#include "nr-net-device.h"
9
10#include "ns3/deprecated.h"
11
12namespace ns3
13{
14
15class Packet;
16class PacketBurst;
17class Node;
18class NrUePhy;
19class NrUeMac;
20class NrUeComponentCarrierManager;
21class NrEpcUeNas;
22class NrUeRrc;
23class NrGnbNetDevice;
24class BandwidthPartUe;
25class BwpManagerUe;
26class NrInitialAssociation;
27
37{
38 public:
43 static TypeId GetTypeId();
44
49
53 ~NrUeNetDevice() override;
54
59 uint32_t GetCsgId() const;
60
65 void SetCsgId(uint32_t csgId);
66
72 Ptr<NrUePhy> GetPhy(uint8_t index) const;
73
79 Ptr<NrUeMac> GetMac(uint8_t index) const;
80
85 Ptr<BwpManagerUe> GetBwpManager() const;
86
95 void SetImsi(uint64_t imsi);
96
101 uint64_t GetImsi() const;
102
107 uint16_t GetCellId() const;
108
113 Ptr<NrEpcUeNas> GetNas() const;
114
119 Ptr<NrUeRrc> GetRrc() const;
120
125 void SetInitAssoc(Ptr<NrInitialAssociation> initAssoc);
126
133 void SetTargetGnb(Ptr<NrGnbNetDevice> gnb);
134
139 Ptr<const NrGnbNetDevice> GetTargetGnb() const;
140
145 void SetCcMap(std::map<uint8_t, Ptr<BandwidthPartUe>> ccm);
146
151 std::map<uint8_t, Ptr<BandwidthPartUe>> GetCcMap();
152
157 uint32_t GetCcMapSize() const;
158
168 void EnqueueDlHarqFeedback(const DlHarqInfo& m) const;
169
178 void RouteIngoingCtrlMsgs(const std::list<Ptr<NrControlMessage>>& msgList, uint8_t sourceBwpId);
179
185 void RouteOutgoingCtrlMsgs(const std::list<Ptr<NrControlMessage>>& msgList,
186 uint8_t sourceBwpId);
187
194 NS_DEPRECATED("Obsolete method")
195 void UpdateConfig();
196
197 protected:
198 // inherited from Object
199 void DoInitialize() override;
200 void DoDispose() override;
201
202 // inherited from NetDevice
203 bool DoSend(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber) override;
204
205 private:
206 Ptr<NrGnbNetDevice> m_targetGnb;
207 Ptr<NrUeRrc> m_rrc;
208 Ptr<NrEpcUeNas> m_nas;
209 Ptr<NrInitialAssociation> m_nrInitAcc; // Initial Assoc pointer
210 uint64_t m_imsi;
211 uint32_t m_csgId;
212 uint16_t m_primaryDlIndex;
213 uint16_t m_primaryUlIndex;
214
215 std::map<uint8_t, Ptr<BandwidthPartUe>> m_ccMap;
216 Ptr<NrUeComponentCarrierManager> m_componentCarrierManager;
217};
218
219} // namespace ns3
220#endif /* NR_UE_NET_DEVICE_H */
The NrNetDevice class.
The User Equipment NetDevice.
void UpdateConfig()
Update the RRC config. Must be called only once.
uint64_t GetImsi() const
Get the Imsi.
Ptr< NrUeRrc > GetRrc() const
Get a Rrc pointer.
uint16_t GetCellId() const
Get the CellId.
std::map< uint8_t, Ptr< BandwidthPartUe > > GetCcMap()
Get the NrComponentCarrier Map for the UE.
void RouteIngoingCtrlMsgs(const std::list< Ptr< NrControlMessage > > &msgList, uint8_t sourceBwpId)
The UE received a CTRL message list.
void SetImsi(uint64_t imsi)
Set the IMSI.
static TypeId GetTypeId()
GetTypeId.
Ptr< NrUeMac > GetMac(uint8_t index) const
Obtain a pointer to the MAC at the index specified.
Ptr< const NrGnbNetDevice > GetTargetGnb() const
Obtain a pointer to the target gnb.
void RouteOutgoingCtrlMsgs(const std::list< Ptr< NrControlMessage > > &msgList, uint8_t sourceBwpId)
Route the outgoing messages to the right BWP.
void SetTargetGnb(Ptr< NrGnbNetDevice > gnb)
Set the GNB to which this UE is attached to.
NrUeNetDevice()
NrUeNetDevice.
void SetCsgId(uint32_t csgId)
SetCsgId ?
Ptr< NrEpcUeNas > GetNas() const
Get a pointer to the Nas.
Ptr< NrUePhy > GetPhy(uint8_t index) const
Obtain a pointer to the PHY at the index specified.
void SetInitAssoc(Ptr< NrInitialAssociation > initAssoc)
Set the Nr Initial Association.
Ptr< BwpManagerUe > GetBwpManager() const
Get the bandwidth part manager.
void EnqueueDlHarqFeedback(const DlHarqInfo &m) const
Spectrum has calculated the HarqFeedback for one DL transmission, and give it to the NetDevice of the...
uint32_t GetCcMapSize() const
Get the size of the component carriers map.
uint32_t GetCsgId() const
GetCsgId ?
~NrUeNetDevice() override
~NrUeNetDevice
void SetCcMap(std::map< uint8_t, Ptr< BandwidthPartUe > > ccm)
Set the NrComponentCarrier Map for the UE.
A struct that contains info for the DL HARQ.