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/ipv4-l3-protocol.h>
42 #include <ns3/abort.h>
49 NS_OBJECT_ENSURE_REGISTERED ( LteEnbNetDevice);
51 TypeId LteEnbNetDevice::GetTypeId (
void)
55 TypeId (
"ns3::LteEnbNetDevice")
56 .SetParent<LteNetDevice> ()
57 .AddConstructor<LteEnbNetDevice> ()
58 .AddAttribute (
"LteEnbRrc",
59 "The RRC associated to this EnbNetDevice",
61 MakePointerAccessor (&LteEnbNetDevice::m_rrc),
62 MakePointerChecker <LteEnbRrc> ())
63 .AddAttribute (
"LteEnbMac",
64 "The MAC associated to this EnbNetDevice",
66 MakePointerAccessor (&LteEnbNetDevice::m_mac),
67 MakePointerChecker <LteEnbMac> ())
68 .AddAttribute (
"FfMacScheduler",
69 "The scheduler associated to this EnbNetDevice",
71 MakePointerAccessor (&LteEnbNetDevice::m_scheduler),
72 MakePointerChecker <FfMacScheduler> ())
73 .AddAttribute (
"LteEnbPhy",
74 "The PHY associated to this EnbNetDevice",
76 MakePointerAccessor (&LteEnbNetDevice::m_phy),
77 MakePointerChecker <LteEnbPhy> ())
78 .AddAttribute (
"UlBandwidth",
79 "Uplink Transmission Bandwidth Configuration in number of Resource Blocks",
83 MakeUintegerChecker<uint8_t> ())
84 .AddAttribute (
"DlBandwidth",
85 "Downlink Transmission Bandwidth Configuration in number of Resource Blocks",
89 MakeUintegerChecker<uint8_t> ())
90 .AddAttribute (
"CellId",
94 MakeUintegerChecker<uint16_t> ())
95 .AddAttribute (
"DlEarfcn",
96 "Downlink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
97 "as per 3GPP 36.101 Section 5.7.3. ",
100 MakeUintegerChecker<uint16_t> (0, 6149))
101 .AddAttribute (
"UlEarfcn",
102 "Uplink E-UTRA Absolute Radio Frequency Channel Number (EARFCN) "
103 "as per 3GPP 36.101 Section 5.7.3. ",
104 UintegerValue (18100),
106 MakeUintegerChecker<uint16_t> (18000, 24149))
111 LteEnbNetDevice::LteEnbNetDevice ()
116 LteEnbNetDevice::~LteEnbNetDevice (
void)
129 m_scheduler->Dispose ();
253 m_phy->Initialize ();
254 m_mac->Initialize ();
255 m_rrc->Initialize ();
264 NS_ASSERT_MSG (protocolNumber == Ipv4L3Protocol::PROT_NUMBER,
"unsupported protocol " << protocolNumber <<
", only IPv4 is supported");
265 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)
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
uint8_t GetUlBandwidth() const
Ptr< LteEnbPhy > GetPhy(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
#define NS_FATAL_ERROR(msg)
fatal error handling
a polymophic address class
void SetUlBandwidth(uint8_t bw)
virtual void DoInitialize(void)
Ptr< LteEnbRrc > GetRrc() const
void SetDlBandwidth(uint8_t bw)
void SetDlEarfcn(uint16_t earfcn)
virtual void DoDispose(void)
uint16_t GetUlEarfcn() const
#define NS_ASSERT_MSG(condition, message)
uint8_t GetDlBandwidth() const
void SetUlEarfcn(uint16_t earfcn)
Ptr< LteEnbMac > GetMac(void) const