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