INET Framework for OMNeT++/OMNEST
inet::physicallayer::ConstantGainAntenna Class Reference

#include <ConstantGainAntenna.h>

Inheritance diagram for inet::physicallayer::ConstantGainAntenna:
inet::physicallayer::AntennaBase inet::physicallayer::IAntenna inet::physicallayer::IPrintableObject

Public Member Functions

 ConstantGainAntenna ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual double getMaxGain () const override
 Returns the maximum possible antenna gain independent of any direction. More...
 
virtual double computeGain (const EulerAngles direction) const override
 Returns the antenna gain in the provided direction. More...
 
- Public Member Functions inherited from inet::physicallayer::AntennaBase
 AntennaBase ()
 
virtual IMobilitygetMobility () const override
 Returns the mobility of this antenna that describes its position and orientation over time. More...
 
virtual int getNumAntennas () const override
 Returns the number of antennas in the array. More...
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

virtual void initialize (int stage) override
 

Protected Attributes

double gain
 
- Protected Attributes inherited from inet::physicallayer::AntennaBase
IMobilitymobility
 
int numAntennas
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Constructor & Destructor Documentation

inet::physicallayer::ConstantGainAntenna::ConstantGainAntenna ( )
26  :
27  AntennaBase(),
28  gain(NaN)
29 {
30 }
AntennaBase()
Definition: AntennaBase.cc:25
#define NaN
Definition: INETMath.h:103
double gain
Definition: ConstantGainAntenna.h:30

Member Function Documentation

virtual double inet::physicallayer::ConstantGainAntenna::computeGain ( const EulerAngles  direction) const
inlineoverridevirtual

Returns the antenna gain in the provided direction.

The direction is relative to the antenna geometry, so the result depends only on the antenna characteristics. For transmissions, it determines how well the antenna converts input power into radio waves headed in the specified direction. For receptions, it determines how well the antenna converts radio waves arriving from the the specified direction.

Implements inet::physicallayer::IAntenna.

40 { return gain; }
double gain
Definition: ConstantGainAntenna.h:30
virtual double inet::physicallayer::ConstantGainAntenna::getMaxGain ( ) const
inlineoverridevirtual

Returns the maximum possible antenna gain independent of any direction.

Implements inet::physicallayer::IAntenna.

39 { return gain; }
double gain
Definition: ConstantGainAntenna.h:30
void inet::physicallayer::ConstantGainAntenna::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::AntennaBase.

33 {
35  if (stage == INITSTAGE_LOCAL)
36  gain = math::dB2fraction(par("gain"));
37 }
double dB2fraction(double dB)
Converts a dB value to fraction.
Definition: INETMath.h:166
Local initializations.
Definition: InitStages.h:35
double gain
Definition: ConstantGainAntenna.h:30
virtual void initialize(int stage) override
Definition: AntennaBase.cc:31
std::ostream & inet::physicallayer::ConstantGainAntenna::printToStream ( std::ostream &  stream,
int  level 
) const
overridevirtual

Prints this object to the provided output stream.

Function calls to operator<< with pointers or references either const or not are all forwarded to this function.

Reimplemented from inet::physicallayer::AntennaBase.

40 {
41  stream << "ConstantGainAntenna";
42  if (level <= PRINT_LEVEL_DETAIL)
43  stream << ", gain = " << gain;
44  return AntennaBase::printToStream(stream, level);
45 }
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: AntennaBase.cc:39
double gain
Definition: ConstantGainAntenna.h:30

Member Data Documentation

double inet::physicallayer::ConstantGainAntenna::gain
protected

Referenced by initialize(), and printToStream().


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