23 #include "ns3/callback.h"
24 #include "ns3/config.h"
25 #include "ns3/simple-channel.h"
26 #include "ns3/error-model.h"
66 TypeId (
"ns3::LteSimpleHelper")
68 .AddConstructor<LteSimpleHelper> ()
69 .AddAttribute (
"RlcEntity",
70 "Specify which type of RLC will be used. ",
104 devices.
Add (device);
118 devices.
Add (device);
129 m_enbRrc = CreateObject<LteTestRrc> ();
134 m_enbRlc = CreateObject<LteRlcUm> ();
138 m_enbRlc = CreateObject<LteRlcAm> ();
150 m_enbMac = CreateObject<LteTestMac> ();
157 m_enbRrc->SetLtePdcpSapProvider (m_enbPdcp->GetLtePdcpSapProvider ());
158 m_enbPdcp->SetLtePdcpSapUser (
m_enbRrc->GetLtePdcpSapUser ());
174 m_ueRrc = CreateObject<LteTestRrc> ();
175 m_uePdcp = CreateObject<LtePdcp> ();
179 m_ueRlc = CreateObject<LteRlcUm> ();
183 m_ueRlc = CreateObject<LteRlcAm> ();
195 m_ueMac = CreateObject<LteTestMac> ();
202 m_ueRrc->SetLtePdcpSapProvider (m_uePdcp->GetLtePdcpSapProvider ());
203 m_uePdcp->SetLtePdcpSapUser (
m_ueRrc->GetLtePdcpSapUser ());
250 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
252 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize);
254 uint16_t cellId = 222;
255 rlcStats->
DlTxPdu (cellId, imsi, rnti, lcid, packetSize);
260 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
262 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize << delay);
264 uint16_t cellId = 555;
265 rlcStats->
DlRxPdu (cellId, imsi, rnti, lcid, packetSize, delay);
281 uint16_t rnti, uint8_t lcid, uint32_t packetSize)
283 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize);
284 uint64_t imsi = 1111;
285 uint16_t cellId = 555;
286 rlcStats->
UlTxPdu (cellId, imsi, rnti, lcid, packetSize);
291 uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
293 NS_LOG_FUNCTION (rlcStats << path << rnti << (uint16_t)lcid << packetSize << delay);
295 uint16_t cellId = 555;
296 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)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
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)
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
virtual ~LteSimpleHelper(void)
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)
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
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)
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.
LteMacSapUser * GetLteMacSapUser()
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
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)
prefix all trace prints with simulation time
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
prefix all trace prints with function
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.
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.
prefix all trace prints with simulation node
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
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 SetDevice(Ptr< NetDevice > device)
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.
LteRlcSapProvider * GetLteRlcSapProvider()
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 Dispose(void)
Run the DoDispose methods of this object and all the objects aggregated to it.
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 SetLteMacSapProvider(LteMacSapProvider *s)
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)