This class implements the available waveform configurations of DVB-RCS2 return link. More...
#include "satellite-wave-form-conf.h"
Public Types | |
typedef std::vector< uint32_t > | BurstLengthContainer_t |
Define BurstLengthContainer. More... | |
Public Member Functions | |
SatWaveformConf () | |
Default constructor, which is not to be used. More... | |
SatWaveformConf (std::string directoryPathName) | |
Constructor. More... | |
virtual | ~SatWaveformConf () |
Destructor for SatWaveformConf. More... | |
void | Dump (double carrierBandwidthInHz, double symbolRateInBaud) const |
Dump the contents of the waveform. More... | |
bool | GetBestWaveformId (double cno, double symbolRateInBaud, uint32_t &wfId, double &cnoThreshold, uint32_t burstLength=SHORT_BURST_LENGTH) const |
Get the best waveform id based on UT's C/No and C/No thresholds. More... | |
uint32_t | GetDefaultBurstLength () const |
Get default burst length. More... | |
uint32_t | GetDefaultWaveformId () const |
Get default waveform id. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the type ID of instance. More... | |
uint32_t | GetMaxWfId () |
Get maximum supported waveform id return Maximum waveform id. More... | |
uint32_t | GetMinWfId () |
Get minimum supported waveform id return Minimum waveform id. More... | |
SatEnums::SatModcod_t | GetModCod (uint32_t wfId) const |
Get MODCOD enum corresponding to a waveform id. More... | |
bool | GetMostRobustWaveformId (uint32_t &wfId, uint32_t burstLength=SHORT_BURST_LENGTH) const |
Get the most robust waveform id based payload of the waveform in bytes. More... | |
const BurstLengthContainer_t & | GetSupportedBurstLengths () const |
Get supported burst lengths. More... | |
Ptr< SatWaveform > | GetWaveform (uint32_t wfId) const |
Get the details of a certain waveform. More... | |
void | InitializeEbNoRequirements (Ptr< SatLinkResultsRtn > linkResults) |
Initialize the Eb/No requirements of the waveforms based on the used return link results. More... | |
bool | IsAcmEnabled () const |
Check if ACM is enabled. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Derived from Object. More... | |
Static Public Attributes | |
static const uint32_t | LONG_BURST_LENGTH = 1616 |
Static variable defining long burst length. More... | |
static const uint32_t | SHORT_BURST_LENGTH = 536 |
Static variable defining short burst length. More... | |
Private Member Functions | |
SatEnums::SatModcod_t | ConvertToModCod (uint32_t modulatedBits, uint32_t codingRateNumerator, uint32_t codingRateDenominator) const |
Convert modulated bits and coding rate to a MODCOD enum. More... | |
void | ReadFromFile (std::string filePathName) |
Read the waveform table from a file. More... | |
void | ReadFromFileDefaultWaveform (std::string filePathName) |
Read the default waveform ID from a file. More... | |
Private Attributes | |
bool | m_acmEnabled |
Flag to indicate whether ACM is enabled or disabled. More... | |
SatEnums::SatWaveFormBurstLength_t | m_burstLength |
Burst length used. More... | |
uint32_t | m_defaultWfId |
Default waveform id. More... | |
uint32_t | m_maxWfId |
uint32_t | m_minWfId |
Minimum and maximum waveform ids. More... | |
BurstLengthContainer_t | m_supportedBurstLengthsInSymbols |
Container to store supported burst lengths. More... | |
double | m_targetBLER |
Block error rate target for the waveforms. More... | |
std::map< uint32_t, Ptr< SatWaveform > > | m_waveforms |
Container of the waveforms. More... | |
This class implements the available waveform configurations of DVB-RCS2 return link.
Currently the waveforms 3-22 are in use: 3-12 with shorter burst duration and 13-22 with longer burst duration.
Definition at line 212 of file satellite-wave-form-conf.h.
typedef std::vector<uint32_t> ns3::SatWaveformConf::BurstLengthContainer_t |
Define BurstLengthContainer.
Definition at line 218 of file satellite-wave-form-conf.h.
ns3::SatWaveformConf::SatWaveformConf | ( | ) |
Default constructor, which is not to be used.
Definition at line 187 of file satellite-wave-form-conf.cc.
ns3::SatWaveformConf::SatWaveformConf | ( | std::string | directoryPathName | ) |
Constructor.
directoryPathName | Path and to the directory of the waveform configurations |
Definition at line 200 of file satellite-wave-form-conf.cc.
References ns3::SatEnums::LONG_BURST, LONG_BURST_LENGTH, m_burstLength, m_supportedBurstLengthsInSymbols, ReadFromFile(), ReadFromFileDefaultWaveform(), ns3::SatEnums::SHORT_AND_LONG_BURST, ns3::SatEnums::SHORT_BURST, and SHORT_BURST_LENGTH.
|
virtual |
Destructor for SatWaveformConf.
Definition at line 279 of file satellite-wave-form-conf.cc.
|
private |
Convert modulated bits and coding rate to a MODCOD enum.
modulatedBits | Modulated bits of the MODCOD |
codingRateNumerator | Coding rate numerator of the MODCOD |
codingRateDenominator | Coding rate denominator of the MODCOD |
Definition at line 573 of file satellite-wave-form-conf.cc.
References ns3::SatEnums::SAT_MODCOD_16QAM_3_TO_4, ns3::SatEnums::SAT_MODCOD_16QAM_5_TO_6, ns3::SatEnums::SAT_MODCOD_8PSK_2_TO_3, ns3::SatEnums::SAT_MODCOD_8PSK_3_TO_4, ns3::SatEnums::SAT_MODCOD_8PSK_5_TO_6, ns3::SatEnums::SAT_MODCOD_BPSK_1_TO_3, ns3::SatEnums::SAT_MODCOD_QPSK_1_TO_2, ns3::SatEnums::SAT_MODCOD_QPSK_1_TO_3, ns3::SatEnums::SAT_MODCOD_QPSK_2_TO_3, ns3::SatEnums::SAT_MODCOD_QPSK_3_TO_4, ns3::SatEnums::SAT_MODCOD_QPSK_5_TO_6, and ns3::SatEnums::SAT_NONVALID_MODCOD.
Referenced by ReadFromFile().
void ns3::SatWaveformConf::Dump | ( | double | carrierBandwidthInHz, |
double | symbolRateInBaud | ||
) | const |
Dump the contents of the waveform.
The total carrier bandwidth and symbol rate are needed for spectral efficiency calculation.
carrierBandwidthInHz | Total carrier bandwidth including e.g. guard band. |
symbolRateInBaud | Effective symbol rate where guard band and roll-off has been deduced. |
Definition at line 535 of file satellite-wave-form-conf.cc.
References m_waveforms.
bool ns3::SatWaveformConf::GetBestWaveformId | ( | double | cno, |
double | symbolRateInBaud, | ||
uint32_t & | wfId, | ||
double & | cnoThreshold, | ||
uint32_t | burstLength = SHORT_BURST_LENGTH |
||
) | const |
Get the best waveform id based on UT's C/No and C/No thresholds.
cno | UTs estimated C/No |
symbolRateInBaud | Frame's symbol rate used for waveform C/No requirement calculation |
wfId | Waveform id variable used for passing the best waveform id to the client |
cnoThreshold | variable used for passing the C/No threshold of the selected waveform to the client |
burstLength | Requested burst length in symbols |
Definition at line 460 of file satellite-wave-form-conf.cc.
References ns3::SatUtils::LinearToDb(), m_acmEnabled, m_defaultWfId, and m_waveforms.
|
inline |
Get default burst length.
Definition at line 286 of file satellite-wave-form-conf.h.
References GetWaveform(), and m_defaultWfId.
uint32_t ns3::SatWaveformConf::GetDefaultWaveformId | ( | ) | const |
Get default waveform id.
Definition at line 446 of file satellite-wave-form-conf.cc.
References m_defaultWfId, m_maxWfId, and m_minWfId.
|
virtual |
Get the type ID of instance.
Definition at line 272 of file satellite-wave-form-conf.cc.
References GetTypeId().
|
inline |
Get maximum supported waveform id return Maximum waveform id.
Definition at line 344 of file satellite-wave-form-conf.h.
References m_maxWfId.
|
inline |
Get minimum supported waveform id return Minimum waveform id.
Definition at line 335 of file satellite-wave-form-conf.h.
References m_minWfId.
SatEnums::SatModcod_t ns3::SatWaveformConf::GetModCod | ( | uint32_t | wfId | ) | const |
Get MODCOD enum corresponding to a waveform id.
wfId | Waveform id |
Definition at line 549 of file satellite-wave-form-conf.cc.
References m_maxWfId, m_minWfId, m_waveforms, and ns3::SatEnums::SAT_NONVALID_MODCOD.
bool ns3::SatWaveformConf::GetMostRobustWaveformId | ( | uint32_t & | wfId, |
uint32_t | burstLength = SHORT_BURST_LENGTH |
||
) | const |
Get the most robust waveform id based payload of the waveform in bytes.
wfId | Waveform id variable used for passing the best waveform id to the client |
burstLength | Requested burst length in symbols |
Definition at line 506 of file satellite-wave-form-conf.cc.
References m_waveforms.
|
inline |
Get supported burst lengths.
Definition at line 295 of file satellite-wave-form-conf.h.
References m_supportedBurstLengthsInSymbols.
|
static |
Derived from Object.
Definition at line 242 of file satellite-wave-form-conf.cc.
References ns3::SatEnums::LONG_BURST, m_acmEnabled, m_burstLength, m_targetBLER, ns3::SatEnums::SHORT_AND_LONG_BURST, and ns3::SatEnums::SHORT_BURST.
Referenced by GetInstanceTypeId().
Ptr< SatWaveform > ns3::SatWaveformConf::GetWaveform | ( | uint32_t | wfId | ) | const |
Get the details of a certain waveform.
wfId | Waveform id |
Definition at line 433 of file satellite-wave-form-conf.cc.
References m_maxWfId, m_minWfId, and m_waveforms.
Referenced by GetDefaultBurstLength().
void ns3::SatWaveformConf::InitializeEbNoRequirements | ( | Ptr< SatLinkResultsRtn > | linkResults | ) |
Initialize the Eb/No requirements of the waveforms based on the used return link results.
linkResults | Pointer to return link results |
In return link the link results are in Eb/No format. Since, the C/No is dependent on the symbol rate, we cannot store the requirement in C/No format, but in Eb/No. Eb/No = (Es/log2M)/No = (Es/No)*(1/log2M) = C/N * (1/log2M) = C/No * (1/fs) * (1/log2M)
Definition at line 414 of file satellite-wave-form-conf.cc.
References ns3::SatUtils::DbToLinear(), m_targetBLER, and m_waveforms.
|
inline |
Check if ACM is enabled.
Definition at line 250 of file satellite-wave-form-conf.h.
References m_acmEnabled.
|
private |
Read the waveform table from a file.
filePathName | path and file name |
Definition at line 317 of file satellite-wave-form-conf.cc.
References ConvertToModCod(), m_maxWfId, m_minWfId, and m_waveforms.
Referenced by SatWaveformConf().
|
private |
Read the default waveform ID from a file.
filePathName | path and file name |
Definition at line 285 of file satellite-wave-form-conf.cc.
References m_defaultWfId.
Referenced by SatWaveformConf().
|
static |
Static variable defining long burst length.
Definition at line 357 of file satellite-wave-form-conf.h.
Referenced by SatWaveformConf().
|
private |
Flag to indicate whether ACM is enabled or disabled.
If ACM is disabled, the m_defaultWfId is used.
Definition at line 398 of file satellite-wave-form-conf.h.
Referenced by GetBestWaveformId(), GetTypeId(), and IsAcmEnabled().
|
private |
Burst length used.
Definition at line 415 of file satellite-wave-form-conf.h.
Referenced by SatWaveformConf(), and GetTypeId().
|
private |
Default waveform id.
Definition at line 403 of file satellite-wave-form-conf.h.
Referenced by GetBestWaveformId(), GetDefaultBurstLength(), GetDefaultWaveformId(), and ReadFromFileDefaultWaveform().
|
private |
Definition at line 410 of file satellite-wave-form-conf.h.
Referenced by GetDefaultWaveformId(), GetMaxWfId(), GetModCod(), GetWaveform(), and ReadFromFile().
|
private |
Minimum and maximum waveform ids.
Note, that currently it is assumed that all the wfs between min and max are valid!
Definition at line 409 of file satellite-wave-form-conf.h.
Referenced by GetDefaultWaveformId(), GetMinWfId(), GetModCod(), GetWaveform(), and ReadFromFile().
|
private |
Container to store supported burst lengths.
Definition at line 420 of file satellite-wave-form-conf.h.
Referenced by SatWaveformConf(), and GetSupportedBurstLengths().
|
private |
Block error rate target for the waveforms.
Default value set as an attribute to 10^(-5).
Definition at line 392 of file satellite-wave-form-conf.h.
Referenced by GetTypeId(), and InitializeEbNoRequirements().
|
private |
Container of the waveforms.
Definition at line 386 of file satellite-wave-form-conf.h.
Referenced by Dump(), GetBestWaveformId(), GetModCod(), GetMostRobustWaveformId(), GetWaveform(), InitializeEbNoRequirements(), and ReadFromFile().
|
static |
Static variable defining short burst length.
Definition at line 352 of file satellite-wave-form-conf.h.
Referenced by ns3::SatFrameAllocator::SatFrameAllocator(), SatWaveformConf(), and ns3::SatFrameAllocator::GetBestWaveform().