23 #include "ns3/llc-snap-header.h"
24 #include "ns3/simulator.h"
25 #include "ns3/callback.h"
27 #include "ns3/packet.h"
28 #include "lte-net-device.h"
29 #include "ns3/packet-burst.h"
30 #include "ns3/uinteger.h"
31 #include "ns3/trace-source-accessor.h"
32 #include "ns3/pointer.h"
34 #include "ns3/lte-enb-net-device.h"
35 #include "lte-ue-net-device.h"
36 #include "lte-ue-mac.h"
37 #include "lte-ue-rrc.h"
38 #include "ns3/ipv4-header.h"
41 #include "lte-ue-phy.h"
42 #include "epc-ue-nas.h"
43 #include <ns3/ipv4-l3-protocol.h>
51 NS_OBJECT_ENSURE_REGISTERED ( LteUeNetDevice);
54 TypeId LteUeNetDevice::GetTypeId (
void)
58 TypeId (
"ns3::LteUeNetDevice")
59 .SetParent<LteNetDevice> ()
60 .AddAttribute (
"LteUeRrc",
61 "The RRC associated to this UeNetDevice",
63 MakePointerAccessor (&LteUeNetDevice::m_rrc),
64 MakePointerChecker <LteUeRrc> ())
65 .AddAttribute (
"LteUeMac",
66 "The MAC associated to this UeNetDevice",
68 MakePointerAccessor (&LteUeNetDevice::m_mac),
69 MakePointerChecker <LteUeMac> ())
70 .AddAttribute (
"LteUePhy",
71 "The PHY associated to this UeNetDevice",
73 MakePointerAccessor (&LteUeNetDevice::m_phy),
74 MakePointerChecker <LteUePhy> ())
75 .AddAttribute (
"Imsi",
76 "International Mobile Subscriber Identity assigned to this UE",
79 MakeUintegerAccessor (&LteUeNetDevice::m_imsi),
80 MakeUintegerChecker<uint64_t> ())
87 LteUeNetDevice::LteUeNetDevice (
void)
105 LteUeNetDevice::~LteUeNetDevice (
void)
130 m_nas->SetImsi (m_imsi);
131 m_rrc->SetImsi (m_imsi);
138 LteUeNetDevice::GetMac (
void)
const
146 LteUeNetDevice::GetRrc (
void)
const
154 LteUeNetDevice::GetPhy (
void)
const
161 LteUeNetDevice::GetNas (
void)
const
168 LteUeNetDevice::GetImsi ()
const
194 m_phy->Initialize ();
195 m_mac->Initialize ();
196 m_rrc->Initialize ();
203 NS_ASSERT_MSG (protocolNumber == Ipv4L3Protocol::PROT_NUMBER,
"unsupported protocol " << protocolNumber <<
", only IPv4 is supported");
205 return m_nas->Send (packet);
#define NS_LOG_FUNCTION(parameters)
virtual void DoDispose(void)
virtual void SetNode(Ptr< Node > node)
#define NS_LOG_COMPONENT_DEFINE(name)
#define NS_FATAL_ERROR(msg)
fatal error handling
a polymophic address class
void SetTargetEnb(Ptr< LteEnbNetDevice > enb)
Set the targer eNB where the UE is registered.
virtual void DoInitialize(void)
Ptr< LteEnbNetDevice > GetTargetEnb(void)
Get the targer eNB where the UE is registered.
#define NS_ASSERT_MSG(condition, message)
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)