A Discrete-Event Network Simulator
API
ns3::InterferenceHelper Class Reference

handles interference calculations More...

#include "interference-helper.h"

+ Inheritance diagram for ns3::InterferenceHelper:
+ Collaboration diagram for ns3::InterferenceHelper:

Classes

class  NiChange
 Noise and Interference (thus Ni) event. More...
 

Public Member Functions

 InterferenceHelper ()
 
 ~InterferenceHelper ()
 
Ptr< EventAdd (Ptr< const WifiPpdu > ppdu, const WifiTxVector &txVector, Time duration, RxPowerWattPerChannelBand rxPower, bool isStartOfdmaRxing=false)
 Add the PPDU-related signal to interference helper. More...
 
void AddBand (WifiSpectrumBand band)
 Add a frequency band. More...
 
void AddForeignSignal (Time duration, RxPowerWattPerChannelBand rxPower)
 Add a non-Wifi signal to interference helper. More...
 
struct PhyEntity::SnrPer CalculatePayloadSnrPer (Ptr< Event > event, uint16_t channelWidth, WifiSpectrumBand band, uint16_t staId, std::pair< Time, Time > relativeMpduStartStop) const
 Calculate the SNIR at the start of the payload and accumulate all SNIR changes in the SNIR vector for each MPDU of an A-MPDU. More...
 
struct PhyEntity::SnrPer CalculatePhyHeaderSnrPer (Ptr< Event > event, uint16_t channelWidth, WifiSpectrumBand band, WifiPpduField header) const
 Calculate the SNIR at the start of the PHY header and accumulate all SNIR changes in the SNIR vector. More...
 
double CalculateSnr (Ptr< Event > event, uint16_t channelWidth, uint8_t nss, WifiSpectrumBand band) const
 Calculate the SNIR for the event (starting from now until the event end). More...
 
void EraseEvents (void)
 Erase all events. More...
 
Time GetEnergyDuration (double energyW, WifiSpectrumBand band)
 
Ptr< ErrorRateModelGetErrorRateModel (void) const
 Return the error rate model. More...
 
void NotifyRxEnd (Time endTime)
 Notify that RX has ended. More...
 
void NotifyRxStart ()
 Notify that RX has started. More...
 
void RemoveBands (void)
 Remove the frequency bands. More...
 
void SetErrorRateModel (const Ptr< ErrorRateModel > rate)
 Set the error rate model for this interference helper. More...
 
void SetNoiseFigure (double value)
 Set the noise figure. More...
 
void SetNumberOfReceiveAntennas (uint8_t rx)
 Set the number of RX antennas in the receiver corresponding to this interference helper. More...
 
void UpdateEvent (Ptr< Event > event, RxPowerWattPerChannelBand rxPower)
 Update event to scale its received power (W) per band. More...
 

Protected Member Functions

double CalculateChunkSuccessRate (double snir, Time duration, WifiMode mode, const WifiTxVector &txVector, WifiPpduField field) const
 Calculate the success rate of the chunk given the SINR, duration, and TXVECTOR. More...
 
double CalculatePayloadChunkSuccessRate (double snir, Time duration, const WifiTxVector &txVector, uint16_t staId=SU_STA_ID) const
 Calculate the success rate of the payload chunk given the SINR, duration, and TXVECTOR. More...
 
double CalculateSnr (double signal, double noiseInterference, uint16_t channelWidth, uint8_t nss) const
 Calculate SNR (linear ratio) from the given signal power and noise+interference power. More...
 

Private Types

typedef std::multimap< Time, NiChangeNiChanges
 typedef for a multimap of NiChange More...
 
typedef std::map< WifiSpectrumBand, NiChangesNiChangesPerBand
 Map of NiChanges per band. More...
 

Private Member Functions

NiChanges::iterator AddNiChangeEvent (Time moment, NiChange change, WifiSpectrumBand band)
 Add NiChange to the list at the appropriate position and return the iterator of the new event. More...
 
void AppendEvent (Ptr< Event > event, bool isStartOfdmaRxing)
 Append the given Event. More...
 
double CalculateNoiseInterferenceW (Ptr< Event > event, NiChangesPerBand *nis, WifiSpectrumBand band) const
 Calculate noise and interference power in W. More...
 
