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/lte-ffr-algorithm.h>
44 #include <ns3/ipv4-l3-protocol.h>
45 #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 (
"LteFfrAlgorithm",
77 "The FFR algorithm associated to this EnbNetDevice",
80 MakePointerChecker <LteFfrAlgorithm> ())
81 .AddAttribute (
"LteEnbMac",
82 "The MAC associated to this EnbNetDevice",
85 MakePointerChecker <LteEnbMac> ())
86 .AddAttribute (
"FfMacScheduler",
87 "The scheduler associated to this EnbNetDevice",
90 MakePointerChecker <FfMacScheduler> ())
91 .AddAttribute (
"LteEnbPhy",
92 "The PHY associated to this EnbNetDevice",
95 MakePointerChecker <LteEnbPhy> ())
96 .AddAttribute (
"UlBandwidth",
97 "Uplink Transmission Bandwidth Configuration in number of Resource Blocks",
101 MakeUintegerChecker<uint8_t> ())
102 .AddAttribute (
"DlBandwidth",
103 "Downlink Transmission Bandwidth Configuration in number of Resource Blocks",
107 MakeUintegerChecker<uint8_t> ())
108 .AddAttribute (
"CellId",
112 MakeUintegerChecker<uint16_t> ())
113 .AddAttribute (
"DlEarfcn",
114 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
115 "as per 3GPP 36.101 Section 5.7.3. ",
118 MakeUintegerChecker<uint16_t> (0, 6599))
119 .AddAttribute (
"UlEarfcn",
120 "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
121 "as per 3GPP 36.101 Section 5.7.3. ",
124 MakeUintegerChecker<uint16_t> (18000, 24599))
125 .AddAttribute (
"CsgId",
126 "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
130 MakeUintegerChecker<uint32_t> ())
131 .AddAttribute (
"CsgIndication",
132 "If true, only UEs which are members of the CSG (i.e. same CSG ID) "
133 "can gain access to the eNodeB, therefore enforcing closed access mode. "
134 "Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
144 : m_isConstructed (false),
145 m_isConfigured (false),
329 m_phy->Initialize ();
330 m_mac->Initialize ();
331 m_rrc->Initialize ();
336 m_anr->Initialize ();
348 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 "...
AttributeValue implementation for Boolean.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint16_t GetCellId() const
virtual void DoDispose(void)
Destructor implementation.
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint8_t GetUlBandwidth() const
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
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)
Report a fatal error with a message and terminate.
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.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Hold an unsigned integer type.
void SetUlBandwidth(uint8_t bw)
virtual void DoInitialize(void)
Initialize() implementation.
#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)
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
Hold objects of type Ptr<T>.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void SetDlEarfcn(uint16_t earfcn)
virtual void DoDispose(void)
Destructor implementation.
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.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
Ptr< LteEnbMac > GetMac(void) const
TypeId SetParent(TypeId tid)
Set the parent TypeId.
static const uint16_t PROT_NUMBER
Protocol number (0x0800)