A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::UanPdp Class Reference

The power delay profile returned by propagation models. More...

#include "uan-prop-model.h"

+ Collaboration diagram for ns3::UanPdp:

Public Types

typedef std::vector< Tap >::const_iterator Iterator
 Convenience iterator typedef.
 

Public Member Functions

 UanPdp ()
 Create empty PDP object.
 
 UanPdp (std::vector< double > arrivals, Time resolution)
 Create PDP object from real valued arrival amplitudes.
 
 UanPdp (std::vector< std::complex< double > > arrivals, Time resolution)
 Create PDP object from vector of arrival amplitudes.
 
 UanPdp (std::vector< Tap > taps, Time resolution)
 Create PDP object from a vector of Tap objects.
 
 ~UanPdp ()
 Dummy destructor, see DoDispose.
 
Iterator GetBegin () const
 Get the beginning of the tap vector.
 
Iterator GetEnd () const
 Get the end of the tap list (one beyond the last entry).
 
uint32_t GetNTaps () const
 Get the number of taps.
 
Time GetResolution () const
 Get the delay time resolution (time duration between arrivals).
 
const TapGetTap (uint32_t i) const
 Get the Tap at the specified delay index.
 
UanPdp NormalizeToSumNc () const
 Creates a new UanPdp normalized to its non coherent sum.
 
void SetNTaps (uint32_t nTaps)
 Resize the tap vector.
 
void SetResolution (Time resolution)
 Set the time duration (resolution) between arrivals.
 
void SetTap (std::complex< double > arrival, uint32_t index)
 Set the arrival value for a tap.
 
std::complex< doubleSumTapsC (Time begin, Time end) const
 Compute the coherent sum of tap amplitudes between a start and end time.
 
std::complex< doubleSumTapsFromMaxC (Time delay, Time duration) const
 Compute the coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total duration.
 
double SumTapsFromMaxNc (Time delay, Time duration) const
 Compute the non-coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total time duration.
 
double SumTapsNc (Time begin, Time end) const
 Compute the non-coherent sum of tap amplitudes between a start and end time.
 

Static Public Member Functions

static UanPdp CreateImpulsePdp ()
 Get a unit impulse PDP at time 0.
 

Private Attributes

Time m_resolution
 The time resolution.
 
std::vector< Tapm_taps
 The vector of Taps.
 

Friends

std::ostream & operator<< (std::ostream &os, const UanPdp &pdp)
 Writes PDP to stream as list of arrivals.
 
std::istream & operator>> (std::istream &is, UanPdp &pdp)
 Reads in list of arrivals from stream is.
 

Detailed Description

The power delay profile returned by propagation models.

Container class to describe power delay profile returned from UAN propagation models using tapped delay line model. This should model a channel impulse response as a set of equally spaced signal arrivals.

Generally, the profile should be normalized, such that the sum of all taps should equal 1. The received signal power on any interval (t1, t2) can then be found from summing the taps on the interval and multiplying by the total received power at the receiver.

Definition at line 78 of file uan-prop-model.h.

Member Typedef Documentation

◆ Iterator

typedef std::vector<Tap>::const_iterator ns3::UanPdp::Iterator

Convenience iterator typedef.

Definition at line 84 of file uan-prop-model.h.

Constructor & Destructor Documentation

◆ UanPdp() [1/4]

ns3::UanPdp::UanPdp ( )

Create empty PDP object.

Definition at line 93 of file uan-prop-model.cc.

Referenced by NormalizeToSumNc().

+ Here is the caller graph for this function:

◆ UanPdp() [2/4]

ns3::UanPdp::UanPdp ( std::vector< Tap > taps,
Time resolution )

Create PDP object from a vector of Tap objects.

Parameters
tapsTaps to include in this PDP.
resolutionResolution of PDP object.

Definition at line 97 of file uan-prop-model.cc.

◆ UanPdp() [3/4]

ns3::UanPdp::UanPdp ( std::vector< std::complex< double > > arrivals,
Time resolution )

Create PDP object from vector of arrival amplitudes.

