5G-LENA nr-v3.3-81-g75c7590d
The 5G/NR module for the ns-3 simulator
|
The NrInterference class inherits LteInterference which implements a gaussian interference model, i.e., all incoming signals are added to the total interference. NrInterference class extends this functionality to support energy detection functionality. More...
#include "nr-interference.h"
Public Member Functions | |
NrInterference () | |
NrInterference constructor. | |
~NrInterference () override | |
~NrInterference | |
virtual void | AddMimoChunkProcessor (Ptr< NrMimoChunkProcessor > cp) |
Add a chunk processor for MIMO signals. | |
void | AddSignal (Ptr< const SpectrumValue > spd, Time duration) override |
virtual void | AddSignalMimo (Ptr< const SpectrumSignalParameters > params, const Time &duration) |
Notify that a new signal is being perceived in the medium. This method is to be called for all incoming signals, including interference. This method handles MIMO signals and also calls LteInterference to cover SISO signals. | |
void | AppendEvent (Time startTime, Time endTime, double rxPowerW) |
Crates events corresponding to the new energy. One event corresponds to the moment when the energy starts, and another to the moment that energy ends and in that event the energy is negative, or it is being subtracted. This function also updates the list of events, i.e. it removed the events belonging to the signals that have finished. | |
virtual void | DoSubtractSignalMimo (Ptr< const SpectrumSignalParameters > params, uint32_t signalId) |
Notify that a signals transmission is ending. This means that the signal will be removed from the lists of RX and interfering signals. This method handles MIMO signals and also calls LteInterference to cover SISO signals. | |
void | EndRx () override |
void | EraseEvents () |
Time | GetEnergyDuration (double energyW) |
Returns the duration of the energy that is above the energy provided detection threshold. | |
bool | IsChannelBusyNow (double energyW) |
Checks if the sum of the energy, including the energies that start at this moment is greater than provided energy detection threshold. If yes it returns true, otherwise false. | |
bool | IsChunkProcessorSet () |
virtual void | StartRxMimo (Ptr< const SpectrumSignalParameters > params) |
Notify the intended receiver that a new signal is being received. This method is to be called only for the useful signal-of-interest. This method handles MIMO signals and also calls LteInterference to cover SISO signals. | |
Public Member Functions inherited from ns3::NrInterferenceBase | |
virtual void | AddInterferenceChunkProcessor (Ptr< NrChunkProcessor > p) |
Add a NrChunkProcessor that will use the time-vs-frequency interference calculated by this NrInterferenceBase instance. Note that all the added NrChunkProcessors will work in parallel. | |
virtual void | AddRsPowerChunkProcessor (Ptr< NrChunkProcessor > p) |
virtual void | AddSinrChunkProcessor (Ptr< NrChunkProcessor > p) |
Add a NrChunkProcessor that will use the time-vs-frequency SINR calculated by this NrInterferenceBase instance. Note that all the added NrChunkProcessors will work in parallel. | |
void | DoDispose () override |
virtual void | SetNoisePowerSpectralDensity (Ptr< const SpectrumValue > noisePsd) |
virtual void | StartRx (Ptr< const SpectrumValue > rxPsd) |
Notify that the PHY is starting a RX attempt. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the object TypeId. | |
Static Public Member Functions inherited from ns3::NrInterferenceBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | DoDispose () override |
DoDispose method inherited from Object. | |
Protected Member Functions inherited from ns3::NrInterferenceBase | |
virtual void | DoAddSignal (Ptr< const SpectrumValue > spd) |
virtual void | DoSubtractSignal (Ptr< const SpectrumValue > spd, uint32_t signalId) |
Protected Attributes | |
double | m_firstPower |
NiChanges | m_niChanges |
List of events in which there is some change in the energy. | |
TracedCallback< double > | m_rssiPerProcessedChunk |
! Trace for RSSI pre processed chunk. | |
TracedCallback< double > | m_snrPerProcessedChunk |
! Trace for SNR per processed chunk. | |
Protected Attributes inherited from ns3::NrInterferenceBase | |
Ptr< SpectrumValue > | m_allSignals |
std::list< Ptr< NrChunkProcessor > > | m_interfChunkProcessorList |
Time | m_lastChangeTime {Seconds(0)} |
uint32_t | m_lastSignalId {0} |
the last signal ID | |
uint32_t | m_lastSignalIdBeforeReset {0} |
the last signal ID before reset | |
Ptr< const SpectrumValue > | m_noise {nullptr} |
the noise value | |
bool | m_receiving {false} |
are we receiving? | |
std::list< Ptr< NrChunkProcessor > > | m_rsPowerChunkProcessorList |
Ptr< SpectrumValue > | m_rxSignal {nullptr} |
std::list< Ptr< NrChunkProcessor > > | m_sinrChunkProcessorList |
The NrInterference class inherits LteInterference which implements a gaussian interference model, i.e., all incoming signals are added to the total interference. NrInterference class extends this functionality to support energy detection functionality.
Definition at line 39 of file nr-interference.h.
ns3::NrInterference::NrInterference | ( | ) |
NrInterference constructor.
Definition at line 20 of file nr-interference.cc.
|
override |
~NrInterference
Definition at line 27 of file nr-interference.cc.
|
virtual |
Add a chunk processor for MIMO signals.
cp | The NrMimoChunkProcessor to be added |
Definition at line 391 of file nr-interference.cc.
|
overridevirtual |
notify that a new signal is being perceived in the medium. This method is to be called for all incoming signal, regardless of whether they're useful signals or interferers.
spd | the power spectral density of the new signal |
duration | the duration of the new signal |
Reimplemented from ns3::NrInterferenceBase.
Definition at line 62 of file nr-interference.cc.
References ns3::NrInterferenceBase::AddSignal(), and AppendEvent().
|
virtual |
Notify that a new signal is being perceived in the medium. This method is to be called for all incoming signals, including interference. This method handles MIMO signals and also calls LteInterference to cover SISO signals.
params | The spectrum signal parameters of the new signal |
duration | The duration of the new signal |
Definition at line 328 of file nr-interference.cc.
References AppendEvent(), ns3::NrInterferenceBase::DoAddSignal(), DoSubtractSignalMimo(), ns3::NrInterferenceBase::m_lastSignalId, and ns3::NrInterferenceBase::m_lastSignalIdBeforeReset.
void ns3::NrInterference::AppendEvent | ( | Time | startTime, |
Time | endTime, | ||
double | rxPowerW | ||
) |
Crates events corresponding to the new energy. One event corresponds to the moment when the energy starts, and another to the moment that energy ends and in that event the energy is negative, or it is being subtracted. This function also updates the list of events, i.e. it removed the events belonging to the signals that have finished.
startTime | Energy start time |
endTime | Energy end time |
rxPowerW | Power of the energy in Watts |
Definition at line 298 of file nr-interference.cc.
References m_firstPower, m_niChanges, and ns3::NrInterferenceBase::m_receiving.
Referenced by AddSignal(), and AddSignalMimo().
|
overrideprotected |
DoDispose method inherited from Object.
Definition at line 33 of file nr-interference.cc.
|
virtual |
Notify that a signals transmission is ending. This means that the signal will be removed from the lists of RX and interfering signals. This method handles MIMO signals and also calls LteInterference to cover SISO signals.
params | The spectrum signal parameters of the ending signal |
signalId | The LteInterference signalId |
Definition at line 369 of file nr-interference.cc.
References ns3::NrInterferenceBase::DoSubtractSignal().
Referenced by AddSignalMimo().
|
overridevirtual |
notify that the RX attempt has ended. The receiving PHY must call this method when RX ends or RX is aborted.
Reimplemented from ns3::NrInterferenceBase.
Definition at line 85 of file nr-interference.cc.
References ns3::NrInterferenceBase::m_interfChunkProcessorList, ns3::NrInterferenceBase::m_receiving, ns3::NrInterferenceBase::m_rsPowerChunkProcessorList, ns3::NrInterferenceBase::m_sinrChunkProcessorList, and m_snrPerProcessedChunk.
void ns3::NrInterference::EraseEvents | ( | ) |
Erase all events.
Definition at line 279 of file nr-interference.cc.
References m_firstPower, and m_niChanges.
Time ns3::NrInterference::GetEnergyDuration | ( | double | energyW | ) |
Returns the duration of the energy that is above the energy provided detection threshold.
energyW | energy detection threshold used to evaluate if the channel is busy |
Definition at line 233 of file nr-interference.cc.
References IsChannelBusyNow(), m_firstPower, and m_niChanges.
|
static |
Get the object TypeId.
Definition at line 45 of file nr-interference.cc.
References m_rssiPerProcessedChunk, and m_snrPerProcessedChunk.
bool ns3::NrInterference::IsChannelBusyNow | ( | double | energyW | ) |
Checks if the sum of the energy, including the energies that start at this moment is greater than provided energy detection threshold. If yes it returns true, otherwise false.
energyW | energy detection threshold used to evaluate if the channel is busy |
Definition at line 211 of file nr-interference.cc.
References ns3::NrInterferenceBase::m_allSignals.
Referenced by GetEnergyDuration().
bool ns3::NrInterference::IsChunkProcessorSet | ( | ) |
Definition at line 398 of file nr-interference.cc.
|
virtual |
Notify the intended receiver that a new signal is being received. This method is to be called only for the useful signal-of-interest. This method handles MIMO signals and also calls LteInterference to cover SISO signals.
params | The spectrum signal parameters of the new signal |
Definition at line 351 of file nr-interference.cc.
References ns3::NrInterferenceBase::m_receiving, and ns3::NrInterferenceBase::StartRx().
|
protected |
This contains the accumulated sum of the energy events until the certain moment it has been calculated
Definition at line 242 of file nr-interference.h.
Referenced by AppendEvent(), EraseEvents(), and GetEnergyDuration().
|
protected |
List of events in which there is some change in the energy.
Used for energy duration calculation, inspired by wifi/model/interference-helper implementation
Definition at line 241 of file nr-interference.h.
Referenced by AppendEvent(), EraseEvents(), and GetEnergyDuration().
|
protected |
! Trace for RSSI pre processed chunk.
Definition at line 237 of file nr-interference.h.
Referenced by GetTypeId().
|
protected |
! Trace for SNR per processed chunk.
Definition at line 236 of file nr-interference.h.
Referenced by EndRx(), and GetTypeId().