![]() |
5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
|
Interface between the physical layer and the channel. More...
#include "nr-spectrum-phy.h"
Public Types | |
typedef void(* | DataSnrTracedCallback) (const SfnSf &sfnSf, const uint16_t cellId, const uint8_t bwpId, const uint64_t imsi, const double snr) |
typedef Callback< void, const DlHarqInfo & > | NrPhyDlHarqFeedbackCallback |
typedef std::function< void(const std::list< Ptr< NrControlMessage > > &, uint8_t)> | NrPhyRxCtrlEndOkCallback |
This callback method type is used to notify that CTRL is received. | |
typedef Callback< void, const Ptr< Packet > & > | NrPhyRxDataEndOkCallback |
This callback method type is used to notify that DATA is received. | |
typedef Callback< void, uint16_t, const Ptr< SpectrumValue > & > | NrPhyRxPssCallback |
typedef Callback< void, const UlHarqInfo & > | NrPhyUlHarqFeedbackCallback |
typedef void(* | RxDataTracedCallback) (const SfnSf &sfnSf, Ptr< const SpectrumValue > v, const Time &t, uint16_t bwpId, uint16_t cellId) |
TracedCallback signature for RB statistics. | |
typedef Callback< void, uint16_t, uint16_t, double > | SrsSinrReportCallback |
typedef Callback< void, uint16_t, uint16_t, double > | SrsSnrReportCallback |
enum | State { IDLE = 0 , TX , RX_DATA , RX_DL_CTRL , RX_UL_CTRL , RX_UL_SRS , CCA_BUSY } |
Enum that defines possible states of the spectrum phy. More... | |
Public Member Functions | |
NrSpectrumPhy () | |
NrSpectrumPhy constructor. | |
~NrSpectrumPhy () override | |
~NrSpectrumPhy | |
void | AddBeamManager (Ptr< BeamManager > b) |
Adds the beam manager of corresponds spectrum phy of antenna panel, and that beam manager is responsible of the antenna array of this spectrum phy. | |
void | AddCsiImMimoChunkProcessor (const Ptr< NrMimoChunkProcessor > &p) |
Connect CSI-IM chunk processor with the corresponding CSI-IM interference object. | |
void | AddCsiRsMimoChunkProcessor (const Ptr< NrMimoChunkProcessor > &p) |
Connect CSI-RS chunk processor with the corresponding CSI-RS interference object. | |
void | AddDataMimoChunkProcessor (const Ptr< NrMimoChunkProcessor > &p) |
Connect DATA chunk processor with the corresponding DATA interference object. | |
void | AddDataPowerChunkProcessor (const Ptr< NrChunkProcessor > &p) |
Adds the chunk processor that will process the power for the data. | |
void | AddDataSinrChunkProcessor (const Ptr< NrChunkProcessor > &p) |
Adds the chunk processor that will process the interference. | |
void | AddDlCtrlSinrChunkProcessor (const Ptr< NrChunkProcessor > &p) |
Adds the chunk processor that will process the received power. | |
void | AddExpectedDlCtrlEnd (Time ctrlEndTime) |
Keeps track of when DL CTRL should finish. Needed for CSI-RS and CSI-IM implementation to be able to schedule CSI-IM just at the beginning of the PDSCH. | |
void | AddExpectedSrsRnti (uint16_t rnti) |
void | AddExpectedTb (ExpectedTb expectedTb) |
Instruct the Spectrum Model of a incoming transmission. | |
void | AddPanel (const Ptr< Object > antenna) |
Add the antenna panel to this NrSpectrumPhy, currently in NR module it is expected to be of type UniformPlannarArray. | |
void | AddRsPowerChunkProcessor (const Ptr< NrChunkProcessor > &p) |
Adds the chunk processor that will process the received power. | |
void | AddSrsSinrChunkProcessor (const Ptr< NrChunkProcessor > &p) |
void | AddSrsSinrReportCallback (SrsSinrReportCallback callback) |
It adds callback to the list of callbacks that will be notified once SRS is being received. | |
void | AddSrsSnrReportCallback (SrsSnrReportCallback callback) |
It adds callback to the list of callbacks that will be notified once SRS is being received. | |
int64_t | AssignStreams (int64_t stream) |
double | CircularBearingAnglesForPanels (double firstPanelBearingAngleRad, uint8_t panelIndex) const |
initialize the bearing angles of panels in to cover 360 Degree | |
void | ConfigPanelsBearingAngles () |
Either initialize the bearing angles of panels in install step or update all bearing angles based on proper method, if no parameter pass it would get first antenna bearing angle and set other panels based on proper approach. | |
void | ConfigPanelsBearingAngles (double firstPanelBearingAngleRad) |
Either initialize the bearing angles of panels in install step or update all bearing angles based on proper method, if no parameter pass it would get first antenna bearing angle and set other panels based on proper approach. | |
void | EnableDlCtrlPathlossTrace () |
void | EnableDlDataPathlossTrace () |
Ptr< Object > | GetAntenna () const override |
Inherited from SpectrumPhy Note: Implements GetRxAntenna function from SpectrumPhy. | |
Ptr< BeamManager > | GetBeamManager () |
uint16_t | GetBwpId () const |
double | GetCcaMode1Threshold () const |
uint16_t | GetCellId () const |
Ptr< NetDevice > | GetDevice () const override |
Ptr< NrErrorModel > | GetErrorModel () const |
Time | GetFirstRxDuration () const |
Time | GetFirstRxStart () const |
Ptr< MobilityModel > | GetMobility () const override |
Ptr< NrInterference > | GetNrInterference () const |
Ptr< NrPhy > | GetNrPhy () const |
uint8_t | GetNumPanels () const |
Get the number of panels in this NrSpectrumPhy. | |
Ptr< Object > | GetPanelByIndex (const uint8_t index) const |
Interface enable to access all panels using proper index. | |
Ptr< NrPhy > | GetPhy () const |
uint16_t | GetRnti () const |
Ptr< const SpectrumModel > | GetRxSpectrumModel () const override |
Ptr< SpectrumChannel > | GetSpectrumChannel () const |
Returns spectrum channel object to which is attached this spectrum phy instance. | |
Ptr< const SpectrumValue > | GetTxPowerSpectralDensity () |
void | InstallPhy (const Ptr< NrPhy > &phyModel) |
Set NrPhy of this spectrum phy in order to be able to obtain information such as cellId, bwpId, etc. | |
bool | IsGnb () const |
bool | IsTransmitting () |
Return true if the current Phy State is TX. | |
void | ReportDlCtrlSinr (const SpectrumValue &sinr) |
Called when DlCtrlSinr is fired. | |
void | ReportWbDlDataSnrPerceived (const double dlDataSnr) |
Report wideband perceived downlink data SNR. | |
void | SetActivePanel (const uint8_t panelIndex) |
Set the active antenna panel to this NrSpectrumPhy,. | |
void | SetAntenna (Ptr< Object > antenna) |
Sets the antenna of this NrSpectrumPhy instance, currently in NR module it is expected to be of type UniformPlannarArray. | |
void | SetBeamManager (Ptr< BeamManager > b) |
void | SetCcaMode1Threshold (double thresholdDBm) |
Set clear channel assessment (CCA) threshold. | |
void | SetChannel (Ptr< SpectrumChannel > c) override |
void | SetDataErrorModelEnabled (bool dataErrorModelEnabled) |
Enables or disabled data error model. | |
void | SetDevice (Ptr< NetDevice > d) override |
void | SetErrorModel (Ptr< NrErrorModel > em) |
void | SetErrorModelType (TypeId errorModelType) |
Sets the error model type. | |
void | SetFirstRxDuration (Time duration) |
void | SetFirstRxStart (Time startTime) |
void | SetIsGnb (bool isGnb) |
Set whether this spectrum PHY belongs to Gnb or UE TODO NrHelper should be declared as friend and this function should be private. | |
void | SetMobility (Ptr< MobilityModel > m) override |
virtual void | SetNoisePowerSpectralDensity (const Ptr< const SpectrumValue > &noisePsd) |
Sets noise power spectral density to be used by this device. | |
void | SetNumPanels (const uint8_t numPanel) |
Set the number of panels in this NrSpectrumPhy. | |
void | SetPhyDlHarqFeedbackCallback (const NrPhyDlHarqFeedbackCallback &c) |
Sets the callback to be called when DL HARQ feedback is generated. | |
void | SetPhyRxCtrlEndOkCallback (const NrPhyRxCtrlEndOkCallback &c) |
Sets the callback to be called when CTRL is received successfully. | |
void | SetPhyRxDataEndOkCallback (const NrPhyRxDataEndOkCallback &c) |
Sets the callback to be called when DATA is received successfully. | |
void | SetPhyRxPssCallback (const NrPhyRxPssCallback &c) |
void | SetPhyUlHarqFeedbackCallback (const NrPhyUlHarqFeedbackCallback &c) |
Sets the callback to be called when UL HARQ feedback is generated. | |
void | SetRnti (uint16_t rnti) |
void | SetTxPowerSpectralDensity (const Ptr< SpectrumValue > &txPsd) |
Sets transmit power spectral density. | |
void | SetUnlicensedMode (bool unlicensedMode) |
Sets whether to perform in unlicensed mode in which the channel monitoring is enabled. | |
void | StartRx (Ptr< SpectrumSignalParameters > params) override |
Inherited from SpectrumPhy. When this function is called this spectrum phy starts receiving a signal from its spectrum channel. | |
void | StartTxCsiRs (uint16_t rnti, uint16_t beamId) |
void | StartTxDataFrames (const Ptr< PacketBurst > &pb, const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const std::shared_ptr< DciInfoElementTdma > dci, const Time &duration) |
Starts transmission of data frames on connected spectrum channel object. | |
void | StartTxDlControlFrames (const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const Time &duration) |
Starts transmission of DL CTRL. | |
void | StartTxUlControlFrames (const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const Time &duration) |
Start transmission of UL CTRL. | |
void | UpdateMimoSinrPerceived (const std::vector< MimoSinrChunk > &sinr) |
Store the SINR chunks for all received signals at end of interference calculations. | |
void | UpdateSinrPerceived (const SpectrumValue &sinr) |
SpectrumPhy that will be called when the SINR for the received DATA is being calculated by the interference object over DATA chunk processor. | |
void | UpdateSrsSinrPerceived (const SpectrumValue &srsSinr) |
SpectrumPhy that will be called when the SINR for the received SRS at gNB is being calculated by the interference object over SRS chunk processor. | |
void | UpdateSrsSnrPerceived (const double srsSnr) |
SpectrumPhy that will be called when the SNR for the received SRS at gNB is being calculated. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the object TypeId. | |
Protected Member Functions | |
void | ChangeState (State newState, Time duration) |
Update the state of the spectrum phy. The states are: IDLE, TX, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, CCA_BUSY. | |
void | DoDispose () override |
DoDispose method inherited from Object. | |
void | EndTx () |
Function that is called when the transmission has ended. It is used to update spectrum phy state. | |
Ptr< SpectrumChannel > | GetChannel () const |
Get pointer to SpectrumChannel. | |
Ptr< UniformRandomVariable > | GetErrorModelRv () const |
Get pointer to error model random variable. | |
State | GetState () const |
Get current state. | |
void | IncrementActiveTransmissions () |
Increase the counter of active transmissions. | |
void | NotifyRxDataTrace (const SfnSf &sfn, Ptr< const SpectrumValue > spectrumValue, const Time &duration, uint16_t bwpId, uint16_t cellId) const |
call RxDataTrace from subclass | |
void | NotifyTxCtrlTrace (Time duration) const |
call TxCtrlTrace from subclass | |
void | NotifyTxDataTrace (Time duration) const |
call TxDataTrace from subclass | |
Interface between the physical layer and the channel.
NrSpectrumPhy models some of the basic physical layer functionalities such as transmitting CTRL or DATA, receiving the signals, decoding them, and distinguishing whether the signal is useful (CTRL, DATA), i.e. sent to this NR device NrPhy instance, or it should be considered as interference. It is also responsible for obtaining measurements, and for HARQ feedback generation by leveraging HARQ module.
This class implements the interface between the NrPhy and the spectrum channel, and provides to NrPhy aforementioned functionalities. Each NR device's NrPhy has its own NrSpectrumPhy that is in charge of providing these basic phy layer functionalities. In order to be able to receive signals from the channel, each NrSpectrumPhy should be registered to listen events from its channel. To achieve that, during the configuration of NR device's NrPhy at some point should be called AddRx function of the spectrum channel to register the NrSpectrumPhy instance as a receiver on that channel.
This class also has the interface with NrInterference class to pass the necessary information for the interference calculation and to obtain the interference calculation results.
Also it has interface with HARQ module, to which it passes necessary information for the HARQ feedback generation, which is then forwarded to NrPhy.
The user can configure the class using the method NrHelper::SetGnbSpectrumAttribute(), or NrHelper::SetUeSpectrumAttribute(), depending on the type of user you want to configure, or by directly calling SetAttribute
on the pointer. The list of attributes is reported below, in the Attributes section.
ns3::NrSpectrumPhy is accessible through the following paths with Config::Set and Config::Connect:
/NodeList/[i]/DeviceList/[i]/$ns3::NrGnbNetDevice/BandwidthPartMap/[i]/NrGnbPhy/SpectrumPhy
/NodeList/[i]/DeviceList/[i]/$ns3::NrNetDevice/$ns3::NrGnbNetDevice/BandwidthPartMap/[i]/NrGnbPhy/SpectrumPhy
/NodeList/[i]/DeviceList/[i]/$ns3::NrNetDevice/$ns3::NrUeNetDevice/ComponentCarrierMapUe/[i]/NrUePhy/SpectrumPhy
/NodeList/[i]/DeviceList/[i]/$ns3::NrUeNetDevice/ComponentCarrierMapUe/[i]/NrUePhy/SpectrumPhy
Size of this type is 976 bytes (on a 64-bit architecture).
Definition at line 71 of file nr-spectrum-phy.h.
typedef void(* ns3::NrSpectrumPhy::DataSnrTracedCallback) (const SfnSf &sfnSf, const uint16_t cellId, const uint8_t bwpId, const uint64_t imsi, const double snr) |
[in] | sfnSf | SfnSf |
[in] | cellId | |
[in] | bwpId | |
[in] | imsi | |
[in] | snr |
Definition at line 545 of file nr-spectrum-phy.h.
typedef Callback<void, const DlHarqInfo&> ns3::NrSpectrumPhy::NrPhyDlHarqFeedbackCallback |
This callback method type is used by the NrSpectrumPhy to notify the PHY about the status of a DL HARQ feedback
Definition at line 125 of file nr-spectrum-phy.h.
typedef std::function<void(const std::list<Ptr<NrControlMessage>>&, uint8_t)> ns3::NrSpectrumPhy::NrPhyRxCtrlEndOkCallback |
This callback method type is used to notify that CTRL is received.
Definition at line 113 of file nr-spectrum-phy.h.
typedef Callback<void, const Ptr<Packet>&> ns3::NrSpectrumPhy::NrPhyRxDataEndOkCallback |
This callback method type is used to notify that DATA is received.
Definition at line 108 of file nr-spectrum-phy.h.
typedef Callback<void, uint16_t, const Ptr<SpectrumValue>&> ns3::NrSpectrumPhy::NrPhyRxPssCallback |
This method is used by the NrSpectrumPhy to notify the UE PHY that a PSS has been received
Definition at line 119 of file nr-spectrum-phy.h.
typedef Callback<void, const UlHarqInfo&> ns3::NrSpectrumPhy::NrPhyUlHarqFeedbackCallback |
This callback method type is used by the NrSpectrumPhy to notify the PHY about the status of a UL HARQ feedback
Definition at line 130 of file nr-spectrum-phy.h.
typedef void(* ns3::NrSpectrumPhy::RxDataTracedCallback) (const SfnSf &sfnSf, Ptr< const SpectrumValue > v, const Time &t, uint16_t bwpId, uint16_t cellId) |
TracedCallback signature for RB statistics.
[in] | sfnSf | SfnSf |
[in] | v | rxPsd values |
[in] | t | duration of the reception |
[in] | bwpId | BWP ID |
[in] | cellId | Cell ID |
Definition at line 492 of file nr-spectrum-phy.h.
typedef Callback<void, uint16_t, uint16_t, double> ns3::NrSpectrumPhy::SrsSinrReportCallback |
Definition at line 509 of file nr-spectrum-phy.h.
typedef Callback<void, uint16_t, uint16_t, double> ns3::NrSpectrumPhy::SrsSnrReportCallback |
Definition at line 510 of file nr-spectrum-phy.h.
Enum that defines possible states of the spectrum phy.
Definition at line 93 of file nr-spectrum-phy.h.
ns3::NrSpectrumPhy::NrSpectrumPhy | ( | ) |
NrSpectrumPhy constructor.
Definition at line 61 of file nr-spectrum-phy.cc.
|
override |
~NrSpectrumPhy
Definition at line 72 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddBeamManager | ( | Ptr< BeamManager > | b | ) |
Adds the beam manager of corresponds spectrum phy of antenna panel, and that beam manager is responsible of the antenna array of this spectrum phy.
b | Beam manager |
Definition at line 430 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddCsiImMimoChunkProcessor | ( | const Ptr< NrMimoChunkProcessor > & | p | ) |
Connect CSI-IM chunk processor with the corresponding CSI-IM interference object.
p | the CSI-IM chunk processor |
Definition at line 2027 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddCsiRsMimoChunkProcessor | ( | const Ptr< NrMimoChunkProcessor > & | p | ) |
Connect CSI-RS chunk processor with the corresponding CSI-RS interference object.
p | the CSI-RS chunk processor |
Definition at line 2020 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddDataMimoChunkProcessor | ( | const Ptr< NrMimoChunkProcessor > & | p | ) |
Connect DATA chunk processor with the corresponding DATA interference object.
p | the DATA chunk processor |
Definition at line 2013 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddDataPowerChunkProcessor | ( | const Ptr< NrChunkProcessor > & | p | ) |
Adds the chunk processor that will process the power for the data.
p | the chunk processor |
Definition at line 1038 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddDataSinrChunkProcessor | ( | const Ptr< NrChunkProcessor > & | p | ) |
Adds the chunk processor that will process the interference.
p | the chunk processor |
Definition at line 1045 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddDlCtrlSinrChunkProcessor | ( | const Ptr< NrChunkProcessor > & | p | ) |
Adds the chunk processor that will process the received power.
p | the chunk processor |
Definition at line 1106 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddExpectedDlCtrlEnd | ( | Time | ctrlEndTime | ) |
Keeps track of when DL CTRL should finish. Needed for CSI-RS and CSI-IM implementation to be able to schedule CSI-IM just at the beginning of the PDSCH.
ctrlEndTime | Expected time when DL CTRL will end |
Definition at line 2108 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddExpectedSrsRnti | ( | uint16_t | rnti | ) |
Definition at line 1192 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddExpectedTb | ( | ExpectedTb | expectedTb | ) |
Instruct the Spectrum Model of a incoming transmission.
expectedTb | Expected transport block |
Definition at line 1165 of file nr-spectrum-phy.cc.
References IsGnb(), ns3::ExpectedTb::m_mcs, ns3::ExpectedTb::m_numSym, ns3::ExpectedTb::m_rnti, ns3::ExpectedTb::m_symStart, and ns3::ExpectedTb::m_tbSize.
void ns3::NrSpectrumPhy::AddPanel | ( | const Ptr< Object > | antenna | ) |
Add the antenna panel to this NrSpectrumPhy, currently in NR module it is expected to be of type UniformPlannarArray.
antenna | the antenna panel to be add to this NrSpectrumPhy instance |
Definition at line 1140 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddRsPowerChunkProcessor | ( | const Ptr< NrChunkProcessor > & | p | ) |
Adds the chunk processor that will process the received power.
p | the chunk processor |
Definition at line 1099 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddSrsSinrChunkProcessor | ( | const Ptr< NrChunkProcessor > & | p | ) |
Definition at line 1052 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddSrsSinrReportCallback | ( | SrsSinrReportCallback | callback | ) |
It adds callback to the list of callbacks that will be notified once SRS is being received.
callback | callback to be added to the list of callbacks |
Definition at line 1198 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::AddSrsSnrReportCallback | ( | SrsSnrReportCallback | callback | ) |
It adds callback to the list of callbacks that will be notified once SRS is being received.
callback | callback to be added to the list of callbacks |
Definition at line 1204 of file nr-spectrum-phy.cc.
int64_t ns3::NrSpectrumPhy::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 1999 of file nr-spectrum-phy.cc.
|
protected |
Update the state of the spectrum phy. The states are: IDLE, TX, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, CCA_BUSY.
newState | the new state |
duration | how much time the spectrum phy will be in the new state |
Definition at line 1487 of file nr-spectrum-phy.cc.
References CCA_BUSY, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, and TX.
Referenced by EndTx(), StartTxDataFrames(), StartTxDlControlFrames(), and StartTxUlControlFrames().
double ns3::NrSpectrumPhy::CircularBearingAnglesForPanels | ( | double | firstPanelBearingAngleRad, |
uint8_t | panelIndex | ||
) | const |
initialize the bearing angles of panels in to cover 360 Degree
firstPanelBearingAngleRad | Bearing angle of first panel |
panelIndex | Index of corresponding panel |
Definition at line 474 of file nr-spectrum-phy.cc.
Referenced by ConfigPanelsBearingAngles(), and ConfigPanelsBearingAngles().
void ns3::NrSpectrumPhy::ConfigPanelsBearingAngles | ( | ) |
Either initialize the bearing angles of panels in install step or update all bearing angles based on proper method, if no parameter pass it would get first antenna bearing angle and set other panels based on proper approach.
Definition at line 445 of file nr-spectrum-phy.cc.
References CircularBearingAnglesForPanels().
void ns3::NrSpectrumPhy::ConfigPanelsBearingAngles | ( | double | firstPanelBearingAngleRad | ) |
Either initialize the bearing angles of panels in install step or update all bearing angles based on proper method, if no parameter pass it would get first antenna bearing angle and set other panels based on proper approach.
firstPanelBearingAngleRad | Bearing angle of first panel |
Definition at line 461 of file nr-spectrum-phy.cc.
References CircularBearingAnglesForPanels().
|
overrideprotected |
DoDispose method inherited from Object.
Definition at line 77 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::EnableDlCtrlPathlossTrace | ( | ) |
Definition at line 502 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::EnableDlDataPathlossTrace | ( | ) |
Definition at line 495 of file nr-spectrum-phy.cc.
|
protected |
Function that is called when the transmission has ended. It is used to update spectrum phy state.
Definition at line 1500 of file nr-spectrum-phy.cc.
References ChangeState(), IDLE, and TX.
Referenced by StartTxDataFrames(), StartTxDlControlFrames(), and StartTxUlControlFrames().
|
override |
Inherited from SpectrumPhy Note: Implements GetRxAntenna function from SpectrumPhy.
Definition at line 391 of file nr-spectrum-phy.cc.
Referenced by ns3::LenaV2Utils::SetLenaV2SimulatorParameters().
Ptr< BeamManager > ns3::NrSpectrumPhy::GetBeamManager | ( | ) |
Definition at line 437 of file nr-spectrum-phy.cc.
uint16_t ns3::NrSpectrumPhy::GetBwpId | ( | ) | const |
Definition at line 1469 of file nr-spectrum-phy.cc.
Referenced by StartRx().
double ns3::NrSpectrumPhy::GetCcaMode1Threshold | ( | ) | const |
Returns clear channel assessment (CCA) threshold
Definition at line 531 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
uint16_t ns3::NrSpectrumPhy::GetCellId | ( | ) | const |
Definition at line 1463 of file nr-spectrum-phy.cc.
Referenced by StartRx(), StartTxCsiRs(), StartTxDataFrames(), StartTxDlControlFrames(), StartTxUlControlFrames(), UpdateSrsSinrPerceived(), and UpdateSrsSnrPerceived().
|
protected |
Get pointer to SpectrumChannel.
Definition at line 379 of file nr-spectrum-phy.cc.
|
override |
Definition at line 353 of file nr-spectrum-phy.cc.
Ptr< NrErrorModel > ns3::NrSpectrumPhy::GetErrorModel | ( | ) | const |
Definition at line 489 of file nr-spectrum-phy.cc.
|
protected |
Get pointer to error model random variable.
Definition at line 220 of file nr-spectrum-phy.cc.
Time ns3::NrSpectrumPhy::GetFirstRxDuration | ( | ) | const |
Definition at line 244 of file nr-spectrum-phy.cc.
Time ns3::NrSpectrumPhy::GetFirstRxStart | ( | ) | const |
Definition at line 232 of file nr-spectrum-phy.cc.
|
override |
Definition at line 366 of file nr-spectrum-phy.cc.
Ptr< NrInterference > ns3::NrSpectrumPhy::GetNrInterference | ( | ) | const |
Definition at line 1158 of file nr-spectrum-phy.cc.
Ptr< NrPhy > ns3::NrSpectrumPhy::GetNrPhy | ( | ) | const |
Definition at line 226 of file nr-spectrum-phy.cc.
uint8_t ns3::NrSpectrumPhy::GetNumPanels | ( | ) | const |
Get the number of panels in this NrSpectrumPhy.
Definition at line 414 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
Ptr< Object > ns3::NrSpectrumPhy::GetPanelByIndex | ( | const uint8_t | index | ) | const |
Interface enable to access all panels using proper index.
Definition at line 400 of file nr-spectrum-phy.cc.
Ptr< NrPhy > ns3::NrSpectrumPhy::GetPhy | ( | ) | const |
Definition at line 1127 of file nr-spectrum-phy.cc.
uint16_t ns3::NrSpectrumPhy::GetRnti | ( | ) | const |
|
override |
Definition at line 385 of file nr-spectrum-phy.cc.
Ptr< SpectrumChannel > ns3::NrSpectrumPhy::GetSpectrumChannel | ( | ) | const |
Returns spectrum channel object to which is attached this spectrum phy instance.
Definition at line 1152 of file nr-spectrum-phy.cc.
Referenced by StartRx().
|
protected |
Ptr< const SpectrumValue > ns3::NrSpectrumPhy::GetTxPowerSpectralDensity | ( | ) |
Definition at line 587 of file nr-spectrum-phy.cc.
|
static |
Get the object TypeId.
Definition at line 131 of file nr-spectrum-phy.cc.
References GetCcaMode1Threshold(), GetNumPanels(), ns3::NrLteMiErrorModel::GetTypeId(), SetCcaMode1Threshold(), SetDataErrorModelEnabled(), SetErrorModelType(), SetNumPanels(), and SetUnlicensedMode().
Referenced by ns3::NrHelper::NrHelper().
|
protected |
Increase the counter of active transmissions.
Definition at line 256 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::InstallPhy | ( | const Ptr< NrPhy > & | phyModel | ) |
Set NrPhy of this spectrum phy in order to be able to obtain information such as cellId, bwpId, etc.
Definition at line 1121 of file nr-spectrum-phy.cc.
bool ns3::NrSpectrumPhy::IsGnb | ( | ) | const |
Definition at line 1475 of file nr-spectrum-phy.cc.
Referenced by AddExpectedTb().
bool ns3::NrSpectrumPhy::IsTransmitting | ( | ) |
Return true if the current Phy State is TX.
Definition at line 881 of file nr-spectrum-phy.cc.
References TX.
|
protected |
call RxDataTrace from subclass
sfnSf | SfnSf |
spectrumValue | rxPsd values |
duration | duration of the reception |
bwpId | BWP ID |
cellId | Cell ID |
Definition at line 262 of file nr-spectrum-phy.cc.
|
protected |
call TxCtrlTrace from subclass
duration | Duration that the transmitter will occupy channel with control transmission |
Definition at line 272 of file nr-spectrum-phy.cc.
|
protected |
call TxDataTrace from subclass
duration | Duration that the transmitter will occupy channel with data transmission |
Definition at line 278 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::ReportDlCtrlSinr | ( | const SpectrumValue & | sinr | ) |
Called when DlCtrlSinr is fired.
sinr | the sinr PSD |
Definition at line 1062 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::ReportWbDlDataSnrPerceived | ( | const double | dlDataSnr | ) |
Report wideband perceived downlink data SNR.
dlDataSnr | the downlink data SNR |
Definition at line 1985 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetActivePanel | ( | const uint8_t | panelIndex | ) |
Set the active antenna panel to this NrSpectrumPhy,.
panelIndex | Index of active panel of this NrSpectrumPhy |
Definition at line 1146 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetAntenna | ( | Ptr< Object > | antenna | ) |
Sets the antenna of this NrSpectrumPhy instance, currently in NR module it is expected to be of type UniformPlannarArray.
antenna | the antenna to be set to this NrSpectrumPhy instance |
Definition at line 1133 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetBeamManager | ( | Ptr< BeamManager > | b | ) |
Definition at line 422 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetCcaMode1Threshold | ( | double | thresholdDBm | ) |
Set clear channel assessment (CCA) threshold.
thresholdDBm | - CCA threshold in dBms |
Definition at line 523 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
|
override |
Definition at line 372 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetDataErrorModelEnabled | ( | bool | dataErrorModelEnabled | ) |
Enables or disabled data error model.
dataErrorModelEnabled | boolean saying whether the data error model should be enabled |
Definition at line 545 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
|
override |
Definition at line 322 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetErrorModel | ( | Ptr< NrErrorModel > | em | ) |
Definition at line 482 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetErrorModelType | ( | TypeId | errorModelType | ) |
Sets the error model type.
Definition at line 552 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
void ns3::NrSpectrumPhy::SetFirstRxDuration | ( | Time | duration | ) |
Definition at line 250 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetFirstRxStart | ( | Time | startTime | ) |
Definition at line 238 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetIsGnb | ( | bool | isGnb | ) |
Set whether this spectrum PHY belongs to Gnb or UE TODO NrHelper should be declared as friend and this function should be private.
isGnb | whether the spectrum PHY belongs to Gnb or UE |
Definition at line 1481 of file nr-spectrum-phy.cc.
|
override |
Definition at line 359 of file nr-spectrum-phy.cc.
|
virtual |
Sets noise power spectral density to be used by this device.
noisePsd | SpectrumValue object holding noise PSD |
Definition at line 561 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetNumPanels | ( | const uint8_t | numPanel | ) |
Set the number of panels in this NrSpectrumPhy.
Definition at line 408 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
void ns3::NrSpectrumPhy::SetPhyDlHarqFeedbackCallback | ( | const NrPhyDlHarqFeedbackCallback & | c | ) |
Sets the callback to be called when DL HARQ feedback is generated.
Definition at line 307 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetPhyRxCtrlEndOkCallback | ( | const NrPhyRxCtrlEndOkCallback & | c | ) |
Sets the callback to be called when CTRL is received successfully.
c | the callback function |
Definition at line 293 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetPhyRxDataEndOkCallback | ( | const NrPhyRxDataEndOkCallback & | c | ) |
Sets the callback to be called when DATA is received successfully.
c | the callback function |
Definition at line 286 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetPhyRxPssCallback | ( | const NrPhyRxPssCallback & | c | ) |
set the callback for the reception of the PSS as part of the interconnections between the NrSpectrumPhy and the UE PHY
c | the callback |
Definition at line 300 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetPhyUlHarqFeedbackCallback | ( | const NrPhyUlHarqFeedbackCallback & | c | ) |
Sets the callback to be called when UL HARQ feedback is generated.
Definition at line 314 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetRnti | ( | uint16_t | rnti | ) |
Set RNTI of this spectrum phy
rnti | RNTI to be set |
Definition at line 509 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetTxPowerSpectralDensity | ( | const Ptr< SpectrumValue > & | txPsd | ) |
Sets transmit power spectral density.
txPsd | transmit power spectral density to be used for the upcoming transmissions by this spectrum phy |
Definition at line 580 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::SetUnlicensedMode | ( | bool | unlicensedMode | ) |
Sets whether to perform in unlicensed mode in which the channel monitoring is enabled.
unlicensedMode | if true the unlicensed mode is enabled |
Definition at line 538 of file nr-spectrum-phy.cc.
Referenced by GetTypeId().
|
override |
Inherited from SpectrumPhy. When this function is called this spectrum phy starts receiving a signal from its spectrum channel.
params | SpectrumSignalParameters object that will be used to process this signal |
Definition at line 634 of file nr-spectrum-phy.cc.
References GetBwpId(), GetCellId(), GetSpectrumChannel(), and IDLE.
void ns3::NrSpectrumPhy::StartTxCsiRs | ( | uint16_t | rnti, |
uint16_t | beamId | ||
) |
Start transmission of CSI-RS
rnti | the rnti of the user towards which is directed the CSI-RS |
beamId | the ID of the beam that is used to transmit this CSI-RS |
Definition at line 939 of file nr-spectrum-phy.cc.
References CCA_BUSY, GetCellId(), IDLE, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, RX_UL_SRS, and TX.
void ns3::NrSpectrumPhy::StartTxDataFrames | ( | const Ptr< PacketBurst > & | pb, |
const std::list< Ptr< NrControlMessage > > & | ctrlMsgList, | ||
const std::shared_ptr< DciInfoElementTdma > | dci, | ||
const Time & | duration | ||
) |
Starts transmission of data frames on connected spectrum channel object.
pb | packet burst to be transmitted |
ctrlMsgList | control message list |
dci | downlink control information |
duration | the duration of transmission |
Definition at line 805 of file nr-spectrum-phy.cc.
References CCA_BUSY, ChangeState(), EndTx(), GetCellId(), IDLE, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, RX_UL_SRS, and TX.
void ns3::NrSpectrumPhy::StartTxDlControlFrames | ( | const std::list< Ptr< NrControlMessage > > & | ctrlMsgList, |
const Time & | duration | ||
) |
Starts transmission of DL CTRL.
duration | the duration of this transmission |
Definition at line 887 of file nr-spectrum-phy.cc.
References CCA_BUSY, ChangeState(), EndTx(), GetCellId(), IDLE, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, RX_UL_SRS, and TX.
void ns3::NrSpectrumPhy::StartTxUlControlFrames | ( | const std::list< Ptr< NrControlMessage > > & | ctrlMsgList, |
const Time & | duration | ||
) |
Start transmission of UL CTRL.
ctrlMsgList | the list of control messages to be transmitted in UL |
duration | the duration of the CTRL messages transmission |
Definition at line 988 of file nr-spectrum-phy.cc.
References CCA_BUSY, ChangeState(), EndTx(), GetCellId(), IDLE, RX_DATA, RX_DL_CTRL, RX_UL_CTRL, RX_UL_SRS, and TX.
void ns3::NrSpectrumPhy::UpdateMimoSinrPerceived | ( | const std::vector< MimoSinrChunk > & | sinr | ) |
Store the SINR chunks for all received signals at end of interference calculations.
sinr | The vector of all SINR values of receive signals. A new chunk is generated for each different receive signal (for example for each UL reception of a signal from a different UE) and at each time instant where the interference changes. |
Definition at line 2007 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::UpdateSinrPerceived | ( | const SpectrumValue & | sinr | ) |
SpectrumPhy that will be called when the SINR for the received DATA is being calculated by the interference object over DATA chunk processor.
sinr | the resulting SINR spectrum value |
Definition at line 1113 of file nr-spectrum-phy.cc.
void ns3::NrSpectrumPhy::UpdateSrsSinrPerceived | ( | const SpectrumValue & | srsSinr | ) |
SpectrumPhy that will be called when the SINR for the received SRS at gNB is being calculated by the interference object over SRS chunk processor.
srsSinr | the resulting SRS SINR spectrum value |
Definition at line 1073 of file nr-spectrum-phy.cc.
References GetCellId().
void ns3::NrSpectrumPhy::UpdateSrsSnrPerceived | ( | const double | srsSnr | ) |
SpectrumPhy that will be called when the SNR for the received SRS at gNB is being calculated.
srsSnr | the resulting SRS SNR |
Definition at line 1087 of file nr-spectrum-phy.cc.
References GetCellId().