5G-LENA nr-v3.3-81-g75c7590d
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrInterference Class Reference

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"

+ Inheritance diagram for ns3::NrInterference:
+ Collaboration diagram for ns3::NrInterference:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NrInterference()

ns3::NrInterference::NrInterference ( )

NrInterference constructor.

Definition at line 20 of file nr-interference.cc.

◆ ~NrInterference()

ns3::NrInterference::~NrInterference ( )
override

~NrInterference

Definition at line 27 of file nr-interference.cc.

Member Function Documentation

◆ AddMimoChunkProcessor()

void ns3::NrInterference::AddMimoChunkProcessor ( Ptr< NrMimoChunkProcessor cp)
virtual

Add a chunk processor for MIMO signals.

Parameters
cpThe NrMimoChunkProcessor to be added

Definition at line 391 of file nr-interference.cc.

◆ AddSignal()

void ns3::NrInterference::AddSignal ( Ptr< const SpectrumValue >  spd,
Time  duration 
)
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.

Parameters
spdthe power spectral density of the new signal
durationthe duration of the new signal

Reimplemented from ns3::NrInterferenceBase.

Definition at line 62 of file nr-interference.cc.

References ns3::NrInterferenceBase::AddSignal(), and AppendEvent().

+ Here is the call graph for this function:

◆ AddSignalMimo()

void ns3::NrInterference::AddSignalMimo ( Ptr< const SpectrumSignalParameters >  params,
const Time &  duration 
)
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.

Parameters
paramsThe spectrum signal parameters of the new signal
durationThe 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.

+ Here is the call graph for this function:

◆ AppendEvent()

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.

Parameters
startTimeEnergy start time
endTimeEnergy end time
rxPowerWPower 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().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::NrInterference::DoDispose ( )
overrideprotected

DoDispose method inherited from Object.

Definition at line 33 of file nr-interference.cc.

◆ DoSubtractSignalMimo()

void ns3::NrInterference::DoSubtractSignalMimo ( Ptr< const SpectrumSignalParameters >  params,
uint32_t  signalId 
)
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.

Parameters
paramsThe spectrum signal parameters of the ending signal
signalIdThe LteInterference signalId

Definition at line 369 of file nr-interference.cc.

References ns3::NrInterferenceBase::DoSubtractSignal().

Referenced by AddSignalMimo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EndRx()

void ns3::NrInterference::EndRx ( )
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.

◆ EraseEvents()

void ns3::NrInterference::EraseEvents ( )

Erase all events.

Definition at line 279 of file nr-interference.cc.

References m_firstPower, and m_niChanges.

◆ GetEnergyDuration()

Time ns3::NrInterference::GetEnergyDuration ( double  energyW)

Returns the duration of the energy that is above the energy provided detection threshold.

Parameters
energyWenergy detection threshold used to evaluate if the channel is busy
Returns
Duration of the energy that is above provided energy detection threshold.

Definition at line 233 of file nr-interference.cc.

References IsChannelBusyNow(), m_firstPower, and m_niChanges.

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::NrInterference::GetTypeId ( )
static

Get the object TypeId.

Returns
the object TypeId

Definition at line 45 of file nr-interference.cc.

References m_rssiPerProcessedChunk, and m_snrPerProcessedChunk.

◆ IsChannelBusyNow()

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.

Parameters
energyWenergy detection threshold used to evaluate if the channel is busy
Returns
Returns true if the energy is above provided threshold. Otherwise false.

Definition at line 211 of file nr-interference.cc.

References ns3::NrInterferenceBase::m_allSignals.

Referenced by GetEnergyDuration().

+ Here is the caller graph for this function:

◆ IsChunkProcessorSet()

bool ns3::NrInterference::IsChunkProcessorSet ( )
Returns
Returns a flag that indicates whether at least one chunk processor is set. Returns true if chunk processor list is not empty.

Definition at line 398 of file nr-interference.cc.

◆ StartRxMimo()

void ns3::NrInterference::StartRxMimo ( Ptr< const SpectrumSignalParameters >  params)
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.

Parameters
paramsThe 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().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_firstPower

double ns3::NrInterference::m_firstPower
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().

◆ m_niChanges

NiChanges ns3::NrInterference::m_niChanges
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().

◆ m_rssiPerProcessedChunk

TracedCallback<double> ns3::NrInterference::m_rssiPerProcessedChunk
protected

! Trace for RSSI pre processed chunk.

Definition at line 237 of file nr-interference.h.

Referenced by GetTypeId().

◆ m_snrPerProcessedChunk

TracedCallback<double> ns3::NrInterference::m_snrPerProcessedChunk
protected

! Trace for SNR per processed chunk.

Definition at line 236 of file nr-interference.h.

Referenced by EndRx(), and GetTypeId().


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