|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
25 #ifndef PROPAGATION_LOSS_MODEL_H
26 #define PROPAGATION_LOSS_MODEL_H
28 #include "ns3/object.h"
29 #include "ns3/random-variable-stream.h"
331 double DbmToW (
double dbm)
const;
451 double DbmToW (
double dbm)
const;
512 void SetReference (
double referenceDistance,
double referenceLoss);
a unique identifier for an interface.
double m_heightAboveZ
antenna height above the node's Z coordinate
double GetSystemLoss(void) const
double m_minDistance
minimum distance for the model
Nakagami-m fast fading propagation loss model.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
NakagamiPropagationLossModel & operator=(const NakagamiPropagationLossModel &)
Copy constructor.
double m_systemLoss
the system loss
Every class exported by the ns3 library is enclosed in the ns3 namespace.
LogDistancePropagationLossModel(const LogDistancePropagationLossModel &)
Copy constructor.
a Friis propagation loss model
FriisPropagationLossModel(const FriisPropagationLossModel &)
Copy constructor.
static TypeId GetTypeId(void)
Get the type ID.
double m_frequency
the carrier frequency
static Ptr< PropagationLossModel > CreateDefaultReference(void)
Creates a default reference loss model.
std::map< MobilityPair, double > m_loss
Propagation loss between pair of nodes.
double m_lambda
the carrier wavelength
virtual int64_t DoAssignStreams(int64_t stream)=0
Subclasses must implement this; those not using random variables can return zero.
std::pair< Ptr< MobilityModel >, Ptr< MobilityModel > > MobilityPair
Typedef: Mobility models pair.
static TypeId GetTypeId(void)
Get the type ID.
FriisPropagationLossModel & operator=(const FriisPropagationLossModel &)
Copy constructor.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
LogDistancePropagationLossModel()
The propagation loss follows a random distribution.
A log distance path loss propagation model with three distance fields.
double m_range
Maximum Transmission Range (meters)
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
double CalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account all the PropagationLossModel(s) chained to the current one.
Models the propagation loss through a transmission medium.
void SetSystemLoss(double systemLoss)
Ptr< PropagationLossModel > GetNext()
Gets the next PropagationLossModel in the chain of loss models that act on the signal.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
PropagationLossModel & operator=(const PropagationLossModel &)
Copy constructor.
static TypeId GetTypeId(void)
Get the type ID.
static TypeId GetTypeId(void)
Get the type ID.
virtual ~MatrixPropagationLossModel()
double GetMinLoss(void) const
double m_minLoss
the minimum loss
double m_distance2
Distance2.
The propagation loss depends only on the distance (range) between transmitter and receiver.
RandomPropagationLossModel()
void SetFrequency(double frequency)
double GetSystemLoss(void) const
Ptr< RandomVariableStream > m_variable
random generator
double m_m0
m for distances smaller than Distance1
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
double m_lambda
the carrier wavelength
void SetReference(double referenceDistance, double referenceLoss)
Set the reference path loss at a given distance.
double DbmFromW(double w) const
Transforms a Watt value to Dbm.
static TypeId GetTypeId(void)
Get the type ID.
double m_default
default loss
ThreeLogDistancePropagationLossModel(const ThreeLogDistancePropagationLossModel &)
Copy constructor.
double m_m1
m for distances smaller than Distance2
NakagamiPropagationLossModel(const NakagamiPropagationLossModel &)
Copy constructor.
double GetMinDistance(void) const
double GetFrequency(void) const
A base class which provides memory management and object aggregation.
void SetDefaultLoss(double defaultLoss)
Set the default propagation loss (in dB, positive) to be used, infinity if not set.
NakagamiPropagationLossModel()
FriisPropagationLossModel()
double m_exponent2
The exponent for the third field.
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
Ptr< PropagationLossModel > m_next
Next propagation loss model in the list.
void SetFrequency(double frequency)
static TypeId GetTypeId(void)
Get the type ID.
void SetNext(Ptr< PropagationLossModel > next)
Enables a chain of loss models to act on the signal.
PropagationLossModel(const PropagationLossModel &)
Copy constructor.
double m_m2
m for distances greater than Distance2
double DbmToW(double dbm) const
Transforms a Dbm value to Watt.
TwoRayGroundPropagationLossModel()
a Two-Ray Ground propagation loss model ported from NS2
ThreeLogDistancePropagationLossModel()
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
ThreeLogDistancePropagationLossModel & operator=(const ThreeLogDistancePropagationLossModel &)
Copy constructor.
RandomPropagationLossModel(const RandomPropagationLossModel &)
Copy constructor.
static TypeId GetTypeId(void)
Get the type ID.
void SetSystemLoss(double systemLoss)
double m_exponent1
The exponent for the second field.
double m_exponent
model exponent
MatrixPropagationLossModel(const MatrixPropagationLossModel &)
Copy constructor.
double m_referenceLoss
The reference loss at distance d0 (dB).
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
double GetPathLossExponent(void) const
double m_distance2
Beginning of the third (far) distance field.
double m_referenceLoss
reference loss
a log distance propagation model.
double m_systemLoss
the system loss
TwoRayGroundPropagationLossModel(const TwoRayGroundPropagationLossModel &)
Copy constructor.
LogDistancePropagationLossModel & operator=(const LogDistancePropagationLossModel &)
Copy constructor.
Ptr< ErlangRandomVariable > m_erlangRandomVariable
Erlang random variable.
MatrixPropagationLossModel()
RandomPropagationLossModel & operator=(const RandomPropagationLossModel &)
Copy constructor.
TwoRayGroundPropagationLossModel & operator=(const TwoRayGroundPropagationLossModel &)
Copy constructor.
double m_distance1
Beginning of the second (middle) distance field.
double m_frequency
the carrier frequency
virtual ~RandomPropagationLossModel()
double m_referenceDistance
reference distance
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Returns the Rx Power taking into account only the particular PropagationLossModel.
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
void SetHeightAboveZ(double heightAboveZ)
Ptr< GammaRandomVariable > m_gammaRandomVariable
Gamma random variable.
RangePropagationLossModel & operator=(const RangePropagationLossModel &)
Copy constructor.
void SetPathLossExponent(double n)
double m_exponent0
The exponent for the first field.
void SetMinDistance(double minDistance)
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
int64_t AssignStreams(int64_t stream)
If this loss model uses objects of type RandomVariableStream, set the stream numbers to the integers ...
double m_distance1
Distance1.
MatrixPropagationLossModel & operator=(const MatrixPropagationLossModel &)
Copy constructor.
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
double m_distance0
Beginning of the first (near) distance field.
double DbmFromW(double w) const
Transforms a Watt value to Dbm.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
void SetMinLoss(double minLoss)
The propagation loss is fixed for each pair of nodes and doesn't depend on their actual positions.
static TypeId GetTypeId(void)
Get the type ID.
void SetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, double loss, bool symmetric=true)
Set loss (in dB, positive) between pair of ns-3 objects (typically, nodes).
static TypeId GetTypeId(void)
Get the type ID.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
RangePropagationLossModel()
double GetFrequency(void) const
double DbmToW(double dbm) const
Transforms a Dbm value to Watt.
virtual ~PropagationLossModel()
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero.
RangePropagationLossModel(const RangePropagationLossModel &)
Copy constructor.