![]() |
5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
|
Simple frequency division multiplexing example. More...
#include "ns3/antenna-module.h"
#include "ns3/config-store.h"
#include "ns3/core-module.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 "ns3/three-gpp-spectrum-propagation-loss-model.h"
Go to the source code of this file.
Functions | |
void | ConnectPdcpRlcTraces () |
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 int | g_pdcpTraceCallbackCalled |
static int | g_rlcTraceCallbackCalled |
Simple frequency division multiplexing example.
This example describes how to setup a simple simulation with the frequency division multiplexing. Simulation example allows configuration of the two bandwidth parts where each is dedicated to different traffic type. The topology is a simple topology that consists of 1 UE and 1 gNB. There is one data bearer active and it will be multiplexed over a one of the two bandwidth parts depending on whether the traffic is configured to be low latency or not. By default the traffic is low latency. So, the example can be run from the command line in the following way:
./ns3 run cttc-3gpp-channel-simple-fdm
or to configure flow as not ultra low latency:
./ns3 run 'cttc-3gpp-channel-simple-fdm –isUll=0'
Variables that are accessible through the command line (e.g. numerology of BWP 1 can be configured by using –numerologyBwp1=4, so if the user would like to specify this parameter the program can be run in the following way:
./ns3 run "cttc-3gpp-channel-simple-fdm --numerologyBwp1=4"
The configured spectrum division is as follows:
--------------------------—Band 1------------------------------— --------------------------—CC1---------------------------------— ---------—BWP1------------—|-----------—BWP2---------------—
Definition in file cttc-3gpp-channel-simple-fdm.cc.
void ConnectPdcpRlcTraces | ( | ) |
Function that connects PDCP and RLC traces to the corresponding trace sources.
Definition at line 133 of file cttc-3gpp-channel-simple-fdm.cc.
References RxPdcpPDU(), and RxRlcPDU().
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.
path | The path that matches the trace source |
rnti | RNTI of UE |
lcid | logical channel id |
bytes | PDCP PDU size in bytes |
pdcpDelay | PDCP delay |
Definition at line 102 of file cttc-3gpp-channel-simple-fdm.cc.
References g_pdcpTraceCallbackCalled.
Referenced by ConnectPdcpRlcTraces().
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.
path | The path that matches the trace source |
rnti | RNTI of UE |
lcid | logical channel id |
bytes | RLC PDU size in bytes |
rlcDelay | RLC PDU delay |
Definition at line 119 of file cttc-3gpp-channel-simple-fdm.cc.
References g_rlcTraceCallbackCalled.
Referenced by ConnectPdcpRlcTraces().
|
static |
Function creates a single packet and directly calls the function send of a device to send the packet to the destination address.
device | Device that will send the packet to the destination address. |
addr | Destination address for a packet. |
packetSize | The packet size. |
Definition at line 75 of file cttc-3gpp-channel-simple-fdm.cc.
|
static |
Global variable used to check if the callback function for PDCP is called and thus to determine if the example is run correctly or not
Definition at line 63 of file cttc-3gpp-channel-simple-fdm.cc.
Referenced by RxPdcpPDU().
|
static |
Global variable used to check if the callback function for RLC is called and thus to determine if the example is run correctly or not
Definition at line 60 of file cttc-3gpp-channel-simple-fdm.cc.
Referenced by RxRlcPDU().