ns3::SatFadingExternalInputTraceContainer Class Reference

Container class for external input fading traces. More...

#include "satellite-fading-external-input-trace-container.h"

+ Inheritance diagram for ns3::SatFadingExternalInputTraceContainer:
+ Collaboration diagram for ns3::SatFadingExternalInputTraceContainer:

Public Types

typedef std::pair< Ptr< SatFadingExternalInputTrace >, Ptr< SatFadingExternalInputTrace > > ChannelTracePair_t
 Define type ChannelTracePair_t. More...
 
enum  InputMode_t { LIST_MODE , POSITION_MODE , RANDOM_MODE }
 Definitions for different modes of using trace input files. More...
 

Public Member Functions

 SatFadingExternalInputTraceContainer ()
 Constructor. More...
 
 ~SatFadingExternalInputTraceContainer ()
 Destructor. More...
 
Ptr< SatFadingExternalInputTraceGetFadingTrace (uint32_t nodeId, SatEnums::ChannelType_t channelType, Ptr< MobilityModel > mobility)
 Get method for getting a proper fading trace. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the type ID of instance. More...
 
bool TestFadingTraces (uint32_t numOfUts, uint32_t numOfGws)
 A method to test that the fading traces are according to assumptions. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Types

typedef std::vector< TraceFileContainerItem_tTraceFileContainer_t
 
typedef std::pair< std::string, GeoCoordinateTraceFileContainerItem_t
 
typedef std::map< std::string, Ptr< SatFadingExternalInputTrace > > TraceInputContainer_t
 

Private Member Functions

Ptr< SatFadingExternalInputTraceCreateFadingTrace (SatFadingExternalInputTrace::TraceFileType_e fileType, InputMode_t inputMode, TraceFileContainer_t &container, uint32_t id, Ptr< MobilityModel > mobility)
 Create (or load) fading trace source for the requested UT/GW. More...
 
void CreateGwFadingTrace (uint32_t gwId, Ptr< MobilityModel > mobility)
 Create new GW fading trace. More...
 
void CreateUtFadingTrace (uint32_t utId, Ptr< MobilityModel > mobility)
 Create new UT fading trace. More...
 
std::string FindSourceBasedOnPosition (TraceFileContainer_t &container, uint32_t id, Ptr< MobilityModel > mobility)
 Find the nearest fading trace source file for the requested UT/GW based on given mobility. More...
 
void LoadIndexFiles ()
 Initialize index files. More...
 
void ReadIndexFile (std::string indexFile, TraceFileContainer_t &container)
 Read trace file information from given index file. More...
 

Private Attributes

std::string m_dataPath
 data path to find trace input files More...
 
std::map< uint32_t, ChannelTracePair_tm_gwFadingMap
 Container of the GW fading traces. More...
 
TraceFileContainer_t m_gwFwdUpFileNames
 GW forward up link trace file names. More...
 
std::string m_gwFwdUpIndexFileName
 The name of file which defines the index table to be used for trace input of forward up link for GWs. More...
 
TraceFileContainer_t m_gwRtnDownFileNames
 GW return down link trace file names. More...
 
std::string m_gwRtnDownIndexFileName
 The name of file which defines the index table to be used for trace input of forward up link for GWs. More...
 
bool m_indexFilesLoaded
 flag telling if index trace files are already loaded More...
 
TraceInputContainer_t m_loadedTraces
 Loaded trace files. More...
 
double m_maxDistanceToFading
 Maximum distance allowed to the external fading trace source. More...
 
std::map< uint32_t, ChannelTracePair_tm_utFadingMap
 Container of the UT fading traces. More...
 
TraceFileContainer_t m_utFwdDownFileNames
 UT forward down link trace file names. More...
 
std::string m_utFwdDownIndexFileName
 The name of file which defines the index table to be used for trace input of forward down link for UT. More...
 
InputMode_t m_utInputMode
 Input mode to read trace files form given index table (file) for UTs. More...
 
TraceFileContainer_t m_utRtnUpFileNames
 UT return up link trace file names. More...
 
std::string m_utRtnUpIndexFileName
 The name of file which defines the index table to be used for trace input of return up link for UTs. More...
 

