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> 
   58     TypeId (
"ns3::LteUeNetDevice")
 
   60     .AddConstructor<LteUeNetDevice> ()
 
   61     .AddAttribute (
"EpcUeNas",
 
   62                    "The NAS associated to this UeNetDevice",
 
   65                    MakePointerChecker <EpcUeNas> ())
 
   66     .AddAttribute (
"LteUeRrc",
 
   67                    "The RRC associated to this UeNetDevice",
 
   70                    MakePointerChecker <LteUeRrc> ())
 
   71     .AddAttribute (
"LteUeMac",
 
   72                    "The MAC associated to this UeNetDevice",
 
   75                    MakePointerChecker <LteUeMac> ())
 
   76     .AddAttribute (
"LteUePhy",
 
   77                    "The PHY associated to this UeNetDevice",
 
   80                    MakePointerChecker <LteUePhy> ())
 
   81     .AddAttribute (
"Imsi",
 
   82                    "International Mobile Subscriber Identity assigned to this UE",
 
   85                    MakeUintegerChecker<uint64_t> ())
 
   86     .AddAttribute (
"DlEarfcn",
 
   87                    "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) " 
   88                    "as per 3GPP 36.101 Section 5.7.3. ",
 
   92                    MakeUintegerChecker<uint16_t> (0, 6149))
 
   93     .AddAttribute (
"CsgId",
 
   94                    "The Closed Subscriber Group (CSG) identity that this UE is associated with, " 
   95                    "i.e., giving the UE access to cells which belong to this particular CSG. " 
   96                    "This restriction only applies to initial cell selection and EPC-enabled simulation. " 
   97                    "This does not revoke the UE's access to non-CSG cells. ",
 
  101                    MakeUintegerChecker<uint32_t> ())
 
  109   : m_isConstructed (false)
 
  246   m_phy->Initialize ();
 
  247   m_mac->Initialize ();
 
  248   m_rrc->Initialize ();
 
  257       NS_LOG_INFO(
"unsupported protocol " << protocolNumber << 
", only IPv4 is supported");
 
  260   return m_nas->Send (packet);
 
smart pointer class similar to boost::intrusive_ptr 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory. 
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 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
Ptr< LteEnbNetDevice > m_targetEnb
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
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)
Use NS_LOG to output a message of level LOG_LOGIC. 
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. 
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)