5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrGnbPhy Class Reference

The gNb physical layer. More...

#include "nr-gnb-phy.h"

+ Inheritance diagram for ns3::NrGnbPhy:
+ Collaboration diagram for ns3::NrGnbPhy:

Public Types

typedef void(* RBStatsTracedCallback) (const SfnSf &sfnSf, uint8_t sym, const std::vector< int > &rbMap, uint16_t bwpId, uint16_t cellId)
 TracedCallback signature for RB statistics.
 
typedef void(* RxedGnbPhyCtrlMsgsTracedCallback) (const SfnSf sfn, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >)
 
typedef void(* SlotStatsTracedCallback) (const SfnSf &sfnSf, uint32_t scheduledUe, uint32_t usedReg, uint32_t usedSym, uint32_t availableRb, uint32_t availableSym, uint16_t bwpId, uint16_t cellId)
 TracedCallback signature for slot statistics.
 
typedef void(* TxedGnbPhyCtrlMsgsTracedCallback) (const SfnSf sfn, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >)
 

Public Member Functions

 NrGnbPhy ()
 NrGnbPhy constructor. Please use the other one.
 
 ~NrGnbPhy () override
 ~NrGnbPhy
 
void ChangeBeamformingVector (Ptr< NrNetDevice > dev)
 
void ChangeToQuasiOmniBeamformingVector ()
 
int8_t DoGetReferenceSignalPower () const
 Get the power of the enb.
 
void GenerateDataCqiReport (const SpectrumValue &sinr)
 Generate a DL CQI report.
 
BeamId GetBeamId (uint16_t rnti) const override
 Get the BeamId for the selected user.
 
Ptr< NrChAccessManagerGetCam () const
 Get the channel access manager for the PHY.
 
const SfnSfGetCurrentSfnSf () const override
 Get the current SfnSf.
 
LteEnbCphySapProvider * GetEnbCphySapProvider ()
 Get the C PHY SAP provider.
 
uint32_t GetN0Delay () const
 : Get the minimum processing delay (in slots) to decode DL DCI and decode DL Data
 
uint32_t GetN1Delay () const
 : Get the minimum processing delay (in slots) to decode DL Data and send Harq feedback
 
uint32_t GetN2Delay () const
 : Get the minimum processing delay (in slots) to decode UL DCI and prepare UL data
 
uint32_t GetNumRbPerRbg () const override
 Retrieve the number of RB per RBG.
 
std::string GetPattern () const
 Retrieve the currently installed pattern.
 
double GetTxPower () const override
 Retrieve the TX power of the gNB.
 
void PhyCtrlMessagesReceived (const Ptr< NrControlMessage > &msg)
 Receive a list of CTRL messages.
 
void PhyDataPacketReceived (const Ptr< Packet > &p)
 Receive a PHY data packet.
 
bool RegisterUe (uint64_t imsi, const Ptr< NrUeNetDevice > &ueDevice)
 Add the UE to the list of this gnb UEs.
 
void ReportUlHarqFeedback (const UlHarqInfo &mes)
 Get the HARQ feedback from NrSpectrumPhy and forward it to the scheduler.
 
void ScheduleStartEventLoop (uint32_t nodeId, uint16_t frame, uint8_t subframe, uint16_t slot) override
 Start the ue Event Loop.
 
void SetCam (const Ptr< NrChAccessManager > &s)
 Set the channel access manager interface for this instance of the PHY.
 
void SetEnbCphySapUser (LteEnbCphySapUser *s)
 Set the C PHY SAP user.
 
void SetN0Delay (uint32_t delay)
 : Set the minimum processing delay (in slots) to decode DL DCI and decode DL data. It is not defined in NR specs. It defaults to 0 slots.
 
void SetN1Delay (uint32_t delay)
 : Set the minimum processing delay (in slots) to decode DL Data and send Harq feedback.
 
void SetN2Delay (uint32_t delay)
 : Set the minimum processing delay (in slots) to decode UL DCI and prepare UL data.
 
void SetPattern (const std::string &pattern)
 Set the pattern that the gnb will utilize.
 
void SetPhySapUser (NrGnbPhySapUser *ptr)
 Install the PHY SAP user (which is in this case the MAC)
 
