Protected Member Functions

ConnectionManager Class Reference
[connectionManager - channel and connection related classes]

BaseConnectionManager implementation which only defines a specific max interference distance. More...

#include <ConnectionManager.h>

Inherits BaseConnectionManager.

Inherited by UnitDisk.

Collaboration diagram for ConnectionManager:
Collaboration graph
[legend]

List of all members.

Protected Member Functions

virtual double calcInterfDist ()
 Calculate interference distance.

Detailed Description

BaseConnectionManager implementation which only defines a specific max interference distance.

Calculates the maximum interference distance based on the transmitter power, wavelength, pathloss coefficient and a threshold for the minimal receive Power.

Definition at line 19 of file ConnectionManager.h.


Member Function Documentation

double ConnectionManager::calcInterfDist (  )  [protected, virtual]

Calculate interference distance.

Calculation of the interference distance based on the transmitter power, wavelength, pathloss coefficient and a threshold for the minimal receive Power

You may want to overwrite this function in order to do your own interference calculation

Implements BaseConnectionManager.

Reimplemented in UnitDisk.

Definition at line 13 of file ConnectionManager.cc.

References M_PI, and BaseWorldUtility::speedOfLight.

{
  double interfDistance;

  //the minimum carrier frequency for this cell
  double carrierFrequency = par("carrierFrequency").doubleValue();
  //maximum transmission power possible
  double pMax             = par("pMax").doubleValue();
  if (pMax <=0) {
    error("Max transmission power is <=0!");
  }
  //minimum signal attenuation threshold
  double sat              = par("sat").doubleValue();
  //minimum path loss coefficient
  double alpha            = par("alpha").doubleValue();

  double waveLength     = (BaseWorldUtility::speedOfLight/carrierFrequency);
  //minimum power level to be able to physically receive a signal
  double minReceivePower = pow(10.0, sat/10.0);

  interfDistance = pow(waveLength * waveLength * pMax
                 / (16.0*M_PI*M_PI*minReceivePower),
               1.0 / alpha);

  ccEV << "max interference distance:" << interfDistance << endl;

  return interfDistance;
}


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