ns3::SatBbFrameConf Class Reference

This class implements the BB Frame configurations for DVB-S2. More...

#include "satellite-bbframe-conf.h"

+ Inheritance diagram for ns3::SatBbFrameConf:
+ Collaboration diagram for ns3::SatBbFrameConf:

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_tGetModCodsUsed ()
 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_tm_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...
 

Detailed Description

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 144 of file satellite-bbframe-conf.h.

Member Typedef Documentation

◆ waveformMap_t

Define type waveformMap_t.

Definition at line 180 of file satellite-bbframe-conf.h.

Constructor & Destructor Documentation

◆ SatBbFrameConf() [1/2]

ns3::SatBbFrameConf::SatBbFrameConf ( )

Default constructor.

Definition at line 139 of file satellite-bbframe-conf.cc.

◆ SatBbFrameConf() [2/2]

◆ ~SatBbFrameConf()

ns3::SatBbFrameConf::~SatBbFrameConf ( )
virtual

Destructor for SatBbFrameConf.

Definition at line 451 of file satellite-bbframe-conf.cc.

Member Function Documentation

◆ CalculateBbFrameDuration()

Time ns3::SatBbFrameConf::CalculateBbFrameDuration ( SatEnums::SatModcod_t  modcod,
SatEnums::SatBbFrameType_t  frameType 
) const
private

Calculate the BBFrame duration in Time.

Parameters
modcodUsed MODCOD in the BBFrame
frameTypeUsed BBFrame type (short OR normal)
symbolRateThe symbol rate of the scheduled carrier
Returns
The BBFrame duration in Time

Definition at line 535 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().

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

◆ CalculateBbFramePayloadBits()

uint32_t ns3::SatBbFrameConf::CalculateBbFramePayloadBits ( SatEnums::SatModcod_t  modcod,
SatEnums::SatBbFrameType_t  frameType 
) const
private

Calculate the BBrame higher layer payload in bits.

Parameters
modcodUsed MODCOD in the BBFrame
frameTypeUsed BBFrame type (short OR normal)
Returns
The maximum payload in bits

Definition at line 506 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().

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

◆ DumpWaveforms()

void ns3::SatBbFrameConf::DumpWaveforms ( ) const

Dump waveform details for debugging purposes.

Definition at line 481 of file satellite-bbframe-conf.cc.

References m_waveforms.

◆ GetBbFrameDuration()

Time ns3::SatBbFrameConf::GetBbFrameDuration ( SatEnums::SatModcod_t  modcod,
SatEnums::SatBbFrameType_t  frameType 
) const

Get the BB frame frame duration.

Parameters
modcodMODCOD
frameTypeBB frame type: short, normal

Definition at line 638 of file satellite-bbframe-conf.cc.

References m_waveforms.

◆ GetBbFrameHeaderSizeInBytes()

uint32_t ns3::SatBbFrameConf::GetBbFrameHeaderSizeInBytes ( ) const
inline

Get BB frame header size in bytes.

Returns
BB frame header size in bytes

Definition at line 187 of file satellite-bbframe-conf.h.

References m_bbFrameHeaderSizeInBytes.

◆ GetBbFrameHighOccupancyThreshold()

double ns3::SatBbFrameConf::GetBbFrameHighOccupancyThreshold ( ) const
inline

Get configured BB frame high occupancy threshold.

Returns
BB frame high occupancy threshold

Definition at line 197 of file satellite-bbframe-conf.h.

References m_bbFrameHighOccupancyThreshold.

◆ GetBbFrameLowOccupancyThreshold()

double ns3::SatBbFrameConf::GetBbFrameLowOccupancyThreshold ( ) const
inline

Get configured BB frame low occupancy threshold.

Returns
BB frame low occupancy threshold

Definition at line 207 of file satellite-bbframe-conf.h.

References m_bbFrameLowOccupancyThreshold.

◆ GetBbFramePayloadBits()

uint32_t ns3::SatBbFrameConf::GetBbFramePayloadBits ( SatEnums::SatModcod_t  modcod,
SatEnums::SatBbFrameType_t  frameType 
) const

Get the BB frame payload in bits.

Parameters
modcodMODCOD
frameTypeBB frame type: short, normal

Definition at line 623 of file satellite-bbframe-conf.cc.

References m_waveforms.

◆ GetBbFrameUsageMode()

SatEnums::BbFrameUsageMode_t ns3::SatBbFrameConf::GetBbFrameUsageMode ( ) const
inline

Get configured BB frame usage mode.

Returns
BB frame usage mode

Definition at line 217 of file satellite-bbframe-conf.h.

References m_bbFrameUsageMode.

◆ GetBestModcod()

SatEnums::SatModcod_t ns3::SatBbFrameConf::GetBestModcod ( double  cNo,
SatEnums::SatBbFrameType_t  frameType 
) const

Get the best MODCOD with a given BB frame type.

Parameters
cNoC/No of the UT to be scheduled
frameTypeUsed BBFrame type (short OR normal)
Returns
SatModcod_t The best MODCOD

Definition at line 653 of file satellite-bbframe-conf.cc.

