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

#include <DipoleAntenna.h>

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

Public Member Functions

 DipoleAntenna ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual m getLength () const
 
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

m length
 
- 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::DipoleAntenna::DipoleAntenna ( )
26  :
27  AntennaBase(),
28  length(NaN)
29 {
30 }
AntennaBase()
Definition: AntennaBase.cc:25
m length
Definition: DipoleAntenna.h:30
#define NaN
Definition: INETMath.h:103

Member Function Documentation

double inet::physicallayer::DipoleAntenna::computeGain ( const EulerAngles  direction) const
overridevirtual

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 {
41  double q = sin(direction.beta - M_PI_2);
42  return 1.5 * q * q;
43 }
#define M_PI_2
Definition: INETMath.h:68
Value sin(const value< Value, Unit > &angle)
Definition: Units.h:1195
virtual m inet::physicallayer::DipoleAntenna::getLength ( ) const
inlinevirtual
39 { return length; }
m length
Definition: DipoleAntenna.h:30
virtual double inet::physicallayer::DipoleAntenna::getMaxGain ( ) const
inlineoverridevirtual

Returns the maximum possible antenna gain independent of any direction.

Implements inet::physicallayer::IAntenna.

40 { return 1.5; }
void inet::physicallayer::DipoleAntenna::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::physicallayer::AntennaBase.

33 {
35  if (stage == INITSTAGE_LOCAL)
36  length = m(par("length"));
37 }
m length
Definition: DipoleAntenna.h:30
Local initializations.
Definition: InitStages.h:35
virtual void initialize(int stage) override
Definition: AntennaBase.cc:31
value< double, units::m > m
Definition: Units.h:1047
std::ostream & inet::physicallayer::DipoleAntenna::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.

46 {
47  stream << "DipoleAntenna";
48  if (level <= PRINT_LEVEL_DETAIL)
49  stream << ", length = " << length;
50  return AntennaBase::printToStream(stream, level);
51 }
m length
Definition: DipoleAntenna.h:30
virtual std::ostream & printToStream(std::ostream &stream, int level) const override
Prints this object to the provided output stream.
Definition: AntennaBase.cc:39

Member Data Documentation

m inet::physicallayer::DipoleAntenna::length
protected

Referenced by initialize(), and printToStream().


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