void SetPrimary ()
 Set this PHY as primary.
 
void SetSubChannels (const std::vector< int > &rbIndexVector, size_t nTotalAllocRbs)
 Set the Tx power spectral density based on the RB index vector.
 
void SetTxPower (double pow)
 Set the transmission power for the UE.
 
- Public Member Functions inherited from ns3::NrPhy
 NrPhy ()
 NrPhy constructor.
 
 ~NrPhy () override
 ~NrPhy
 
void DoSetCellId (uint16_t cellId)
 Set the cell ID.
 
void EncodeCtrlMsg (const Ptr< NrControlMessage > &msg)
 Take the control messages, and put it in a list that will be sent at the first occasion.
 
void EnqueueCtrlMessage (const Ptr< NrControlMessage > &m)
 Enqueue a ctrl message, keeping in consideration L1L2CtrlDelay.
 
uint16_t GetBwpId () const
 
uint16_t GetCellId () const
 
double GetCentralFrequency () const
 Retrieve the frequency (in Hz) of this PHY's channel.
 
uint32_t GetChannelBandwidth () const
 Retrieve the channel bandwidth, in Hz.
 
uint32_t GetL1L2CtrlLatency () const
 
double GetNoiseFigure () const
 Get the NoiseFigure value.
 
uint16_t GetNumerology () const
 Get the configured numerology.
 
NrPhySapProviderGetPhySapProvider ()
 Retrieve a pointer to an instance of NrPhySapProvider.
 
enum NrSpectrumValueHelper::PowerAllocationType GetPowerAllocationType () const
 Get the power allocation type.
 
uint32_t GetRbNum () const
 Get the number of Resource block configured.
 
double GetRbOverhead () const
 Get the bandwidth overhead used when calculating the usable RB number.
 
Time GetSlotPeriod () const
 Get the slot period.
 
Ptr< const SpectrumModel > GetSpectrumModel ()
 Get the spectrum model of the PHY.
 
Ptr< NrSpectrumPhyGetSpectrumPhy () const
 Retrieve the SpectrumPhy pointer.
 
uint32_t GetSubcarrierSpacing () const
 Retrieve the subcarrier spacing in Hz. Subcarrier spacing is updated when the numerology is being updated.
 
Time GetSymbolPeriod () const
 Get SymbolPeriod.
 
uint32_t GetSymbolsPerSlot () const
 Get the number of symbols in a slot.
 
virtual Time GetTbDecodeLatency () const
 Returns Transport Block decode latency.
 
bool HasDlSlot () const
 Go through the current pattern and see if at least one slot is DL, F or S.
 
bool HasUlSlot () const
 Go through the current pattern and see if at least one slot is UL, F or S.
 
void InstallCentralFrequency (double f)
 Install the PHY over a particular central frequency.
 
void InstallSpectrumPhy (const Ptr< NrSpectrumPhy > &spectrumPhy)
 Set the SpectrumPhy associated with this PHY.
 
void NotifyConnectionSuccessful ()
 Notify PHY about the successful RRC connection establishment.
 
void PushBackSlotAllocInfo (const SlotAllocInfo &slotAllocInfo)
 Store the slot allocation info.
 
void SendRachPreamble (uint32_t PreambleId, uint32_t Rnti)
 Send the RachPreamble.
 
void SetBwpId (uint16_t bwpId)
 Set the bwp id. Called by helper.
 
void SetDevice (Ptr< NrNetDevice > d)
 Set the owner device.
 
void SetMacPdu (const Ptr< Packet > &p, const SfnSf &sfn, uint8_t symStart, uint16_t rnti)
 Store a MAC PDU.
 
void SetNoiseFigure (double d)
 Set the NoiseFigure value.
 
void SetNumerology (uint16_t numerology)
 Set GNB or UE numerology.
 
void SetPowerAllocationType (enum NrSpectrumValueHelper::PowerAllocationType powerAllocationType)
 Set power allocation type. There are currently supported two types: one that distributes uniformly energy among all bandwidth (all RBs), and another only over used or active RBs.
 
void SetRbOverhead (double oh)
 Set the bandwidth overhead for calculating the usable RB number.
 
