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

SAP interface between the MAC and the PHY. More...

#include "nr-phy-sap.h"

+ Inheritance diagram for ns3::NrPhySapProvider:

Public Member Functions

virtual ~NrPhySapProvider ()
 ~NrPhySapProvider
 
virtual BeamId GetBeamId (uint8_t rnti) const =0
 Get the beam ID from the RNTI specified. Not in any standard.
 
virtual uint16_t GetBwpId () const =0
 Retrieve the bandwidth part id.
 
virtual uint16_t GetCellId () const =0
 Retrieve the cell id.
 
virtual uint32_t GetRbNum () const =0
 Retrieve the number of resource blocks.
 
virtual Time GetSlotPeriod () const =0
 Retrieve the slot period.
 
virtual Ptr< const SpectrumModel > GetSpectrumModel ()=0
 Retrieve the spectrum model used by the PHY layer.
 
virtual uint32_t GetSymbolsPerSlot () const =0
 Retrieve the number of symbols in one slot.
 
virtual void NotifyConnectionSuccessful ()=0
 Notify PHY about the successful RRC connection establishment.
 
virtual void SendControlMessage (Ptr< NrControlMessage > msg)=0
 Send a control message.
 
virtual void SendMacPdu (const Ptr< Packet > &p, const SfnSf &sfn, uint8_t symStart, uint16_t rnti)=0
 Send a Mac PDU.
 
virtual void SendRachPreamble (uint8_t PreambleId, uint8_t Rnti)=0
 Send the RACH preamble.
 
virtual void SetSlotAllocInfo (const SlotAllocInfo &slotAllocInfo)=0
 Set a SlotAllocInfo inside the PHY allocations.
 

Detailed Description

SAP interface between the MAC and the PHY.

The API between the MAC and the PHY classes, for UE and GNB, is defined in this class. The direction is from the MAC to the PHY (i.e., the MAC will have a pointer of this class, that points to a valid instance of the PHY).

As a general rule, no caching is allowed for the values returned by any Get* method, because those values can change dynamically.

Definition at line 37 of file nr-phy-sap.h.

Constructor & Destructor Documentation

◆ ~NrPhySapProvider()

ns3::NrPhySapProvider::~NrPhySapProvider ( )
virtual

~NrPhySapProvider

Definition at line 12 of file nr-phy-sap.cc.

Member Function Documentation

◆ GetBeamId()

virtual BeamId ns3::NrPhySapProvider::GetBeamId ( uint8_t  rnti) const
pure virtual

Get the beam ID from the RNTI specified. Not in any standard.

Parameters
rntiRNTI of the user
Returns
Beam ID of the user

The MAC asks for the BeamId of the specified used.

Referenced by ns3::NrGnbMac::DoSlotDlIndication().

+ Here is the caller graph for this function:

◆ GetBwpId()

virtual uint16_t ns3::NrPhySapProvider::GetBwpId ( ) const
pure virtual

Retrieve the bandwidth part id.

Returns
The Bwp id of the PHY

Referenced by ns3::NrGnbMac::GetBwpId(), and ns3::NrUeMac::GetBwpId().

+ Here is the caller graph for this function:

◆ GetCellId()

virtual uint16_t ns3::NrPhySapProvider::GetCellId ( ) const
pure virtual

Retrieve the cell id.

Returns
The cell id of the PHY

Referenced by ns3::NrGnbMac::GetCellId(), and ns3::NrUeMac::GetCellId().

+ Here is the caller graph for this function:

◆ GetRbNum()

virtual uint32_t ns3::NrPhySapProvider::GetRbNum ( ) const
pure virtual

Retrieve the number of resource blocks.

Returns
Get the number of resource blocks configured

Referenced by ns3::NrGnbMac::GetDlCtrlDci().

+ Here is the caller graph for this function:

◆ GetSlotPeriod()

virtual Time ns3::NrPhySapProvider::GetSlotPeriod ( ) const
pure virtual

Retrieve the slot period.

Returns
the slot period (don't store the value as it depends on the numerology)

◆ GetSpectrumModel()

virtual Ptr< const SpectrumModel > ns3::NrPhySapProvider::GetSpectrumModel ( )
pure virtual

Retrieve the spectrum model used by the PHY layer.

Returns
the SpectrumModel

It is used to calculate the CQI. In the future, this method may be removed if the CQI calculation is done in the PHY layer, just reporting to MAC its value.

◆ GetSymbolsPerSlot()

virtual uint32_t ns3::NrPhySapProvider::GetSymbolsPerSlot ( ) const
pure virtual

Retrieve the number of symbols in one slot.

Returns
the number of symbols in one slot (it is an attribute in the PHY, so it can be changed dynamically – don't store the value)

◆ SendControlMessage()

virtual void ns3::NrPhySapProvider::SendControlMessage ( Ptr< NrControlMessage msg)
pure virtual

Send a control message.

Parameters
msgthe message to send

The MAC sends to the PHY a control message. The PHY will take care of considering the MAC-TO-PHY delay.

◆ SendMacPdu()

virtual void ns3::NrPhySapProvider::SendMacPdu ( const Ptr< Packet > &  p,
const SfnSf sfn,
uint8_t  symStart,
uint16_t  rnti 
)
pure virtual

Send a Mac PDU.

Parameters
pPDU
sfnSFN
symStartsymbol inside the SFN
rntithe RNTI of the receiving or transmitting UE, to map PDU to each UE's PHY signal

The MAC sends to the PHY a MAC PDU, represented by the packet p. The PDU MUST have a LteRadioBearerTag and a NrMacPduHeader.

◆ SendRachPreamble()

virtual void ns3::NrPhySapProvider::SendRachPreamble ( uint8_t  PreambleId,
uint8_t  Rnti 
)
pure virtual

Send the RACH preamble.

Parameters
PreambleIdthe ID of the preamble
Rntithe RNTI

◆ SetSlotAllocInfo()

virtual void ns3::NrPhySapProvider::SetSlotAllocInfo ( const SlotAllocInfo slotAllocInfo)
pure virtual

Set a SlotAllocInfo inside the PHY allocations.

Parameters
slotAllocInfothe allocation

Called by the MAC to install in the PHY the allocation that has been prepared.


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