24 #include <ns3/llc-snap-header.h>
25 #include <ns3/simulator.h>
26 #include <ns3/callback.h>
28 #include <ns3/packet.h>
29 #include <ns3/lte-net-device.h>
30 #include <ns3/packet-burst.h>
31 #include <ns3/uinteger.h>
32 #include <ns3/trace-source-accessor.h>
33 #include <ns3/pointer.h>
35 #include <ns3/lte-amc.h>
36 #include <ns3/lte-enb-mac.h>
37 #include <ns3/lte-enb-net-device.h>
38 #include <ns3/lte-enb-rrc.h>
39 #include <ns3/lte-ue-net-device.h>
40 #include <ns3/lte-enb-phy.h>
41 #include <ns3/ff-mac-scheduler.h>
42 #include <ns3/lte-handover-algorithm.h>
43 #include <ns3/lte-anr.h>
44 #include <ns3/lte-ffr-algorithm.h>
45 #include <ns3/ipv4-l3-protocol.h>
46 #include <ns3/abort.h>
48 #include <ns3/lte-enb-component-carrier-manager.h>
49 #include <ns3/object-map.h>
50 #include <ns3/object-factory.h>
62 TypeId (
"ns3::LteEnbNetDevice")
64 .AddConstructor<LteEnbNetDevice> ()
65 .AddAttribute (
"LteEnbRrc",
66 "The RRC associated to this EnbNetDevice",
69 MakePointerChecker <LteEnbRrc> ())
70 .AddAttribute (
"LteHandoverAlgorithm",
71 "The handover algorithm associated to this EnbNetDevice",
74 MakePointerChecker <LteHandoverAlgorithm> ())
75 .AddAttribute (
"LteAnr",
76 "The automatic neighbour relation function associated to this EnbNetDevice",
79 MakePointerChecker <LteAnr> ())
80 .AddAttribute (
"LteFfrAlgorithm",
81 "The FFR algorithm associated to this EnbNetDevice",
84 MakePointerChecker <LteFfrAlgorithm> ())
85 .AddAttribute (
"LteEnbComponentCarrierManager",
86 "The RRC associated to this EnbNetDevice",
89 MakePointerChecker <LteEnbComponentCarrierManager> ())
90 .AddAttribute (
"ComponentCarrierMap",
"List of component carriers.",
93 MakeObjectMapChecker<ComponentCarrierEnb> ())
94 .AddAttribute (
"UlBandwidth",
95 "Uplink Transmission Bandwidth Configuration in number of Resource Blocks",
99 MakeUintegerChecker<uint8_t> ())
100 .AddAttribute (
"DlBandwidth",
101 "Downlink Transmission Bandwidth Configuration in number of Resource Blocks",
105 MakeUintegerChecker<uint8_t> ())
106 .AddAttribute (
"CellId",
110 MakeUintegerChecker<uint16_t> ())
111 .AddAttribute (
"DlEarfcn",
112 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
113 "as per 3GPP 36.101 Section 5.7.3. ",
116 MakeUintegerChecker<uint32_t> (0, 262143))
117 .AddAttribute (
"UlEarfcn",
118 "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
119 "as per 3GPP 36.101 Section 5.7.3. ",
122 MakeUintegerChecker<uint32_t> (0, 262143))
123 .AddAttribute (
"CsgId",
124 "The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
128 MakeUintegerChecker<uint32_t> ())
129 .AddAttribute (
"CsgIndication",
130 "If true, only UEs which are members of the CSG (i.e. same CSG ID) "
131 "can gain access to the eNodeB, therefore enforcing closed access mode. "
132 "Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
142 : m_isConstructed (false),
143 m_isConfigured (false),
145 m_componentCarrierManager(0)
175 for (uint32_t i = 0; i <
m_ccMap.size (); i++)
189 return m_ccMap.at (0)->GetMac ();
195 return m_ccMap.at (0)->GetPhy ();
201 return m_ccMap.at (index)->GetMac ();
207 return m_ccMap.at (index)->GetPhy ();
233 if (it.second->GetCellId () == cellId)
349 std::map < uint8_t, Ptr<ComponentCarrierEnb> >
368 std::map< uint8_t, Ptr<ComponentCarrierEnb> >::iterator it;
371 it->second->Initialize ();
373 m_rrc->Initialize ();
379 m_anr->Initialize ();
391 return m_rrc->SendData (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 "...
AttributeValue implementation for Boolean.
void SetUlEarfcn(uint32_t earfcn)
#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
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink bandwidth i...
Ptr< LteEnbPhy > GetPhy(void) const
uint32_t m_dlEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- downlink carrier fre...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#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.
std::map< uint8_t, Ptr< ComponentCarrierEnb > > m_ccMap
ComponentCarrier map.
uint32_t GetCsgId() const
Returns the CSG ID of the eNodeB.
Ptr< LteEnbComponentCarrierManager > m_componentCarrierManager
the component carrier manager of this eNb
bool m_isConstructed
is constructed?
a polymophic address class
uint32_t GetUlEarfcn() const
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)
Ptr< LteEnbRrc > m_rrc
the RRC
virtual void DoInitialize(void)
Initialize() implementation.
static TypeId GetTypeId(void)
Get the type ID.
Ptr< LteEnbRrc > GetRrc() const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetDlBandwidth(uint8_t bw)
Ptr< LteFfrAlgorithm > m_ffrAlgorithm
DEPRECATED - It is maintained for backward compatibility after adding CA feature. ...
uint32_t GetDlEarfcn() const
Hold objects of type Ptr.
void SetDlEarfcn(uint32_t earfcn)
Ptr< const AttributeChecker > MakeBooleanChecker(void)
virtual void DoDispose(void)
Destructor implementation.
void SetCsgIndication(bool csgIndication)
Enable or disable the CSG indication flag.
uint32_t m_ulEarfcn
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink carrier frequ...
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
void SetCcMap(std::map< uint8_t, Ptr< ComponentCarrierEnb > > ccm)
Set the ComponentCarrier Map of the Enb.
#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 m_csgIndication
CSG indication.
bool GetCsgIndication() const
Returns the CSG indication flag of the eNodeB.
Ptr< LteEnbComponentCarrierManager > GetComponentCarrierManager() const
bool m_isConfigured
is configured?
bool HasCellId(uint16_t cellId) const
Ptr< LteHandoverAlgorithm > m_handoverAlgorithm
the handover algorithm
uint16_t m_cellId
Cell Identifer.
uint8_t GetDlBandwidth() const
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
void SetCsgId(uint32_t csgId)
Associate the eNodeB device with a particular CSG.
uint8_t m_ulBandwidth
DEPRECATE - It is maintained for backward compatibility after adding CA feature- uplink bandwidth in ...
virtual ~LteEnbNetDevice(void)
Container for a set of ns3::Object pointers.
LteNetDevice provides basic implementation for all LTE network devices.
std::map< uint8_t, Ptr< ComponentCarrierEnb > > GetCcMap(void)
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)