INET Framework for OMNeT++/OMNEST
inet::physicallayer::PathLossBase Class Referenceabstract

#include <PathLossBase.h>

Inheritance diagram for inet::physicallayer::PathLossBase:
inet::physicallayer::IPathLoss inet::IPrintableObject inet::physicallayer::BreakpointPathLoss inet::physicallayer::FreeSpacePathLoss inet::physicallayer::SuiPathLoss inet::physicallayer::UwbIrStochasticPathLoss inet::physicallayer::LogNormalShadowing inet::physicallayer::NakagamiFading inet::physicallayer::RayleighFading inet::physicallayer::RicianFading inet::physicallayer::TwoRayGroundReflection

Public Member Functions

virtual double computePathLoss (mps propagationSpeed, Hz frequency, m distance) const override=0
 Returns the loss factor as a function of propagation speed, carrier frequency and distance. More...
 
virtual double computePathLoss (const ITransmission *transmission, const IArrival *arrival) const override
 Returns the loss factor for the provided transmission and arrival. More...
 
- Public Member Functions inherited from inet::physicallayer::IPathLoss
virtual m computeRange (mps propagationSpeed, Hz frequency, double loss) const =0
 Returns the range for the given loss factor. More...
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const
 Prints this object to the provided output stream. More...
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Member Function Documentation

◆ computePathLoss() [1/2]

double inet::physicallayer::PathLossBase::computePathLoss ( const ITransmission transmission,
const IArrival arrival 
) const
overridevirtual

Returns the loss factor for the provided transmission and arrival.

The value is in the range [0, 1] where 1 means no loss at all and 0 means all power is lost.

Implements inet::physicallayer::IPathLoss.

Reimplemented in inet::physicallayer::TwoRayGroundReflection.

18 {
19  auto radioMedium = transmission->getMedium();
20  auto narrowbandSignalAnalogModel = check_and_cast<const INarrowbandSignal *>(transmission->getAnalogModel());
21  mps propagationSpeed = radioMedium->getPropagation()->getPropagationSpeed();
22  Hz centerFrequency = Hz(narrowbandSignalAnalogModel->getCenterFrequency());
23  m distance = m(arrival->getStartPosition().distance(transmission->getStartPosition()));
24  return computePathLoss(propagationSpeed, centerFrequency, distance);
25 }

◆ computePathLoss() [2/2]

virtual double inet::physicallayer::PathLossBase::computePathLoss ( mps  propagationSpeed,
Hz  frequency,
m  distance 
) const
overridepure virtual

Returns the loss factor as a function of propagation speed, carrier frequency and distance.

The value is in the range [0, 1] where 1 means no loss at all and 0 means all power is lost.

Implements inet::physicallayer::IPathLoss.

Implemented in inet::physicallayer::UwbIrStochasticPathLoss, inet::physicallayer::SuiPathLoss, inet::physicallayer::FreeSpacePathLoss, inet::physicallayer::RicianFading, inet::physicallayer::NakagamiFading, inet::physicallayer::RayleighFading, inet::physicallayer::LogNormalShadowing, and inet::physicallayer::BreakpointPathLoss.

Referenced by computePathLoss().


The documentation for this class was generated from the following files:
inet::units::units::Hz
pow< s, -1 > Hz
Definition: Units.h:935
inet::units::units::mps
compose< m, pow< s, -1 > > mps
Definition: Units.h:1151
inet::physicallayer::PathLossBase::computePathLoss
virtual double computePathLoss(mps propagationSpeed, Hz frequency, m distance) const override=0
Returns the loss factor as a function of propagation speed, carrier frequency and distance.
inet::units::values::m
value< double, units::m > m
Definition: Units.h:1233