15#include "ns3/assert.h"
29 for (
int i = 0;
i < 7;
i++)
40 for (
int i = 0;
i < 7;
i++)
49 for (
int i = 0;
i < 7;
i++)
82 for (
int i = 0;
i < 7;
i++)
120 for (
unsigned int j = 0;
j <
sizeof(
modulation0[0]) /
sizeof(
double);
j++)
132 for (
unsigned int j = 0;
j <
sizeof(
modulation1[0]) /
sizeof(
double);
j++)
144 for (
unsigned int j = 0;
j <
sizeof(
modulation2[0]) /
sizeof(
double);
j++)
156 for (
unsigned int j = 0;
j <
sizeof(
modulation3[0]) /
sizeof(
double);
j++)
168 for (
unsigned int j = 0;
j <
sizeof(
modulation4[0]) /
sizeof(
double);
j++)
180 for (
unsigned int j = 0;
j <
sizeof(
modulation5[0]) /
sizeof(
double);
j++)
192 for (
unsigned int j = 0;
j <
sizeof(
modulation6[0]) /
sizeof(
double);
j++)
221 for (
int i = 0;
i < 7;
i++)
270 std::vector<SNRToBlockErrorRateRecord*>*
record =
nullptr;
274 if (
SNR <= (
record->at(0)->GetSNRValue()))
307 std::vector<SNRToBlockErrorRateRecord*>*
record =
nullptr;
310 if (
SNR <= (
record->at(0)->GetSNRValue()))
312 return record->at(0)->Copy();
void ActivateLoss(bool loss)
If activate loss is called with false, all the returned BlcER will be 0 (no losses)
void ClearRecords()
Clear records function.
static const double modulation5[6][547]
These represent default traces, providing a number of parameters for each SNR value.
SNRToBlockErrorRateManager()
bool m_activateLoss
activate loss
static const double modulation1[6][42]
These represent default traces, providing a number of parameters for each SNR value.
void ReLoadTraces()
Reloads the trace.
void LoadTraces()
Loads the traces form the repository specified in the constructor or set by SetTraceFilePath function...
SNRToBlockErrorRateRecord * GetSNRToBlockErrorRateRecord(double SNR, uint8_t modulation)
returns a record of type SNRToBlockErrorRateRecord corresponding to a given modulation and SNR value
std::string GetTraceFilePath()
std::string m_traceFilePath
trace file path
static const double modulation0[6][29]
These represent default traces, providing a number of parameters for each SNR value.
static const double modulation6[6][626]
These represent default traces, providing a number of parameters for each SNR value.
static const double modulation3[6][117]
These represent default traces, providing a number of parameters for each SNR value.
double GetBlockErrorRate(double SNR, uint8_t modulation)
returns the Block Error Rate for a given modulation and SNR value
void SetTraceFilePath(char *traceFilePath)
Set the path of the repository containing the traces.
static const double modulation2[6][96]
These represent default traces, providing a number of parameters for each SNR value.
std::vector< SNRToBlockErrorRateRecord * > * m_recordModulation[7]
record modulation
void LoadDefaultTraces()
Loads the default traces from default-traces.h file.
~SNRToBlockErrorRateManager()
static const double modulation4[6][331]
These represent default traces, providing a number of parameters for each SNR value.
This class represents a record (handled by SnrToBlockErrorRate manager) that keeps a mapping between ...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.