void SetSymbolsPerSlot (uint16_t symbolsPerSlot)
 Set the number of symbol per slot.
 
virtual void SetTbDecodeLatency (const Time &us)
 Configures TB decode latency.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get Type id.
 
- Static Public Member Functions inherited from ns3::NrPhy
static std::string GetPattern (const std::vector< LteNrTddSlotType > &pattern)
 Get a string representation of a pattern.
 
static TypeId GetTypeId ()
 Get the TypeId of the Object.
 
static bool HasDlSlot (const std::vector< LteNrTddSlotType > &pattern)
 See if at least one slot is DL, F or S.
 
static bool HasUlSlot (const std::vector< LteNrTddSlotType > &pattern)
 See if at least one slot is UL, F or S.
 

Protected Member Functions

void DoDispose () override
 DoDispose method inherited from Object.
 
- Protected Member Functions inherited from ns3::NrPhy
void DoDispose () override
 DoDispose method inherited from Object.
 
void DoUpdateRbNum ()
 Update the number of RB. Usually called after bandwidth changes.
 
void EnqueueCtrlMsgNow (const Ptr< NrControlMessage > &msg)
 Enqueue a CTRL message without considering L1L2CtrlLatency.
 
void EnqueueCtrlMsgNow (const std::list< Ptr< NrControlMessage > > &listOfMsgs)
 Enqueue a CTRL message without considering L1L2CtrlLatency.
 
std::vector< int > FromRBGBitmaskToRBAssignment (const std::vector< uint8_t > rbgBitmask) const
 Transform a MAC-made vector of RBG to a PHY-ready vector of SINR indices.
 
Ptr< SpectrumValue > GetNoisePowerSpectralDensity ()
 Create Noise Power Spectral density.
 
Ptr< PacketBurst > GetPacketBurst (SfnSf sf, uint8_t sym, uint16_t rnti)
 Retrieve the PacketBurst at the slot/symbol specified.
 
Ptr< SpectrumValue > GetTxPowerSpectralDensity (const std::vector< int > &rbIndexVector)
 
void InitializeMessageList ()
 Initialize the message list.
 
bool IsCtrlMsgListEmpty () const
 Check if there are no control messages queued for this slot.
 
SlotAllocInfoPeekSlotAllocInfo (const SfnSf &sfnsf)
 Peek the SlotAllocInfo at the SfnSf specified.
 
virtual std::list< Ptr< NrControlMessage > > PopCurrentSlotCtrlMsgs ()
 Extract and return the message list that is at the beginning of the queue.
 
void PushFrontSlotAllocInfo (const SfnSf &newSfnSf, const SlotAllocInfo &slotAllocInfo)
 Store the slot allocation info at the front.
 
SlotAllocInfo RetrieveSlotAllocInfo ()
 Get the head for the slot allocation info, and delete it from the internal list.
 
SlotAllocInfo RetrieveSlotAllocInfo (const SfnSf &sfnsf)
 Get the SlotAllocationInfo for the specified slot, and delete it from the internal list.
 
void SetChannelBandwidth (uint16_t bandwidth)
 Function to set the channel bandwidth, used also by child classes, i.e., see functions DoSetDlBanwidth in NrUePhy and DoSetBandwidth in NrGnbPhy. This function is also called by NrHelper when creating gNB and UE devices. See CreateGnbPhy and CreateUePhy in NrHelper. This function updates the number of RBs and thus the spectrum model, i.e., for noise PSD and for future transmissions.
 
bool SlotAllocInfoExists (const SfnSf &sfnsf) const
 Check if the SlotAllocationInfo for that slot exists.
 
size_t SlotAllocInfoSize () const
 Retrieve the size of the SlotAllocInfo list.
 

Friends

class LtePatternTestCase
 
class MemberLteEnbCphySapProvider< NrGnbPhy >
 
class NrMemberPhySapProvider
 

Additional Inherited Members

- Static Protected Member Functions inherited from ns3::NrPhy
static bool IsTdd (const std::vector< LteNrTddSlotType > &pattern)
 Check if a pattern is TDD.
 
