12NS_LOG_COMPONENT_DEFINE(
"NrEesmIr");
13NS_OBJECT_ENSURE_REGISTERED(NrEesmIr);
17 NS_LOG_FUNCTION(
this);
22 NS_LOG_FUNCTION(
this);
34 const std::vector<int>& map,
39 NS_LOG_FUNCTION(
this);
44 uint32_t codeBitsSum = 0;
45 uint32_t infoBits = DynamicCast<NrEesmErrorModelOutput>(sinrHistory.front())
47 double mapSumSize = 0.0;
49 for (
const Ptr<NrErrorModelOutput>& output : sinrHistory)
51 Ptr<NrEesmErrorModelOutput> sinrHistorytemp = DynamicCast<NrEesmErrorModelOutput>(output);
52 NS_ASSERT(sinrHistorytemp !=
nullptr);
54 NS_LOG_DEBUG(
" Exponential SINR sum " << sinrHistorytemp->m_sinrExp <<
" codeBits "
55 << sinrHistorytemp->m_codeBits
56 <<
" infoBits: " << sinrHistorytemp->m_infoBits);
58 codeBitsSum += sinrHistorytemp->m_codeBits;
59 mapSumSize += sinrHistorytemp->m_map.size();
61 mapSumSize += map.size();
64 const_cast<NrEesmIr*
>(
this)->m_Reff = infoBits /
static_cast<double>(codeBitsSum);
66 NS_LOG_INFO(
" Reff " << m_Reff <<
" HARQ history (previous) " << sinrHistory.size());
69 double expSINR_previousTx = DynamicCast<NrEesmErrorModelOutput>(sinrHistory.back())->m_sinrExp;
70 return SinrEff(sinr, map, mcs, expSINR_previousTx, mapSumSize);
76 NS_LOG_FUNCTION(
this);
80 uint8_t mcs_eq = mcsTx;
84 NS_LOG_INFO(
" Modulation order: " << +ModOrder);
85 NS_LOG_INFO(
" Reff: " << m_Reff);
87 for (uint8_t mcsindex = (mcsTx - 1); mcsindex != 255; mcsindex--)
double SinrEff(const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs, double a, double b) const
compute the effective SINR for the specified MCS and SINR, according to the EESM method.
virtual const std::vector< uint8_t > * GetMcsMTable() const =0
virtual const std::vector< double > * GetMcsEcrTable() const =0
Eesm error model, based on the IR HARQ.
double ComputeSINR(const SpectrumValue &sinr, const std::vector< int > &map, uint8_t mcs, uint32_t sizeBit, const NrErrorModel::NrErrorModelHistory &sinrHistory) const override
Computes the effective SINR after retransmission combining with HARQ-IR. Also, it updates the equival...
~NrEesmIr() override
~NrEesmIr deconstructor
NrEesmIr()
NrEesmIr constructor.
double GetMcsEq(uint8_t mcsTx) const override
Returns the MCS corresponding to the ECR after retransmissions. In case of HARQ-IR the equivalent ECR...
static TypeId GetTypeId()
Get the type id of the object.
std::vector< Ptr< NrErrorModelOutput > > NrErrorModelHistory
Vector of previous output.