Container class for external input fading traces. More...
#include "satellite-fading-external-input-trace-container.h"
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< SatFadingExternalInputTrace > | GetFadingTrace (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_t > | TraceFileContainer_t |
typedef std::pair< std::string, GeoCoordinate > | TraceFileContainerItem_t |
typedef std::map< std::string, Ptr< SatFadingExternalInputTrace > > | TraceInputContainer_t |
Private Member Functions | |
Ptr< SatFadingExternalInputTrace > | CreateFadingTrace (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_t > | m_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_t > | m_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... | |
Container class for external input fading traces.
The class provides an interface for accessing the correct fading trace object.
Definition at line 45 of file satellite-fading-external-input-trace-container.h.
typedef std::pair<Ptr<SatFadingExternalInputTrace>, Ptr<SatFadingExternalInputTrace> > ns3::SatFadingExternalInputTraceContainer::ChannelTracePair_t |
Define type ChannelTracePair_t.
Definition at line 62 of file satellite-fading-external-input-trace-container.h.
|
private |
Definition at line 109 of file satellite-fading-external-input-trace-container.h.
|
private |
Definition at line 108 of file satellite-fading-external-input-trace-container.h.
|
private |
Definition at line 111 of file satellite-fading-external-input-trace-container.h.
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 51 of file satellite-fading-external-input-trace-container.h.
ns3::SatFadingExternalInputTraceContainer::SatFadingExternalInputTraceContainer | ( | ) |
Constructor.
Definition at line 103 of file satellite-fading-external-input-trace-container.cc.
References m_dataPath.
ns3::SatFadingExternalInputTraceContainer::~SatFadingExternalInputTraceContainer | ( | ) |
Destructor.
Definition at line 115 of file satellite-fading-external-input-trace-container.cc.
References m_gwFadingMap, and m_utFadingMap.
|
private |
Create (or load) fading trace source for the requested UT/GW.
fileType | Type of the trace file |
inputMode | used when reading input traces from trace file |
container | Container reference to find out needed trace file info |
id | Id of the node GW or UT (from SatIdMapper) |
mobility | Mobility for given node |
Definition at line 376 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().
|
private |
Create new GW fading trace.
gwId | Id of the GW (from SatIdMapper) |
mobility | Mobility for given GW node |
Definition at line 169 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().
|
private |
Create new UT fading trace.
utId | Id of the UT (from SatIdMapper) |
mobility | Mobility for given UT node |
Definition at line 140 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().
|
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.
container | Container reference to find out needed trace file info |
id | Id of the node GW or UT (from SatIdMapper) |
mobility | Mobility for given node |
Definition at line 442 of file satellite-fading-external-input-trace-container.cc.
References m_maxDistanceToFading.
Referenced by CreateFadingTrace().
Ptr< SatFadingExternalInputTrace > ns3::SatFadingExternalInputTraceContainer::GetFadingTrace | ( | uint32_t | nodeId, |
SatEnums::ChannelType_t | channelType, | ||
Ptr< MobilityModel > | mobility | ||
) |
Get method for getting a proper fading trace.
nodeId | GW or UT Node id (from SatIdMapper) |
channelType | Channel type |
mobility | Mobility of the node |
Definition at line 198 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.
|
virtual |
Get the type ID of instance.
Definition at line 98 of file satellite-fading-external-input-trace-container.cc.
References GetTypeId().
|
static |
Get the type ID.
Definition at line 47 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().
|
private |
Initialize index files.
Definition at line 124 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().
|
private |
Read trace file information from given index file.
indexFile | Index file to parse for trace file names |
container | Container reference to store found trace file info |
Definition at line 336 of file satellite-fading-external-input-trace-container.cc.
References m_dataPath.
Referenced by LoadIndexFiles(), and TestFadingTraces().
bool ns3::SatFadingExternalInputTraceContainer::TestFadingTraces | ( | uint32_t | numOfUts, |
uint32_t | numOfGws | ||
) |
A method to test that the fading traces are according to assumptions.
numOfUts | number of UTs to test |
numOfGws | number of GWs to test |
Definition at line 260 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().
|
private |
data path to find trace input files
Definition at line 181 of file satellite-fading-external-input-trace-container.h.
Referenced by SatFadingExternalInputTraceContainer(), CreateFadingTrace(), and ReadIndexFile().
|
private |
Container of the GW fading traces.
Definition at line 121 of file satellite-fading-external-input-trace-container.h.
Referenced by ~SatFadingExternalInputTraceContainer(), CreateGwFadingTrace(), GetFadingTrace(), and TestFadingTraces().
|
private |
GW forward up link trace file names.
Definition at line 165 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateGwFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
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 144 of file satellite-fading-external-input-trace-container.h.
Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().
|
private |
GW return down link trace file names.
Definition at line 170 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateGwFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
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 150 of file satellite-fading-external-input-trace-container.h.
Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().
|
private |
flag telling if index trace files are already loaded
Definition at line 178 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateGwFadingTrace(), CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
private |
Loaded trace files.
Definition at line 175 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateFadingTrace().
|
private |
Maximum distance allowed to the external fading trace source.
Definition at line 184 of file satellite-fading-external-input-trace-container.h.
Referenced by FindSourceBasedOnPosition(), and GetTypeId().
|
private |
Container of the UT fading traces.
Definition at line 116 of file satellite-fading-external-input-trace-container.h.
Referenced by ~SatFadingExternalInputTraceContainer(), CreateUtFadingTrace(), GetFadingTrace(), and TestFadingTraces().
|
private |
UT forward down link trace file names.
Definition at line 155 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
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 132 of file satellite-fading-external-input-trace-container.h.
Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().
|
private |
Input mode to read trace files form given index table (file) for UTs.
Definition at line 126 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateFadingTrace(), CreateUtFadingTrace(), and GetTypeId().
|
private |
UT return up link trace file names.
Definition at line 160 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
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 138 of file satellite-fading-external-input-trace-container.h.
Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().