- Protected Attributes inherited from ns3::NrPhy
std::list< Ptr< NrControlMessage > > m_ctrlMsgs
 CTRL messages to be sent.
 
SlotAllocInfo m_currSlotAllocInfo
 Current slot allocation.
 
Ptr< NrNetDevicem_netDevice
 Pointer to the owner netDevice.
 
double m_noiseFigure {0.0}
 Noise figure (attribute)
 
std::unordered_map< uint64_t, Ptr< PacketBurst > > m_packetBurstMap
 Map between SfnSf and PacketBurst.
 
NrPhySapProviderm_phySapProvider
 Pointer to the MAC.
 
uint32_t m_raPreambleId {0}
 Preamble ID.
 
Ptr< NrSpectrumPhym_spectrumPhy
 Pointer to the (owned) spectrum phy.
 
std::vector< LteNrTddSlotTypem_tddPattern = {F, F, F, F, F, F, F, F, F, F}
 Pattern.
 
double m_txPower {0.0}
 Transmission power (attribute)
 

Detailed Description

The gNb physical layer.

This class represent the gNb physical layer, and is the main class for what regards the gNb. It has different features, that spans from the spectrum transmission (delegated to the NrSpectrumPhy class), the slot timings and settings (including numerology, pattern...), and the channel access in unlicensed spectrum.

Spectrum transmission

The PHY has a pointer to NrSpectrumPhy class, which is the entry point in the spectrum transmission domain, and the connection point with the channel. The PHY has an attribute, TxPower, that is responsible of the transmission power of the node. The selection of the RB where that power is set is done by the MAC during the scheduling phase, generating a DCI that will be used as a reference.

The transmission of control message is fictitious; the scheduler will reserve symbols in which the transmission will be done, but the list of the messages will be passed to the UE without any interference or error model applied.

Slot Timings, and event processing

The node works as a state-machine where all the processing is done at the beginning of the slot boundary. The slot duration is dictated by the selected numerology and the number of symbols per slot. At the beginning of the slot (StartSlot()) the PHY will check the channel status, and (if applicable) will call the MAC for its processing, through the SAP interface. The MAC will pass the allocations that it has generated, and the PHY will transmit on the air the allocations that are planned for this slot.

We model the processing times of the layer through a parameter called L1L2CtrlLatency. This latency, set to 2, indicates that a DL allocation done by MAC will require two slot before going in the air. For this reason, MAC always work "in the future".

Unlicensed access

The PHY is prepared to postpone its processing if the channel access manager (an interface specified in the NrChAccessManager class) indicates that the channel is busy, hence not available for the transmission.

Configuration

The initialization of the class in done through NrHelper; the user can interact with it through the various attribute that are present, trying to avoid using direct function calls. The attributes can be changed by a direct call to SetAttribute on the pointer of the PHY, or (before the PHY creation) through the helper method NrHelper::SetGnbPhyAttribute().

See also
NrPhy::SetSpectrumPhy
NrPhy::StartEventLoop
NrPhy::StartSlot

Config Paths

ns3::NrGnbPhy is accessible through the following paths with Config::Set and Config::Connect:

Attributes

  • RbOverhead: Overhead when calculating the usable RB number
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:0.5
    • Initial value: 0.04
    • Flags: construct write read
  • TxPower: Transmission power in dBm
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 4
    • Flags: construct write read
  • NoiseFigure: Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0." In this model, we consider T0 = 290K.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 5
    • Flags: construct write read
  • SpectrumPhy: The downlink NrSpectrumPhy associated to this NrPhy
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::NrSpectrumPhy>
    • Flags: read
  • N0Delay: Minimum processing delay needed to decode DL DCI and decode DL data
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:1
    • Initial value: 0
    • Flags: construct write read
  • N1Delay: Minimum processing delay (UE side) from the end of DL Data reception to the earliest possible start of the corresponding ACK/NACK transmission
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4
    • Initial value: 2
    • Flags: construct write read
  • N2Delay: Minimum processing delay needed to decode UL DCI and prepare UL data
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4
    • Initial value: 2
    • Flags: construct write read
  • TbDecodeLatency: Transport block decode latency
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +100000.0ns
    • Flags: construct write read
  • Numerology: The 3GPP numerology to be used
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write read
  • SymbolsPerSlot: Number of symbols in one slot
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 14
    • Flags: construct write read
  • Pattern: The slot pattern
    • Set with class: StringValue
    • Underlying type:
    • Initial value: F|F|F|F|F|F|F|F|F|F|
    • Flags: construct write read