double CalculatePayloadPer (Ptr< const Event > event, uint16_t channelWidth, NiChangesPerBand *nis, WifiSpectrumBand band, uint16_t staId, std::pair< Time, Time > window) const
 Calculate the error rate of the given PHY payload only in the provided time window (thus enabling per MPDU PER information). More...
 
double CalculatePhyHeaderPer (Ptr< const Event > event, NiChangesPerBand *nis, uint16_t channelWidth, WifiSpectrumBand band, WifiPpduField header) const
 Calculate the error rate of the PHY header. More...
 
double CalculatePhyHeaderSectionPsr (Ptr< const Event > event, NiChangesPerBand *nis, uint16_t channelWidth, WifiSpectrumBand band, PhyEntity::PhyHeaderSections phyHeaderSections) const
 Calculate the success rate of the PHY header sections for the provided event. More...
 
NiChanges::iterator GetNextPosition (Time moment, WifiSpectrumBand band)
 Returns an iterator to the first NiChange that is later than moment. More...
 
NiChanges::iterator GetPreviousPosition (Time moment, WifiSpectrumBand band)
 Returns an iterator to the last NiChange that is before than moment. More...
 

Private Attributes

Ptr< ErrorRateModelm_errorRateModel
 error rate model More...
 
std::map< WifiSpectrumBand, double > m_firstPowerPerBand
 first power of each band in watts More...
 
NiChangesPerBand m_niChangesPerBand
 NI Changes for each band. More...
 
double m_noiseFigure
 noise figure (linear) More...
 
uint8_t m_numRxAntennas
 the number of RX antennas in the corresponding receiver More...
 
bool m_rxing
 flag whether it is in receiving state More...
 

Detailed Description

handles interference calculations

Definition at line 131 of file interference-helper.h.

Member Typedef Documentation

◆ NiChanges

typedef std::multimap<Time, NiChange> ns3::InterferenceHelper::NiChanges
private

typedef for a multimap of NiChange

Definition at line 352 of file interference-helper.h.

◆ NiChangesPerBand

Map of NiChanges per band.

Definition at line 357 of file interference-helper.h.

Constructor & Destructor Documentation

◆ InterferenceHelper()

ns3::InterferenceHelper::InterferenceHelper ( )

Definition at line 176 of file interference-helper.cc.

◆ ~InterferenceHelper()

ns3::InterferenceHelper::~InterferenceHelper ( )

Definition at line 183 of file interference-helper.cc.

References m_errorRateModel, and RemoveBands().

+ Here is the call graph for this function:

Member Function Documentation

◆ Add()

Ptr< Event > ns3::InterferenceHelper::Add ( Ptr< const WifiPpdu ppdu,
const WifiTxVector txVector,
Time  duration,
RxPowerWattPerChannelBand  rxPower,
bool  isStartOfdmaRxing = false 
)

Add the PPDU-related signal to interference helper.

Parameters
ppduthe PPDU
txVectorthe TXVECTOR
durationthe PPDU duration
rxPowerreceived power per band (W)
isStartOfdmaRxingflag whether the event corresponds to the start of the OFDMA payload reception (only used for UL-OFDMA) //TODO simplify this once WifiPpdu is subclassed by adding an attribute
Returns
Event

Definition at line 190 of file interference-helper.cc.

References AppendEvent().

Referenced by AddForeignSignal(), ns3::PhyEntity::CreateInterferenceEvent(), and ns3::SpectrumWifiPhy::StartRx().

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

◆ AddBand()

void ns3::InterferenceHelper::AddBand ( WifiSpectrumBand  band)

Add a frequency band.

Parameters
bandthe band to be created

Definition at line 223 of file interference-helper.cc.

References AddNiChangeEvent(), m_firstPowerPerBand, m_niChangesPerBand, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands(), and ns3::YansWifiPhy::YansWifiPhy().

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

◆ AddForeignSignal()

void ns3::InterferenceHelper::AddForeignSignal ( Time  duration,
RxPowerWattPerChannelBand  rxPower 
)

Add a non-Wifi signal to interference helper.

Parameters
durationthe duration of the signal
rxPowerreceived power per band (W)

Definition at line 198 of file interference-helper.cc.

