LteHarqBufferRx Class Reference

Simu5G: LteHarqBufferRx Class Reference
Simu5G

#include <LteHarqBufferRx.h>

Inheritance diagram for LteHarqBufferRx:
[legend]

Public Member Functions

virtual void insertPdu (Codeword cw, inet::Packet *pkt)
virtual std::list< inet::Packet * > extractCorrectPdus ()
virtual unsigned int purgeCorruptedPdus ()
virtual UnitList firstAvailable ()
virtual bool isHarqBufferActive () const

Protected Member Functions

virtual void sendFeedback ()
virtual void macUe_emit (simsignal_t signal, double val)
virtual void initMacUe ()

Protected Attributes

opp_component_ptr< Binder > binder_
 binder module reference
opp_component_ptr< LteMacBase > macOwner_
 MAC module reference.
unsigned int numHarqProcesses_
 number of contained H-ARQ processes
MacNodeId srcId_
 ID of the source node for which this buffer has been created.
std::vector< LteHarqProcessRx * > processes_
 processes vector
bool isMulticast_
 flag for multicast flows

Detailed Description

H-ARQ RX buffer: messages coming from PHY are stored in the H-ARQ RX buffer. When a new PDU is inserted, it is in EVALUATING state, meaning that the hardware is checking its correctness. A feedback is sent after the PDU has been evaluated (HARQ_FB_EVALUATION_INTERVAL), and in case of ACK, the PDU moves to CORRECT state; otherwise, it is dropped from the process. The operations of checking if a PDU is ready for feedback and if it is in the correct state are done in the extractCorrectPdu method, which must be called at every TTI (it must be part of the MAC main loop).

Member Function Documentation

◆ insertPdu()

virtual void insertPdu ( Codeword cw,
inet::Packet * pkt )
virtual

Insertion of a new PDU coming from PHY layer into RX H-ARQ buffer.

Parameters
PDUto be inserted

Reimplemented in LteHarqBufferRxD2D.

◆ extractCorrectPdus()

virtual std::list< inet::Packet * > extractCorrectPdus ( )
virtual

Sends feedback for all processes which are older than HARQ_FB_EVALUATION_INTERVAL, then extracts the PDU in correct state (if any)

Returns
uncorrupted PDUs or empty list if none

Reimplemented in LteHarqBufferRxD2D.

◆ purgeCorruptedPdus()

virtual unsigned int purgeCorruptedPdus ( )
virtual

Purges PDUs in corrupted state (if any)

Returns
number of purged corrupted PDUs or zero if none

References processes_.

◆ firstAvailable()

virtual UnitList firstAvailable ( )
virtual

Returns a pair with H-ARQ process ID and a list of its empty {RXHARQ_PDU_EMPTY} units to be used for reception of new H-ARQ sub-bursts.

Returns
a list of acid and their units to be used for reception

References isMulticast_.

◆ isHarqBufferActive()

virtual bool isHarqBufferActive ( ) const
virtual
Author
Alessandro Noferi

Check if the buffer is active

Returns
true if the RxHarqPduStatus of all units of all processes is not RXHARQ_PDU_EMPTY

◆ sendFeedback()

virtual void sendFeedback ( )
protectedvirtual

Checks for all processes if the PDU has been evaluated and sends feedback if affirmative.

Reimplemented in LteHarqBufferRxD2D.

◆ macUe_emit()

virtual void macUe_emit ( simsignal_t signal,
double val )
inlineprotectedvirtual

Only emit signals from macUe_ if the node still exists. It is possible that the source node (e.g., a UE) left the simulation, but the packets from the node still reside in the simulation.

◆ initMacUe()

virtual void initMacUe ( )
inlineprotectedvirtual

macUe_ is a private member, so derived classes need this member function to initialize it. macUe_ being a private member forces one to use the macUe_emit function to emit statistics (hence, checking against nullptr)

References binder_, macOwner_, and srcId_.

Member Data Documentation

◆ binder_

opp_component_ptr<Binder> binder_
protected

binder module reference

Referenced by initMacUe().

◆ macOwner_

opp_component_ptr<LteMacBase> macOwner_
protected

MAC module reference.

Referenced by initMacUe().

◆ numHarqProcesses_

unsigned int numHarqProcesses_
protected

number of contained H-ARQ processes

◆ srcId_

MacNodeId srcId_
protected

ID of the source node for which this buffer has been created.

Referenced by initMacUe().

◆ processes_

std::vector<LteHarqProcessRx *> processes_
protected

processes vector

Referenced by purgeCorruptedPdus().

◆ isMulticast_

bool isMulticast_
protected

flag for multicast flows

Referenced by firstAvailable().