TraceSources

  • UlSinrTrace: UL SINR statistics.
    Callback signature: ns3::UlSinr::TracedCallback
  • GnbPhyRxedCtrlMsgsTrace: Enb PHY Rxed Control Messages Traces.
    Callback signature: ns3::NrPhyRxTrace::RxedGnbPhyCtrlMsgsTracedCallback
  • GnbPhyTxedCtrlMsgsTrace: Enb PHY Txed Control Messages Traces.
    Callback signature: ns3::NrPhyRxTrace::TxedGnbPhyCtrlMsgsTracedCallback

Size of this type is 1032 bytes (on a 64-bit architecture).

Definition at line 89 of file nr-gnb-phy.h.

Member Typedef Documentation

◆ RBStatsTracedCallback

typedef void(* ns3::NrGnbPhy::RBStatsTracedCallback) (const SfnSf &sfnSf, uint8_t sym, const std::vector< int > &rbMap, uint16_t bwpId, uint16_t cellId)

TracedCallback signature for RB statistics.

Parameters
[in]sfnSfSlot number
[in]symSymbol
[in]rbMapRB Map, in the spectrum format (vector of indexes of the active RB)
[in]bwpIdBWP ID
[in]cellIdCell ID

Definition at line 387 of file nr-gnb-phy.h.

◆ RxedGnbPhyCtrlMsgsTracedCallback

typedef void(* ns3::NrGnbPhy::RxedGnbPhyCtrlMsgsTracedCallback) (const SfnSf sfn, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >)

TracedCallback signature for Received Control Messages.

Parameters
[in]frameFrame number.
[in]subframeSubframe number.
[in]slotnumber.
[in]VarTti
[in]nodeId
[in]rnti
[in]bwpId
[in]pointerto msg to get the msg type

Definition at line 333 of file nr-gnb-phy.h.

◆ SlotStatsTracedCallback

typedef void(* ns3::NrGnbPhy::SlotStatsTracedCallback) (const SfnSf &sfnSf, uint32_t scheduledUe, uint32_t usedReg, uint32_t usedSym, uint32_t availableRb, uint32_t availableSym, uint16_t bwpId, uint16_t cellId)

TracedCallback signature for slot statistics.

Parameters
[in]sfnSfSlot number
[in]scheduledUeThe number of scheduled UE in the slot
[in]usedRegUsed Resource Element Group (1 sym x 1 RB)
[in]usedSymUsed symbols
[in]availableRbAvailable RBs
[in]availableSymAvailable symbols
[in]bwpIdBWP ID
[in]cellIdCell ID

Definition at line 369 of file nr-gnb-phy.h.

◆ TxedGnbPhyCtrlMsgsTracedCallback

typedef void(* ns3::NrGnbPhy::TxedGnbPhyCtrlMsgsTracedCallback) (const SfnSf sfn, const uint16_t nodeId, const uint16_t rnti, const uint8_t bwpId, Ptr< NrControlMessage >)

TracedCallback signature for Transmitted Control Messages.

Parameters
[in]frameFrame number.
[in]subframeSubframe number.
[in]slotnumber.
[in]VarTti
[in]nodeId
[in]rnti
[in]bwpId
[in]pointerto msg to get the msg type

Definition at line 351 of file nr-gnb-phy.h.

Constructor & Destructor Documentation

◆ NrGnbPhy()

ns3::NrGnbPhy::NrGnbPhy ( )

NrGnbPhy constructor. Please use the other one.

Definition at line 44 of file nr-gnb-phy.cc.

◆ ~NrGnbPhy()

ns3::NrGnbPhy::~NrGnbPhy ( )
override

~NrGnbPhy

Definition at line 52 of file nr-gnb-phy.cc.

Member Function Documentation

◆ ChangeBeamformingVector()

