5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
|
The gNb physical layer. More...
#include "nr-gnb-phy.h"
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 gnb. | |
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< NrChAccessManager > | GetCam () const |
Get the channel access manager for the PHY. | |
const SfnSf & | GetCurrentSfnSf () const override |
Get the current SfnSf. | |
NrGnbCphySapProvider * | GetGnbCphySapProvider () |
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 | SetGnbCphySapUser (NrGnbCphySapUser *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. | |
NrPhySapProvider * | GetPhySapProvider () |
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< NrSpectrumPhy > | GetSpectrumPhy () 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. | |
virtual 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. | |
SlotAllocInfo & | PeekSlotAllocInfo (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 | MemberNrGnbCphySapProvider< NrGnbPhy > |
class | NrMemberPhySapProvider |
class | NrPatternTestCase |
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< NrNetDevice > | m_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. | |
NrPhySapProvider * | m_phySapProvider |
Pointer to the MAC. | |
uint32_t | m_raPreambleId {0} |
Preamble ID. | |
Ptr< NrSpectrumPhy > | m_spectrumPhy |
Pointer to the (owned) spectrum phy. | |
std::vector< LteNrTddSlotType > | m_tddPattern = {F, F, F, F, F, F, F, F, F, F} |
Pattern. | |
double | m_txPower {0.0} |
Transmission power (attribute) | |
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.
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.
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".
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.
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().
ns3::NrGnbPhy is accessible through the following paths with Config::Set and Config::Connect:
/NodeList/[i]/DeviceList/[i]/$ns3::NrGnbNetDevice/BandwidthPartMap/[i]/NrGnbPhy
/NodeList/[i]/DeviceList/[i]/$ns3::NrNetDevice/$ns3::NrGnbNetDevice/BandwidthPartMap/[i]/NrGnbPhy
Size of this type is 1216 bytes (on a 64-bit architecture).
Definition at line 86 of file nr-gnb-phy.h.
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.
[in] | sfnSf | Slot number |
[in] | sym | Symbol |
[in] | rbMap | RB Map, in the spectrum format (vector of indexes of the active RB) |
[in] | bwpId | BWP ID |
[in] | cellId | Cell ID |
Definition at line 384 of file nr-gnb-phy.h.
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.
[in] | frame | Frame number. |
[in] | subframe | Subframe number. |
[in] | slot | number. |
[in] | VarTti | |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | pointer | to msg to get the msg type |
Definition at line 330 of file nr-gnb-phy.h.
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.
[in] | sfnSf | Slot number |
[in] | scheduledUe | The number of scheduled UE in the slot |
[in] | usedReg | Used Resource Element Group (1 sym x 1 RB) |
[in] | usedSym | Used symbols |
[in] | availableRb | Available RBs |
[in] | availableSym | Available symbols |
[in] | bwpId | BWP ID |
[in] | cellId | Cell ID |
Definition at line 366 of file nr-gnb-phy.h.
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.
[in] | frame | Frame number. |
[in] | subframe | Subframe number. |
[in] | slot | number. |
[in] | VarTti | |
[in] | nodeId | |
[in] | rnti | |
[in] | bwpId | |
[in] | pointer | to msg to get the msg type |
Definition at line 348 of file nr-gnb-phy.h.
ns3::NrGnbPhy::NrGnbPhy | ( | ) |
NrGnbPhy constructor. Please use the other one.
Definition at line 42 of file nr-gnb-phy.cc.
|
override |
~NrGnbPhy
Definition at line 50 of file nr-gnb-phy.cc.
void ns3::NrGnbPhy::ChangeBeamformingVector | ( | Ptr< NrNetDevice > | dev | ) |
TODO change to private and add documentation
Definition at line 1385 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_spectrumPhy.
void ns3::NrGnbPhy::ChangeToQuasiOmniBeamformingVector | ( | ) |
TODO change to private and add documentation
Definition at line 1391 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_spectrumPhy.
|
overrideprotected |
DoDispose method inherited from Object.
Definition at line 55 of file nr-gnb-phy.cc.
References ns3::NrPhy::DoDispose().
int8_t ns3::NrGnbPhy::DoGetReferenceSignalPower | ( | ) | const |
Get the power of the gnb.
Definition at line 1762 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_txPower.
void ns3::NrGnbPhy::GenerateDataCqiReport | ( | const SpectrumValue & | sinr | ) |
Generate a DL CQI report.
Connected by the helper to a callback in corresponding ChunkProcessor
sinr | the SINR |
Definition at line 1612 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().
|
overridevirtual |
Get the BeamId for the selected user.
rnti | the selected UE |
Implements ns3::NrPhy.
Definition at line 558 of file nr-gnb-phy.cc.
References ns3::NrPhy::GetBwpId(), and ns3::NrPhy::m_spectrumPhy.
Ptr< NrChAccessManager > ns3::NrGnbPhy::GetCam | ( | ) | const |
Get the channel access manager for the PHY.
Definition at line 588 of file nr-gnb-phy.cc.
|
overridevirtual |
Get the current SfnSf.
Implements ns3::NrPhy.
Definition at line 186 of file nr-gnb-phy.cc.
NrGnbCphySapProvider * ns3::NrGnbPhy::GetGnbCphySapProvider | ( | ) |
Get the C PHY SAP provider.
Definition at line 512 of file nr-gnb-phy.cc.
uint32_t ns3::NrGnbPhy::GetN0Delay | ( | ) | const |
: Get the minimum processing delay (in slots) to decode DL DCI and decode DL Data
Definition at line 519 of file nr-gnb-phy.cc.
Referenced by GetTypeId().
uint32_t ns3::NrGnbPhy::GetN1Delay | ( | ) | const |
: Get the minimum processing delay (in slots) to decode DL Data and send Harq feedback
Definition at line 525 of file nr-gnb-phy.cc.
Referenced by GetTypeId().
uint32_t ns3::NrGnbPhy::GetN2Delay | ( | ) | const |
: Get the minimum processing delay (in slots) to decode UL DCI and prepare UL data
Definition at line 531 of file nr-gnb-phy.cc.
Referenced by GetTypeId().
|
overridevirtual |
Retrieve 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 180 of file nr-gnb-phy.cc.
References ns3::NrGnbPhySapUser::GetNumRbPerRbg().
std::string ns3::NrGnbPhy::GetPattern | ( | ) | const |
Retrieve the currently installed pattern.
Definition at line 1822 of file nr-gnb-phy.cc.
References ns3::NrPhy::GetPattern(), and ns3::NrPhy::m_tddPattern.
Referenced by GetTypeId().
|
overridevirtual |
Retrieve the TX power of the gNB.
Please note that there is also an attribute ("NrUePhy::TxPower")
Implements ns3::NrPhy.
Definition at line 601 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_txPower.
Referenced by GetTypeId().
|
static |
Get Type id.
Definition at line 63 of file nr-gnb-phy.cc.
References GetN0Delay(), GetN1Delay(), GetN2Delay(), ns3::NrPhy::GetNoiseFigure(), ns3::NrPhy::GetNumerology(), GetPattern(), ns3::NrPhy::GetPowerAllocationType(), ns3::NrPhy::GetRbOverhead(), ns3::NrPhy::GetSpectrumPhy(), ns3::NrPhy::GetSymbolsPerSlot(), ns3::NrPhy::GetTbDecodeLatency(), GetTxPower(), SetN0Delay(), SetN1Delay(), SetN2Delay(), ns3::NrPhy::SetNoiseFigure(), ns3::NrPhy::SetNumerology(), SetPattern(), ns3::NrPhy::SetPowerAllocationType(), ns3::NrPhy::SetRbOverhead(), ns3::NrPhy::SetSymbolsPerSlot(), ns3::NrPhy::SetTbDecodeLatency(), and SetTxPower().
Referenced by ns3::NrHelper::NrHelper().
void ns3::NrGnbPhy::PhyCtrlMessagesReceived | ( | const Ptr< NrControlMessage > & | msg | ) |
Receive a list of CTRL messages.
Connected by the helper to a callback of the spectrum.
msg | the message |
Definition at line 1640 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().
void ns3::NrGnbPhy::PhyDataPacketReceived | ( | const Ptr< Packet > & | p | ) |
Receive a PHY data packet.
Connected by the helper to a callback of the spectrum.
p | Received packet |
Definition at line 1602 of file nr-gnb-phy.cc.
References ns3::NrPhy::GetTbDecodeLatency(), ns3::NrPhy::m_netDevice, and ns3::NrGnbPhySapUser::ReceivePhyPdu().
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.
imsi | IMSI of the device |
ueDevice | Device |
Definition at line 1582 of file nr-gnb-phy.cc.
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
mes | the HARQ feedback |
Definition at line 1775 of file nr-gnb-phy.cc.
References ns3::UlHarqInfo::IsReceivedOk(), ns3::HarqInfo::m_rnti, and ns3::NrGnbPhySapUser::UlHarqFeedback().
|
overridevirtual |
Start the ue Event Loop.
nodeId | the UE nodeId |
frame | Frame |
subframe | SubF. |
slot | Slot |
Implements ns3::NrPhy.
Definition at line 467 of file nr-gnb-phy.cc.
void ns3::NrGnbPhy::SetCam | ( | const Ptr< NrChAccessManager > & | s | ) |
Set the channel access manager interface for this instance of the PHY.
s | the pointer to the interface |
Definition at line 577 of file nr-gnb-phy.cc.
void ns3::NrGnbPhy::SetGnbCphySapUser | ( | NrGnbCphySapUser * | s | ) |
Set the C PHY SAP user.
s | the C PHY SAP user |
Definition at line 505 of file nr-gnb-phy.cc.
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 537 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_tddPattern.
Referenced by GetTypeId().
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.
delay | the N1 delay |
Definition at line 544 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_tddPattern.
Referenced by GetTypeId().
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.
delay | the N2 delay |
Definition at line 551 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_tddPattern.
Referenced by GetTypeId().
void ns3::NrGnbPhy::SetPattern | ( | const std::string & | pattern | ) |
Set the pattern that the gnb will utilize.
pattern | A 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:
Definition at line 1788 of file nr-gnb-phy.cc.
References ns3::DL, ns3::F, ns3::S, and ns3::UL.
Referenced by GetTypeId().
void ns3::NrGnbPhy::SetPhySapUser | ( | NrGnbPhySapUser * | ptr | ) |
Install the PHY SAP user (which is in this case the MAC)
ptr | the PHY SAP user pointer to install |
Definition at line 1769 of file nr-gnb-phy.cc.
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 1828 of file nr-gnb-phy.cc.
void ns3::NrGnbPhy::SetSubChannels | ( | const std::vector< int > & | rbIndexVector, |
size_t | nTotalAllocRbs | ||
) |
Set the Tx power spectral density based on the RB index vector.
rbIndexVector | vector of the index of the RB (in SpectrumValue array) in which there is a transmission for the current allocation (towards a specific UE) |
nTotalAllocRbs | total number of RBs which are occupied for any transmission/allocation (includes allocations towards other UEs in OFDMA DL) |
Definition at line 607 of file nr-gnb-phy.cc.
References ns3::NrPhy::GetPowerAllocationType(), ns3::NrPhy::GetTxPowerSpectralDensity(), and ns3::NrPhy::m_spectrumPhy.
void ns3::NrGnbPhy::SetTxPower | ( | double | pow | ) |
Set the transmission power for the UE.
Please note that there is also an attribute ("NrUePhy::TxPower")
pow | power |
Definition at line 595 of file nr-gnb-phy.cc.
References ns3::NrPhy::m_txPower.
Referenced by GetTypeId().
|
friend |
Definition at line 1 of file nr-gnb-phy.h.
|
friend |
Definition at line 89 of file nr-gnb-phy.h.
|
friend |
Definition at line 809 of file nr-gnb-phy.h.