References Add(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_QOSDATA.

Referenced by ns3::SpectrumWifiPhy::StartRx().

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

◆ AddNiChangeEvent()

InterferenceHelper::NiChanges::iterator ns3::InterferenceHelper::AddNiChangeEvent ( Time  moment,
NiChange  change,
WifiSpectrumBand  band 
)
private

Add NiChange to the list at the appropriate position and return the iterator of the new event.

Parameters
momenttime to check from
changethe NiChange to add
bandidentify the band to check
Returns
the iterator of the new event

Definition at line 630 of file interference-helper.cc.

References GetNextPosition(), m_niChangesPerBand, and NS_ASSERT.

Referenced by AddBand(), AppendEvent(), and EraseEvents().

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

◆ AppendEvent()

void ns3::InterferenceHelper::AppendEvent ( Ptr< Event event,
bool  isStartOfdmaRxing 
)
private

Append the given Event.

Parameters
eventthe event to be appended
isStartOfdmaRxingflag whether event corresponds to the start of the OFDMA payload reception (only used for UL-OFDMA)

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

References AddNiChangeEvent(), GetNextPosition(), GetPreviousPosition(), m_firstPowerPerBand, m_niChangesPerBand, m_rxing, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by Add().

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

◆ CalculateChunkSuccessRate()

double ns3::InterferenceHelper::CalculateChunkSuccessRate ( double  snir,
Time  duration,
WifiMode  mode,
const WifiTxVector txVector,
WifiPpduField  field 
) const
protected

Calculate the success rate of the chunk given the SINR, duration, and TXVECTOR.

The duration and TXVECTOR are used to calculate how many bits are present in the chunk.

Parameters
snirthe SINR
durationthe duration of the chunk
modethe WifiMode
txVectorthe TXVECTOR
fieldthe PPDU field to which the chunk belongs to
Returns
the success rate

Definition at line 390 of file interference-helper.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), ns3::Time::GetSeconds(), ns3::Time::IsZero(), m_errorRateModel, and m_numRxAntennas.

Referenced by CalculatePhyHeaderSectionPsr().

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

◆ CalculateNoiseInterferenceW()

double ns3::InterferenceHelper::CalculateNoiseInterferenceW ( Ptr< Event event,
NiChangesPerBand nis,
WifiSpectrumBand  band 
) const
private

Calculate noise and interference power in W.

Parameters
eventthe event
nisthe NiChanges
bandthe band
Returns
noise and interference power

Definition at line 361 of file interference-helper.cc.

References m_firstPowerPerBand, m_niChangesPerBand, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by CalculateSnr().

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

◆ CalculatePayloadChunkSuccessRate()

double ns3::InterferenceHelper::CalculatePayloadChunkSuccessRate ( double  snir,
Time  duration,
const WifiTxVector txVector,
uint16_t  staId = SU_STA_ID 
) const
protected

Calculate the success rate of the payload chunk given the SINR, duration, and TXVECTOR.

The duration and TXVECTOR are used to calculate how many bits are present in the payload chunk.

Parameters
snirthe SINR
durationthe duration of the chunk
txVectorthe TXVECTOR
staIdthe station ID of the PSDU (only used for MU)
Returns
the success rate

Definition at line 403 of file interference-helper.cc.