void ns3::NrGnbPhy::ChangeBeamformingVector ( Ptr< NrNetDevice dev)

TODO change to private and add documentation

Definition at line 1349 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_spectrumPhy.

◆ ChangeToQuasiOmniBeamformingVector()

void ns3::NrGnbPhy::ChangeToQuasiOmniBeamformingVector ( )

TODO change to private and add documentation

Definition at line 1355 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_spectrumPhy.

◆ DoDispose()

void ns3::NrGnbPhy::DoDispose ( )
overrideprotected

DoDispose method inherited from Object.

Definition at line 57 of file nr-gnb-phy.cc.

References ns3::NrPhy::DoDispose().

+ Here is the call graph for this function:

◆ DoGetReferenceSignalPower()

int8_t ns3::NrGnbPhy::DoGetReferenceSignalPower ( ) const

Get the power of the enb.

Returns
the power

Definition at line 1727 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_txPower.

◆ GenerateDataCqiReport()

void ns3::NrGnbPhy::GenerateDataCqiReport ( const SpectrumValue &  sinr)

Generate a DL CQI report.

Connected by the helper to a callback in corresponding ChunkProcessor

Parameters
sinrthe SINR

Definition at line 1577 of file nr-gnb-phy.cc.

References ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_sfnSf, ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_symStart, ns3::NrMacSchedSapProvider::SchedUlCqiInfoReqParameters::m_ulCqi, and ns3::NrGnbPhySapUser::UlCqiReport().

+ Here is the call graph for this function:

◆ GetBeamId()

BeamId ns3::NrGnbPhy::GetBeamId ( uint16_t  rnti) const
overridevirtual

Get the BeamId for the selected user.

Parameters
rntithe selected UE
Returns
the beam id of the UE

Implements ns3::NrPhy.

Definition at line 560 of file nr-gnb-phy.cc.

References ns3::NrPhy::GetBwpId(), and ns3::NrPhy::m_spectrumPhy.

+ Here is the call graph for this function:

◆ GetCam()

Ptr< NrChAccessManager > ns3::NrGnbPhy::GetCam ( ) const

Get the channel access manager for the PHY.

Returns
the CAM of the PHY

Definition at line 590 of file nr-gnb-phy.cc.

◆ GetCurrentSfnSf()

const SfnSf & ns3::NrGnbPhy::GetCurrentSfnSf ( ) const
overridevirtual

Get the current SfnSf.

Returns
the current SfnSf

Implements ns3::NrPhy.

Definition at line 188 of file nr-gnb-phy.cc.

◆ GetEnbCphySapProvider()

LteEnbCphySapProvider * ns3::NrGnbPhy::GetEnbCphySapProvider ( )

Get the C PHY SAP provider.

Returns
the C PHY SAP provider pointer

Definition at line 514 of file nr-gnb-phy.cc.

◆ GetN0Delay()

uint32_t ns3::NrGnbPhy::GetN0Delay ( ) const

: Get the minimum processing delay (in slots) to decode DL DCI and decode DL Data

Definition at line 521 of file nr-gnb-phy.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetN1Delay()

uint32_t ns3::NrGnbPhy::GetN1Delay ( ) const

: Get the minimum processing delay (in slots) to decode DL Data and send Harq feedback

Definition at line 527 of file nr-gnb-phy.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetN2Delay()

uint32_t ns3::NrGnbPhy::GetN2Delay ( ) const

: Get the minimum processing delay (in slots) to decode UL DCI and prepare UL data

Definition at line 533 of file nr-gnb-phy.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetNumRbPerRbg()

uint32_t ns3::NrGnbPhy::GetNumRbPerRbg ( ) const
overridevirtual

Retrieve the number of RB per RBG.

Returns
the number of RB per RBG

The method will ask the MAC for the value. Don't store it as it may change.

Implements ns3::NrPhy.

Definition at line 182 of file nr-gnb-phy.cc.

References ns3::NrGnbPhySapUser::GetNumRbPerRbg().

+ Here is the call graph for this function:

◆ GetPattern()

std::string ns3::NrGnbPhy::GetPattern ( ) const

Retrieve the currently installed pattern.

Returns
the installed pattern

Definition at line 1787 of file nr-gnb-phy.cc.

