ns3::SatBasicCnoEstimator Class Reference

class for module SatCnoEstimator. More...

#include "satellite-cno-estimator.h"

+ Inheritance diagram for ns3::SatBasicCnoEstimator:
+ Collaboration diagram for ns3::SatBasicCnoEstimator:

Public Member Functions

 SatBasicCnoEstimator ()
 Default construct a SatCnoEstimator. More...
 
 SatBasicCnoEstimator (SatCnoEstimator::EstimationMode_t mode, Time window)
 Construct a SatCnoEstimator with given estimation mode type. More...
 
 ~SatBasicCnoEstimator ()
 Destroy a SatCnoEstimator. More...
 
- Public Member Functions inherited from ns3::SatCnoEstimator
 SatCnoEstimator ()
 Default construct a SatCnoEstimator. More...
 
virtual ~SatCnoEstimator ()
 Destroy a SatCnoEstimator. More...
 
void AddSample (double cno)
 Add a C/N0 sample to estimator. More...
 
double GetCnoEstimation ()
 Estimate C/N0 value of the samples. More...
 

Static Public Member Functions

static double AddToSum (double currentSum, const std::pair< Time, double > &sample)
 Method to add a sample value to current sum. More...
 

Private Types

typedef std::map< Time, double > SampleMap_t
 

Private Member Functions

void ClearOutdatedSamples ()
 Clear outdated samples from storage. More...
 
virtual void DoAddSample (double cno)
 Add a C/N0 sample to estimator. More...
 
virtual double DoGetCnoEstimation ()
 Estimate C/N0 value of the samples in window. More...
 

Private Attributes

EstimationMode_t m_mode
 
SampleMap_t m_samples
 
Time m_window
 

Additional Inherited Members

- Public Types inherited from ns3::SatCnoEstimator
enum  EstimationMode_t { LAST , MINIMUM , AVERAGE }
 Definition of modes for estimator. More...
 

Detailed Description

class for module SatCnoEstimator.

This SatCnoEstimator class holds information of a satellite DAMA entry. It's is created and used by NCC.

It supports three dirrent modes:

  • LAST: The last value in the window given when requested.
  • MINIMUM: The minimum value in the window given when requested.
  • AVERAGE: The average of the samples in window given when requested.

Definition at line 113 of file satellite-cno-estimator.h.

Member Typedef Documentation

◆ SampleMap_t

typedef std::map<Time, double> ns3::SatBasicCnoEstimator::SampleMap_t
private

Definition at line 153 of file satellite-cno-estimator.h.

Constructor & Destructor Documentation

◆ SatBasicCnoEstimator() [1/2]

ns3::SatBasicCnoEstimator::SatBasicCnoEstimator ( )

Default construct a SatCnoEstimator.

Definition at line 69 of file satellite-cno-estimator.cc.

◆ SatBasicCnoEstimator() [2/2]

ns3::SatBasicCnoEstimator::SatBasicCnoEstimator ( SatCnoEstimator::EstimationMode_t  mode,
Time  window 
)

Construct a SatCnoEstimator with given estimation mode type.

Definition at line 75 of file satellite-cno-estimator.cc.

◆ ~SatBasicCnoEstimator()

ns3::SatBasicCnoEstimator::~SatBasicCnoEstimator ( )

Destroy a SatCnoEstimator.

This is the destructor for the SatCnoEstimator.

Definition at line 83 of file satellite-cno-estimator.cc.

Member Function Documentation

◆ AddToSum()

static double ns3::SatBasicCnoEstimator::AddToSum ( double  currentSum,
const std::pair< Time, double > &  sample 
)
inlinestatic

Method to add a sample value to current sum.

Parameters
currentSum
sample
Returns
New sum after addition.

Definition at line 123 of file satellite-cno-estimator.h.

Referenced by DoGetCnoEstimation().

+ Here is the caller graph for this function:

◆ ClearOutdatedSamples()

void ns3::SatBasicCnoEstimator::ClearOutdatedSamples ( )
private

Clear outdated samples from storage.

Definition at line 162 of file satellite-cno-estimator.cc.

References m_samples, and m_window.

Referenced by DoAddSample(), and DoGetCnoEstimation().

+ Here is the caller graph for this function:

◆ DoAddSample()

void ns3::SatBasicCnoEstimator::DoAddSample ( double  cno)
privatevirtual

Add a C/N0 sample to estimator.

Parameters
cnoC/N0 sample value

Implements ns3::SatCnoEstimator.

Definition at line 89 of file satellite-cno-estimator.cc.

References ns3::SatCnoEstimator::AVERAGE, ClearOutdatedSamples(), ns3::SatCnoEstimator::LAST, m_mode, m_samples, and ns3::SatCnoEstimator::MINIMUM.

+ Here is the call graph for this function:

◆ DoGetCnoEstimation()

double ns3::SatBasicCnoEstimator::DoGetCnoEstimation ( )
privatevirtual

Estimate C/N0 value of the samples in window.

Returns
Estimated value of the C/N0, in case that estimation cannot be done (e.g. no samples) NAN is returned.

Implements ns3::SatCnoEstimator.

Definition at line 117 of file satellite-cno-estimator.cc.

References AddToSum(), ns3::SatCnoEstimator::AVERAGE, ClearOutdatedSamples(), ns3::SatCnoEstimator::LAST, m_mode, m_samples, and ns3::SatCnoEstimator::MINIMUM.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_mode

EstimationMode_t ns3::SatBasicCnoEstimator::m_mode
private

Definition at line 157 of file satellite-cno-estimator.h.

Referenced by DoAddSample(), and DoGetCnoEstimation().

◆ m_samples

SampleMap_t ns3::SatBasicCnoEstimator::m_samples
private

◆ m_window

Time ns3::SatBasicCnoEstimator::m_window
private

Definition at line 156 of file satellite-cno-estimator.h.

Referenced by ClearOutdatedSamples().


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