A Discrete-Event Network Simulator
API
ns3::SNRToBlockErrorRateManager Class Reference

This class handles the SNR to BlcER traces. More...

#include "snr-to-block-error-rate-manager.h"

+ Collaboration diagram for ns3::SNRToBlockErrorRateManager:

Public Member Functions

 SNRToBlockErrorRateManager ()
 
 ~SNRToBlockErrorRateManager (void)
 
void ActivateLoss (bool loss)
 If activate loss is called with false, all the returned BlcER will be 0 (no losses) More...
 
double GetBlockErrorRate (double SNR, uint8_t modulation)
 returns the Block Error Rate for a given modulation and SNR value More...
 
SNRToBlockErrorRateRecordGetSNRToBlockErrorRateRecord (double SNR, uint8_t modulation)
 returns a record of type SNRToBlockErrorRateRecord corresponding to a given modulation and SNR value More...
 
std::string GetTraceFilePath (void)
 
void LoadDefaultTraces (void)
 Loads the default traces from default-traces.h file. More...
 
void LoadTraces (void)
 Loads the traces form the repository specified in the constructor or set by SetTraceFilePath function. More...
 
void ReLoadTraces (void)
 Reloads the trace. More...
 
void SetTraceFilePath (char *traceFilePath)
 Set the path of the repository containing the traces. More...
 

Private Member Functions

void ClearRecords (void)
 Clear records function. More...
 

Private Attributes

uint8_t m_activateLoss
 activate loss More...
 
std::vector< SNRToBlockErrorRateRecord * > * m_recordModulation [7]
 record modulation More...
 
std::string m_traceFilePath
 trace file path More...
 

Related Functions

(Note that these are not member functions.)

static const double modulation0 [6][29]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation1 [6][42]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation2 [6][96]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation3 [6][117]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation4 [6][331]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation5 [6][547]
 These represent default traces, providing a number of parameters for each SNR value. More...
 
static const double modulation6 [6][626]
 These represent default traces, providing a number of parameters for each SNR value. More...
 

Detailed Description

This class handles the SNR to BlcER traces.

A path to a repository containing trace files should be provided. If no repository is provided the traces from default-traces.h will be loaded. A valid repository should contain 7 files, one for each modulation and coding scheme.

The names of the files should respect the following format: modulation<modulation-and-conding-index>.txt, e.g. modulation0.txt, modulation1.txt, etc. for modulation 0, modulation 1, and so on...

The file format is ASCII with six columns as follows:

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

Definition at line 55 of file snr-to-block-error-rate-manager.h.

Constructor & Destructor Documentation

◆ SNRToBlockErrorRateManager()

ns3::SNRToBlockErrorRateManager::SNRToBlockErrorRateManager ( void  )

◆ ~SNRToBlockErrorRateManager()

ns3::SNRToBlockErrorRateManager::~SNRToBlockErrorRateManager ( void  )

Definition at line 46 of file snr-to-block-error-rate-manager.cc.

References ClearRecords(), and m_recordModulation.

+ Here is the call graph for this function:

Member Function Documentation

◆ ActivateLoss()

void ns3::SNRToBlockErrorRateManager::ActivateLoss ( bool  loss)

If activate loss is called with false, all the returned BlcER will be 0 (no losses)

Parameters
losstrue to activates losses

Definition at line 75 of file snr-to-block-error-rate-manager.cc.

References m_activateLoss.

Referenced by ns3::SimpleOfdmWimaxPhy::ActivateLoss().

+ Here is the caller graph for this function:

◆ ClearRecords()

void ns3::SNRToBlockErrorRateManager::ClearRecords ( void  )
private

Clear records function.

Definition at line 56 of file snr-to-block-error-rate-manager.cc.

References m_recordModulation.

Referenced by ~SNRToBlockErrorRateManager(), LoadDefaultTraces(), LoadTraces(), and ReLoadTraces().

+ Here is the caller graph for this function:

◆ GetBlockErrorRate()

double ns3::SNRToBlockErrorRateManager::GetBlockErrorRate ( double  SNR,
uint8_t  modulation 
)

returns the Block Error Rate for a given modulation and SNR value

Parameters
SNRthe SNR value
modulationone of the seven MCS
Returns
the Block Error Rate

Definition at line 288 of file snr-to-block-error-rate-manager.cc.

References m_activateLoss, and m_recordModulation.

◆ GetSNRToBlockErrorRateRecord()

SNRToBlockErrorRateRecord * ns3::SNRToBlockErrorRateManager::GetSNRToBlockErrorRateRecord ( double  SNR,
uint8_t  modulation 
)

returns a record of type SNRToBlockErrorRateRecord corresponding to a given modulation and SNR value

Parameters
SNRthe SNR value
modulationone of the seven MCS
Returns
the Block Error Rate

Definition at line 325 of file snr-to-block-error-rate-manager.cc.

References m_activateLoss, and m_recordModulation.

Referenced by Ns3WimaxSNRtoBLERTestCase::DoRunOnce(), and ns3::SimpleOfdmWimaxPhy::StartReceive().

+ Here is the caller graph for this function:

◆ GetTraceFilePath()

std::string ns3::SNRToBlockErrorRateManager::GetTraceFilePath ( void  )
Returns
the path to the repository containing the traces.

Definition at line 282 of file snr-to-block-error-rate-manager.cc.

References m_traceFilePath.

Referenced by ns3::SimpleOfdmWimaxPhy::GetTraceFilePath().

+ Here is the caller graph for this function:

◆ LoadDefaultTraces()

void ns3::SNRToBlockErrorRateManager::LoadDefaultTraces ( void  )

Loads the default traces from default-traces.h file.

Definition at line 117 of file snr-to-block-error-rate-manager.cc.

References ClearRecords(), m_activateLoss, m_recordModulation, modulation0, modulation1, modulation2, modulation3, modulation4, modulation5, and modulation6.

Referenced by LoadTraces(), and ReLoadTraces().

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

◆ LoadTraces()

void ns3::SNRToBlockErrorRateManager::LoadTraces ( void  )

Loads the traces form the repository specified in the constructor or set by SetTraceFilePath function.

If no repository is provided, default traces will be loaded from default-traces.h file

Definition at line 81 of file snr-to-block-error-rate-manager.cc.

References ClearRecords(), LoadDefaultTraces(), m_activateLoss, m_recordModulation, m_traceFilePath, and NS_LOG_INFO.

Referenced by ns3::SimpleOfdmWimaxPhy::SimpleOfdmWimaxPhy(), Ns3WimaxSNRtoBLERTestCase::DoRunOnce(), and ns3::SimpleOfdmWimaxPhy::SetTraceFilePath().

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

◆ ReLoadTraces()

void ns3::SNRToBlockErrorRateManager::ReLoadTraces ( void  )

Reloads the trace.

Definition at line 237 of file snr-to-block-error-rate-manager.cc.

References ClearRecords(), LoadDefaultTraces(), m_activateLoss, m_recordModulation, m_traceFilePath, and NS_LOG_INFO.

Referenced by ns3::SimpleOfdmWimaxPhy::SetSNRToBlockErrorRateTracesPath().

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

◆ SetTraceFilePath()

void ns3::SNRToBlockErrorRateManager::SetTraceFilePath ( char *  traceFilePath)

Set the path of the repository containing the traces.

Parameters
traceFilePaththe path to the repository.

Definition at line 276 of file snr-to-block-error-rate-manager.cc.

References m_traceFilePath.

Referenced by ns3::SimpleOfdmWimaxPhy::SimpleOfdmWimaxPhy(), ns3::SimpleOfdmWimaxPhy::SetSNRToBlockErrorRateTracesPath(), and ns3::SimpleOfdmWimaxPhy::SetTraceFilePath().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ modulation0

const double modulation0[6][29]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 78 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation1

const double modulation1[6][42]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 104 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation2

const double modulation2[6][96]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 136 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation3

const double modulation3[6][117]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 191 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation4

const double modulation4[6][331]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 273 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation5

const double modulation5[6][547]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 456 of file default-traces.h.

Referenced by LoadDefaultTraces().

◆ modulation6

const double modulation6[6][626]
related

These represent default traces, providing a number of parameters for each SNR value.

The parameters provided are (in order):

  1. The SNR value,
  2. The bit error rate BER,
  3. The block error rate BlcERm,
  4. The standard deviation on block error rate,
  5. The lower bound confidence interval for a given modulation, and
  6. The upper bound confidence interval for a given modulation.

It is made of 7 tables: one for each modulation and coding scheme. Each table is made of 6 columns, as listed above.

These traces are generated by an external OFDM simulator: It is based on an external mathematics and signal processing library IT++ and includes:

  • A random block generator,
  • A Reed Solomon (RS) coder,
  • A convolutional coder,
  • an interleaver,
  • A 256 FFT-based OFDM modulator,
  • A multi-path channel simulator, and
  • An equalizer.

The multipath channel is simulated using the TDL_channel class of the IT++ library.

The file format should be as follows

SNR_value1 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 ... ... ... ... ... ...

Additional notes: from Esteban Municio esteb.nosp@m.an.m.nosp@m.unici.nosp@m.o@ur.nosp@m.jc.es

This trace file has been edited for the 16 QAM 3/4 modulation (modulation4) since the original SNR traces for this modulation were not long enough, giving inflated BER and BLER figures for typical SNR values. Due to the impossibility to get the original IT++ environment used for the original traces by the previous authors, the traces of modulation4 have been generated using a simple IT++ program simulating the theoretical model of a AWGN channel given BER=3/2*erfc(sqrt(k*0.1*(Eb_N0_dB)));

Definition at line 710 of file default-traces.h.

Referenced by LoadDefaultTraces().

Member Data Documentation

◆ m_activateLoss

uint8_t ns3::SNRToBlockErrorRateManager::m_activateLoss
private

◆ m_recordModulation

std::vector<SNRToBlockErrorRateRecord *>* ns3::SNRToBlockErrorRateManager::m_recordModulation[7]
private

◆ m_traceFilePath

std::string ns3::SNRToBlockErrorRateManager::m_traceFilePath
private

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