5G-LENA nr-v3.0-32-g83aee33
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.
 
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.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the object TypeId.
 

Protected Member Functions

void DoDispose () override
 DoDispose method inherited from Object.
 

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.
 

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.

Introspection did not find any typical Config paths.
No Attributes are defined for this type.

TraceSources

  • SnrPerProcessedChunk: Snr per processed chunk.
    Callback signature: ns3::SnrPerProcessedChunk::TracedCallback
  • RssiPerProcessedChunk: Rssi per processed chunk.
    Callback signature: ns3::RssiPerProcessedChunk::TracedCallback

Size of this type is 18446744073709551615 bytes (on a 64-bit architecture).

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

Constructor & Destructor Documentation

◆ NrInterference()

ns3::NrInterference::NrInterference ( )

NrInterference constructor.

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

◆ ~NrInterference()

ns3::NrInterference::~NrInterference ( )
override

~NrInterference

Definition at line 30 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 394 of file nr-interference.cc.

◆ AddSignal()

void ns3::NrInterference::AddSignal ( Ptr< const SpectrumValue >  spd,
Time  duration 
)
override

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

◆ 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 331 of file nr-interference.cc.

References AppendEvent(), and DoSubtractSignalMimo().

+ 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 301 of file nr-interference.cc.

References m_firstPower, and m_niChanges.

Referenced by AddSignalMimo().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::NrInterference::DoDispose ( )
overrideprotected

DoDispose method inherited from Object.

Definition at line 36 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 372 of file nr-interference.cc.

Referenced by AddSignalMimo().

+ Here is the caller graph for this function:

◆ EndRx()

void ns3::NrInterference::EndRx ( )
override

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

◆ EraseEvents()

void ns3::NrInterference::EraseEvents ( )

Erase all events.

Definition at line 282 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 236 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 48 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 214 of file nr-interference.cc.

Referenced by GetEnergyDuration().

+ Here is the caller graph for this function:

◆ 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 354 of file nr-interference.cc.

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 236 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 235 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 231 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 230 of file nr-interference.h.

Referenced by GetTypeId().


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