27#include "ns3/singleton.h"
35NS_LOG_COMPONENT_DEFINE(
"SatInterferenceInputTraceContainer");
45 static TypeId tid = TypeId(
"ns3::SatInterferenceInputTraceContainer")
47 .AddConstructor<SatInterferenceInputTraceContainer>();
53 NS_LOG_FUNCTION(
this);
58 NS_LOG_FUNCTION(
this);
66 NS_LOG_FUNCTION(
this);
70 SatBaseTraceContainer::DoDispose();
76 NS_LOG_FUNCTION(
this);
84Ptr<SatInputFileStreamTimeDoubleContainer>
87 NS_LOG_FUNCTION(
this);
89 std::stringstream filename;
92 int32_t gwId = Singleton<SatIdMapper>::Get()->GetGwIdWithMac(key.first);
93 int32_t utId = Singleton<SatIdMapper>::Get()->GetUtIdWithMac(key.first);
94 int32_t beamId = Singleton<SatIdMapper>::Get()->GetBeamIdWithMac(key.first);
96 if (beamId < 0 || (utId < 0 && gwId < 0))
102 if (utId >= 0 && gwId < 0)
104 filename << dataPath <<
"/additional-input/interferencetraces/input/BEAM_" << beamId
105 <<
"_UT_" << utId <<
"_channelType_"
109 if (gwId >= 0 && utId < 0)
111 filename << dataPath <<
"/additional-input/interferencetraces/input/BEAM_" << beamId
112 <<
"_GW_" << gwId <<
"_channelType_"
116 std::pair<container_t::iterator, bool> result =
m_container.insert(
118 CreateObject<SatInputFileStreamTimeDoubleContainer>(
119 filename.str().c_str(),
123 if (result.second ==
false)
125 NS_FATAL_ERROR(
"SatInterferenceInputTraceContainer::AddNode failed");
128 NS_LOG_INFO(
"Added node with MAC " << key.first <<
" channel type " << key.second);
130 return result.first->second;
133 NS_FATAL_ERROR(
"SatInterferenceInputTraceContainer::AddNode failed");
137Ptr<SatInputFileStreamTimeDoubleContainer>
140 NS_LOG_FUNCTION(
this);
142 container_t::iterator iter =
m_container.find(key);
155 NS_LOG_FUNCTION(
this);
157 return FindNode(key)->ProceedToNextClosestTimeSample().at(
SatBaseTraceContainer()
Constructor.
static const uint32_t INTF_TRACE_DEFAULT_INTF_DENSITY_INDEX
Default interference density index for interference traces.
static const uint32_t INTF_TRACE_DEFAULT_NUMBER_OF_COLUMNS
Default number of columns for interference traces.
static std::string GetChannelTypeName(ChannelType_t channelType)
static Ptr< SatEnvVariables > GetInstance()
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.