24 #include "ns3/string.h"
25 #include <ns3/simulator.h>
37 : m_dlRxFirstWrite (true),
38 m_ulRxFirstWrite (true)
54 .AddConstructor<PhyRxStatsCalculator> ()
55 .AddAttribute (
"DlRxOutputFilename",
56 "Name of the file where the downlink results will be saved.",
60 .AddAttribute (
"UlRxOutputFilename",
61 "Name of the file where the uplink results will be saved.",
99 std::ofstream outFile;
103 if (!outFile.is_open ())
109 outFile <<
"% time\tcellId\tIMSI\tRNTI\ttxMode\tlayer\tmcs\tsize\trv\tndi\tcorrect";
110 outFile << std::endl;
115 if (!outFile.is_open ())
124 outFile << (uint32_t) params.
m_cellId <<
"\t";
125 outFile << params.
m_imsi <<
"\t";
126 outFile << params.
m_rnti <<
"\t";
127 outFile << (uint32_t) params.
m_txMode <<
"\t";
128 outFile << (uint32_t) params.
m_layer <<
"\t";
129 outFile << (uint32_t) params.
m_mcs <<
"\t";
130 outFile << params.
m_size <<
"\t";
131 outFile << (uint32_t) params.
m_rv <<
"\t";
132 outFile << (uint32_t) params.
m_ndi <<
"\t";
143 std::ofstream outFile;
147 if (!outFile.is_open ())
153 outFile <<
"% time\tcellId\tIMSI\tRNTI\tlayer\tmcs\tsize\trv\tndi\tcorrect";
154 outFile << std::endl;
159 if (!outFile.is_open ())
168 outFile << (uint32_t) params.
m_cellId <<
"\t";
169 outFile << params.
m_imsi <<
"\t";
170 outFile << params.
m_rnti <<
"\t";
171 outFile << (uint32_t) params.
m_layer <<
"\t";
172 outFile << (uint32_t) params.
m_mcs <<
"\t";
173 outFile << params.
m_size <<
"\t";
174 outFile << (uint32_t) params.
m_rv <<
"\t";
175 outFile << (uint32_t) params.
m_ndi <<
"\t";
186 std::ostringstream pathAndRnti;
187 pathAndRnti << path <<
"/" << params.
m_rnti;
188 if (phyRxStats->ExistsImsiPath (pathAndRnti.str ()) ==
true)
190 imsi = phyRxStats->GetImsiPath (pathAndRnti.str ());
195 phyRxStats->SetImsiPath (pathAndRnti.str (), imsi);
199 phyRxStats->DlPhyReception (params);
208 std::ostringstream pathAndRnti;
209 pathAndRnti << path <<
"/" << params.
m_rnti;
210 if (phyRxStats->ExistsImsiPath (pathAndRnti.str ()) ==
true)
212 imsi = phyRxStats->GetImsiPath (pathAndRnti.str ());
217 phyRxStats->SetImsiPath (pathAndRnti.str (), imsi);
221 phyRxStats->UlPhyReception (params);
Doxygen introspection did not find any typical Config paths.
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
uint8_t m_mcs
MCS for transport block.
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
hold variables of type string
uint8_t m_rv
the redundancy version (HARQ)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
void DlPhyReception(PhyReceptionStatParameters params)
Notifies the stats calculator that an downlink reception has occurred.
std::string GetUlRxOutputFilename(void)
Get the name of the file where the UL RX PHY statistics will be stored.
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
virtual ~PhyRxStatsCalculator()
Destructor.
static uint64_t FindImsiForEnb(std::string path, uint16_t rnti)
void UlPhyReception(PhyReceptionStatParameters params)
Notifies the stats calculator that an uplink reception has occurred.
uint8_t m_layer
the layer (cw) of the transmission
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
uint8_t m_ndi
new data indicator flag
PhyRxStatsCalculator()
Constructor.
void SetDlOutputFilename(std::string outputFilename)
Set the name of the file where the downlink statistics will be stored.
static uint64_t FindImsiForUe(std::string path, uint16_t rnti)
uint8_t m_txMode
the transmission Mode
uint16_t m_size
Size of transport block.
static void DlPhyReceptionCallback(Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
trace sink
static void UlPhyReceptionCallback(Ptr< PhyRxStatsCalculator > phyRxStats, std::string path, PhyReceptionStatParameters params)
trace sink
uint8_t m_correctness
correctness of the TB received
uint16_t m_rnti
C-RNTI scheduled.
uint16_t m_cellId
Cell ID of the attached Enb.
std::string GetDlRxOutputFilename(void)
Get the name of the file where the DL RX PHY statistics will be stored.
#define NS_LOG_ERROR(msg)
void SetUlRxOutputFilename(std::string outputFilename)
Set the name of the file where the UL Rx PHY statistics will be stored.
void SetDlRxOutputFilename(std::string outputFilename)
Set the name of the file where the DL RX PHY statistics will be stored.
uint64_t m_imsi
IMSI of the scheduled UE.
static TypeId GetTypeId(void)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.