References ns3::NrPhy::GetPattern(), and ns3::NrPhy::m_tddPattern.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTxPower()

double ns3::NrGnbPhy::GetTxPower ( ) const
overridevirtual

Retrieve the TX power of the gNB.

Please note that there is also an attribute ("NrUePhy::TxPower")

Returns
the TX power of the gNB

Implements ns3::NrPhy.

Definition at line 603 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_txPower.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ PhyCtrlMessagesReceived()

void ns3::NrGnbPhy::PhyCtrlMessagesReceived ( const Ptr< NrControlMessage > &  msg)

Receive a list of CTRL messages.

Connected by the helper to a callback of the spectrum.

Parameters
msgthe message

Definition at line 1605 of file nr-gnb-phy.cc.

References ns3::NrControlMessage::DL_CQI, ns3::NrControlMessage::DL_HARQ, ns3::NrPhy::GetBwpId(), ns3::NrPhy::GetCellId(), ns3::DlCqiInfo::m_rnti, ns3::HarqInfo::m_rnti, ns3::NrControlMessage::RACH_PREAMBLE, ns3::NrGnbPhySapUser::ReceiveControlMessage(), and ns3::NrGnbPhySapUser::ReceiveRachPreamble().

+ Here is the call graph for this function:

◆ PhyDataPacketReceived()

void ns3::NrGnbPhy::PhyDataPacketReceived ( const Ptr< Packet > &  p)

Receive a PHY data packet.

Connected by the helper to a callback of the spectrum.

Parameters
pReceived packet

Definition at line 1567 of file nr-gnb-phy.cc.

References ns3::NrPhy::GetTbDecodeLatency(), ns3::NrPhy::m_netDevice, and ns3::NrGnbPhySapUser::ReceivePhyPdu().

+ Here is the call graph for this function:

◆ RegisterUe()

bool ns3::NrGnbPhy::RegisterUe ( uint64_t  imsi,
const Ptr< NrUeNetDevice > &  ueDevice 
)

Add the UE to the list of this gnb UEs.

Usually called by the helper when a UE register to this gnb.

Parameters
imsiIMSI of the device
ueDeviceDevice
Returns

Definition at line 1547 of file nr-gnb-phy.cc.

◆ ReportUlHarqFeedback()

void ns3::NrGnbPhy::ReportUlHarqFeedback ( const UlHarqInfo mes)

Get the HARQ feedback from NrSpectrumPhy and forward it to the scheduler.

Connected by the helper to a spectrum phy callback

Parameters
mesthe HARQ feedback

Definition at line 1740 of file nr-gnb-phy.cc.

References ns3::UlHarqInfo::IsReceivedOk(), ns3::HarqInfo::m_rnti, and ns3::NrGnbPhySapUser::UlHarqFeedback().

+ Here is the call graph for this function:

◆ ScheduleStartEventLoop()

void ns3::NrGnbPhy::ScheduleStartEventLoop ( uint32_t  nodeId,
uint16_t  frame,
uint8_t  subframe,
uint16_t  slot 
)
overridevirtual

Start the ue Event Loop.

Parameters
nodeIdthe UE nodeId
frameFrame
subframeSubF.
slotSlot

Implements ns3::NrPhy.

Definition at line 469 of file nr-gnb-phy.cc.

◆ SetCam()

void ns3::NrGnbPhy::SetCam ( const Ptr< NrChAccessManager > &  s)

Set the channel access manager interface for this instance of the PHY.

Parameters
sthe pointer to the interface

Definition at line 579 of file nr-gnb-phy.cc.

◆ SetEnbCphySapUser()

void ns3::NrGnbPhy::SetEnbCphySapUser ( LteEnbCphySapUser *  s)

Set the C PHY SAP user.

Parameters
sthe C PHY SAP user

Definition at line 507 of file nr-gnb-phy.cc.

◆ SetN0Delay()

void ns3::NrGnbPhy::SetN0Delay ( uint32_t  delay)

: Set the minimum processing delay (in slots) to decode DL DCI and decode DL data. It is not defined in NR specs. It defaults to 0 slots.

Definition at line 539 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_tddPattern.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetN1Delay()

