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. | |
| enum | InputMode_t { LIST_MODE , POSITION_MODE , RANDOM_MODE } |
| Definitions for different modes of using trace input files. More... | |
Public Member Functions | |
| SatFadingExternalInputTraceContainer () | |
| Constructor. | |
| ~SatFadingExternalInputTraceContainer () | |
| Destructor. | |
| Ptr< SatFadingExternalInputTrace > | GetFadingTrace (uint32_t nodeId, SatEnums::ChannelType_t channelType, Ptr< MobilityModel > mobility) |
| Get method for getting a proper fading trace. | |
| virtual void | NotifyConstructionCompleted () override |
| Notifier called once the ObjectBase is fully constructed. | |
| bool | TestFadingTraces (uint32_t numOfUts, uint32_t numOfGws) |
| A method to test that the fading traces are according to assumptions. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
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. | |
| void | CreateGwFadingTrace (uint32_t gwId, Ptr< MobilityModel > mobility) |
| Create new GW fading trace. | |
| void | CreateUtFadingTrace (uint32_t utId, Ptr< MobilityModel > mobility) |
| Create new UT fading trace. | |
| 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. | |
| void | LoadIndexFiles () |
| Initialize index files. | |
| void | ReadIndexFile (std::string indexFile, TraceFileContainer_t &container) |
| Read trace file information from given index file. | |
Private Attributes | |
| std::string | m_dataPath |
| data path to find trace input files | |
| std::map< uint32_t, ChannelTracePair_t > | m_gwFadingMap |
| Container of the GW fading traces. | |
| TraceFileContainer_t | m_gwFwdUpFileNames |
| GW forward up link trace file names. | |
| 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. | |
| TraceFileContainer_t | m_gwRtnDownFileNames |
| GW return down link trace file names. | |
| 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. | |
| bool | m_indexFilesLoaded |
| flag telling if index trace files are already loaded | |
| TraceInputContainer_t | m_loadedTraces |
| Loaded trace files. | |
| double | m_maxDistanceToFading |
| Maximum distance allowed to the external fading trace source. | |
| std::map< uint32_t, ChannelTracePair_t > | m_utFadingMap |
| Container of the UT fading traces. | |
| TraceFileContainer_t | m_utFwdDownFileNames |
| UT forward down link trace file names. | |
| 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. | |
| InputMode_t | m_utInputMode |
| Input mode to read trace files form given index table (file) for UTs. | |
| TraceFileContainer_t | m_utRtnUpFileNames |
| UT return up link trace file names. | |
| 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. | |
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 113 of file satellite-fading-external-input-trace-container.h.
|
private |
Definition at line 112 of file satellite-fading-external-input-trace-container.h.
|
private |
Definition at line 115 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 97 of file satellite-fading-external-input-trace-container.cc.
References LIST_MODE, m_indexFilesLoaded, m_maxDistanceToFading, and m_utInputMode.
| ns3::SatFadingExternalInputTraceContainer::~SatFadingExternalInputTraceContainer | ( | ) |
Destructor.
Definition at line 116 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 377 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 170 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 141 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 443 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 199 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.
|
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.
|
private |
Initialize index files.
Definition at line 125 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().
|
overridevirtual |
Notifier called once the ObjectBase is fully constructed.
This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.
Definition at line 106 of file satellite-fading-external-input-trace-container.cc.
References ns3::SatEnvVariables::GetInstance(), and m_dataPath.
|
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 337 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 261 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 185 of file satellite-fading-external-input-trace-container.h.
Referenced by CreateFadingTrace(), NotifyConstructionCompleted(), and ReadIndexFile().
|
private |
Container of the GW fading traces.
Definition at line 125 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 169 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 148 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 174 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 154 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 182 of file satellite-fading-external-input-trace-container.h.
Referenced by SatFadingExternalInputTraceContainer(), CreateGwFadingTrace(), CreateUtFadingTrace(), LoadIndexFiles(), and TestFadingTraces().
|
private |
Loaded trace files.
Definition at line 179 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 188 of file satellite-fading-external-input-trace-container.h.
Referenced by SatFadingExternalInputTraceContainer(), FindSourceBasedOnPosition(), and GetTypeId().
|
private |
Container of the UT fading traces.
Definition at line 120 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 159 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 136 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 130 of file satellite-fading-external-input-trace-container.h.
Referenced by SatFadingExternalInputTraceContainer(), CreateFadingTrace(), CreateUtFadingTrace(), and GetTypeId().
|
private |
UT return up link trace file names.
Definition at line 164 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 142 of file satellite-fading-external-input-trace-container.h.
Referenced by GetTypeId(), LoadIndexFiles(), and TestFadingTraces().