A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::InterferenceHelper Class Reference

handles interference calculations More...

#include <interference-helper.h>

+ Collaboration diagram for ns3::InterferenceHelper:

Classes

class  Event
class  NiChange
struct  SnrPer

Public Member Functions

 InterferenceHelper ()
 ~InterferenceHelper ()
Ptr< InterferenceHelper::EventAdd (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble, Time duration, double rxPower)
struct InterferenceHelper::SnrPer CalculateSnrPer (Ptr< InterferenceHelper::Event > event)
void EraseEvents (void)
Time GetEnergyDuration (double energyW)
Ptr< ErrorRateModelGetErrorRateModel (void) const
double GetNoiseFigure (void) const
void NotifyRxEnd ()
void NotifyRxStart ()
void SetErrorRateModel (Ptr< ErrorRateModel > rate)
void SetNoiseFigure (double value)

Private Types

typedef std::list< Ptr< Event > > Events
typedef std::vector< NiChangeNiChanges

Private Member Functions

 InterferenceHelper (const InterferenceHelper &o)
void AddNiChangeEvent (NiChange change)
void AppendEvent (Ptr< Event > event)
double CalculateChunkSuccessRate (double snir, Time delay, WifiMode mode) const
double CalculateNoiseInterferenceW (Ptr< Event > event, NiChanges *ni) const
double CalculatePer (Ptr< const Event > event, NiChanges *ni) const
double CalculateSnr (double signal, double noiseInterference, WifiMode mode) const
NiChanges::iterator GetPosition (Time moment)
 Returns an iterator to the first nichange, which is later than moment.
InterferenceHelperoperator= (const InterferenceHelper &o)

Private Attributes

Ptr< ErrorRateModelm_errorRateModel
double m_firstPower
NiChanges m_niChanges
 Experimental: needed for energy duration calculation.
double m_noiseFigure
bool m_rxing

Detailed Description

handles interference calculations

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

Member Typedef Documentation

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

typedef std::vector<NiChange> ns3::InterferenceHelper::NiChanges
private

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

Constructor & Destructor Documentation

ns3::InterferenceHelper::InterferenceHelper ( )

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

ns3::InterferenceHelper::~InterferenceHelper ( )

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

References EraseEvents(), and m_errorRateModel.

+ Here is the call graph for this function:

ns3::InterferenceHelper::InterferenceHelper ( const InterferenceHelper o)
private

Member Function Documentation

Ptr< InterferenceHelper::Event > ns3::InterferenceHelper::Add ( uint32_t  size,
WifiMode  payloadMode,
enum WifiPreamble  preamble,
Time  duration,
double  rxPower 
)

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

References AppendEvent().

Referenced by ns3::YansWifiPhy::StartReceivePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::InterferenceHelper::AddNiChangeEvent ( NiChange  change)
private

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

References GetPosition(), ns3::InterferenceHelper::NiChange::GetTime(), and m_niChanges.

Referenced by AppendEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References AddNiChangeEvent(), GetPosition(), m_firstPower, m_niChanges, m_rxing, and ns3::Now().

Referenced by Add().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::InterferenceHelper::CalculateChunkSuccessRate ( double  snir,
Time  delay,
WifiMode  mode 
) const
private

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

References ns3::ErrorRateModel::GetChunkSuccessRate(), ns3::WifiMode::GetPhyRate(), ns3::Time::GetSeconds(), m_errorRateModel, and ns3::NanoSeconds().

Referenced by CalculatePer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::InterferenceHelper::CalculateNoiseInterferenceW ( Ptr< Event event,
NiChanges ni 
) const
private

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

References m_firstPower, m_niChanges, m_rxing, and NS_ASSERT.

Referenced by CalculateSnrPer().

+ Here is the caller graph for this function:

double ns3::InterferenceHelper::CalculatePer ( Ptr< const Event event,
NiChanges ni 
) const
private
double ns3::InterferenceHelper::CalculateSnr ( double  signal,
double  noiseInterference,
WifiMode  mode 
) const
private

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

References ns3::WifiMode::GetBandwidth(), and m_noiseFigure.

Referenced by CalculatePer(), and CalculateSnrPer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct InterferenceHelper::SnrPer ns3::InterferenceHelper::CalculateSnrPer ( Ptr< InterferenceHelper::Event event)
read

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

References CalculateNoiseInterferenceW(), CalculatePer(), CalculateSnr(), ns3::InterferenceHelper::SnrPer::per, and ns3::InterferenceHelper::SnrPer::snr.

Referenced by ns3::YansWifiPhy::EndReceive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::InterferenceHelper::EraseEvents ( void  )

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

References m_firstPower, m_niChanges, and m_rxing.

Referenced by ns3::YansWifiPhy::SetChannelNumber(), and ~InterferenceHelper().

+ Here is the caller graph for this function:

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

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

References m_firstPower, m_niChanges, ns3::MicroSeconds(), and ns3::Now().

Referenced by ns3::YansWifiPhy::StartReceivePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

References m_errorRateModel.

Referenced by ns3::YansWifiPhy::CalculateSnr(), and ns3::YansWifiPhy::GetErrorRateModel().

+ Here is the caller graph for this function:

double ns3::InterferenceHelper::GetNoiseFigure ( void  ) const

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

References m_noiseFigure.

Referenced by ns3::YansWifiPhy::GetRxNoiseFigure().

+ Here is the caller graph for this function:

InterferenceHelper::NiChanges::iterator ns3::InterferenceHelper::GetPosition ( Time  moment)
private

Returns an iterator to the first nichange, which is later than moment.

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

References m_niChanges.

Referenced by AddNiChangeEvent(), and AppendEvent().

+ Here is the caller graph for this function:

void ns3::InterferenceHelper::NotifyRxEnd ( )

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

References m_rxing.

Referenced by ns3::YansWifiPhy::EndReceive(), and ns3::YansWifiPhy::SendPacket().

+ Here is the caller graph for this function:

void ns3::InterferenceHelper::NotifyRxStart ( void  )

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

References m_rxing.

Referenced by ns3::YansWifiPhy::StartReceivePacket().

+ Here is the caller graph for this function:

InterferenceHelper& ns3::InterferenceHelper::operator= ( const InterferenceHelper o)
private
void ns3::InterferenceHelper::SetErrorRateModel ( Ptr< ErrorRateModel rate)

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

References m_errorRateModel.

Referenced by ns3::YansWifiPhy::SetErrorRateModel().

+ Here is the caller graph for this function:

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

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

References m_noiseFigure.

Referenced by ns3::YansWifiPhy::SetRxNoiseFigure().

+ Here is the caller graph for this function:

Member Data Documentation

Ptr<ErrorRateModel> ns3::InterferenceHelper::m_errorRateModel
private
double ns3::InterferenceHelper::m_firstPower
private
NiChanges ns3::InterferenceHelper::m_niChanges
private

Experimental: needed for energy duration calculation.

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

Referenced by AddNiChangeEvent(), AppendEvent(), CalculateNoiseInterferenceW(), EraseEvents(), GetEnergyDuration(), and GetPosition().

double ns3::InterferenceHelper::m_noiseFigure
private

noise figure (linear)

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

Referenced by CalculateSnr(), GetNoiseFigure(), and SetNoiseFigure().

bool ns3::InterferenceHelper::m_rxing
private

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