ns3::SatFadingExternalInputTrace Class Reference

The class for satellite fading external input trace. More...

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

+ Inheritance diagram for ns3::SatFadingExternalInputTrace:
+ Collaboration diagram for ns3::SatFadingExternalInputTrace:

Public Types

enum  TraceFileType_e { FT_TWO_COLUMN , FT_THREE_COLUMN }
 

Public Member Functions

 SatFadingExternalInputTrace ()
 Default constructor. More...
 
 SatFadingExternalInputTrace (TraceFileType_e type, std::string filePathName)
 Constructor with initialization parameters. More...
 
 ~SatFadingExternalInputTrace ()
 Destructor for SatFadingExternalInputTrace. More...
 
double GetFading () const
 Get the current fading value for this specific fading file. More...
 
bool TestFadingTrace () const
 A method to test that the fading trace is according to assumptions. More...
 

Private Member Functions

void ReadTrace (std::string filePathName)
 Read the fading trace from a binary file. More...
 

Private Attributes

float m_startTime
 Fading start time and interval calculated from the actual trace file. More...
 
float m_timeInterval
 
TraceFileType_e m_traceFileType
 There may be different fading file types. More...
 
std::vector< std::vector< float > > m_traceVector
 Container for the fading trace. More...
 

Static Private Attributes

static const uint32_t FADING_INDEX = 1
 
static const uint32_t SCINTILLATION_INDEX = 2
 
static const uint32_t TIME_INDEX = 0
 Constant indices used in the fading container. More...
 

Detailed Description

The class for satellite fading external input trace.

The class reads fading trace input samples from a file and provides the current fading value for this specific fading file.

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

Member Enumeration Documentation

◆ TraceFileType_e

Enumerator
FT_TWO_COLUMN 
FT_THREE_COLUMN 

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

Constructor & Destructor Documentation

◆ SatFadingExternalInputTrace() [1/2]

ns3::SatFadingExternalInputTrace::SatFadingExternalInputTrace ( )

Default constructor.

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

◆ SatFadingExternalInputTrace() [2/2]

ns3::SatFadingExternalInputTrace::SatFadingExternalInputTrace ( TraceFileType_e  type,
std::string  filePathName 
)

Constructor with initialization parameters.

Parameters
type
filePathName

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

References m_traceFileType, and ReadTrace().

+ Here is the call graph for this function:

◆ ~SatFadingExternalInputTrace()

ns3::SatFadingExternalInputTrace::~SatFadingExternalInputTrace ( )

Destructor for SatFadingExternalInputTrace.

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

Member Function Documentation

◆ GetFading()

double ns3::SatFadingExternalInputTrace::GetFading ( ) const

Get the current fading value for this specific fading file.

Returns
fading value in linear format

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

References ns3::SatUtils::DbToLinear(), FADING_INDEX, m_startTime, m_timeInterval, m_traceVector, and TIME_INDEX.

+ Here is the call graph for this function:

◆ ReadTrace()

void ns3::SatFadingExternalInputTrace::ReadTrace ( std::string  filePathName)
private

Read the fading trace from a binary file.

Parameters
filePathNamePath and file name of the fading file

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

References FT_TWO_COLUMN, m_startTime, m_timeInterval, m_traceFileType, and m_traceVector.

Referenced by SatFadingExternalInputTrace().

+ Here is the caller graph for this function:

◆ TestFadingTrace()

bool ns3::SatFadingExternalInputTrace::TestFadingTrace ( ) const

A method to test that the fading trace is according to assumptions.

Returns
boolean value indicating success or failure

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

References m_timeInterval, m_traceVector, and TIME_INDEX.

Member Data Documentation

◆ FADING_INDEX

const uint32_t ns3::SatFadingExternalInputTrace::FADING_INDEX = 1
staticprivate

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

Referenced by GetFading().

◆ m_startTime

float ns3::SatFadingExternalInputTrace::m_startTime
private

Fading start time and interval calculated from the actual trace file.

Note, that the current implementation assumes that we have constant time interval between fading samples. This assumption has been made for speed-up issues.

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

Referenced by GetFading(), and ReadTrace().

◆ m_timeInterval

float ns3::SatFadingExternalInputTrace::m_timeInterval
private

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

Referenced by GetFading(), ReadTrace(), and TestFadingTrace().

◆ m_traceFileType

TraceFileType_e ns3::SatFadingExternalInputTrace::m_traceFileType
private

There may be different fading file types.

  • FT_TWO_COLUMN
    • First = time in seconds
    • Second = fading in dB
  • FT_THREE_COLUMN
    • First = time in seconds
    • Second = fading in dB
    • Third = scintillation in dB

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

Referenced by SatFadingExternalInputTrace(), and ReadTrace().

◆ m_traceVector

std::vector<std::vector<float> > ns3::SatFadingExternalInputTrace::m_traceVector
private

Container for the fading trace.

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

Referenced by GetFading(), ReadTrace(), and TestFadingTrace().

◆ SCINTILLATION_INDEX

const uint32_t ns3::SatFadingExternalInputTrace::SCINTILLATION_INDEX = 2
staticprivate

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

◆ TIME_INDEX

const uint32_t ns3::SatFadingExternalInputTrace::TIME_INDEX = 0
staticprivate

Constant indices used in the fading container.

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

Referenced by GetFading(), and TestFadingTrace().


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