23 #include "ns3/callback.h"
24 #include "ns3/config.h"
25 #include "ns3/simple-channel.h"
26 #include "ns3/error-model.h"
65 TypeId (
"ns3::LteSimpleHelper")
67 .AddConstructor<LteSimpleHelper> ()
68 .AddAttribute (
"RlcEntity",
69 "Specify which type of RLC will be used. ",
103 devices.
Add (device);
117 devices.
Add (device);
128 m_enbRrc = CreateObject<LteTestRrc> ();
133 m_enbRlc = CreateObject<LteRlcUm> ();
137 m_enbRlc = CreateObject<LteRlcAm> ();
149 m_enbMac = CreateObject<LteTestMac> ();
158 m_enbRrc->SetLtePdcpSapProvider (m_enbPdcp->GetLtePdcpSapProvider ());
159 m_enbPdcp->SetLtePdcpSapUser (
m_enbRrc->GetLtePdcpSapUser ());
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 ());
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.
void Dispose(void)
Dispose of this Object.
enum ns3::LteSimpleHelper::LteRlcEntityType_t m_lteRlcEntityType
Ptr< LteTestRrc > m_enbRrc
virtual void DoInitialize(void)
Initialize() implementation.
Prefix all trace prints with simulation node.
#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 an Object subclass with the TypeId system.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
virtual ~LteSimpleHelper(void)
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ptr< NetDevice > InstallSingleEnbDevice(Ptr< Node > n)
Ptr< NetDevice > InstallSingleUeDevice(Ptr< Node > n)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< LteTestRrc > m_ueRrc
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
static TypeId GetTypeId(void)
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
virtual void DoDispose(void)
Destructor implementation.
#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
void SetRnti(uint16_t rnti)
Ptr< LteTestMac > m_enbMac
void LteSimpleHelperUlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
void LteSimpleHelperDlRxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
Hold variables of type enum.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
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.
LteMacSapUser * GetLteMacSapUser()
virtual void DoDispose(void)
Destructor implementation.
Prefix all trace prints with simulation time.
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
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.
void SetLteRlcSapUser(LteRlcSapUser *s)
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
void SetLcId(uint8_t lcId)
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.
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.
LogLevel
Logging severity classes and levels.
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)
Make an EnumChecker pre-configured with a set of allowed values by name.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Prefix all trace prints with function.
void EnableUlPdcpTraces(void)
Enable trace sinks for UL PDCP layer.
void EnableDlPdcpTraces(void)
Enable trace sinks for DL PDCP layer.
ObjectFactory m_enbDeviceFactory
void SetDevice(Ptr< NetDevice > device)
virtual void DoInitialize(void)
Initialize() implementation.
void EnableUlRlcTraces(void)
Enable trace sinks for UL RLC layer.
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
LteRlcSapProvider * GetLteRlcSapProvider()
static const uint32_t packetSize
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)
Set the parent TypeId.
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.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
void LteSimpleHelperDlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
void SetLteMacSapProvider(LteMacSapProvider *s)
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)