ns3::SatDefaultSuperframeAllocator Class Reference

helper class for Satellite Beam Scheduler. More...

#include "satellite-default-superframe-allocator.h"

+ Inheritance diagram for ns3::SatDefaultSuperframeAllocator:
+ Collaboration diagram for ns3::SatDefaultSuperframeAllocator:

Public Member Functions

 SatDefaultSuperframeAllocator (Ptr< SatSuperframeConf > superFrameConf)
 Construct SatDefaultSuperframeAllocator. More...
 
 ~SatDefaultSuperframeAllocator ()
 Destruct SatDefaultSuperframeAllocator. More...
 
void GenerateTimeSlots (SatFrameAllocator::TbtpMsgContainer_t &tbtpContainer, uint32_t maxSizeInBytes, SatFrameAllocator::UtAllocInfoContainer_t &utAllocContainer, TracedCallback< uint32_t > waveformTrace, TracedCallback< uint32_t, uint32_t > utLoadTrace, TracedCallback< uint32_t, double > loadTrace)
 Generate time slots in TBTP(s) for the UT/RC. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the type ID of instance. More...
 
void PreAllocateSymbols (SatFrameAllocator::SatFrameAllocContainer_t &allocReqs)
 Preallocate symbols for given to UTs in superframe. More...
 
void ReleaseMinimumRate (uint32_t minimumRateBytes, bool controlSlotsEnabled)
 Release minimum rate from the allocator. More...
 
void ReserveMinimumRate (uint32_t minimumRateBytes, bool controlSlotsEnabled)
 Reserve minimum rate from the allocator. More...
 
- Public Member Functions inherited from ns3::SatSuperframeAllocator
 SatSuperframeAllocator (Ptr< SatSuperframeConf > superFrameConf)
 Construct SatSuperframeAllocator. More...
 
virtual ~SatSuperframeAllocator ()
 Destruct SatSuperframeAllocator. More...
 
Time GetSuperframeDuration () const
 Get super frame duration. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 derived from object More...
 
- Static Public Member Functions inherited from ns3::SatSuperframeAllocator
static TypeId GetTypeId (void)
 derived from object More...
 

Private Types

typedef std::vector< Ptr< SatFrameAllocator > > FrameAllocatorContainer_t
 Container for SatFrameInfo items. More...
 
typedef std::map< Ptr< SatFrameAllocator >, uint32_t > SupportedFramesMap_t
 Container for the supported SatFrameAllocator (frames). More...
 

Private Member Functions

bool AllocateBasedOnCc (SatFrameAllocator::CcLevel_t ccLevel, SatFrameAllocator::SatFrameAllocReq *allocReq, const SupportedFramesMap_t &frames)
 Allocate given request according to type. More...
 
bool AllocateToFrame (SatFrameAllocator::SatFrameAllocReq *allocReq)
 Allocate a request to a frame. More...
 
void RemoveAllocations ()
 Remove allocations from all frames maintained by frame allocator. More...
 
Ptr< SatFrameAllocatorSelectBestCarrier (double cno, uint32_t &bestWaveFormId)
 Select which carrier is the best suited for handling requests of a terminal communicating at the given C/N0. More...
 
void SelectCarriers (SatFrameAllocator::SatFrameAllocContainer_t &allocReqs)
 Select which carriers to use from the underlying frames. More...
 

Private Attributes

bool m_fcaEnabled
 
FrameAllocatorContainer_t m_frameAllocators
 
uint32_t m_minCarrierPayloadInBytes
 
uint32_t m_minimumRateBasedBytesLeft
 
uint32_t m_mostRobustSlotPayloadInBytes
 
bool m_rcBasedAllocationEnabled
 
double m_targetLoad
 
double m_totalBandwidth
 

Additional Inherited Members

- Protected Attributes inherited from ns3::SatSuperframeAllocator
Ptr< SatSuperframeConfm_superframeConf
 

Detailed Description

helper class for Satellite Beam Scheduler.

SatDefaultSuperframeAllocator class is used by SatBeamScheduler to maintain information of the pre-allocated symbols per Capacity Category (CC) in frame. It also knows physical constrains of the frames.

SatDefaultSuperframeAllocator is created and used by SatBeamScheduler.

Definition at line 50 of file satellite-default-superframe-allocator.h.

Member Typedef Documentation

◆ FrameAllocatorContainer_t

Container for SatFrameInfo items.