Parameters
arrivalsVector of complex amplitude arrivals.
resolutionTime duration between arrivals in vector.

Definition at line 103 of file uan-prop-model.cc.

References m_resolution, m_taps, and ns3::Seconds().

+ Here is the call graph for this function:

◆ UanPdp() [4/4]

ns3::UanPdp::UanPdp ( std::vector< double > arrivals,
Time resolution )

Create PDP object from real valued arrival amplitudes.

Parameters
arrivalsVector of real valued arrivals.
resolutionTime duration between arrivals in vector.

Definition at line 115 of file uan-prop-model.cc.

References m_resolution, m_taps, and ns3::Seconds().

+ Here is the call graph for this function:

◆ ~UanPdp()

ns3::UanPdp::~UanPdp ( )

Dummy destructor, see DoDispose.

Definition at line 127 of file uan-prop-model.cc.

References m_taps.

Member Function Documentation

◆ CreateImpulsePdp()

UanPdp ns3::UanPdp::CreateImpulsePdp ( )
static

Get a unit impulse PDP at time 0.

Returns
The unit impulse.

Definition at line 348 of file uan-prop-model.cc.

References ns3::Seconds(), SetResolution(), and SetTap().

Referenced by ns3::UanPropModelIdeal::GetPdp(), and ns3::UanPropModelThorp::GetPdp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBegin()

UanPdp::Iterator ns3::UanPdp::GetBegin ( ) const

Get the beginning of the tap vector.

Returns
Iterator positioned at first arrival.

Definition at line 164 of file uan-prop-model.cc.

References m_taps.

Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().

+ Here is the caller graph for this function:

◆ GetEnd()

UanPdp::Iterator ns3::UanPdp::GetEnd ( ) const

Get the end of the tap list (one beyond the last entry).

Returns
Iterator positioned after last arrival

Definition at line 170 of file uan-prop-model.cc.

References m_taps.

Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().

+ Here is the caller graph for this function:

◆ GetNTaps()

uint32_t ns3::UanPdp::GetNTaps ( ) const

Get the number of taps.

Returns
Number of taps in PDP.

Definition at line 176 of file uan-prop-model.cc.

References m_taps.

Referenced by GetTap(), NormalizeToSumNc(), SumTapsC(), SumTapsFromMaxC(), SumTapsFromMaxNc(), and SumTapsNc().

+ Here is the caller graph for this function:

◆ GetResolution()

Time ns3::UanPdp::GetResolution ( ) const

Get the delay time resolution (time duration between arrivals).

Returns
Resolution of PDP.

Definition at line 182 of file uan-prop-model.cc.

References m_resolution.

◆ GetTap()

const Tap & ns3::UanPdp::GetTap ( uint32_t i) const

Get the Tap at the specified delay index.

Parameters
iIndex number of tap to return (0 based).
Returns
Tap object at index i.

Definition at line 145 of file uan-prop-model.cc.

References GetNTaps(), m_taps, and NS_ASSERT_MSG.

Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NormalizeToSumNc()

UanPdp ns3::UanPdp::NormalizeToSumNc ( ) const

Creates a new UanPdp normalized to its non coherent sum.

See also
SumTapsNc
Returns
the new PDP

Definition at line 329 of file uan-prop-model.cc.

References UanPdp(), GetNTaps(), m_resolution, and m_taps.

+ Here is the call graph for this function:

◆ SetNTaps()

void ns3::UanPdp::SetNTaps ( uint32_t nTaps)

Resize the tap vector.

Parameters
nTapsNumber of taps in this PDP

Definition at line 152 of file uan-prop-model.cc.

References m_taps.

◆ SetResolution()

void ns3::UanPdp::SetResolution ( Time resolution)

Set the time duration (resolution) between arrivals.

Parameters
resolutionThe resolution.

Definition at line 158 of file uan-prop-model.cc.

References m_resolution.

Referenced by CreateImpulsePdp().

+ Here is the caller graph for this function:

◆ SetTap()