References m_acmEnabled, m_defaultModCod, and m_waveforms.

◆ GetDefaultModCod()

SatEnums::SatModcod_t ns3::SatBbFrameConf::GetDefaultModCod ( ) const

Get the default MODCOD.

Returns
SatModcod_t The default MODCOD

Definition at line 705 of file satellite-bbframe-conf.cc.

References m_defaultModCod.

◆ GetDefaultModCodDummyFramesS2X()

SatEnums::SatModcod_t ns3::SatBbFrameConf::GetDefaultModCodDummyFramesS2X ( ) const

Get the default MODCOD for short DVB-S2X frames.

Returns
SatModcod_t The default MODCOD for short DVB-S2X frames

Definition at line 712 of file satellite-bbframe-conf.cc.

References m_defaultModCodDummyFramesS2X.

◆ GetDummyBbFrameDuration()

Time ns3::SatBbFrameConf::GetDummyBbFrameDuration ( ) const

Get the dummy frame duration in Time.

Returns
The dummy BBFrame length in Time

Definition at line 646 of file satellite-bbframe-conf.cc.

References m_dummyFrameInSlots, m_symbolRate, and m_symbolsPerSlot.

◆ GetDvbVersion()

SatEnums::DvbVersion_t ns3::SatBbFrameConf::GetDvbVersion ( )

Indicates if using DVB-S2 or DVB-S2X.

Returns
The DVB version chosen

Definition at line 492 of file satellite-bbframe-conf.cc.

References m_dvbVersion.

◆ GetInstanceTypeId()

TypeId ns3::SatBbFrameConf::GetInstanceTypeId ( void  ) const
virtual

Get the type ID of instance.

Returns
the object TypeId

Definition at line 446 of file satellite-bbframe-conf.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetModCodsList()

void ns3::SatBbFrameConf::GetModCodsList ( )
private

Get the list of ModCods from their string representation.

Definition at line 571 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().

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

◆ GetModCodsUsed()

std::vector< SatEnums::SatModcod_t > ns3::SatBbFrameConf::GetModCodsUsed ( )

Get the list of ModCods used.

Returns
All the ModCods used in this conf.

Definition at line 499 of file satellite-bbframe-conf.cc.

References m_modCodsUsed.

◆ GetMostRobustModcod()

SatEnums::SatModcod_t ns3::SatBbFrameConf::GetMostRobustModcod ( SatEnums::SatBbFrameType_t  frameType) const

Get the most robust MODCOD with a given BB frame type.

Parameters
frameTypeUsed BBFrame type (short OR normal)
Returns
SatModcod_t The most robust MODCOD

Definition at line 682 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.

◆ GetSymbolRate()

double ns3::SatBbFrameConf::GetSymbolRate ( )

Symbol rate in baud.

Returns
Symbol rate in baud

Definition at line 631 of file satellite-bbframe-conf.cc.

References m_symbolRate.

◆ GetTypeId()

◆ InitializeCNoRequirements()

void ns3::SatBbFrameConf::InitializeCNoRequirements ( Ptr< SatLinkResultsFwd linkResults)

Initialize the C/No requirements for a given BLER target.

Parameters
linkResultsDVB-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 457 of file satellite-bbframe-conf.cc.

References ns3::SatUtils::DbToLinear(), m_symbolRate, m_targetBler, and m_waveforms.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_acmEnabled

bool ns3::SatBbFrameConf::m_acmEnabled
private

Flag to indicate whether ACM is enabled or disabled.

If ACM is disabled, the m_defaultModCod is used.

Definition at line 386 of file satellite-bbframe-conf.h.

Referenced by GetBestModcod(), and GetTypeId().

◆ m_bbFrameHeaderSizeInBytes

uint32_t ns3::SatBbFrameConf::m_bbFrameHeaderSizeInBytes
private

The BB frame header size in bytes.

Definition at line 364 of file satellite-bbframe-conf.h.

Referenced by GetBbFrameHeaderSizeInBytes(), and GetTypeId().

◆ m_bbFrameHighOccupancyThreshold

double ns3::SatBbFrameConf::m_bbFrameHighOccupancyThreshold
private

The BB frame high occupancy threshold in range 0 - 1.

Definition at line 369 of file satellite-bbframe-conf.h.

Referenced by GetBbFrameHighOccupancyThreshold(), and GetTypeId().

◆ m_bbFrameLowOccupancyThreshold

double ns3::SatBbFrameConf::m_bbFrameLowOccupancyThreshold
private

The BB frame low occupancy threshold in range 0 - 1.

Definition at line 374 of file satellite-bbframe-conf.h.

Referenced by GetBbFrameLowOccupancyThreshold(), and GetTypeId().

◆ m_bbFrameS2XPilots

bool ns3::SatBbFrameConf::m_bbFrameS2XPilots
private

Indicates if using pilots in BBFrames when DVB-S2X is chosen.

Definition at line 454 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), GetModCodsList(), and GetTypeId().

◆ m_bbFrameUsageMode

SatEnums::BbFrameUsageMode_t ns3::SatBbFrameConf::m_bbFrameUsageMode
private