Definition at line 119 of file satellite-default-superframe-allocator.h.

◆ SupportedFramesMap_t

Container for the supported SatFrameAllocator (frames).

Definition at line 124 of file satellite-default-superframe-allocator.h.

Constructor & Destructor Documentation

◆ SatDefaultSuperframeAllocator()

ns3::SatDefaultSuperframeAllocator::SatDefaultSuperframeAllocator ( Ptr< SatSuperframeConf superFrameConf)

◆ ~SatDefaultSuperframeAllocator()

ns3::SatDefaultSuperframeAllocator::~SatDefaultSuperframeAllocator ( )

Member Function Documentation

◆ AllocateBasedOnCc()

bool ns3::SatDefaultSuperframeAllocator::AllocateBasedOnCc ( SatFrameAllocator::CcLevel_t  ccLevel,
SatFrameAllocator::SatFrameAllocReq allocReq,
const SupportedFramesMap_t frames 
)
private

Allocate given request according to type.

Parameters
ccLevelCC level of the request
allocReqRequested bytes
framesInformation of the possibles frames to allocate.
Returns

Definition at line 464 of file satellite-default-superframe-allocator.cc.

Referenced by AllocateToFrame().

+ Here is the caller graph for this function:

◆ AllocateToFrame()

bool ns3::SatDefaultSuperframeAllocator::AllocateToFrame ( SatFrameAllocator::SatFrameAllocReq allocReq)
private

Allocate a request to a frame.

Parameters
allocReqAllocation request parameters for RC/CCs
Returns
true when allocation is successful, false otherwise

Definition at line 407 of file satellite-default-superframe-allocator.cc.

References AllocateBasedOnCc(), ns3::SatFrameAllocator::CC_LEVEL_CRA, ns3::SatFrameAllocator::CC_LEVEL_CRA_MIN_RBDC, ns3::SatFrameAllocator::CC_LEVEL_CRA_RBDC, ns3::SatFrameAllocator::CC_LEVEL_CRA_RBDC_VBDC, ns3::SatFrameAllocator::SatFrameAllocReq::m_cno, and m_frameAllocators.

Referenced by PreAllocateSymbols().

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

◆ GenerateTimeSlots()

void ns3::SatDefaultSuperframeAllocator::GenerateTimeSlots ( SatFrameAllocator::TbtpMsgContainer_t tbtpContainer,
uint32_t  maxSizeInBytes,
SatFrameAllocator::UtAllocInfoContainer_t utAllocContainer,
TracedCallback< uint32_t >  waveformTrace,
TracedCallback< uint32_t, uint32_t >  utLoadTrace,
TracedCallback< uint32_t, double >  loadTrace 
)
virtual

Generate time slots in TBTP(s) for the UT/RC.

Parameters
tbtpContainerTBTP message container to add/fill TBTPs.
maxSizeInBytesMaximum size for a TBTP message.
utAllocContainerReference to UT allocation container to fill in info of the allocation
waveformTraceWave form trace callback
utLoadTraceUT load per the frame trace callback
loadTraceLoad per the frame trace callback

Implements ns3::SatSuperframeAllocator.

Definition at line 293 of file satellite-default-superframe-allocator.cc.

References m_frameAllocators, and m_rcBasedAllocationEnabled.

◆ GetInstanceTypeId()

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

Get the type ID of instance.

Returns
the object TypeId

Reimplemented from ns3::SatSuperframeAllocator.

Definition at line 67 of file satellite-default-superframe-allocator.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::SatDefaultSuperframeAllocator::GetTypeId ( void  )
static

derived from object

Definition at line 42 of file satellite-default-superframe-allocator.cc.

References m_fcaEnabled, m_rcBasedAllocationEnabled, and m_targetLoad.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ PreAllocateSymbols()

void ns3::SatDefaultSuperframeAllocator::PreAllocateSymbols ( SatFrameAllocator::SatFrameAllocContainer_t allocReqs)
virtual

Preallocate symbols for given to UTs in superframe.

Pre-allocation is done in fairly manner between UTs and RCs.

Implements ns3::SatSuperframeAllocator.

Definition at line 323 of file satellite-default-superframe-allocator.cc.

References AllocateToFrame(), ns3::SatSuperframeConf::CONFIG_TYPE_3, m_fcaEnabled, m_frameAllocators, ns3::SatSuperframeAllocator::m_superframeConf, m_targetLoad, RemoveAllocations(), and SelectCarriers().

