This class implements the BB Frame configurations for DVB-S2. More...
#include "satellite-bbframe-conf.h"
Public Types | |
typedef std::map< std::pair< SatEnums::SatModcod_t, SatEnums::SatBbFrameType_t >, Ptr< SatDvbS2Waveform > > | waveformMap_t |
Define type waveformMap_t. More... | |
Public Member Functions | |
SatBbFrameConf () | |
Default constructor. More... | |
SatBbFrameConf (double symbolRate, SatEnums::DvbVersion_t dvbVersion) | |
SatBbFrameConf constructor. More... | |
virtual | ~SatBbFrameConf () |
Destructor for SatBbFrameConf. More... | |
void | DumpWaveforms () const |
Dump waveform details for debugging purposes. More... | |
Time | GetBbFrameDuration (SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const |
Get the BB frame frame duration. More... | |
uint32_t | GetBbFrameHeaderSizeInBytes () const |
Get BB frame header size in bytes. More... | |
double | GetBbFrameHighOccupancyThreshold () const |
Get configured BB frame high occupancy threshold. More... | |
double | GetBbFrameLowOccupancyThreshold () const |
Get configured BB frame low occupancy threshold. More... | |
uint32_t | GetBbFramePayloadBits (SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const |
Get the BB frame payload in bits. More... | |
SatEnums::BbFrameUsageMode_t | GetBbFrameUsageMode () const |
Get configured BB frame usage mode. More... | |
SatEnums::SatModcod_t | GetBestModcod (double cNo, SatEnums::SatBbFrameType_t frameType) const |
Get the best MODCOD with a given BB frame type. More... | |
SatEnums::SatModcod_t | GetDefaultModCod () const |
Get the default MODCOD. More... | |
SatEnums::SatModcod_t | GetDefaultModCodDummyFramesS2X () const |
Get the default MODCOD for short DVB-S2X frames. More... | |
Time | GetDummyBbFrameDuration () const |
Get the dummy frame duration in Time. More... | |
SatEnums::DvbVersion_t | GetDvbVersion () |
Indicates if using DVB-S2 or DVB-S2X. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the type ID of instance. More... | |
std::vector< SatEnums::SatModcod_t > | GetModCodsUsed () |
Get the list of ModCods used. More... | |
SatEnums::SatModcod_t | GetMostRobustModcod (SatEnums::SatBbFrameType_t frameType) const |
Get the most robust MODCOD with a given BB frame type. More... | |
double | GetSymbolRate () |
Symbol rate in baud. More... | |
void | InitializeCNoRequirements (Ptr< SatLinkResultsFwd > linkResults) |
Initialize the C/No requirements for a given BLER target. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
Time | CalculateBbFrameDuration (SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const |
Calculate the BBFrame duration in Time. More... | |
uint32_t | CalculateBbFramePayloadBits (SatEnums::SatModcod_t modcod, SatEnums::SatBbFrameType_t frameType) const |
Calculate the BBrame higher layer payload in bits. More... | |
void | GetModCodsList () |
Get the list of ModCods from their string representation. More... | |
Private Attributes | |
bool | m_acmEnabled |
Flag to indicate whether ACM is enabled or disabled. More... | |
uint32_t | m_bbFrameHeaderSizeInBytes |
The BB frame header size in bytes. More... | |
double | m_bbFrameHighOccupancyThreshold |
The BB frame high occupancy threshold in range 0 - 1. More... | |
double | m_bbFrameLowOccupancyThreshold |
The BB frame low occupancy threshold in range 0 - 1. More... | |
bool | m_bbFrameS2XPilots |
Indicates if using pilots in BBFrames when DVB-S2X is chosen. More... | |
SatEnums::BbFrameUsageMode_t | m_bbFrameUsageMode |
BBFrame usage mode. More... | |
SatEnums::SatModcod_t | m_defaultModCod |
Default MODCOD is used. More... | |
SatEnums::SatModcod_t | m_defaultModCodDummyFramesS2X |
Default MODCOD for DVB-S2X dummy Frames. More... | |
std::string | m_defaultModCodDummyFramesS2XStr |
String representation of default ModCod for DVB-S2X Dummy Frames. More... | |
std::string | m_defaultModCodStr |
The string representation of default ModCod. More... | |
uint32_t | m_dummyFrameInSlots |
Dummy BBFrame length in slots. More... | |
SatEnums::DvbVersion_t | m_dvbVersion |
Indicates if using DVB-S2 or DVB-S2X. More... | |
std::vector< SatEnums::SatModcod_t > | m_modCodsUsed |
List of ModCods used. More... | |
std::string | m_modCodsUsedStr |
String containing all DVB-S2X ModCods used. More... | |
SatEnums::SatModcod_t | m_mostRobustNormalFrameModcod |
The most robust MODCOD for long frame. More... | |
SatEnums::SatModcod_t | m_mostRobustShortFrameModcod |
The most robust MODCOD for short frame. More... | |
std::map< uint32_t, uint32_t > | m_normalFramePayloadInSlots |
uint32_t | m_pilotBlockInSymbols |
The size of the pilot block in symbols. More... | |
uint32_t | m_pilotBlockIntervalInSlots |
Interval of pilot block in slots. More... | |
uint32_t | m_plHeaderInSlots |
The PL header size in slots. More... | |
std::map< uint32_t, uint32_t > | m_shortFramePayloadInSlots |
double | m_symbolRate |
Symbol rate in baud. More... | |
uint32_t | m_symbolsPerSlot |
The size of the (data) slot in symbols. More... | |
double | m_targetBler |
Block error rate target for the waveforms. More... | |
waveformMap_t | m_waveforms |
Available "waveforms", i.e. More... | |
This class implements the BB Frame configurations for DVB-S2.
Available waveforms are for two BB frame types (short and normal) and for all supported DVB-S2 MODCODs defined in SatEnums.
Definition at line 148 of file satellite-bbframe-conf.h.
typedef std::map<std::pair<SatEnums::SatModcod_t, SatEnums::SatBbFrameType_t>, Ptr<SatDvbS2Waveform> > ns3::SatBbFrameConf::waveformMap_t |
Define type waveformMap_t.
Definition at line 184 of file satellite-bbframe-conf.h.
ns3::SatBbFrameConf::SatBbFrameConf | ( | ) |
Default constructor.
Definition at line 141 of file satellite-bbframe-conf.cc.
ns3::SatBbFrameConf::SatBbFrameConf | ( | double | symbolRate, |
SatEnums::DvbVersion_t | dvbVersion | ||
) |
SatBbFrameConf constructor.
symbolRate | Symbol rate in baud |
Definition at line 171 of file satellite-bbframe-conf.cc.
References CalculateBbFrameDuration(), CalculateBbFramePayloadBits(), ns3::SatEnums::DVB_S2, ns3::SatEnums::DVB_S2X, ns3::SatEnums::GetAvailableBbFrameTypes(), ns3::SatUtils::GetFrameTypeS2X(), ns3::SatEnums::GetModcodFromName(), GetModCodsList(), ns3::SatEnums::GetModcodTypeName(), m_bbFrameS2XPilots, m_bbFrameUsageMode, m_defaultModCod, m_defaultModCodDummyFramesS2X, m_defaultModCodDummyFramesS2XStr, m_defaultModCodStr, m_dvbVersion, m_modCodsUsed, m_mostRobustNormalFrameModcod, m_mostRobustShortFrameModcod, m_normalFramePayloadInSlots, m_shortFramePayloadInSlots, m_waveforms, ns3::SatEnums::NORMAL_FRAME, ns3::SatEnums::NORMAL_FRAMES, ns3::payloadConf, ns3::SatEnums::SAT_NONVALID_MODCOD, ns3::SatEnums::SHORT_AND_NORMAL_FRAMES, ns3::SatEnums::SHORT_FRAME, and ns3::SatEnums::SHORT_FRAMES.
|
virtual |
Destructor for SatBbFrameConf.
Definition at line 454 of file satellite-bbframe-conf.cc.
|
private |
Calculate the BBFrame duration in Time.
modcod | Used MODCOD in the BBFrame |
frameType | Used BBFrame type (short OR normal) |
symbolRate | The symbol rate of the scheduled carrier |
Definition at line 538 of file satellite-bbframe-conf.cc.
References ns3::SatUtils::GetModulatedBits(), m_normalFramePayloadInSlots, m_pilotBlockInSymbols, m_pilotBlockIntervalInSlots, m_plHeaderInSlots, m_shortFramePayloadInSlots, m_symbolRate, m_symbolsPerSlot, ns3::SatEnums::NORMAL_FRAME, and ns3::SatEnums::SHORT_FRAME.
Referenced by SatBbFrameConf().
|
private |
Calculate the BBrame higher layer payload in bits.
modcod | Used MODCOD in the BBFrame |
frameType | Used BBFrame type (short OR normal) |
Definition at line 509 of file satellite-bbframe-conf.cc.
References ns3::SatUtils::GetCodingRate(), ns3::SatUtils::GetModulatedBits(), m_normalFramePayloadInSlots, m_shortFramePayloadInSlots, m_symbolsPerSlot, ns3::SatEnums::NORMAL_FRAME, and ns3::SatEnums::SHORT_FRAME.
Referenced by SatBbFrameConf().
void ns3::SatBbFrameConf::DumpWaveforms | ( | ) | const |
Dump waveform details for debugging purposes.
Definition at line 484 of file satellite-bbframe-conf.cc.
References m_waveforms.
Time ns3::SatBbFrameConf::GetBbFrameDuration | ( | SatEnums::SatModcod_t | modcod, |
SatEnums::SatBbFrameType_t | frameType | ||
) | const |
Get the BB frame frame duration.
modcod | MODCOD |
frameType | BB frame type: short, normal |
Definition at line 641 of file satellite-bbframe-conf.cc.
References m_waveforms.
|
inline |
Get BB frame header size in bytes.
Definition at line 191 of file satellite-bbframe-conf.h.
References m_bbFrameHeaderSizeInBytes.
|
inline |
Get configured BB frame high occupancy threshold.
Definition at line 201 of file satellite-bbframe-conf.h.
References m_bbFrameHighOccupancyThreshold.
|
inline |
Get configured BB frame low occupancy threshold.
Definition at line 211 of file satellite-bbframe-conf.h.
References m_bbFrameLowOccupancyThreshold.
uint32_t ns3::SatBbFrameConf::GetBbFramePayloadBits | ( | SatEnums::SatModcod_t | modcod, |
SatEnums::SatBbFrameType_t | frameType | ||
) | const |
Get the BB frame payload in bits.
modcod | MODCOD |
frameType | BB frame type: short, normal |
Definition at line 626 of file satellite-bbframe-conf.cc.
References m_waveforms.
|
inline |
Get configured BB frame usage mode.
Definition at line 221 of file satellite-bbframe-conf.h.
References m_bbFrameUsageMode.
SatEnums::SatModcod_t ns3::SatBbFrameConf::GetBestModcod | ( | double | cNo, |
SatEnums::SatBbFrameType_t | frameType | ||
) | const |
Get the best MODCOD with a given BB frame type.
cNo | C/No of the UT to be scheduled |
frameType | Used BBFrame type (short OR normal) |
Definition at line 656 of file satellite-bbframe-conf.cc.
References m_acmEnabled, m_defaultModCod, and m_waveforms.
SatEnums::SatModcod_t ns3::SatBbFrameConf::GetDefaultModCod | ( | ) | const |
Get the default MODCOD.
Definition at line 708 of file satellite-bbframe-conf.cc.
References m_defaultModCod.
SatEnums::SatModcod_t ns3::SatBbFrameConf::GetDefaultModCodDummyFramesS2X | ( | ) | const |
Get the default MODCOD for short DVB-S2X frames.
Definition at line 715 of file satellite-bbframe-conf.cc.
References m_defaultModCodDummyFramesS2X.
Time ns3::SatBbFrameConf::GetDummyBbFrameDuration | ( | ) | const |
Get the dummy frame duration in Time.
Definition at line 649 of file satellite-bbframe-conf.cc.
References m_dummyFrameInSlots, m_symbolRate, and m_symbolsPerSlot.
SatEnums::DvbVersion_t ns3::SatBbFrameConf::GetDvbVersion | ( | ) |
Indicates if using DVB-S2 or DVB-S2X.
Definition at line 495 of file satellite-bbframe-conf.cc.
References m_dvbVersion.
|
virtual |
Get the type ID of instance.
Definition at line 449 of file satellite-bbframe-conf.cc.
References GetTypeId().
|
private |
Get the list of ModCods from their string representation.
Definition at line 574 of file satellite-bbframe-conf.cc.
References ns3::SatEnums::DVB_S2, ns3::SatEnums::DVB_S2X, ns3::SatEnums::GetAvailableModcodsFwdLink(), ns3::SatEnums::GetAvailableModcodsFwdLinkS2X(), ns3::SatEnums::GetModcodFromName(), m_bbFrameS2XPilots, m_bbFrameUsageMode, m_dvbVersion, m_modCodsUsed, m_modCodsUsedStr, and ns3::SatEnums::NORMAL_FRAMES.
Referenced by SatBbFrameConf().
std::vector< SatEnums::SatModcod_t > ns3::SatBbFrameConf::GetModCodsUsed | ( | ) |
Get the list of ModCods used.
Definition at line 502 of file satellite-bbframe-conf.cc.
References m_modCodsUsed.
SatEnums::SatModcod_t ns3::SatBbFrameConf::GetMostRobustModcod | ( | SatEnums::SatBbFrameType_t | frameType | ) | const |
Get the most robust MODCOD with a given BB frame type.
frameType | Used BBFrame type (short OR normal) |
Definition at line 685 of file satellite-bbframe-conf.cc.
References m_mostRobustNormalFrameModcod, m_mostRobustShortFrameModcod, ns3::SatEnums::NORMAL_FRAME, ns3::SatEnums::SAT_NONVALID_MODCOD, and ns3::SatEnums::SHORT_FRAME.
double ns3::SatBbFrameConf::GetSymbolRate | ( | ) |
Symbol rate in baud.
Definition at line 634 of file satellite-bbframe-conf.cc.
References m_symbolRate.
|
static |
Get the type ID.
Definition at line 356 of file satellite-bbframe-conf.cc.
References m_acmEnabled, m_bbFrameHeaderSizeInBytes, m_bbFrameHighOccupancyThreshold, m_bbFrameLowOccupancyThreshold, m_bbFrameS2XPilots, m_bbFrameUsageMode, m_defaultModCodDummyFramesS2XStr, m_defaultModCodStr, m_dummyFrameInSlots, m_modCodsUsedStr, m_pilotBlockInSymbols, m_pilotBlockIntervalInSlots, m_plHeaderInSlots, m_symbolsPerSlot, m_targetBler, ns3::SatEnums::NORMAL_FRAMES, ns3::SatEnums::SHORT_AND_NORMAL_FRAMES, and ns3::SatEnums::SHORT_FRAMES.
Referenced by GetInstanceTypeId().
void ns3::SatBbFrameConf::InitializeCNoRequirements | ( | Ptr< SatLinkResultsFwd > | linkResults | ) |
Initialize the C/No requirements for a given BLER target.
linkResults | DVB-S2, DVB-S2X or DVB-RCS2 link results |
TODO: We have link results for only normal BB frames! The link results for short BB frames should be added and the interface changed to be able to GetEsNoDb for both frame types.
In forward link the link results are in Es/No format, thus here we need to convert the Es/No into C/No: Es/No = (C*Ts)/No = C/No * (1/fs) = C/N
Definition at line 460 of file satellite-bbframe-conf.cc.
References ns3::SatUtils::DbToLinear(), m_symbolRate, m_targetBler, and m_waveforms.
|
private |
Flag to indicate whether ACM is enabled or disabled.
If ACM is disabled, the m_defaultModCod is used.
Definition at line 390 of file satellite-bbframe-conf.h.
Referenced by GetBestModcod(), and GetTypeId().
|
private |
The BB frame header size in bytes.
Definition at line 368 of file satellite-bbframe-conf.h.
Referenced by GetBbFrameHeaderSizeInBytes(), and GetTypeId().
|
private |
The BB frame high occupancy threshold in range 0 - 1.
Definition at line 373 of file satellite-bbframe-conf.h.
Referenced by GetBbFrameHighOccupancyThreshold(), and GetTypeId().
|
private |
The BB frame low occupancy threshold in range 0 - 1.
Definition at line 378 of file satellite-bbframe-conf.h.
Referenced by GetBbFrameLowOccupancyThreshold(), and GetTypeId().
|
private |
Indicates if using pilots in BBFrames when DVB-S2X is chosen.
Definition at line 458 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), GetModCodsList(), and GetTypeId().
|
private |
BBFrame usage mode.
Definition at line 438 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), GetBbFrameUsageMode(), GetModCodsList(), and GetTypeId().
|
private |
Default MODCOD is used.
It will be m_defaultModCodS2 or m_defaultModCodS2X depending on the DVB version chosen: DVB-S2 or DVB-S2X.
TODO: The attribute for m_defaultModCod does not currently accept all MODCODs due to maximum arguments limitation (<=22) of MakeEnumChecker (...)
Definition at line 418 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), GetBestModcod(), and GetDefaultModCod().
|
private |
Default MODCOD for DVB-S2X dummy Frames.
This must be a short frame.
Definition at line 395 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), and GetDefaultModCodDummyFramesS2X().
|
private |
String representation of default ModCod for DVB-S2X Dummy Frames.
Must be only modulation and coding rate in the string. This must exist in short Frame format. Used in the attributes and converted into correct m_defaultModCodDummyFramesS2X. In DVB-S2, Dummy Frames use m_defaultModCod.
Definition at line 404 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), and GetTypeId().
|
private |
The string representation of default ModCod.
Should be only modulation and coding rate. Used in the attributes and converted into correct m_defaultModCod.
Definition at line 425 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), and GetTypeId().
|
private |
Dummy BBFrame length in slots.
Definition at line 363 of file satellite-bbframe-conf.h.
Referenced by GetDummyBbFrameDuration(), and GetTypeId().
|
private |
Indicates if using DVB-S2 or DVB-S2X.
Definition at line 453 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), GetDvbVersion(), and GetModCodsList().
|
private |
List of ModCods used.
Definition at line 463 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), GetModCodsList(), and GetModCodsUsed().
|
private |
String containing all DVB-S2X ModCods used.
Definition at line 468 of file satellite-bbframe-conf.h.
Referenced by GetModCodsList(), and GetTypeId().
|
private |
The most robust MODCOD for long frame.
Definition at line 448 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), and GetMostRobustModcod().
|
private |
The most robust MODCOD for short frame.
Definition at line 443 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), and GetMostRobustModcod().
|
private |
Definition at line 428 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), CalculateBbFrameDuration(), and CalculateBbFramePayloadBits().
|
private |
The size of the pilot block in symbols.
Definition at line 348 of file satellite-bbframe-conf.h.
Referenced by CalculateBbFrameDuration(), and GetTypeId().
|
private |
Interval of pilot block in slots.
Definition at line 353 of file satellite-bbframe-conf.h.
Referenced by CalculateBbFrameDuration(), and GetTypeId().
|
private |
The PL header size in slots.
Definition at line 358 of file satellite-bbframe-conf.h.
Referenced by CalculateBbFrameDuration(), and GetTypeId().
|
private |
Definition at line 427 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), CalculateBbFrameDuration(), and CalculateBbFramePayloadBits().
|
private |
Symbol rate in baud.
Definition at line 338 of file satellite-bbframe-conf.h.
Referenced by CalculateBbFrameDuration(), GetDummyBbFrameDuration(), GetSymbolRate(), and InitializeCNoRequirements().
|
private |
The size of the (data) slot in symbols.
Definition at line 343 of file satellite-bbframe-conf.h.
Referenced by CalculateBbFrameDuration(), CalculateBbFramePayloadBits(), GetDummyBbFrameDuration(), and GetTypeId().
|
private |
Block error rate target for the waveforms.
Default value set as an attribute to 10^(-5).
Definition at line 384 of file satellite-bbframe-conf.h.
Referenced by GetTypeId(), and InitializeCNoRequirements().
|
private |
Available "waveforms", i.e.
MODCOD + BBFrame combinations
Definition at line 433 of file satellite-bbframe-conf.h.
Referenced by SatBbFrameConf(), DumpWaveforms(), GetBbFrameDuration(), GetBbFramePayloadBits(), GetBestModcod(), and InitializeCNoRequirements().