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>
57 TypeId (
"ns3::LteEnbNetDevice")
59 .AddConstructor<LteEnbNetDevice> ()
60 .AddAttribute (
"LteEnbRrc",
61 "The RRC associated to this EnbNetDevice",
64 MakePointerChecker <LteEnbRrc> ())
65 .AddAttribute (
"LteHandoverAlgorithm",
66 "The handover algorithm associated to this EnbNetDevice",
69 MakePointerChecker <LteHandoverAlgorithm> ())
70 .AddAttribute (
"LteAnr",
71 "The automatic neighbour relation function associated to this EnbNetDevice",
74 MakePointerChecker <LteAnr> ())
75 .AddAttribute (
"LteEnbMac",
76 "The MAC associated to this EnbNetDevice",
79 MakePointerChecker <LteEnbMac> ())
80 .AddAttribute (
"FfMacScheduler",
81 "The scheduler associated to this EnbNetDevice",
84 MakePointerChecker <FfMacScheduler> ())
85 .AddAttribute (
"LteEnbPhy",
86 "The PHY associated to this EnbNetDevice",
89 MakePointerChecker <LteEnbPhy> ())
90 .AddAttribute (
"UlBandwidth",
91 "Uplink Transmission Bandwidth Configuration in number of Resource Blocks",
95 MakeUintegerChecker<uint8_t> ())
96 .AddAttribute (
"DlBandwidth",
97 "Downlink Transmission Bandwidth Configuration in number of Resource Blocks",
101 MakeUintegerChecker<uint8_t> ())
102 .AddAttribute (
"CellId",
106 MakeUintegerChecker<uint16_t> ())
107 .AddAttribute (
"DlEarfcn",
108 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
109 "as per 3GPP 36.101 Section 5.7.3. ",
112 MakeUintegerChecker<uint16_t> (0, 6599))
113 .AddAttribute (
"UlEarfcn",
114 "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
115 "as per 3GPP 36.101 Section 5.7.3. ",
118 MakeUintegerChecker<uint16_t> (18000, 24599))
119 .AddAttribute (
"CsgId",
120 "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
124 MakeUintegerChecker<uint32_t> ())
125 .AddAttribute (
"CsgIndication",
126 "If true, only UEs which are members of the CSG (i.e. same CSG ID) "
127 "can gain access to the eNodeB, therefore enforcing closed access mode. "
128 "Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
132 MakeBooleanChecker ())
138 : m_isConstructed (false),
139 m_isConfigured (false),
320 m_phy->Initialize ();
321 m_mac->Initialize ();
322 m_rrc->Initialize ();
327 m_anr->Initialize ();
337 return m_rrc->SendData (packet);
uint16_t GetDlEarfcn() const
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.
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
uint8_t m_dlBandwidth
downlink bandwidth in RBs
Ptr< LteEnbPhy > GetPhy(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_FATAL_ERROR(msg)
fatal error handling
uint16_t m_dlEarfcn
downlink carrier frequency
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
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)
Use NS_LOG to output a message of level LOG_LOGIC.
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)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
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)