5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
cttc-3gpp-channel-simple-ran.cc File Reference

Simple RAN. More...

#include "ns3/antenna-module.h"
#include "ns3/config-store.h"
#include "ns3/core-module.h"
#include "ns3/grid-scenario-helper.h"
#include "ns3/internet-module.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-module.h"
#include "ns3/network-module.h"
#include "ns3/nr-eps-bearer-tag.h"
#include "ns3/nr-helper.h"
#include "ns3/nr-module.h"
#include "ns3/nr-point-to-point-epc-helper.h"
+ Include dependency graph for cttc-3gpp-channel-simple-ran.cc:

Go to the source code of this file.

Functions

void ConnectPdcpRlcTraces ()
 
void ConnectUlPdcpRlcTraces ()
 
void RxPdcpPDU (std::string path, uint16_t rnti, uint8_t lcid, uint32_t bytes, uint64_t pdcpDelay)
 
void RxRlcPDU (std::string path, uint16_t rnti, uint8_t lcid, uint32_t bytes, uint64_t rlcDelay)
 
static void SendPacket (Ptr< NetDevice > device, Address &addr, uint32_t packetSize)
 

Variables

static bool g_rxPdcpCallbackCalled = false
 
static bool g_rxRxRlcPDUCallbackCalled = false
 

Detailed Description

Simple RAN.

This example describes how to setup a simulation using the 3GPP channel model from TR 38.901. This example consists of a simple topology of 1 UE and 1 gNb, and only NR RAN part is simulated. One Bandwidth part and one CC are defined. A packet is created and directly sent to gNb device by SendPacket function. Then several functions are connected to PDCP and RLC traces and the delay is printed.

Definition in file cttc-3gpp-channel-simple-ran.cc.

Function Documentation

◆ ConnectPdcpRlcTraces()

void ConnectPdcpRlcTraces ( )

Function that connects PDCP and RLC traces to the corresponding trace sources.

Definition at line 104 of file cttc-3gpp-channel-simple-ran.cc.

References RxPdcpPDU(), and RxRlcPDU().

+ Here is the call graph for this function:

◆ ConnectUlPdcpRlcTraces()

void ConnectUlPdcpRlcTraces ( )

Function that connects UL PDCP and RLC traces to the corresponding trace sources.

Definition at line 117 of file cttc-3gpp-channel-simple-ran.cc.

References RxPdcpPDU(), and RxRlcPDU().

+ Here is the call graph for this function:

◆ RxPdcpPDU()

void RxPdcpPDU ( std::string  path,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  bytes,
uint64_t  pdcpDelay 
)

Function that prints out PDCP delay. This function is designed as a callback for PDCP trace source.

Parameters
pathThe path that matches the trace source
rntiRNTI of UE
lcidlogical channel id
bytesPDCP PDU size in bytes
pdcpDelayPDCP delay

Definition at line 73 of file cttc-3gpp-channel-simple-ran.cc.

Referenced by ConnectPdcpRlcTraces(), and ConnectUlPdcpRlcTraces().

+ Here is the caller graph for this function:

◆ RxRlcPDU()

void RxRlcPDU ( std::string  path,
uint16_t  rnti,
uint8_t  lcid,
uint32_t  bytes,
uint64_t  rlcDelay 
)

Function that prints out RLC statistics, such as RNTI, lcId, RLC PDU size, delay. This function is designed as a callback for RLC trace source.

Parameters
pathThe path that matches the trace source
rntiRNTI of UE
lcidlogical channel id
bytesRLC PDU size in bytes
rlcDelayRLC PDU delay

Definition at line 90 of file cttc-3gpp-channel-simple-ran.cc.

Referenced by ConnectPdcpRlcTraces(), and ConnectUlPdcpRlcTraces().

+ Here is the caller graph for this function:

◆ SendPacket()

static void SendPacket ( Ptr< NetDevice >  device,
Address &  addr,
uint32_t  packetSize 
)
static

Function creates a single packet and directly calls the function send of a device to send the packet to the destination address.

Parameters
deviceDevice that will send the packet to the destination address.
addrDestination address for a packet.
packetSizeThe packet size.

Definition at line 52 of file cttc-3gpp-channel-simple-ran.cc.

Variable Documentation

◆ g_rxPdcpCallbackCalled

bool g_rxPdcpCallbackCalled = false
static

Definition at line 41 of file cttc-3gpp-channel-simple-ran.cc.

◆ g_rxRxRlcPDUCallbackCalled

bool g_rxRxRlcPDUCallbackCalled = false
static

Definition at line 42 of file cttc-3gpp-channel-simple-ran.cc.