Loading...
Searching...
No Matches
SatFrameAllocatorTestCase Class Reference

Test case to unit test Satellite Frame Allocator. More...

Inheritance diagram for SatFrameAllocatorTestCase:
Collaboration diagram for SatFrameAllocatorTestCase:

Public Member Functions

 SatFrameAllocatorTestCase ()
virtual ~SatFrameAllocatorTestCase ()

Private Types

typedef std::map< Address, std::pair< SatFrameAllocator::SatFrameAllocReq, uint32_t > > ReqInfo_t

Private Member Functions

void CheckMultiUtTestResults (SatFrameAllocator::UtAllocInfoContainer_t &utAllocContainer, ReqInfo_t &reqInfo)
void CheckSingleUtTestResults (uint32_t bytesReq, SatFrameAllocator::SatFrameAllocReq req, bool allocated, SatSuperframeConf::ConfigType_t configType, SatFrameAllocator::TbtpMsgContainer_t &tbtpContainer, SatFrameAllocator::UtAllocInfoContainer_t &utAllocContainer, bool rcBasedAllocation, bool fcaEnabled, bool acmEnabled)
SatFrameAllocator::SatFrameAllocReq ContructRequestForUt (uint32_t &totalBytes, uint32_t craBytes, uint32_t minRbdcBytes, uint32_t rbdcBytes, uint32_t vbdcBytes, uint32_t rcCount, bool controlSlot)
virtual void DoRun (void)
void InitFrame (SatSuperframeConf::ConfigType_t configType)
void RunMultiUtTest ()
void RunSingleUtTest (SatSuperframeConf::ConfigType_t configType, bool acmEnabled, bool fcaEnabled)

Private Attributes

SatFrameAllocator::CcLevel_t m_ccLevels [m_ccLevelCount]
uint32_t m_cnoIndex
double m_cnoValues [m_cnoValueCount]
Ptr< SatFrameAllocatorm_frameAllocator
Ptr< SatFrameConfm_frameConf
Ptr< SatWaveformConfm_waveFormConf

Static Private Attributes

static const uint32_t m_ccLevelCount = 4
static const uint32_t m_cnoValueCount = 10

Detailed Description

Test case to unit test Satellite Frame Allocator.

This case tests that SatFrameAllocator object allocates symbols (time slots) for UT/RCs correctly with different configurations.

  1. Create frame configuration and frame allocator.
  2. Reset allocator (method Reset)
  3. Allocate UT(s) with RCs to Allocator (method Allocate)
  4. When desired UTs allocated, pre-allocate symbols for the UT/RC(s). (method PreAllocateSymbols)
  5. Finally generate time slots for UTs (method GenerateTimeSlots) by enabling/disabling RC based allocation.
  6. Repeat steps 2 - 5 with different combination of UT/RCs.

Expected result: Time slots for UT/RC should be generated according to allocation requests and limits in frames.

NOTE: Control slot generation should be also enabled for some allocation requests. Test should executed with ACM enabled and disabled, FCA enabled and disabled.

Definition at line 70 of file satellite-frame-allocator-test.cc.

Member Typedef Documentation

◆ ReqInfo_t

typedef std::map<Address, std::pair<SatFrameAllocator::SatFrameAllocReq, uint32_t> > SatFrameAllocatorTestCase::ReqInfo_t
private

Definition at line 77 of file satellite-frame-allocator-test.cc.

Constructor & Destructor Documentation

◆ SatFrameAllocatorTestCase()

◆ ~SatFrameAllocatorTestCase()

SatFrameAllocatorTestCase::~SatFrameAllocatorTestCase ( )
virtual

Definition at line 145 of file satellite-frame-allocator-test.cc.

Member Function Documentation

◆ CheckMultiUtTestResults()

void SatFrameAllocatorTestCase::CheckMultiUtTestResults ( SatFrameAllocator::UtAllocInfoContainer_t & utAllocContainer,
ReqInfo_t & reqInfo )
private

Definition at line 633 of file satellite-frame-allocator-test.cc.

References m_frameConf.

Referenced by RunMultiUtTest().

Here is the caller graph for this function:

◆ CheckSingleUtTestResults()

void SatFrameAllocatorTestCase::CheckSingleUtTestResults ( uint32_t bytesReq,
SatFrameAllocator::SatFrameAllocReq req,
bool allocated,
SatSuperframeConf::ConfigType_t configType,
SatFrameAllocator::TbtpMsgContainer_t & tbtpContainer,
SatFrameAllocator::UtAllocInfoContainer_t & utAllocContainer,
bool rcBasedAllocation,
bool fcaEnabled,
bool acmEnabled )
private

◆ ContructRequestForUt()

SatFrameAllocator::SatFrameAllocReq SatFrameAllocatorTestCase::ContructRequestForUt ( uint32_t & totalBytes,
uint32_t craBytes,
uint32_t minRbdcBytes,
uint32_t rbdcBytes,
uint32_t vbdcBytes,
uint32_t rcCount,
bool controlSlot )
private

◆ DoRun()

void SatFrameAllocatorTestCase::DoRun ( void )
privatevirtual

◆ InitFrame()

◆ RunMultiUtTest()

void SatFrameAllocatorTestCase::RunMultiUtTest ( )
private

Definition at line 507 of file satellite-frame-allocator-test.cc.

References ns3::SatFrameAllocator::CC_LEVEL_CRA, CheckMultiUtTestResults(), ns3::SatSuperframeConf::CONFIG_TYPE_0, ContructRequestForUt(), InitFrame(), m_ccLevelCount, m_ccLevels, m_frameAllocator, and m_waveFormConf.

Referenced by DoRun().

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

◆ RunSingleUtTest()

void SatFrameAllocatorTestCase::RunSingleUtTest ( SatSuperframeConf::ConfigType_t configType,
bool acmEnabled,
bool fcaEnabled )
private

Definition at line 183 of file satellite-frame-allocator-test.cc.

References CheckSingleUtTestResults(), ContructRequestForUt(), InitFrame(), m_ccLevelCount, m_ccLevels, ns3::SatFrameAllocator::SatFrameAllocReq::m_cno, m_frameAllocator, m_frameConf, and m_waveFormConf.

Referenced by DoRun().

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

Member Data Documentation

◆ m_ccLevelCount

const uint32_t SatFrameAllocatorTestCase::m_ccLevelCount = 4
staticprivate

Definition at line 79 of file satellite-frame-allocator-test.cc.

Referenced by RunMultiUtTest(), and RunSingleUtTest().

◆ m_ccLevels

SatFrameAllocator::CcLevel_t SatFrameAllocatorTestCase::m_ccLevels[m_ccLevelCount]
private

◆ m_cnoIndex

uint32_t SatFrameAllocatorTestCase::m_cnoIndex
private

◆ m_cnoValueCount

const uint32_t SatFrameAllocatorTestCase::m_cnoValueCount = 10
staticprivate

Definition at line 80 of file satellite-frame-allocator-test.cc.

Referenced by ContructRequestForUt().

◆ m_cnoValues

double SatFrameAllocatorTestCase::m_cnoValues[m_cnoValueCount]
private

◆ m_frameAllocator

Ptr<SatFrameAllocator> SatFrameAllocatorTestCase::m_frameAllocator
private

◆ m_frameConf

Ptr<SatFrameConf> SatFrameAllocatorTestCase::m_frameConf
private

◆ m_waveFormConf

Ptr<SatWaveformConf> SatFrameAllocatorTestCase::m_waveFormConf
private

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