23 #include "ns3/callback.h"
24 #include "ns3/config.h"
25 #include "ns3/simple-channel.h"
26 #include "ns3/error-model.h"
67 TypeId (
"ns3::LteSimpleHelper")
69 .AddConstructor<LteSimpleHelper> ()
70 .AddAttribute (
"RlcEntity",
71 "Specify which type of RLC will be used. ",
105 devices.
Add (device);
119 devices.
Add (device);
130 m_enbRrc = CreateObject<LteTestRrc> ();
135 m_enbRlc = CreateObject<LteRlcUm> ();
139 m_enbRlc = CreateObject<LteRlcAm> ();
151 m_enbMac = CreateObject<LteTestMac> ();
158 m_enbRrc->SetLtePdcpSapProvider (m_enbPdcp->GetLtePdcpSapProvider ());
159 m_enbPdcp->SetLtePdcpSapUser (
m_enbRrc->GetLtePdcpSapUser ());
161 m_enbPdcp->SetLteRlcSapProvider (
m_enbRlc->GetLteRlcSapProvider ());
162 m_enbRlc->SetLteRlcSapUser (m_enbPdcp->GetLteRlcSapUser ());
175 m_ueRrc = CreateObject<LteTestRrc> ();
176 m_uePdcp = CreateObject<LtePdcp> ();
180 m_ueRlc = CreateObject<LteRlcUm> ();
184 m_ueRlc = CreateObject<LteRlcAm> ();
196 m_ueMac = CreateObject<LteTestMac> ();
203 m_ueRrc->SetLtePdcpSapProvider (m_uePdcp->GetLtePdcpSapProvider ());
204 m_uePdcp->SetLtePdcpSapUser (
m_ueRrc->GetLtePdcpSapUser ());
206 m_uePdcp->SetLteRlcSapProvider (
m_ueRlc->GetLteRlcSapProvider ());
207 m_ueRlc->SetLteRlcSapUser (m_uePdcp->GetLteRlcSapUser ());
251 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
253 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize);
255 uint16_t cellId = 222;
256 rlcStats->
DlTxPdu (cellId, imsi, rnti, lcid, packetSize);
261 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
263 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize << delay);
265 uint16_t cellId = 555;
266 rlcStats->
DlRxPdu (cellId, imsi, rnti, lcid, packetSize, delay);
282 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
284 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize);
285 uint64_t imsi = 1111;
286 uint16_t cellId = 555;
287 rlcStats->
UlTxPdu (cellId, imsi, rnti, lcid, packetSize);
292 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
294 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize << delay);
296 uint16_t cellId = 555;
297 rlcStats->
UlRxPdu (cellId, imsi, rnti, lcid, packetSize, delay);
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
enum ns3::LteSimpleHelper::LteRlcEntityType_t m_lteRlcEntityType
Ptr< LteTestRrc > m_enbRrc
#define NS_LOG_FUNCTION(parameters)
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
std::vector< Ptr< Node > >::const_iterator Iterator
virtual ~LteSimpleHelper(void)
Ptr< NetDevice > InstallSingleEnbDevice(Ptr< Node > n)
Ptr< NetDevice > InstallSingleUeDevice(Ptr< Node > n)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Ptr< LteTestRrc > m_ueRrc
void SetTypeId(TypeId tid)
static TypeId GetTypeId(void)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
void EnableTraces(void)
Enables trace sinks for MAC, RLC and PDCP.
Ptr< LteTestMac > m_ueMac
Ptr< LteTestMac > m_enbMac
void LteSimpleHelperUlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
void LteSimpleHelperDlRxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
hold variables of type 'enum'
Ptr< Object > Create(void) const
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
void LteSimpleHelperUlRxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
holds a vector of ns3::NetDevice pointers
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void UlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Notifies the stats calculator that an uplink transmission has occurred.
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Ptr< SimpleChannel > m_phyChannel
ObjectFactory m_ueDeviceFactory
keep track of a set of node pointers.
void EnableLogComponents(void)
Enables logging for all components of the LENA architecture.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
NS_LOG_COMPONENT_DEFINE("LteSimpleHelper")
void DlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Notifies the stats calculator that an downlink transmission has occurred.
void EnableDlRlcTraces(void)
Enable trace sinks for DL RLC layer.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
void UlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Notifies the stats calculator that an uplink reception has occurred.
uint32_t AddDevice(Ptr< NetDevice > device)
void EnableUlPdcpTraces(void)
Enable trace sinks for UL PDCP layer.
void EnableDlPdcpTraces(void)
Enable trace sinks for DL PDCP layer.
ObjectFactory m_enbDeviceFactory
LogLevel
Logging severity classes and levels.
void Initialize(void)
This method calls the virtual DoInitialize method on all the objects aggregated to this object...
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
void EnableUlRlcTraces(void)
Enable trace sinks for UL RLC layer.
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
a base class which provides memory management and object aggregation
The LteSimpleNetDevice class implements the LTE simple net device.
static TypeId GetTypeId(void)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void DlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Notifies the stats calculator that an downlink reception has occurred.
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
void LteSimpleHelperDlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
void LogComponentEnable(char const *name, enum LogLevel level)
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)