![]() |
5G-LENA nr-v3.3-81-g75c7590d
The 5G/NR module for the ns-3 simulator
|
The base class for gNb and UE physical layer. More...
#include "nr-phy.h"
Public Member Functions | |
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. | |
virtual BeamId | GetBeamId (uint16_t rnti) const =0 |
Get the beam id for the specified user. | |
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. | |
virtual const SfnSf & | GetCurrentSfnSf () const =0 |
Get the current SfnSf. | |
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. | |
virtual double | GetTxPower () const =0 |
Retrieve the Tx power. | |
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 | ScheduleStartEventLoop (uint32_t nodeId, uint16_t frame, uint8_t subframe, uint16_t slot)=0 |
Schedule the start of the NR event loop. | |
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 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. | |
void | DoInitialize () override |
DoInitialize 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< bool > 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. | |
virtual uint32_t | GetNumRbPerRbg () const =0 |
Protected function that is used to get the number of resource blocks per resource block group. | |
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. | |
Static Protected Member Functions | |
static bool | IsTdd (const std::vector< LteNrTddSlotType > &pattern) |
Check if a pattern is TDD. | |
Protected Attributes | |
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 base class for gNb and UE physical layer.
From this class descends NrGnbPhy and NrUePhy, the physical layer classes for the gNb and the UE. This class has four main duties:
The control message list is maintained as a list that has, always, a number of element equals to the latency between PHY and MAC, plus one. The list is initialized by a call to InitializeMessageList(). The messages are enqueued by MAC at the end of the list through the method EnqueueCtrlMessage(). If the PHY has the necessity of adding a message, then it can use the no-latency version of it, namely EnqueueCtrlMsgNow(). The messages for the current slot (i.e., the messages at the front of the list) can be retrieved with PopCurrentSlotCtrlMsgs(). To know if there are messages for the current slot, use IsCtrlMsgListEmpty(). The list is stored in the variable m_controlMessageQueue.
At the gNb, After the MAC does the slot allocation, it is saved in the PHY with the method PushBackSlotAllocInfo(), and if an allocation for the same slot is already present, the two will be merged together. The slot allocation is stored inside the variable m_slotAllocInfo.
With each allocation, will come also one (or more) MAC PDU, that are stored within the method SetMacPdu(). The storage is based on the SfnSf inside the variable m_packetBurstMap.
When the numerology is configured, quite a lot of parameters change as well. The entire process of updating the relative parameters is done inside the function SetNumerology().
Introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Size of this type is 456 bytes (on a 64-bit architecture).
ns3::NrPhy::NrPhy | ( | ) |
NrPhy constructor.
Definition at line 185 of file nr-phy.cc.
References m_phySapProvider, and SetNumerology().
|
overrideprotected |
DoDispose method inherited from Object.
Definition at line 200 of file nr-phy.cc.
References m_ctrlMsgs, m_netDevice, m_packetBurstMap, m_phySapProvider, m_spectrumPhy, and m_tddPattern.
Referenced by ns3::NrGnbPhy::DoDispose(), and ns3::NrUePhy::DoDispose().
|
overrideprotected |
DoInitialize method inherited from Object.
Definition at line 218 of file nr-phy.cc.
References m_spectrumPhy.
void ns3::NrPhy::DoSetCellId | ( | uint16_t | cellId | ) |
Set the cell ID.
cellId | the cell id. |
Called by lte-gnb-cphy-sap only.
Definition at line 329 of file nr-phy.cc.
Referenced by ns3::NrUePhy::RegisterToGnb().
|
protected |
Update the number of RB. Usually called after bandwidth changes.
Definition at line 534 of file nr-phy.cc.
References GetChannelBandwidth(), GetNoisePowerSpectralDensity(), GetRbNum(), m_spectrumPhy, and ns3::NrSpectrumValueHelper::SUBCARRIERS_PER_RB.
Referenced by SetChannelBandwidth(), and SetNumerology().
void ns3::NrPhy::EncodeCtrlMsg | ( | const Ptr< NrControlMessage > & | msg | ) |
Take the control messages, and put it in a list that will be sent at the first occasion.
msg | Message to "encode" and transmit |
Definition at line 470 of file nr-phy.cc.
References m_ctrlMsgs.
Referenced by ns3::NrUePhy::FinishSlotProcessing().
void ns3::NrPhy::EnqueueCtrlMessage | ( | const Ptr< NrControlMessage > & | m | ) |
|
protected |
|
protected |
|
protected |
Transform a MAC-made vector of RBG to a PHY-ready vector of SINR indices.
rbgBitmask | Bitmask which indicates with 1 the RBG in which there is a transmission, with 0 a RBG in which there is not a transmission |
Example (4 RB per RBG, 4 total RBG assignable): rbgBitmask = <0,1,1,0> output = <4,5,6,7,8,9,10,11>
(the rbgBitmask expressed as rbBitmask would be: <0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0> , and therefore the places in which there is a 1 are from the 4th to the 11th, and that is reflected in the output)
|
pure virtual |
Get the beam id for the specified user.
rnti | RNTI |
Implemented in ns3::NrGnbPhy, and ns3::NrUePhy.
uint16_t ns3::NrPhy::GetBwpId | ( | ) | const |
Definition at line 652 of file nr-phy.cc.
Referenced by ns3::NrUePhy::EnqueueDlHarqFeedback(), ns3::NrUePhy::FinishSlotProcessing(), ns3::NrUePhy::GenerateDlCqiReport(), ns3::NrUePhy::GenerateDlCqiReportMimo(), ns3::NrGnbPhy::GetBeamId(), ns3::NrGnbPhy::PhyCtrlMessagesReceived(), ns3::NrUePhy::PhyCtrlMessagesReceived(), ns3::NrUePhy::ReportDlCtrlSinr(), and ns3::NrUePhy::SetSubChannelsForTransmission().
uint16_t ns3::NrPhy::GetCellId | ( | ) | const |
Definition at line 658 of file nr-phy.cc.
Referenced by ns3::NrUePhy::GenerateDlCqiReport(), ns3::NrGnbPhy::PhyCtrlMessagesReceived(), ns3::NrUePhy::PhyCtrlMessagesReceived(), ns3::NrUePhy::ReportDlCtrlSinr(), ns3::NrUePhy::ReportRsReceivedPower(), and ns3::NrUePhy::SetSubChannelsForTransmission().
double ns3::NrPhy::GetCentralFrequency | ( | ) | const |
Retrieve the frequency (in Hz) of this PHY's channel.
The function will assert if it is called without having set a frequency first.
Definition at line 406 of file nr-phy.cc.
Referenced by GetSpectrumModel().
uint32_t ns3::NrPhy::GetChannelBandwidth | ( | ) | const |
Retrieve the channel bandwidth, in Hz.
Definition at line 521 of file nr-phy.cc.
Referenced by DoUpdateRbNum(), and SetChannelBandwidth().
|
pure virtual |
uint32_t ns3::NrPhy::GetL1L2CtrlLatency | ( | ) | const |
Before it was an attribute; as we are unsure if it works for values different from 2, we decided to make it static until the need to have it different from 2 arises.
Definition at line 664 of file nr-phy.cc.
Referenced by InitializeMessageList().
double ns3::NrPhy::GetNoiseFigure | ( | ) | const |
Get the NoiseFigure value.
Definition at line 877 of file nr-phy.cc.
References m_noiseFigure.
Referenced by ns3::NrGnbPhy::GetTypeId(), and ns3::NrUePhy::GetTypeId().
|
protected |
Create Noise Power Spectral density.
Definition at line 388 of file nr-phy.cc.
References ns3::NrSpectrumValueHelper::CreateNoisePowerSpectralDensity(), GetSpectrumModel(), and m_noiseFigure.
Referenced by DoUpdateRbNum(), and SetNoiseFigure().
uint16_t ns3::NrPhy::GetNumerology | ( | ) | const |
Get the configured numerology.
Definition at line 290 of file nr-phy.cc.
Referenced by GetPacketBurst(), ns3::NrGnbPhy::GetTypeId(), PeekSlotAllocInfo(), ns3::NrUePhy::ReceivePss(), RetrieveSlotAllocInfo(), SetMacPdu(), SetNumerology(), and SlotAllocInfoExists().
|
protectedpure virtual |
Protected function that is used to get the number of resource blocks per resource block group.
Implemented in ns3::NrGnbPhy, and ns3::NrUePhy.
|
protected |
Retrieve the PacketBurst at the slot/symbol specified.
sf | System frame and slot number |
sym | Symbol at which the PacketBurst should be sent |
rnti | The RNTI associated with this burst |
Definition at line 365 of file nr-phy.cc.
References ns3::SfnSf::GetEncodingWithSymStartRnti(), GetNumerology(), ns3::SfnSf::GetNumerology(), and m_packetBurstMap.
Referenced by PushFrontSlotAllocInfo().
|
static |
Get a string representation of a pattern.
pattern | the TDD pattern |
Definition at line 414 of file nr-phy.cc.
References ns3::DL, ns3::F, ns3::S, and ns3::UL.
Referenced by ns3::NrGnbPhy::GetPattern().
NrPhySapProvider * ns3::NrPhy::GetPhySapProvider | ( | ) |
Retrieve a pointer to an instance of NrPhySapProvider.
Definition at line 676 of file nr-phy.cc.
References m_phySapProvider.
enum NrSpectrumValueHelper::PowerAllocationType ns3::NrPhy::GetPowerAllocationType | ( | ) | const |
Get the power allocation type.
Definition at line 439 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId(), ns3::NrUePhy::GetTypeId(), and ns3::NrGnbPhy::SetSubChannels().
uint32_t ns3::NrPhy::GetRbNum | ( | ) | const |
Get the number of Resource block configured.
It changes with the numerology and the channel bandwidth
Definition at line 515 of file nr-phy.cc.
Referenced by DoUpdateRbNum(), GetSpectrumModel(), SetNoiseFigure(), and SetNumerology().
double ns3::NrPhy::GetRbOverhead | ( | ) | const |
Get the bandwidth overhead used when calculating the usable RB number.
Definition at line 310 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId().
Time ns3::NrPhy::GetSlotPeriod | ( | ) | const |
Get the slot period.
Definition at line 322 of file nr-phy.cc.
Referenced by ns3::NrUePhy::EnqueueDlHarqFeedback(), and SetNumerology().
Ptr< const SpectrumModel > ns3::NrPhy::GetSpectrumModel | ( | ) |
Get the spectrum model of the PHY.
Definition at line 848 of file nr-phy.cc.
References GetCentralFrequency(), GetRbNum(), ns3::NrSpectrumValueHelper::GetSpectrumModel(), and GetSubcarrierSpacing().
Referenced by GetNoisePowerSpectralDensity(), and GetTxPowerSpectralDensity().
Ptr< NrSpectrumPhy > ns3::NrPhy::GetSpectrumPhy | ( | ) | const |
Retrieve the SpectrumPhy pointer.
As this function is used mainly to get traced values out of Spectrum, it should be removed and the traces connected (and redirected) here.
Definition at line 670 of file nr-phy.cc.
References m_spectrumPhy.
Referenced by ns3::NrGnbPhy::GetTypeId(), and ns3::NrUePhy::GetTypeId().
uint32_t ns3::NrPhy::GetSubcarrierSpacing | ( | ) | const |
Retrieve the subcarrier spacing in Hz. Subcarrier spacing is updated when the numerology is being updated.
Definition at line 528 of file nr-phy.cc.
Referenced by GetSpectrumModel(), and SetNumerology().
Time ns3::NrPhy::GetSymbolPeriod | ( | ) | const |
Get SymbolPeriod.
Definition at line 859 of file nr-phy.cc.
Referenced by ns3::NrUePhy::FinishSlotProcessing(), SetNumerology(), and ns3::NrUePhy::SetSubChannelsForTransmission().
uint32_t ns3::NrPhy::GetSymbolsPerSlot | ( | ) | const |
Get the number of symbols in a slot.
Definition at line 316 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId().
|
virtual |
Returns Transport Block decode latency.
Definition at line 889 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId(), ns3::NrUePhy::GetTypeId(), ns3::NrGnbPhy::PhyDataPacketReceived(), and ns3::NrUePhy::PhyDataPacketReceived().
|
pure virtual |
|
protected |
Create Tx Power Spectral Density
rbIndexVector | vector of the index of the RB (in SpectrumValue array) in which there is a transmission |
Definition at line 395 of file nr-phy.cc.
References ns3::NrSpectrumValueHelper::CreateTxPowerSpectralDensity(), GetSpectrumModel(), and m_txPower.
Referenced by ns3::NrGnbPhy::SetSubChannels(), and ns3::NrUePhy::SetSubChannelsForTransmission().
|
static |
bool ns3::NrPhy::HasDlSlot | ( | ) | const |
Go through the current pattern and see if at least one slot is DL, F or S.
Definition at line 477 of file nr-phy.cc.
References HasDlSlot(), and m_tddPattern.
Referenced by HasDlSlot(), and ns3::NrGnbPhy::RegisterUe().
|
static |
bool ns3::NrPhy::HasUlSlot | ( | ) | const |
Go through the current pattern and see if at least one slot is UL, F or S.
Definition at line 483 of file nr-phy.cc.
References HasUlSlot(), and m_tddPattern.
Referenced by HasUlSlot().
|
static |
|
protected |
Initialize the message list.
Definition at line 599 of file nr-phy.cc.
References GetL1L2CtrlLatency().
Referenced by ns3::NrUePhy::RegisterToGnb().
void ns3::NrPhy::InstallCentralFrequency | ( | double | f | ) |
void ns3::NrPhy::InstallSpectrumPhy | ( | const Ptr< NrSpectrumPhy > & | spectrumPhy | ) |
Set the SpectrumPhy associated with this PHY.
spectrumPhy | the spectrumPhy |
Definition at line 639 of file nr-phy.cc.
References m_spectrumPhy.
|
protected |
|
staticprotected |
void ns3::NrPhy::NotifyConnectionSuccessful | ( | ) |
|
protected |
Peek the SlotAllocInfo at the SfnSf specified.
sfnsf | (existing) SfnSf to look for |
The method will assert if sfnsf does not exits (please check with SlotExists())
Definition at line 818 of file nr-phy.cc.
References GetNumerology(), and ns3::SfnSf::GetNumerology().
|
protectedvirtual |
Extract and return the message list that is at the beginning of the queue.
Definition at line 611 of file nr-phy.cc.
Referenced by ns3::NrUePhy::FinishSlotProcessing().
void ns3::NrPhy::PushBackSlotAllocInfo | ( | const SlotAllocInfo & | slotAllocInfo | ) |
Store the slot allocation info.
slotAllocInfo | the allocation to store |
This method expect that the sfn of the allocation will match the sfn when the allocation will be retrieved.
Definition at line 683 of file nr-phy.cc.
References ns3::SlotAllocInfo::m_sfnSf.
|
protected |
Store the slot allocation info at the front.
slotAllocInfo | the allocation to store |
Increase the sfn of all allocations to be chronologically "in order".
Definition at line 718 of file nr-phy.cc.
References ns3::SfnSf::Add(), ns3::DciInfoElementTdma::DATA, ns3::SfnSf::Decode(), ns3::SfnSf::GetEncodingWithSymStartRnti(), GetPacketBurst(), and m_packetBurstMap.
|
protected |
Get the head for the slot allocation info, and delete it from the internal list.
Definition at line 789 of file nr-phy.cc.
Referenced by ns3::NrUePhy::FinishSlotProcessing().
|
protected |
Get the SlotAllocationInfo for the specified slot, and delete it from the internal list.
sfnsf | slot specified |
Definition at line 798 of file nr-phy.cc.
References GetNumerology(), and ns3::SfnSf::GetNumerology().
|
pure virtual |
Schedule the start of the NR event loop.
nodeId | node id (for log messages) |
frame | Starting frame number |
subframe | Starting subframe number |
slot | Starting slot number |
The method is scheduling the start of the first slot at time 0.0.
Implemented in ns3::NrGnbPhy, and ns3::NrUePhy.
|
virtual |
void ns3::NrPhy::SetBwpId | ( | uint16_t | bwpId | ) |
|
protected |
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.
bandwidth | channel bandwidth in kHz * 100 |
Definition at line 243 of file nr-phy.cc.
References DoUpdateRbNum(), and GetChannelBandwidth().
void ns3::NrPhy::SetDevice | ( | Ptr< NrNetDevice > | d | ) |
Set the owner device.
d | the owner device |
Definition at line 228 of file nr-phy.cc.
References m_netDevice.
void ns3::NrPhy::SetMacPdu | ( | const Ptr< Packet > & | p, |
const SfnSf & | sfn, | ||
uint8_t | symStart, | ||
uint16_t | rnti | ||
) |
Store a MAC PDU.
p | the MAC PDU |
sfn | The SfnSf at which store the PDU |
symStart | The symbol inside the SfnSf at which the data will be transmitted |
rnti | The RNTI of the UE, to create separate DL PHY signals towards different UEs |
It will be saved in the PacketBurst map following the SfnSf present in the tag.
Definition at line 342 of file nr-phy.cc.
References ns3::SfnSf::GetEncodingWithSymStartRnti(), GetNumerology(), ns3::SfnSf::GetNumerology(), and m_packetBurstMap.
void ns3::NrPhy::SetNoiseFigure | ( | double | d | ) |
Set the NoiseFigure value.
d | the Noise figure value |
Definition at line 866 of file nr-phy.cc.
References GetNoisePowerSpectralDensity(), GetRbNum(), m_noiseFigure, and m_spectrumPhy.
Referenced by ns3::NrGnbPhy::GetTypeId(), and ns3::NrUePhy::GetTypeId().
void ns3::NrPhy::SetNumerology | ( | uint16_t | numerology | ) |
Set GNB or UE numerology.
numerology | numerology |
For the GNB, this is an attribute that can be changed at any time; for the UE, it is set by the helper at the attachment, and then is not changed anymore.
Definition at line 262 of file nr-phy.cc.
References DoUpdateRbNum(), GetNumerology(), GetRbNum(), GetSlotPeriod(), GetSubcarrierSpacing(), and GetSymbolPeriod().
Referenced by NrPhy(), and ns3::NrGnbPhy::GetTypeId().
void ns3::NrPhy::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.
powerAllocationType | a type of power allocation to be used |
Definition at line 433 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId(), and ns3::NrUePhy::GetTypeId().
void ns3::NrPhy::SetRbOverhead | ( | double | oh | ) |
Set the bandwidth overhead for calculating the usable RB number.
oh | the overhead |
Definition at line 304 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId().
void ns3::NrPhy::SetSymbolsPerSlot | ( | uint16_t | symbolsPerSlot | ) |
Set the number of symbol per slot.
symbolsPerSlot | the value of symbol per slot (12 or 14) |
Definition at line 296 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId().
|
virtual |
Configures TB decode latency.
us | decode latency |
Definition at line 883 of file nr-phy.cc.
Referenced by ns3::NrGnbPhy::GetTypeId(), and ns3::NrUePhy::GetTypeId().
|
protected |
Check if the SlotAllocationInfo for that slot exists.
sfnsf | slot to check |
Definition at line 774 of file nr-phy.cc.
References GetNumerology(), and ns3::SfnSf::GetNumerology().
|
protected |
Retrieve the size of the SlotAllocInfo list.
|
protected |
CTRL messages to be sent.
Definition at line 571 of file nr-phy.h.
Referenced by DoDispose(), and EncodeCtrlMsg().
|
protected |
Current slot allocation.
Definition at line 566 of file nr-phy.h.
Referenced by ns3::NrUePhy::FinishSlotProcessing().
|
protected |
Pointer to the owner netDevice.
Definition at line 557 of file nr-phy.h.
Referenced by DoDispose(), ns3::NrUePhy::FinishSlotProcessing(), ns3::NrGnbPhy::PhyDataPacketReceived(), ns3::NrUePhy::PhyDataPacketReceived(), and SetDevice().
|
protected |
Noise figure (attribute)
Definition at line 561 of file nr-phy.h.
Referenced by GetNoiseFigure(), GetNoisePowerSpectralDensity(), and SetNoiseFigure().
|
protected |
Map between SfnSf and PacketBurst.
Definition at line 564 of file nr-phy.h.
Referenced by DoDispose(), GetPacketBurst(), PushFrontSlotAllocInfo(), and SetMacPdu().
|
protected |
Pointer to the MAC.
Definition at line 568 of file nr-phy.h.
Referenced by NrPhy(), DoDispose(), and GetPhySapProvider().
|
protected |
|
protected |
Pointer to the (owned) spectrum phy.
Definition at line 558 of file nr-phy.h.
Referenced by ns3::NrGnbPhy::ChangeBeamformingVector(), ns3::NrGnbPhy::ChangeToQuasiOmniBeamformingVector(), DoDispose(), DoInitialize(), DoUpdateRbNum(), ns3::NrGnbPhy::GetBeamId(), GetSpectrumPhy(), InstallSpectrumPhy(), SetNoiseFigure(), ns3::NrGnbPhy::SetSubChannels(), and ns3::NrUePhy::SetSubChannelsForTransmission().
Pattern.
Definition at line 573 of file nr-phy.h.
Referenced by ns3::NrGnbPhy::AssignCsiRsOffset(), DoDispose(), ns3::NrGnbPhy::GetPattern(), HasDlSlot(), HasUlSlot(), ns3::NrGnbPhy::RegisterUe(), ns3::NrGnbPhy::SetN0Delay(), ns3::NrGnbPhy::SetN1Delay(), ns3::NrGnbPhy::SetN2Delay(), and ns3::NrUePhy::SetPattern().
|
protected |
Transmission power (attribute)
Definition at line 560 of file nr-phy.h.
Referenced by ns3::NrGnbPhy::DoGetReferenceSignalPower(), ns3::NrGnbPhy::GetTxPower(), ns3::NrUePhy::GetTxPower(), GetTxPowerSpectralDensity(), ns3::NrUePhy::GetTypeId(), ns3::NrGnbPhy::SetTxPower(), and ns3::NrUePhy::SetTxPower().