5G-LENA nr-v4.1
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::BeamId Class Reference

Representation of a beam id. More...

#include "beam-id.h"

Public Member Functions

 BeamId ()
 Default constructor which created beamId with 0 sector and 0 elevation.
 
 BeamId (uint16_t sector, double elevation)
 
uint32_t GetCantor () const
 
double GetElevation () const
 Extract the elevation from the beam id.
 
uint16_t GetSector () const
 Extract the sector from the beam id.
 
bool operator!= (const BeamId &p) const
 Overrides != operator for the general use case.
 
bool operator== (const BeamId &p) const
 Objects of this class are used as key in hash table. This class must implement operator ==() to handle collisions.
 

Static Public Member Functions

static BeamId GetEmptyBeamId ()
 

Detailed Description

Representation of a beam id.

A beam id in ns-3 is a pair that contains the sector, stored as a uint16_t, and the elevation, stored as a double. Utilities functions are provided to extract the values. This ID usually comes with the real physical representation of a Beam, expressed by BeamformingVector.

See also
GetSector
GetElevation

Definition at line 25 of file beam-id.h.

Constructor & Destructor Documentation

◆ BeamId() [1/2]

ns3::BeamId::BeamId ( )

Default constructor which created beamId with 0 sector and 0 elevation.

Definition at line 20 of file beam-id.cc.

◆ BeamId() [2/2]

ns3::BeamId::BeamId ( uint16_t  sector,
double  elevation 
)

@constructor Constructor used to configure both sector and elevation.

Parameters
sectorspecies the sector of the beam
elevationspecifies the elevation of the beam

Definition at line 24 of file beam-id.cc.

Member Function Documentation

◆ GetCantor()

uint32_t ns3::BeamId::GetCantor ( ) const
Returns
Returns the Cantor function value of this BeamId

Definition at line 75 of file beam-id.cc.

Referenced by ns3::BeamIdHash::operator()().

+ Here is the caller graph for this function:

◆ GetElevation()

double ns3::BeamId::GetElevation ( ) const

Extract the elevation from the beam id.

Returns
the elevation of the beam

Definition at line 49 of file beam-id.cc.

Referenced by operator!=(), and operator==().

+ Here is the caller graph for this function:

◆ GetEmptyBeamId()

BeamId ns3::BeamId::GetEmptyBeamId ( )
static

Definition at line 55 of file beam-id.cc.

◆ GetSector()

uint16_t ns3::BeamId::GetSector ( ) const

Extract the sector from the beam id.

Returns
The sector of the beam

Definition at line 43 of file beam-id.cc.

Referenced by operator!=(), and operator==().

+ Here is the caller graph for this function:

◆ operator!=()

bool ns3::BeamId::operator!= ( const BeamId p) const

Overrides != operator for the general use case.

Parameters
pBeamId with which we compare this object

Definition at line 37 of file beam-id.cc.

References GetElevation(), and GetSector().

+ Here is the call graph for this function:

◆ operator==()

bool ns3::BeamId::operator== ( const BeamId p) const

Objects of this class are used as key in hash table. This class must implement operator ==() to handle collisions.

Parameters
pBeamId with which we compare this object

Definition at line 31 of file beam-id.cc.

References GetElevation(), and GetSector().

+ Here is the call graph for this function:

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