23 #include <ns3/llc-snap-header.h>
24 #include <ns3/simulator.h>
25 #include <ns3/callback.h>
27 #include <ns3/packet.h>
28 #include <ns3/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-amc.h>
35 #include <ns3/lte-enb-mac.h>
36 #include <ns3/lte-enb-net-device.h>
37 #include <ns3/lte-enb-rrc.h>
38 #include <ns3/lte-ue-net-device.h>
39 #include <ns3/lte-enb-phy.h>
40 #include <ns3/ff-mac-scheduler.h>
41 #include <ns3/lte-handover-algorithm.h>
42 #include <ns3/lte-anr.h>
43 #include <ns3/ipv4-l3-protocol.h>
44 #include <ns3/abort.h>
58 TypeId (
"ns3::LteEnbNetDevice")
60 .AddConstructor<LteEnbNetDevice> ()
61 .AddAttribute (
"LteEnbRrc",
62 "The RRC associated to this EnbNetDevice",
65 MakePointerChecker <LteEnbRrc> ())
66 .AddAttribute (
"LteHandoverAlgorithm",
67 "The handover algorithm associated to this EnbNetDevice",
70 MakePointerChecker <LteHandoverAlgorithm> ())
71 .AddAttribute (
"LteAnr",
72 "The automatic neighbour relation function associated to this EnbNetDevice",
75 MakePointerChecker <LteAnr> ())
76 .AddAttribute (
"LteEnbMac",
77 "The MAC associated to this EnbNetDevice",
80 MakePointerChecker <LteEnbMac> ())
81 .AddAttribute (
"FfMacScheduler",
82 "The scheduler associated to this EnbNetDevice",
85 MakePointerChecker <FfMacScheduler> ())
86 .AddAttribute (
"LteEnbPhy",
87 "The PHY associated to this EnbNetDevice",
90 MakePointerChecker <LteEnbPhy> ())
91 .AddAttribute (
"UlBandwidth",
92 "Uplink Transmission Bandwidth Configuration in number of Resource Blocks",
96 MakeUintegerChecker<uint8_t> ())
97 .AddAttribute (
"DlBandwidth",
98 "Downlink Transmission Bandwidth Configuration in number of Resource Blocks",
102 MakeUintegerChecker<uint8_t> ())
103 .AddAttribute (
"CellId",
107 MakeUintegerChecker<uint16_t> ())
108 .AddAttribute (
"DlEarfcn",
109 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
110 "as per 3GPP 36.101 Section 5.7.3. ",
113 MakeUintegerChecker<uint16_t> (0, 6599))
114 .AddAttribute (
"UlEarfcn",
115 "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
116 "as per 3GPP 36.101 Section 5.7.3. ",
119 MakeUintegerChecker<uint16_t> (18000, 24599))
120 .AddAttribute (
"CsgId",
121 "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
125 MakeUintegerChecker<uint32_t> ())
126 .AddAttribute (
"CsgIndication",
127 "If true, only UEs which are members of the CSG (i.e. same CSG ID) "
128 "can gain access to the eNodeB, therefore enforcing closed access mode. "
129 "Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
133 MakeBooleanChecker ())
139 : m_isConstructed (false),
140 m_isConfigured (false),
321 m_phy->Initialize ();
322 m_mac->Initialize ();
323 m_rrc->Initialize ();
328 m_anr->Initialize ();
338 return m_rrc->SendData (packet);
uint16_t GetDlEarfcn() const
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
uint16_t GetCellId() const
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint8_t GetUlBandwidth() const
NS_LOG_COMPONENT_DEFINE("LteEnbNetDevice")
uint8_t m_dlBandwidth
downlink bandwidth in RBs
Ptr< LteEnbPhy > GetPhy(void) const
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
uint16_t m_dlEarfcn
downlink carrier frequency
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
#define NS_FATAL_ERROR(msg)
fatal error handling
a polymophic address class
void UpdateConfig()
Propagate attributes and configuration to sub-modules.
Hold an unsigned integer type.
void SetUlBandwidth(uint8_t bw)
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
#define NS_LOG_LOGIC(msg)
static TypeId GetTypeId(void)
Ptr< LteEnbRrc > GetRrc() const
void SetDlBandwidth(uint8_t bw)
void SetDlEarfcn(uint16_t earfcn)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
uint16_t GetUlEarfcn() const
uint16_t m_ulEarfcn
uplink carrier frequency
#define NS_ASSERT_MSG(condition, message)
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Ptr< LteHandoverAlgorithm > m_handoverAlgorithm
uint16_t m_cellId
Cell Identifer.
uint8_t GetDlBandwidth() const
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
uint8_t m_ulBandwidth
uplink bandwidth in RBs
Ptr< FfMacScheduler > m_scheduler
virtual ~LteEnbNetDevice(void)
void SetUlEarfcn(uint16_t earfcn)
LteNetDevice provides basic implementation for all LTE network devices.
a unique identifier for an interface.
Ptr< LteEnbMac > GetMac(void) const
TypeId SetParent(TypeId tid)
static const uint16_t PROT_NUMBER
Protocol number (0x0800)