20 #include <ns3/isotropic-antenna-model.h>    22 #include <ns3/double.h>    23 #include <ns3/uinteger.h>    24 #include <ns3/boolean.h>    25 #include <ns3/pointer.h>    36   size_t N = cv.size ();
    47   for (std::size_t i = 0; i < N - 1; ++i)
    51   os << cv[N - 1] << 
"]";
    56   : m_isBfVectorValid {
false}
    71     .SetGroupName (
"Antenna")
    72     .AddAttribute (
"AntennaElement",
    73                    "A pointer to the antenna element used by the phased array",
    76                    MakePointerChecker<AntennaModel> ())
   107   for (uint64_t i = 0; i < vector.size (); i++)
   112   return std::sqrt (
norm);
   125   for (uint64_t i = 0; i < beamformingVector.size (); i++)
   127       beamformingVector[i] = std::conj (beamformingVector[i]) / 
norm;
   130   return beamformingVector;
   146       steeringVector[i] = std::polar<double> (1.0, phase);
   148   return steeringVector;
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetAntennaElement(Ptr< AntennaModel > antennaElement)
Sets the antenna model to be used. 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
static TypeId GetTypeId(void)
bool m_isBfVectorValid
ensures the validity of the beamforming vector 
ComplexVector m_beamformingVector
the beamforming vector in use 
virtual uint64_t GetNumberOfElements(void) const =0
Returns the number of antenna elements. 
Class holding the azimuth and inclination angles of spherical coordinates. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
Ptr< AntennaModel > m_antennaElement
the model of the antenna element in use 
ComplexVector GetBeamformingVector(void) const
Returns the beamforming vector that is currently being used. 
std::ostream & operator<<(std::ostream &os, const Angles &a)
ComplexVector GetSteeringVector(Angles a) const
Returns the steering vector that points toward the specified position. 
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
 Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
double GetAzimuth(void) const
Getter for azimuth angle. 
virtual Vector GetElementLocation(uint64_t index) const =0
Returns the location of the antenna element with the specified index, normalized with respect to the ...
virtual ~PhasedArrayModel(void)
Destructor. 
void SetBeamformingVector(const ComplexVector &beamformingVector)
Sets the beamforming vector to be used. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
Hold objects of type Ptr<T>. 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
PhasedArrayModel(void)
Constructor. 
std::vector< std::complex< double > > ComplexVector
type definition for complex vectors 
const double norm
Normalization to obtain randoms on [0,1). 
double GetInclination(void) const
Getter for inclination angle. 
Ptr< const AntennaModel > GetAntennaElement(void) const
Returns a pointer to the AntennaModel instance used to model the elements of the array. 
A base class which provides memory management and object aggregation. 
a unique identifier for an interface. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
static double ComputeNorm(const ComplexVector &vector)
Utility method to compute the euclidean norm of a ComplexVector.