LteHarqProcessRx Class Reference

Simu5G: LteHarqProcessRx Class Reference
Simu5G
LteHarqProcessRx Class Reference

#include <LteHarqProcessRx.h>

Inheritance diagram for LteHarqProcessRx:
[legend]

Public Member Functions

 LteHarqProcessRx (unsigned char acid, LteMacBase *owner, Binder *binder)
virtual void insertPdu (Codeword cw, inet::Packet *)
virtual bool isEvaluated (Codeword cw)
virtual inet::Packet * createFeedback (Codeword cw)
virtual bool isCorrect (Codeword cw)
virtual int64_t getByteLength (Codeword cw)
virtual RxHarqPduStatus getUnitStatus (Codeword cw)
virtual std::vector< RxUnitStatus > getProcessStatus ()
virtual inet::Packet * extractPdu (Codeword cw)
virtual void purgeCorruptedPdu (Codeword cw)
virtual void resetCodeword (Codeword cw)
virtual unsigned int getNumHarqUnits ()
bool isEmpty ()
virtual CwList emptyUnitsIds ()
virtual bool isHarqProcessActive ()

Protected Attributes

std::vector< inet::Packet * > pdu_
 contained PDUs
std::vector< RxHarqPduStatus > status_
 current status for each codeword
std::vector< inet::simtime_t > rxTime_
 reception time timestamp
unsigned char acid_
 H-ARQ process identifier.
opp_component_ptr< LteMacBase > macOwner_
 MAC module to manage errors (endSimulation)
opp_component_ptr< Binder > binder_
 reference to the binder
unsigned char transmissions_ = 0
 Number of (re)transmissions for current PDU (N.B.: values are 1,2,3,4)
unsigned short harqFbEvaluationTimer_
 Number of slots for sending back HARQ Feedback.

Detailed Description

H-ARQ RX processes contain PDUs received from the PHY layer for which H-ARQ feedback must be sent. These PDUs must be evaluated using H-ARQ correction functions. The H-ARQ RX process state machine has three states: RXHARQ_PDU_EMPTY RXHARQ_PDU_EVALUATING RXHARQ_PDU_CORRECT

Constructor & Destructor Documentation

◆ LteHarqProcessRx()

LteHarqProcessRx ( unsigned char acid,
LteMacBase * owner,
Binder * binder )

Constructor.

Parameters
acidprocess identifier

Referenced by isHarqProcessActive().

Member Function Documentation

◆ insertPdu()

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

Inserts a PDU into the process and evaluates it (corrupted or correct).

Parameters
pduPDU to be inserted

◆ isEvaluated()

virtual bool isEvaluated ( Codeword cw)
virtual

Tells if contained PDUs have been evaluated and feedback responses can be sent.

A PDU is evaluated if 4ms has elapsed since it was put into the process.

Returns
true if the PDU can be acknowledged/nacked, false if the evaluation is still in process.

◆ createFeedback()

virtual inet::Packet * createFeedback ( Codeword cw)
virtual

Creates a feedback message based on the evaluation result for this PDU.

Returns
feedback message to be sent.

Reimplemented in LteHarqProcessRxD2D.

◆ isCorrect()

virtual bool isCorrect ( Codeword cw)
virtual

Tells if a PDU is in correct state (not corrupted, extractable).

Returns
true if correct, false otherwise

◆ getByteLength()

virtual int64_t getByteLength ( Codeword cw)
virtual

Returns process/codeword PDU size (bytes) [only for buffered status] .

Returns
size if PDU is present, 0 otherwise

◆ getUnitStatus()

virtual RxHarqPduStatus getUnitStatus ( Codeword cw)
inlinevirtual
Returns
the codeword status

References status_.

◆ getProcessStatus()

virtual std::vector< RxUnitStatus > getProcessStatus ( )
virtual
Returns
whole buffer status

◆ extractPdu()

virtual inet::Packet * extractPdu ( Codeword cw)
virtual

Extracts a PDU that can be passed to the MAC layer and reset process status.

Returns
PDU ready for upper layer

◆ purgeCorruptedPdu()

virtual void purgeCorruptedPdu ( Codeword cw)
virtual

Purges a corrupted PDU that has been received on codeword <cw>

◆ resetCodeword()

virtual void resetCodeword ( Codeword cw)
virtual

Resets the status of a codeword containing a corrupted PDU

◆ getNumHarqUnits()

virtual unsigned int getNumHarqUnits ( )
inlinevirtual
Returns
number of codewords available for this process (set to MAX_CODEWORDS by default)

◆ isEmpty()

bool isEmpty ( )

Tells if the process is empty: all of its units are in EMPTY state.

Returns
true if the process is empty, false if it isn't

◆ emptyUnitsIds()

virtual CwList emptyUnitsIds ( )
virtual

Returns a list of ids of empty units inside this process.

Returns
empty units ids list.

◆ isHarqProcessActive()

virtual bool isHarqProcessActive ( )
virtual
Author
Alessandro Noferi

Check if the process is active

Returns
true if at least one unit status is not RXHARQ_PDU_EMPTY

References LteHarqProcessRx().

Member Data Documentation

◆ pdu_

std::vector<inet::Packet *> pdu_
protected

contained PDUs

◆ status_

std::vector<RxHarqPduStatus> status_
protected

current status for each codeword

Referenced by getUnitStatus().

◆ rxTime_

std::vector<inet::simtime_t> rxTime_
protected

reception time timestamp

◆ acid_

unsigned char acid_
protected

H-ARQ process identifier.

◆ macOwner_

opp_component_ptr<LteMacBase> macOwner_
protected

MAC module to manage errors (endSimulation)

◆ binder_

opp_component_ptr<Binder> binder_
protected

reference to the binder

◆ transmissions_

unsigned char transmissions_ = 0
protected

Number of (re)transmissions for current PDU (N.B.: values are 1,2,3,4)

◆ harqFbEvaluationTimer_

unsigned short harqFbEvaluationTimer_
protected

Number of slots for sending back HARQ Feedback.