void ns3::NrGnbPhy::SetN1Delay ( uint32_t  delay)

: Set the minimum processing delay (in slots) to decode DL Data and send Harq feedback.

It is defined in TS 38.214 Table 5.3-1 and Table 5.3-2 for UE capabilities 1 and UE capability 2, respectively, and depends on the numerology. In the specs it is defined in multiples of OFDM symbols, but we define it in multiples of slots, since then it is used to compute flexible K1 timing that is measured in slots. For UE Capability 1, it can take 1 or 2 slots. For UE Capability 2, it is not larger than 1 slot.

Parameters
delaythe N1 delay

Definition at line 546 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_tddPattern.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetN2Delay()

void ns3::NrGnbPhy::SetN2Delay ( uint32_t  delay)

: Set the minimum processing delay (in slots) to decode UL DCI and prepare UL data.

It is defined in TS 38.214 Table 6.4-1 and Table 6.4-2 for UE capabilities 1 and UE capability 2, respectively, and depends on the numerology. In the specs it is defined in multiples of OFDM symbols, but we define it in multiples of slots, since then it is used to compute flexible K2 timing that is measured in slots. For UE Capability 1, it can take 1, 2 or 3 slots. For UE Capability 2, it is not larger than 1 slot.

Parameters
delaythe N2 delay

Definition at line 553 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_tddPattern.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPattern()

void ns3::NrGnbPhy::SetPattern ( const std::string &  pattern)

Set the pattern that the gnb will utilize.

Parameters
patternA string containing slot types separated by the character '|'.

For example, a valid pattern would be "DL|DL|UL|UL|DL|DL|UL|UL|". The slot types allowed are:

  • "DL" for downlink only
  • "UL" for uplink only
  • "F" for flexible (dl and ul)
  • "S" for special slot (LTE-compatibility)

Definition at line 1753 of file nr-gnb-phy.cc.

References ns3::DL, ns3::F, ns3::S, and ns3::UL.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPhySapUser()

void ns3::NrGnbPhy::SetPhySapUser ( NrGnbPhySapUser ptr)

Install the PHY SAP user (which is in this case the MAC)

Parameters
ptrthe PHY SAP user pointer to install

Definition at line 1734 of file nr-gnb-phy.cc.

◆ SetPrimary()

void ns3::NrGnbPhy::SetPrimary ( )

Set this PHY as primary.

A primary PHY will send MIB and SIB1. By default, a PHY is "non-primary".

Definition at line 1793 of file nr-gnb-phy.cc.

◆ SetSubChannels()

void ns3::NrGnbPhy::SetSubChannels ( const std::vector< int > &  rbIndexVector,
size_t  nTotalAllocRbs 
)

Set the Tx power spectral density based on the RB index vector.

Parameters
rbIndexVectorvector of the index of the RB (in SpectrumValue array) in which there is a transmission for the current allocation (towards a specific UE)
nTotalAllocRbstotal number of RBs which are occupied for any transmission/allocation (includes allocations towards other UEs in OFDMA DL)

Definition at line 609 of file nr-gnb-phy.cc.

References ns3::NrPhy::GetPowerAllocationType(), ns3::NrPhy::GetTxPowerSpectralDensity(), and ns3::NrPhy::m_spectrumPhy.

+ Here is the call graph for this function:

◆ SetTxPower()

void ns3::NrGnbPhy::SetTxPower ( double  pow)

Set the transmission power for the UE.

Please note that there is also an attribute ("NrUePhy::TxPower")

Parameters
powpower

Definition at line 597 of file nr-gnb-phy.cc.

References ns3::NrPhy::m_txPower.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ LtePatternTestCase

friend class LtePatternTestCase
friend

Definition at line 812 of file nr-gnb-phy.h.

◆ MemberLteEnbCphySapProvider< NrGnbPhy >

friend class MemberLteEnbCphySapProvider< NrGnbPhy >
friend

Definition at line 1 of file nr-gnb-phy.h.

◆ NrMemberPhySapProvider

friend class NrMemberPhySapProvider
friend

Definition at line 92 of file nr-gnb-phy.h.


The documentation for this class was generated from the following files: