A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::SpectrumModel Class Reference

Set of frequency values implementing the domain of the functions in the Function Space defined by SpectrumValue. More...

#include <spectrum-model.h>

+ Inheritance diagram for ns3::SpectrumModel:
+ Collaboration diagram for ns3::SpectrumModel:

Public Member Functions

 SpectrumModel (std::vector< double > centerFreqs)
 This constructs a SpectrumModel based on a given set of frequencies, which is assumed to be sorted by increasing frequency. More...
 
 SpectrumModel (Bands bands)
 This construct a SpectrumModel based on the explicit values of center frequencies and boundaries of each subband. More...
 
Bands::const_iterator Begin () const
 
Bands::const_iterator End () const
 
size_t GetNumBands () const
 
SpectrumModelUid_t GetUid () const
 
- Public Member Functions inherited from ns3::SimpleRefCount< SpectrumModel >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Attributes

Bands m_bands
 actual definition of frequency bands within this SpectrumModel More...
 
SpectrumModelUid_t m_uid
 unique id for a given set of frequencies More...
 

Static Private Attributes

static SpectrumModelUid_t m_uidCount = 0
 counter to assign m_uids More...
 

Friends

bool operator== (const SpectrumModel &lhs, const SpectrumModel &rhs)
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< SpectrumModel >
static void Cleanup (void)
 Noop. More...
 

Detailed Description

Set of frequency values implementing the domain of the functions in the Function Space defined by SpectrumValue.

Frequency values are in Hz. It is intended that frequency values are non-negative, though this is not enforced.

Definition at line 63 of file spectrum-model.h.

Constructor & Destructor Documentation

ns3::SpectrumModel::SpectrumModel ( std::vector< double >  centerFreqs)

This constructs a SpectrumModel based on a given set of frequencies, which is assumed to be sorted by increasing frequency.

The lower (resp. upper) frequency band limit is determined as the mean value between the center frequency of the considered band and the center frequency of the adjacent lower (resp. upper) band.

Parameters
centerFreqsthe vector of center frequencies.
Returns

Definition at line 44 of file spectrum-model.cc.

References ns3::BandInfo::fc, ns3::BandInfo::fh, ns3::BandInfo::fl, m_bands, m_uid, m_uidCount, and NS_ASSERT.

ns3::SpectrumModel::SpectrumModel ( Bands  bands)

This construct a SpectrumModel based on the explicit values of center frequencies and boundaries of each subband.

Parameters
bands
Returns

Definition at line 76 of file spectrum-model.cc.

References m_bands, m_uid, m_uidCount, and NS_LOG_INFO.

Member Function Documentation

Bands::const_iterator ns3::SpectrumModel::Begin ( void  ) const

Definition at line 84 of file spectrum-model.cc.

References m_bands.

Bands::const_iterator ns3::SpectrumModel::End ( void  ) const

Definition at line 90 of file spectrum-model.cc.

References m_bands.

size_t ns3::SpectrumModel::GetNumBands ( ) const
Returns
the number of frequencies in this SpectrumModel

Definition at line 96 of file spectrum-model.cc.

References m_bands.

SpectrumModelUid_t ns3::SpectrumModel::GetUid ( void  ) const
Returns
the unique id of this SpectrumModel

Definition at line 102 of file spectrum-model.cc.

References m_uid.

Friends And Related Function Documentation

bool operator== ( const SpectrumModel lhs,
const SpectrumModel rhs 
)
friend

Definition at line 37 of file spectrum-model.cc.

Member Data Documentation

Bands ns3::SpectrumModel::m_bands
private

actual definition of frequency bands within this SpectrumModel

Definition at line 110 of file spectrum-model.h.

Referenced by Begin(), End(), GetNumBands(), and SpectrumModel().

SpectrumModelUid_t ns3::SpectrumModel::m_uid
private

unique id for a given set of frequencies

Definition at line 112 of file spectrum-model.h.

Referenced by GetUid(), ns3::operator==(), and SpectrumModel().

SpectrumModelUid_t ns3::SpectrumModel::m_uidCount = 0
staticprivate

counter to assign m_uids

Definition at line 113 of file spectrum-model.h.

Referenced by SpectrumModel().


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