Detailed Description

Container class for external input fading traces.

The class provides an interface for accessing the correct fading trace object.

Definition at line 42 of file satellite-fading-external-input-trace-container.h.

Member Typedef Documentation

◆ ChannelTracePair_t

◆ TraceFileContainer_t

◆ TraceFileContainerItem_t

◆ TraceInputContainer_t

Member Enumeration Documentation

◆ InputMode_t

Definitions for different modes of using trace input files.

Enumerator
LIST_MODE 

LIST_MODE.

POSITION_MODE 

POSITION_MODE.

RANDOM_MODE 

RANDOM_MODE.

Definition at line 48 of file satellite-fading-external-input-trace-container.h.

Constructor & Destructor Documentation

◆ SatFadingExternalInputTraceContainer()

ns3::SatFadingExternalInputTraceContainer::SatFadingExternalInputTraceContainer ( )

Constructor.

Definition at line 96 of file satellite-fading-external-input-trace-container.cc.

References m_dataPath.

◆ ~SatFadingExternalInputTraceContainer()

ns3::SatFadingExternalInputTraceContainer::~SatFadingExternalInputTraceContainer ( )

Destructor.

Definition at line 108 of file satellite-fading-external-input-trace-container.cc.

References m_gwFadingMap, and m_utFadingMap.

Member Function Documentation

◆ CreateFadingTrace()

Ptr< SatFadingExternalInputTrace > ns3::SatFadingExternalInputTraceContainer::CreateFadingTrace ( SatFadingExternalInputTrace::TraceFileType_e  fileType,
InputMode_t  inputMode,
TraceFileContainer_t container,
uint32_t  id,
Ptr< MobilityModel >  mobility 
)
private

Create (or load) fading trace source for the requested UT/GW.

Parameters
fileTypeType of the trace file
inputModeused when reading input traces from trace file
containerContainer reference to find out needed trace file info
idId of the node GW or UT (from SatIdMapper)
mobilityMobility for given node
Returns
Created trace input (or found trace input if queried trace input already created)

Definition at line 369 of file satellite-fading-external-input-trace-container.cc.

References FindSourceBasedOnPosition(), LIST_MODE, m_dataPath, m_loadedTraces, m_utInputMode, POSITION_MODE, and RANDOM_MODE.

Referenced by CreateGwFadingTrace(), and CreateUtFadingTrace().

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

◆ CreateGwFadingTrace()

void ns3::SatFadingExternalInputTraceContainer::CreateGwFadingTrace ( uint32_t  gwId,
Ptr< MobilityModel >  mobility 
)
private

Create new GW fading trace.

Parameters
gwIdId of the GW (from SatIdMapper)
mobilityMobility for given GW node

Definition at line 162 of file satellite-fading-external-input-trace-container.cc.

References CreateFadingTrace(), ns3::SatFadingExternalInputTrace::FT_TWO_COLUMN, LIST_MODE, LoadIndexFiles(), m_gwFadingMap, m_gwFwdUpFileNames, m_gwRtnDownFileNames, and m_indexFilesLoaded.

Referenced by GetFadingTrace(), and TestFadingTraces().

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

◆ CreateUtFadingTrace()

void ns3::SatFadingExternalInputTraceContainer::CreateUtFadingTrace ( uint32_t  utId,
Ptr< MobilityModel >  mobility 
)
private

Create new UT fading trace.

Parameters
utIdId of the UT (from SatIdMapper)
mobilityMobility for given UT node

Definition at line 133 of file satellite-fading-external-input-trace-container.cc.

References CreateFadingTrace(), ns3::SatFadingExternalInputTrace::FT_THREE_COLUMN, ns3::SatFadingExternalInputTrace::FT_TWO_COLUMN, LoadIndexFiles(), m_indexFilesLoaded, m_utFadingMap, m_utFwdDownFileNames, m_utInputMode, and m_utRtnUpFileNames.

Referenced by GetFadingTrace(), and TestFadingTraces().

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

◆ FindSourceBasedOnPosition()

