21 #ifndef SAT_CNO_ESTIMATOR
22 #define SAT_CNO_ESTIMATOR
26 #include <ns3/nstime.h>
27 #include <ns3/simple-ref-count.h>
125 static inline double AddToSum(
double currentSum,
const std::pair<Time, double>& sample)
127 double newSum = currentSum;
129 if (!std::isnan(sample.second))
131 newSum += sample.second;
class for module SatCnoEstimator.
void ClearOutdatedSamples()
Clear outdated samples from storage.
static double AddToSum(double currentSum, const std::pair< Time, double > &sample)
Method to add a sample value to current sum.
virtual void DoAddSample(double cno)
Add a C/N0 sample to estimator.
SatBasicCnoEstimator()
Default construct a SatCnoEstimator.
std::map< Time, double > SampleMap_t
~SatBasicCnoEstimator()
Destroy a SatCnoEstimator.
virtual double DoGetCnoEstimation()
Estimate C/N0 value of the samples in window.
SatCnoEstimator class defines interface for C/N0 estimators.
double GetCnoEstimation()
Estimate C/N0 value of the samples.
virtual void DoAddSample(double cno)=0
Add a C/N0 sample to estimator.
virtual double DoGetCnoEstimation()=0
Estimate C/N0 value of the samples.
EstimationMode_t
Definition of modes for estimator.
@ MINIMUM
Minimum value in the given window returned.
@ LAST
Last value in the given window returned.
@ AVERAGE
Average value in the given window returned.
virtual ~SatCnoEstimator()
Destroy a SatCnoEstimator.
void AddSample(double cno)
Add a C/N0 sample to estimator.
SatCnoEstimator()
Default construct a SatCnoEstimator.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.