BBFrame usage mode.

Definition at line 434 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), GetBbFrameUsageMode(), GetModCodsList(), and GetTypeId().

◆ m_defaultModCod

SatEnums::SatModcod_t ns3::SatBbFrameConf::m_defaultModCod
private

Default MODCOD is used.

  • For broadcast control messages
  • When ACM is disabled
  • When there is not valid C/No information

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 414 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), GetBestModcod(), and GetDefaultModCod().

◆ m_defaultModCodDummyFramesS2X

SatEnums::SatModcod_t ns3::SatBbFrameConf::m_defaultModCodDummyFramesS2X
private

Default MODCOD for DVB-S2X dummy Frames.

This must be a short frame.

Definition at line 391 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), and GetDefaultModCodDummyFramesS2X().

◆ m_defaultModCodDummyFramesS2XStr

std::string ns3::SatBbFrameConf::m_defaultModCodDummyFramesS2XStr
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 400 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), and GetTypeId().

◆ m_defaultModCodStr

std::string ns3::SatBbFrameConf::m_defaultModCodStr
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 421 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), and GetTypeId().

◆ m_dummyFrameInSlots

uint32_t ns3::SatBbFrameConf::m_dummyFrameInSlots
private

Dummy BBFrame length in slots.

Definition at line 359 of file satellite-bbframe-conf.h.

Referenced by GetDummyBbFrameDuration(), and GetTypeId().

◆ m_dvbVersion

SatEnums::DvbVersion_t ns3::SatBbFrameConf::m_dvbVersion
private

Indicates if using DVB-S2 or DVB-S2X.

Definition at line 449 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), GetDvbVersion(), and GetModCodsList().

◆ m_modCodsUsed

std::vector<SatEnums::SatModcod_t> ns3::SatBbFrameConf::m_modCodsUsed
private

List of ModCods used.

Definition at line 459 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), GetModCodsList(), and GetModCodsUsed().

◆ m_modCodsUsedStr

std::string ns3::SatBbFrameConf::m_modCodsUsedStr
private

String containing all DVB-S2X ModCods used.

Definition at line 464 of file satellite-bbframe-conf.h.

Referenced by GetModCodsList(), and GetTypeId().

◆ m_mostRobustNormalFrameModcod

SatEnums::SatModcod_t ns3::SatBbFrameConf::m_mostRobustNormalFrameModcod
private

The most robust MODCOD for long frame.

Definition at line 444 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), and GetMostRobustModcod().

◆ m_mostRobustShortFrameModcod

SatEnums::SatModcod_t ns3::SatBbFrameConf::m_mostRobustShortFrameModcod
private

The most robust MODCOD for short frame.

Definition at line 439 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), and GetMostRobustModcod().

◆ m_normalFramePayloadInSlots

std::map<uint32_t, uint32_t> ns3::SatBbFrameConf::m_normalFramePayloadInSlots
private

◆ m_pilotBlockInSymbols

uint32_t ns3::SatBbFrameConf::m_pilotBlockInSymbols
private

The size of the pilot block in symbols.

Definition at line 344 of file satellite-bbframe-conf.h.

Referenced by CalculateBbFrameDuration(), and GetTypeId().

◆ m_pilotBlockIntervalInSlots

uint32_t ns3::SatBbFrameConf::m_pilotBlockIntervalInSlots
private

Interval of pilot block in slots.

Definition at line 349 of file satellite-bbframe-conf.h.

Referenced by CalculateBbFrameDuration(), and GetTypeId().

◆ m_plHeaderInSlots

uint32_t ns3::SatBbFrameConf::m_plHeaderInSlots
private

The PL header size in slots.

Definition at line 354 of file satellite-bbframe-conf.h.

Referenced by CalculateBbFrameDuration(), and GetTypeId().

◆ m_shortFramePayloadInSlots

std::map<uint32_t, uint32_t> ns3::SatBbFrameConf::m_shortFramePayloadInSlots
private

◆ m_symbolRate

double ns3::SatBbFrameConf::m_symbolRate
private

◆ m_symbolsPerSlot

uint32_t ns3::SatBbFrameConf::m_symbolsPerSlot
private

The size of the (data) slot in symbols.

Definition at line 339 of file satellite-bbframe-conf.h.

Referenced by CalculateBbFrameDuration(), CalculateBbFramePayloadBits(), GetDummyBbFrameDuration(), and GetTypeId().

◆ m_targetBler

double ns3::SatBbFrameConf::m_targetBler
private

Block error rate target for the waveforms.

Default value set as an attribute to 10^(-5).

Definition at line 380 of file satellite-bbframe-conf.h.

Referenced by GetTypeId(), and InitializeCNoRequirements().

◆ m_waveforms

waveformMap_t ns3::SatBbFrameConf::m_waveforms
private

Available "waveforms", i.e.

MODCOD + BBFrame combinations

Definition at line 429 of file satellite-bbframe-conf.h.

Referenced by SatBbFrameConf(), DumpWaveforms(), GetBbFrameDuration(), GetBbFramePayloadBits(), GetBestModcod(), and InitializeCNoRequirements().


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