|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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. ",
128 m_enbRrc = CreateObject<LteTestRrc> ();
133 m_enbRlc = CreateObject<LteRlcUm> ();
137 m_enbRlc = CreateObject<LteRlcAm> ();
147 n->AddDevice (enbDev);
149 m_enbMac = CreateObject<LteTestMac> ();
175 m_ueRrc = CreateObject<LteTestRrc> ();
176 m_uePdcp = CreateObject<LtePdcp> ();
180 m_ueRlc = CreateObject<LteRlcUm> ();
184 m_ueRlc = CreateObject<LteRlcAm> ();
194 n->AddDevice (ueDev);
196 m_ueMac = CreateObject<LteTestMac> ();
260 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
264 uint16_t cellId = 222;
280 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
284 uint16_t cellId = 555;
310 uint16_t rnti, uint8_t lcid, uint32_t
packetSize)
313 uint64_t imsi = 1111;
314 uint16_t cellId = 555;
330 uint16_t rnti, uint8_t lcid, uint32_t
packetSize, uint64_t delay)
334 uint16_t cellId = 555;
holds a vector of ns3::NetDevice pointers
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void LteSimpleHelperDlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
DL transmit PDU callback.
void SetLteMacSapUser(LteMacSapUser *s)
Set the MAC SAP user.
Ptr< LtePdcp > m_uePdcp
UE PDCP.
Ptr< SimpleChannel > m_phyChannel
the physical channel
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 Dispose(void)
Dispose of this Object.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual void DoInitialize(void)
Initialize() implementation.
virtual void DoDispose(void)
Destructor implementation.
Ptr< LteTestRrc > m_enbRrc
ENB RRC.
bool Receive(Ptr< NetDevice > nd, Ptr< const Packet > p, uint16_t protocol, const Address &addr)
the Receive function
Ptr< LtePdcp > m_enbPdcp
ENB PDCP.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
void EnableDlPdcpTraces(void)
Enable trace sinks for DL PDCP layer.
@ LOG_PREFIX_NODE
Prefix all trace prints with simulation node.
The LteSimpleNetDevice class implements the LTE simple net device.
@ LOG_LEVEL_ALL
Print everything.
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.
void LteSimpleHelperUlTxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
UL transmit PDU callback.
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
Ptr< NetDevice > InstallSingleUeDevice(Ptr< Node > n)
Install single UE device.
Ptr< LteRlc > m_ueRlc
UE RLC.
void EnablePdcpTraces(void)
Enable trace sinks for PDCP layer.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold variables of type enum.
void SetRnti(uint16_t rnti)
void EnableDlRlcTraces(void)
Enable trace sinks for DL RLC layer.
LteMacSapUser * GetLteMacSapUser()
static TypeId GetTypeId(void)
Get the type ID.
void SetDevice(Ptr< NetDevice > device)
Set the device function.
Ptr< LteTestMac > m_enbMac
ENB MAC.
void EnableLogComponents(void)
Enables logging for all components of the LENA architecture.
A base class which provides memory management and object aggregation.
ObjectFactory m_ueDeviceFactory
UE device factory.
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
LteMacSapProvider * GetLteMacSapProvider(void)
Get the MAC SAP provider.
Ptr< LteTestRrc > m_ueRrc
UE RRC.
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
void SetLteMacSapProvider(LteMacSapProvider *s)
Ptr< LteRlc > m_enbRlc
ENB RLC.
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
void EnableUlRlcTraces(void)
Enable trace sinks for UL RLC layer.
Ptr< NetDevice > InstallSingleEnbDevice(Ptr< Node > n)
Install single ENB device.
void LteSimpleHelperUlRxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
UL receive PDU callback.
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.
virtual void DoInitialize(void)
Initialize() implementation.
void EnableUlPdcpTraces(void)
Enable trace sinks for UL PDCP layer.
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
void SetLteRlcSapUser(LteRlcSapUser *s)
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
@ LOG_PREFIX_TIME
Prefix all trace prints with simulation time.
virtual ~LteSimpleHelper(void)
static const uint32_t packetSize
void SetLcId(uint8_t lcId)
@ LOG_PREFIX_FUNC
Prefix all trace prints with function.
LogLevel
Logging severity classes and levels.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
void EnableTraces(void)
Enables trace sinks for MAC, RLC and PDCP.
void LteSimpleHelperDlRxPduCallback(Ptr< RadioBearerStatsCalculator > rlcStats, std::string path, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
DL receive PDU callback.
LteRlcSapProvider * GetLteRlcSapProvider()
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
keep track of a set of node pointers.
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Ptr< LteTestMac > m_ueMac
UE MAC.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
static TypeId GetTypeId(void)
Get the type ID.
enum ns3::LteSimpleHelper::LteRlcEntityType_t m_lteRlcEntityType
RLC entity type.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
virtual void DoDispose(void)
Destructor implementation.
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
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.
ObjectFactory m_enbDeviceFactory
ENB device factory.