LteHarqUnitTx Class Reference

Simu5G: LteHarqUnitTx Class Reference
Simu5G
LteHarqUnitTx Class Reference

#include <LteHarqUnitTx.h>

Inheritance diagram for LteHarqUnitTx:
[legend]

Public Member Functions

 LteHarqUnitTx (Binder *binder, unsigned char acid, Codeword cw, LteMacBase *macOwner, LteMacBase *dstMac)
virtual void insertPdu (Packet *pdu)
virtual void markSelected ()
virtual Packet * extractPdu ()
virtual bool pduFeedback (HarqAcknowledgment fb)
virtual bool isEmpty ()
virtual bool isReady ()
virtual bool selfNack ()
virtual void dropPdu ()

Protected Attributes

Packet * pdu_ = nullptr
 Carried sub-burst.
long pduId_ = -1
 Omnet ID of the pdu.
int64_t pduLength_
 PDU size in bytes.
Codeword cw_
 H-ARQ codeword identifier.
unsigned char transmissions_ = 0
 Number of (re)transmissions for current pdu (N.B.: values are 1,2,3,4)
simtime_t txTime_
 TTI at which the pdu has been transmitted.

Detailed Description

An LteHarqUnit is an HARQ mac pdu container, a harqBuffer is made of harq processes which are made of harq units.

LteHarqUnit manages transmissions and retransmissions. Contained PDU may be in one of four statuses:

                       IDLE    PDU                    READY

TXHARQ_PDU_BUFFERED: no present locally ready for rtx TXHARQ_PDU_WAITING: no copy present not ready for tx TXHARQ_PDU_EMPTY: yes not present not ready for tx TXHARQ_PDU_SELECTED: no present will be tx

Constructor & Destructor Documentation

◆ LteHarqUnitTx()

LteHarqUnitTx ( Binder * binder,
unsigned char acid,
Codeword cw,
LteMacBase * macOwner,
LteMacBase * dstMac )

Constructor.

Parameters
idunit identifier

Member Function Documentation

◆ insertPdu()

virtual void insertPdu ( Packet * pdu)
virtual

Inserts a pdu in this harq unit.

When a new pdu is inserted into an H-ARQ unit, its status is TX_HARQ_PDU_SELECTED, so it will be extracted and sent at this same TTI.

Parameters
pduMacPdu to be inserted

◆ markSelected()

virtual void markSelected ( )
virtual

Transition from BUFFERED to SELECTED status: the pdu will be extracted when the buffer is inspected.

◆ extractPdu()

virtual Packet * extractPdu ( )
virtual

Returns the macPdu to be sent and increments transmissions_ counter.

The H-ARQ process containing this unit must call this method in order to extract the pdu the Mac layer will send. Before extraction, control info is updated with transmission counter and ndi.

Reimplemented in LteHarqUnitTxD2D.

◆ pduFeedback()

virtual bool pduFeedback ( HarqAcknowledgment fb)
virtual

Manages ACK/NACK.

Parameters
fbACK or NACK for this H-ARQ unit
Returns
true if the unit has become empty, false if it is still busy

Reimplemented in LteHarqUnitTxD2D.

◆ isEmpty()

virtual bool isEmpty ( )
virtual

Tells if this unit is currently managing a pdu or not.

◆ isReady()

virtual bool isReady ( )
virtual

Tells if the PDU is ready for retransmission (the pdu can then be marked to be sent)

◆ selfNack()

virtual bool selfNack ( )
virtual

If, after evaluating the pdu, it cannot be retransmitted because there isn't enough frame space, a selfNack can be issued to advance the unit status. This avoids a large pdu that cannot be retransmitted (because the channel changed), from locking an H-ARQ unit indefinitely. Must simulate selection, extraction and nack reception. N.B.: txTime is also updated so firstReadyForRtx returns a different pdu

Returns
true if the unit reset as a result of self nack, false otherwise

◆ dropPdu()

virtual void dropPdu ( )
virtual

Resets unit but throws an error if the unit is not in BUFFERED state.

Member Data Documentation

◆ pdu_

Packet* pdu_ = nullptr
protected

Carried sub-burst.

◆ pduId_

long pduId_ = -1
protected

Omnet ID of the pdu.

◆ pduLength_

int64_t pduLength_
protected

PDU size in bytes.

◆ cw_

Codeword cw_
protected

H-ARQ codeword identifier.

◆ transmissions_

unsigned char transmissions_ = 0
protected

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

◆ txTime_

simtime_t txTime_
protected

TTI at which the pdu has been transmitted.