std::string ns3::SatFadingExternalInputTraceContainer::FindSourceBasedOnPosition ( TraceFileContainer_t container,
uint32_t  id,
Ptr< MobilityModel >  mobility 
)
private

Find the nearest fading trace source file for the requested UT/GW based on given mobility.

Only external fading sources which are closer than (equal to) maximum allowed distance are accepted. Maximum allowed distance is defined by attribute.

Parameters
containerContainer reference to find out needed trace file info
idId of the node GW or UT (from SatIdMapper)
mobilityMobility for given node
Returns
The name of the nearest external fading source.

Definition at line 435 of file satellite-fading-external-input-trace-container.cc.

References m_maxDistanceToFading.

Referenced by CreateFadingTrace().

+ Here is the caller graph for this function:

◆ GetFadingTrace()

Ptr< SatFadingExternalInputTrace > ns3::SatFadingExternalInputTraceContainer::GetFadingTrace ( uint32_t  nodeId,
SatEnums::ChannelType_t  channelType,
Ptr< MobilityModel >  mobility 
)

Get method for getting a proper fading trace.

Parameters
nodeIdGW or UT Node id (from SatIdMapper)
channelTypeChannel type
mobilityMobility of the node
Returns
Channel fading trace for a certain node and channel.

Definition at line 191 of file satellite-fading-external-input-trace-container.cc.

References CreateGwFadingTrace(), CreateUtFadingTrace(), ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, m_gwFadingMap, m_utFadingMap, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

+ Here is the call graph for this function:

◆ GetInstanceTypeId()

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

Get the type ID of instance.

Returns
the object TypeId

Definition at line 91 of file satellite-fading-external-input-trace-container.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 41 of file satellite-fading-external-input-trace-container.cc.

References LIST_MODE, m_gwFwdUpIndexFileName, m_gwRtnDownIndexFileName, m_maxDistanceToFading, m_utFwdDownIndexFileName, m_utInputMode, m_utRtnUpIndexFileName, POSITION_MODE, and RANDOM_MODE.

Referenced by GetInstanceTypeId().

+ Here is the caller graph for this function:

◆ LoadIndexFiles()

void ns3::SatFadingExternalInputTraceContainer::LoadIndexFiles ( )
private

Initialize index files.

Definition at line 117 of file satellite-fading-external-input-trace-container.cc.

References m_gwFwdUpFileNames, m_gwFwdUpIndexFileName, m_gwRtnDownFileNames, m_gwRtnDownIndexFileName, m_indexFilesLoaded, m_utFwdDownFileNames, m_utFwdDownIndexFileName, m_utRtnUpFileNames, m_utRtnUpIndexFileName, and ReadIndexFile().

Referenced by CreateGwFadingTrace(), and CreateUtFadingTrace().

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

◆ ReadIndexFile()

void ns3::SatFadingExternalInputTraceContainer::ReadIndexFile ( std::string  indexFile,
TraceFileContainer_t container 
)
private

Read trace file information from given index file.

Parameters
indexFileIndex file to parse for trace file names
containerContainer reference to store found trace file info

Definition at line 329 of file satellite-fading-external-input-trace-container.cc.

References m_dataPath.

Referenced by LoadIndexFiles(), and TestFadingTraces().

+ Here is the caller graph for this function:

◆ TestFadingTraces()

bool ns3::SatFadingExternalInputTraceContainer::TestFadingTraces ( uint32_t  numOfUts,
uint32_t  numOfGws 
)

A method to test that the fading traces are according to assumptions.

Parameters
numOfUtsnumber of UTs to test
numOfGwsnumber of GWs to test
Returns
boolean value indicating success or failure

Definition at line 253 of file satellite-fading-external-input-trace-container.cc.

References CreateGwFadingTrace(), CreateUtFadingTrace(), m_gwFadingMap, m_gwFwdUpFileNames, m_gwFwdUpIndexFileName, m_gwRtnDownFileNames, m_gwRtnDownIndexFileName, m_indexFilesLoaded, m_utFadingMap, m_utFwdDownFileNames, m_utFwdDownIndexFileName, m_utRtnUpFileNames, m_utRtnUpIndexFileName, and ReadIndexFile().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_dataPath