+ Here is the call graph for this function:

◆ ReleaseMinimumRate()

void ns3::SatDefaultSuperframeAllocator::ReleaseMinimumRate ( uint32_t  minimumRateBytes,
bool  controlSlotsEnabled 
)
virtual

Release minimum rate from the allocator.

This method is called when a UT leaves the beam using this allocator.

Parameters
minimumRateBytesMinimum rate based bytes needed to reserve
controlSlotsEnabledFlag indicating if control slot generation is enabled

Implements ns3::SatSuperframeAllocator.

Definition at line 382 of file satellite-default-superframe-allocator.cc.

References m_minCarrierPayloadInBytes, m_minimumRateBasedBytesLeft, and m_mostRobustSlotPayloadInBytes.

◆ RemoveAllocations()

void ns3::SatDefaultSuperframeAllocator::RemoveAllocations ( )
private

Remove allocations from all frames maintained by frame allocator.

Definition at line 280 of file satellite-default-superframe-allocator.cc.

References m_frameAllocators.

Referenced by PreAllocateSymbols().

+ Here is the caller graph for this function:

◆ ReserveMinimumRate()

void ns3::SatDefaultSuperframeAllocator::ReserveMinimumRate ( uint32_t  minimumRateBytes,
bool  controlSlotsEnabled 
)
virtual

Reserve minimum rate from the allocator.

This method is called to perform CAC functionality.

Parameters
minimumRateBytesMinimum rate based bytes needed to reserve
controlSlotsEnabledFlag indicating if control slot generation is enabled

Implements ns3::SatSuperframeAllocator.

Definition at line 351 of file satellite-default-superframe-allocator.cc.

References m_minCarrierPayloadInBytes, m_minimumRateBasedBytesLeft, and m_mostRobustSlotPayloadInBytes.

◆ SelectBestCarrier()

Ptr< SatFrameAllocator > ns3::SatDefaultSuperframeAllocator::SelectBestCarrier ( double  cno,
uint32_t &  bestWaveFormId 
)
private

Select which carrier is the best suited for handling requests of a terminal communicating at the given C/N0.

Returns
The SatFrameAllocator suitable for such carriers or nullptr if none can be found.

Definition at line 253 of file satellite-default-superframe-allocator.cc.

References m_frameAllocators.

Referenced by SelectCarriers().

+ Here is the caller graph for this function:

◆ SelectCarriers()

void ns3::SatDefaultSuperframeAllocator::SelectCarriers ( SatFrameAllocator::SatFrameAllocContainer_t allocReqs)
private

Select which carriers to use from the underlying frames.

This method is called to perform dynamic frequency plan functionality. It should be called only if the superframe configuration is of the CONFIG_TYPE_3 type.

Definition at line 143 of file satellite-default-superframe-allocator.cc.

References m_frameAllocators, m_totalBandwidth, and SelectBestCarrier().

Referenced by PreAllocateSymbols().

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

Member Data Documentation

◆ m_fcaEnabled

bool ns3::SatDefaultSuperframeAllocator::m_fcaEnabled
private

Definition at line 133 of file satellite-default-superframe-allocator.h.

Referenced by GetTypeId(), and PreAllocateSymbols().

◆ m_frameAllocators

◆ m_minCarrierPayloadInBytes

uint32_t ns3::SatDefaultSuperframeAllocator::m_minCarrierPayloadInBytes
private

◆ m_minimumRateBasedBytesLeft

uint32_t ns3::SatDefaultSuperframeAllocator::m_minimumRateBasedBytesLeft
private

◆ m_mostRobustSlotPayloadInBytes

uint32_t ns3::SatDefaultSuperframeAllocator::m_mostRobustSlotPayloadInBytes
private

◆ m_rcBasedAllocationEnabled

bool ns3::SatDefaultSuperframeAllocator::m_rcBasedAllocationEnabled
private

Definition at line 143 of file satellite-default-superframe-allocator.h.

Referenced by GenerateTimeSlots(), and GetTypeId().

◆ m_targetLoad

double ns3::SatDefaultSuperframeAllocator::m_targetLoad
private

Definition at line 130 of file satellite-default-superframe-allocator.h.

Referenced by GetTypeId(), and PreAllocateSymbols().

◆ m_totalBandwidth

double ns3::SatDefaultSuperframeAllocator::m_totalBandwidth
private

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