23 #include "ns3/llc-snap-header.h"
24 #include "ns3/simulator.h"
25 #include "ns3/callback.h"
27 #include "ns3/packet.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"
38 #include "ns3/ipv4-header.h"
43 #include <ns3/ipv4-l3-protocol.h>
59 TypeId (
"ns3::LteUeNetDevice")
61 .AddConstructor<LteUeNetDevice> ()
62 .AddAttribute (
"EpcUeNas",
63 "The NAS associated to this UeNetDevice",
66 MakePointerChecker <EpcUeNas> ())
67 .AddAttribute (
"LteUeRrc",
68 "The RRC associated to this UeNetDevice",
71 MakePointerChecker <LteUeRrc> ())
72 .AddAttribute (
"LteUeMac",
73 "The MAC associated to this UeNetDevice",
76 MakePointerChecker <LteUeMac> ())
77 .AddAttribute (
"LteUePhy",
78 "The PHY associated to this UeNetDevice",
81 MakePointerChecker <LteUePhy> ())
82 .AddAttribute (
"Imsi",
83 "International Mobile Subscriber Identity assigned to this UE",
86 MakeUintegerChecker<uint64_t> ())
87 .AddAttribute (
"DlEarfcn",
88 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
89 "as per 3GPP 36.101 Section 5.7.3. ",
93 MakeUintegerChecker<uint16_t> (0, 6149))
94 .AddAttribute (
"CsgId",
95 "The Closed Subscriber Group (CSG) identity that this UE is associated with, "
96 "i.e., giving the UE access to cells which belong to this particular CSG. "
97 "This restriction only applies to initial cell selection and EPC-enabled simulation. "
98 "This does not revoke the UE's access to non-CSG cells. ",
102 MakeUintegerChecker<uint32_t> ())
110 : m_isConstructed (false)
247 m_phy->Initialize ();
248 m_mac->Initialize ();
249 m_rrc->Initialize ();
258 NS_LOG_INFO(
"unsupported protocol " << protocolNumber <<
", only IPv4 is supported");
261 return m_nas->Send (packet);
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
virtual ~LteUeNetDevice(void)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Ptr< LteUeRrc > GetRrc() const
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Ptr< LteEnbNetDevice > m_targetEnb
a polymophic address class
static TypeId GetTypeId(void)
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void SetTargetEnb(Ptr< LteEnbNetDevice > enb)
Set the targer eNB where the UE is registered.
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
Hold an unsigned integer type.
#define NS_LOG_LOGIC(msg)
void SetCsgId(uint32_t csgId)
Enlist the UE device as a member of a particular CSG.
uint16_t m_dlEarfcn
downlink carrier frequency
Ptr< LteEnbNetDevice > GetTargetEnb(void)
Get the targer eNB where the UE is registered.
Ptr< EpcUeNas > GetNas(void) const
uint16_t GetDlEarfcn() const
void SetDlEarfcn(uint16_t earfcn)
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
Ptr< LteUePhy > GetPhy(void) const
LteNetDevice provides basic implementation for all LTE network devices.
NS_LOG_COMPONENT_DEFINE("LteUeNetDevice")
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.
Ptr< LteUeMac > GetMac(void) const
TypeId SetParent(TypeId tid)
static const uint16_t PROT_NUMBER
Protocol number (0x0800)