std::string ns3::SatFadingExternalInputTraceContainer::m_dataPath
private

data path to find trace input files

Definition at line 178 of file satellite-fading-external-input-trace-container.h.

Referenced by SatFadingExternalInputTraceContainer(), CreateFadingTrace(), and ReadIndexFile().

◆ m_gwFadingMap

std::map<uint32_t, ChannelTracePair_t> ns3::SatFadingExternalInputTraceContainer::m_gwFadingMap
private

◆ m_gwFwdUpFileNames

TraceFileContainer_t ns3::SatFadingExternalInputTraceContainer::m_gwFwdUpFileNames
private

GW forward up link trace file names.

Definition at line 162 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateGwFadingTrace(), LoadIndexFiles(), and TestFadingTraces().

◆ m_gwFwdUpIndexFileName

std::string ns3::SatFadingExternalInputTraceContainer::m_gwFwdUpIndexFileName
private

The name of file which defines the index table to be used for trace input of forward up link for GWs.

Index table defines files used as trace input sources.

Definition at line 141 of file satellite-fading-external-input-trace-container.h.

Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().

◆ m_gwRtnDownFileNames

TraceFileContainer_t ns3::SatFadingExternalInputTraceContainer::m_gwRtnDownFileNames
private

GW return down link trace file names.

Definition at line 167 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateGwFadingTrace(), LoadIndexFiles(), and TestFadingTraces().

◆ m_gwRtnDownIndexFileName

std::string ns3::SatFadingExternalInputTraceContainer::m_gwRtnDownIndexFileName
private

The name of file which defines the index table to be used for trace input of forward up link for GWs.

Index table defines files used as trace input sources.

Definition at line 147 of file satellite-fading-external-input-trace-container.h.

Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().

◆ m_indexFilesLoaded

bool ns3::SatFadingExternalInputTraceContainer::m_indexFilesLoaded
private

flag telling if index trace files are already loaded

Definition at line 175 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateGwFadingTrace(), CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().

◆ m_loadedTraces

TraceInputContainer_t ns3::SatFadingExternalInputTraceContainer::m_loadedTraces
private

Loaded trace files.

Definition at line 172 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateFadingTrace().

◆ m_maxDistanceToFading

double ns3::SatFadingExternalInputTraceContainer::m_maxDistanceToFading
private

Maximum distance allowed to the external fading trace source.

Definition at line 181 of file satellite-fading-external-input-trace-container.h.

Referenced by FindSourceBasedOnPosition(), and GetTypeId().

◆ m_utFadingMap

std::map<uint32_t, ChannelTracePair_t> ns3::SatFadingExternalInputTraceContainer::m_utFadingMap
private

◆ m_utFwdDownFileNames

TraceFileContainer_t ns3::SatFadingExternalInputTraceContainer::m_utFwdDownFileNames
private

UT forward down link trace file names.

Definition at line 152 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().

◆ m_utFwdDownIndexFileName

std::string ns3::SatFadingExternalInputTraceContainer::m_utFwdDownIndexFileName
private

The name of file which defines the index table to be used for trace input of forward down link for UT.

Index table defines files used as trace input sources.

Definition at line 129 of file satellite-fading-external-input-trace-container.h.

Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().

◆ m_utInputMode

InputMode_t ns3::SatFadingExternalInputTraceContainer::m_utInputMode
private

Input mode to read trace files form given index table (file) for UTs.

Definition at line 123 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateFadingTrace(), CreateUtFadingTrace(), and GetTypeId().

◆ m_utRtnUpFileNames

TraceFileContainer_t ns3::SatFadingExternalInputTraceContainer::m_utRtnUpFileNames
private

UT return up link trace file names.

Definition at line 157 of file satellite-fading-external-input-trace-container.h.

Referenced by CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().

◆ m_utRtnUpIndexFileName

std::string ns3::SatFadingExternalInputTraceContainer::m_utRtnUpIndexFileName
private

The name of file which defines the index table to be used for trace input of return up link for UTs.

Index table defines files used as trace input sources.

Definition at line 135 of file satellite-fading-external-input-trace-container.h.

Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().


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