References ns3::WifiMode::GetDataRate(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetNss(), ns3::Time::GetSeconds(), ns3::Time::IsZero(), m_errorRateModel, m_numRxAntennas, and ns3::WIFI_PPDU_FIELD_DATA.

Referenced by CalculatePayloadPer(), and WifiErrorRateModelsTestCaseMimo::DoRun().

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

◆ CalculatePayloadPer()

double ns3::InterferenceHelper::CalculatePayloadPer ( Ptr< const Event event,
uint16_t  channelWidth,
NiChangesPerBand nis,
WifiSpectrumBand  band,
uint16_t  staId,
std::pair< Time, Time window 
) const
private

Calculate the error rate of the given PHY payload only in the provided time window (thus enabling per MPDU PER information).

The PHY payload can be divided into multiple chunks (e.g. due to interference from other transmissions).

Parameters
eventthe event
channelWidththe channel width used to transmit the PSDU (in MHz)
nisthe NiChanges
bandidentify the band used by the PSDU
staIdthe station ID of the PSDU (only used for MU)
windowtime window (pair of start and end times) of PHY payload to focus on
Returns
the error rate of the payload

Definition at line 418 of file interference-helper.cc.

References CalculatePayloadChunkSuccessRate(), ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration(), CalculateSnr(), m_firstPowerPerBand, ns3::Min(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WIFI_PPDU_TYPE_UL_MU, and visualizer.ipython_view::window.

+ Here is the call graph for this function:

◆ CalculatePayloadSnrPer()

struct PhyEntity::SnrPer ns3::InterferenceHelper::CalculatePayloadSnrPer ( Ptr< Event event,
uint16_t  channelWidth,
WifiSpectrumBand  band,
uint16_t  staId,
std::pair< Time, Time relativeMpduStartStop 
) const

Calculate the SNIR at the start of the payload and accumulate all SNIR changes in the SNIR vector for each MPDU of an A-MPDU.

This workaround is required in order to provide one PER per MPDU, for reception success/failure evaluation, while hiding aggregation details from this class.

Parameters
eventthe event corresponding to the first time the corresponding PPDU arrives
channelWidththe channel width used to transmit the PSDU (in MHz)
bandidentify the band used by the PSDU
staIdthe station ID of the PSDU (only used for MU)
relativeMpduStartStopthe time window (pair of start and end times) of PHY payload to focus on
Returns
struct of SNR and PER (with PER being evaluated over the provided time window)

Definition at line 547 of file interference-helper.cc.

References NS_LOG_FUNCTION, ns3::PhyEntity::SnrPer::per, and ns3::PhyEntity::SnrPer::snr.

Referenced by ns3::PhyEntity::GetReceptionStatus().

+ Here is the caller graph for this function:

◆ CalculatePhyHeaderPer()

double ns3::InterferenceHelper::CalculatePhyHeaderPer ( Ptr< const Event event,
NiChangesPerBand nis,
uint16_t  channelWidth,
WifiSpectrumBand  band,
WifiPpduField  header 
) const
private

Calculate the error rate of the PHY header.

The PHY header can be divided into multiple chunks (e.g. due to interference from other transmissions).

Parameters
eventthe event
nisthe NiChanges
channelWidththe channel width (in MHz) for header measurement
bandthe band
headerthe PHY header to consider
Returns
the error rate of the HT PHY header

Definition at line 521 of file interference-helper.cc.

References CalculatePhyHeaderSectionPsr(), ns3::WifiPhy::GetStaticPhyEntity(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CalculatePhyHeaderSectionPsr()

double ns3::InterferenceHelper::CalculatePhyHeaderSectionPsr ( Ptr< const Event event,
NiChangesPerBand nis,
uint16_t  channelWidth,
WifiSpectrumBand  band,
PhyEntity::PhyHeaderSections  phyHeaderSections 
) const
private

Calculate the success rate of the PHY header sections for the provided event.

Parameters
eventthe event
nisthe NiChanges
channelWidththe channel width (in MHz) for header measurement
bandthe band
phyHeaderSectionsthe map of PHY header sections (
See also
PhyEntity::PhyHeaderSections)
Returns
the success rate of the PHY header sections

Definition at line 468 of file interference-helper.cc.

References ns3::Time::As(), CalculateChunkSuccessRate(), CalculateSnr(), ns3::Time::IsStrictlyPositive(), m_firstPowerPerBand, ns3::Max(), ns3::Min(), ns3::Time::NS, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Seconds(), and visualizer.core::start().

Referenced by CalculatePhyHeaderPer().

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

◆ CalculatePhyHeaderSnrPer()

struct PhyEntity::SnrPer ns3::InterferenceHelper::CalculatePhyHeaderSnrPer ( Ptr< Event event,
uint16_t  channelWidth,
WifiSpectrumBand  band,
WifiPpduField  header 
) const

Calculate the SNIR at the start of the PHY header and accumulate all SNIR changes in the SNIR vector.

Parameters
eventthe event corresponding to the first time the corresponding PPDU arrives
channelWidththe channel width (in MHz) for header measurement
bandidentify the band used by the PSDU
headerthe PHY header to consider
Returns
struct of SNR and PER

Definition at line 579 of file interference-helper.cc.

References NS_LOG_FUNCTION, ns3::PhyEntity::SnrPer::per, and ns3::PhyEntity::SnrPer::snr.

Referenced by ns3::PhyEntity::GetPhyHeaderSnrPer().

+ Here is the caller graph for this function:

◆ CalculateSnr() [1/2]

double ns3::InterferenceHelper::CalculateSnr ( Ptr< Event event,
uint16_t  channelWidth,
uint8_t  nss,
WifiSpectrumBand  band 
) const

Calculate the SNIR for the event (starting from now until the event end).

Parameters
eventthe event corresponding to the first time the corresponding PPDU arrives
channelWidththe channel width (in MHz)
nssthe number of spatial streams
bandidentify the band used by the PSDU
Returns
the SNR for the PPDU in linear scale

Definition at line 567 of file interference-helper.cc.

References CalculateNoiseInterferenceW().

Referenced by CalculatePayloadPer(), CalculatePhyHeaderSectionPsr(), WifiErrorRateModelsTestCaseMimo::DoRun(), ns3::PhyEntity::EndOfMpdu(), ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::EndReceivePayload().

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

◆ CalculateSnr() [2/2]

double ns3::InterferenceHelper::CalculateSnr ( double  signal,
double  noiseInterference,
uint16_t  channelWidth,
uint8_t  nss 
) const
protected

Calculate SNR (linear ratio) from the given signal power and noise+interference power.

Parameters
signalsignal power, W
noiseInterferencenoise and interference power, W
channelWidthsignal width (MHz)
nssthe number of spatial streams
Returns
SNR in linear scale

Definition at line 335 of file interference-helper.cc.

References m_errorRateModel, m_noiseFigure, m_numRxAntennas, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::RatioToDb().

+ Here is the call graph for this function:

◆ EraseEvents()

void ns3::InterferenceHelper::EraseEvents ( void  )

Erase all events.

Definition at line 599 of file interference-helper.cc.

References AddNiChangeEvent(), m_firstPowerPerBand, m_niChangesPerBand, and m_rxing.

Referenced by ns3::WifiPhy::DoChannelSwitch().

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

◆ GetEnergyDuration()

Time ns3::InterferenceHelper::GetEnergyDuration ( double  energyW,
WifiSpectrumBand  band 
)
Parameters
energyWthe minimum energy (W) requested
bandidentify the requested band
Returns
the expected amount of time the observed energy on the medium for a given band will be higher than the requested threshold.

Definition at line 259 of file interference-helper.cc.

References GetPreviousPosition(), m_niChangesPerBand, ns3::MicroSeconds(), ns3::Simulator::Now(), and NS_ASSERT.

Referenced by OfdmaSpectrumWifiPhy::GetEnergyDuration(), ns3::WifiPhy::MaybeCcaBusyDuration(), ns3::WifiPhy::ResumeFromOff(), ns3::WifiPhy::ResumeFromSleep(), and ns3::WifiPhy::SwitchMaybeToCcaBusy().

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

◆ GetErrorRateModel()

Ptr< ErrorRateModel > ns3::InterferenceHelper::GetErrorRateModel ( void  ) const

Return the error rate model.

Returns
Error rate model

Definition at line 247 of file interference-helper.cc.

References m_errorRateModel.

Referenced by ns3::WifiPhy::AssignStreams(), and ns3::WifiPhy::CalculateSnr().

+ Here is the caller graph for this function:

◆ GetNextPosition()

InterferenceHelper::NiChanges::iterator ns3::InterferenceHelper::GetNextPosition ( Time  moment,
WifiSpectrumBand  band 
)
private

Returns an iterator to the first NiChange that is later than moment.

Parameters
momenttime to check from
bandidentify the band to check
Returns
an iterator to the list of NiChanges

Definition at line 612 of file interference-helper.cc.

References m_niChangesPerBand, and NS_ASSERT.

Referenced by AddNiChangeEvent(), AppendEvent(), and GetPreviousPosition().

+ Here is the caller graph for this function:

◆ GetPreviousPosition()

InterferenceHelper::NiChanges::iterator ns3::InterferenceHelper::GetPreviousPosition ( Time  moment,
WifiSpectrumBand  band 
)
private

Returns an iterator to the last NiChange that is before than moment.

Parameters
momenttime to check from
bandidentify the band to check
Returns
an iterator to the list of NiChanges

Definition at line 620 of file interference-helper.cc.

References GetNextPosition().

Referenced by AppendEvent(), GetEnergyDuration(), NotifyRxEnd(), and UpdateEvent().

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

◆ NotifyRxEnd()

void ns3::InterferenceHelper::NotifyRxEnd ( Time  endTime)

Notify that RX has ended.

Parameters
endTimethe end time of the signal

Definition at line 645 of file interference-helper.cc.

References GetPreviousPosition(), m_firstPowerPerBand, m_niChangesPerBand, m_rxing, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::WifiPhy::AbortCurrentReception(), ns3::PhyEntity::EndPreambleDetectionPeriod(), ns3::PhyEntity::NotifyInterferenceRxEndAndClear(), and ns3::WifiPhy::ResetReceive().

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

◆ NotifyRxStart()

void ns3::InterferenceHelper::NotifyRxStart ( void  )

Notify that RX has started.

Definition at line 638 of file interference-helper.cc.

References m_rxing, and NS_LOG_FUNCTION.

Referenced by ns3::PhyEntity::EndPreambleDetectionPeriod(), and ns3::PhyEntity::StartPreambleDetectionPeriod().

+ Here is the caller graph for this function:

◆ RemoveBands()

void ns3::InterferenceHelper::RemoveBands ( void  )

Remove the frequency bands.

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

References m_firstPowerPerBand, m_niChangesPerBand, and NS_LOG_FUNCTION.

Referenced by ns3::SpectrumWifiPhy::UpdateInterferenceHelperBands(), and ~InterferenceHelper().

+ Here is the caller graph for this function:

◆ SetErrorRateModel()

void ns3::InterferenceHelper::SetErrorRateModel ( const Ptr< ErrorRateModel rate)

Set the error rate model for this interference helper.

Parameters
rateError rate model

Definition at line 241 of file interference-helper.cc.

References m_errorRateModel.

Referenced by WifiErrorRateModelsTestCaseMimo::DoRun(), and ns3::WifiPhy::SetErrorRateModel().

+ Here is the caller graph for this function:

◆ SetNoiseFigure()

void ns3::InterferenceHelper::SetNoiseFigure ( double  value)

Set the noise figure.

Parameters
valuenoise figure in linear scale

Definition at line 235 of file interference-helper.cc.

References m_noiseFigure.

Referenced by WifiErrorRateModelsTestCaseMimo::DoRun(), and ns3::WifiPhy::SetRxNoiseFigure().

+ Here is the caller graph for this function:

◆ SetNumberOfReceiveAntennas()

void ns3::InterferenceHelper::SetNumberOfReceiveAntennas ( uint8_t  rx)

Set the number of RX antennas in the receiver corresponding to this interference helper.

Parameters
rxthe number of RX antennas

Definition at line 253 of file interference-helper.cc.

References m_numRxAntennas.

Referenced by WifiErrorRateModelsTestCaseMimo::DoRun(), ns3::WifiPhy::SetErrorRateModel(), ns3::WifiPhy::SetNumberOfAntennas(), and ns3::WifiPhy::SetRxNoiseFigure().

+ Here is the caller graph for this function:

◆ UpdateEvent()

void ns3::InterferenceHelper::UpdateEvent ( Ptr< Event event,
RxPowerWattPerChannelBand  rxPower 
)

Update event to scale its received power (W) per band.

Parameters
eventthe event to be updated
rxPowerthe received power (W) per band to be added to the current event

Definition at line 315 of file interference-helper.cc.

References GetPreviousPosition(), m_niChangesPerBand, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::PhyEntity::UpdateInterferenceEvent().

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

Member Data Documentation

◆ m_errorRateModel

Ptr<ErrorRateModel> ns3::InterferenceHelper::m_errorRateModel
private

◆ m_firstPowerPerBand

std::map<WifiSpectrumBand, double> ns3::InterferenceHelper::m_firstPowerPerBand
private

◆ m_niChangesPerBand

NiChangesPerBand ns3::InterferenceHelper::m_niChangesPerBand
private

◆ m_noiseFigure

double ns3::InterferenceHelper::m_noiseFigure
private

noise figure (linear)

Definition at line 423 of file interference-helper.h.

Referenced by CalculateSnr(), and SetNoiseFigure().

◆ m_numRxAntennas

uint8_t ns3::InterferenceHelper::m_numRxAntennas
private

the number of RX antennas in the corresponding receiver

Definition at line 425 of file interference-helper.h.

Referenced by CalculateChunkSuccessRate(), CalculatePayloadChunkSuccessRate(), CalculateSnr(), and SetNumberOfReceiveAntennas().

◆ m_rxing

bool ns3::InterferenceHelper::m_rxing
private

flag whether it is in receiving state

Definition at line 428 of file interference-helper.h.

Referenced by AppendEvent(), EraseEvents(), NotifyRxEnd(), and NotifyRxStart().


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