void ns3::UanPdp::SetTap ( std::complex< double > arrival,
uint32_t index )

Set the arrival value for a tap.

The delay time is the index multiplied by the resolution. The tap vector will be expanded to accommodate the requested index.

Parameters
arrivalComplex arrival value.
indexIndex of arrival.

Definition at line 133 of file uan-prop-model.cc.

References m_resolution, and m_taps.

Referenced by CreateImpulsePdp().

+ Here is the caller graph for this function:

◆ SumTapsC()

std::complex< double > ns3::UanPdp::SumTapsC ( Time begin,
Time end ) const

Compute the coherent sum of tap amplitudes between a start and end time.

Assuming that Tap at index 0 arrives at time 0, this function sums coherently (sums amplitude of arrivals considering phase difference) all arrivals between a start and end time.

Parameters
beginTime value to begin summing arrivals.
endTime value to end summing arrivals.
Returns
Coherent sum of arrivals between two time values.

Definition at line 297 of file uan-prop-model.cc.

References GetNTaps(), m_resolution, m_taps, NS_ASSERT_MSG, and ns3::Seconds().

+ Here is the call graph for this function:

◆ SumTapsFromMaxC()

std::complex< double > ns3::UanPdp::SumTapsFromMaxC ( Time delay,
Time duration ) const

Compute the coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total duration.

this function sums coherently (sums amplitude of arrivals considering phase difference) all arrivals in a given duration starting the given time after the maximum amplitude arrival received

Parameters
delayTime duratation after max to begin summing arrivals.
durationTime duration to sum arrivals for.
Returns
Coherent sum of arrivals after max in given window.

Definition at line 188 of file uan-prop-model.cc.

References GetNTaps(), ns3::Time::IsZero(), m_resolution, m_taps, NS_ASSERT_MSG, and ns3::Seconds().

+ Here is the call graph for this function:

◆ SumTapsFromMaxNc()

double ns3::UanPdp::SumTapsFromMaxNc ( Time delay,
Time duration ) const

Compute the non-coherent sum of tap amplitudes starting after a delay from the maximum amplitude for a total time duration.

This function sums non-coherently (sums amplitude of arrivals ignoring phase difference) all arrivals in a given duration starting the given time after the maximum amplitude arrival received.

Parameters
delayTime duratation after max to begin summing arrivals.
durationTime duration to sum arrivals for.
Returns
Non-coherent sum of arrivals after max in given window.

Definition at line 226 of file uan-prop-model.cc.

References GetNTaps(), ns3::Time::IsZero(), m_resolution, m_taps, NS_ASSERT_MSG, and ns3::Seconds().

Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SumTapsNc()

double ns3::UanPdp::SumTapsNc ( Time begin,
Time end ) const

Compute the non-coherent sum of tap amplitudes between a start and end time.

Assuming that Tap at index 0 arrives at time 0, this function sums non-coherently (sums amplitude of arrivals ignoring phase difference) all arrivals between a start and end time.

Parameters
beginTime value to begin summing arrivals.
endTime value to end summing arrivals.
Returns
Non-coherent sum of arrivals between two time values.

Definition at line 266 of file uan-prop-model.cc.

References GetNTaps(), m_resolution, m_taps, NS_ASSERT_MSG, and ns3::Seconds().

Referenced by ns3::UanPhyCalcSinrFhFsk::CalcSinrDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const UanPdp & pdp )
friend

Writes PDP to stream as list of arrivals.

Parameters
osThe output stream.
pdpThe PDP.
Returns
The output stream.

Definition at line 19 of file uan-prop-model.cc.

◆ operator>>

std::istream & operator>> ( std::istream & is,
UanPdp & pdp )
friend

Reads in list of arrivals from stream is.

Parameters
isThe input stream.
pdpThe PDP variable to set.
Returns
The input stream.

Definition at line 34 of file uan-prop-model.cc.

Member Data Documentation

◆ m_resolution

Time ns3::UanPdp::m_resolution
private

◆ m_taps

std::vector<Tap> ns3::UanPdp::m_taps
private

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