RlcUmTxEntityD2D< Base > Class Template Reference

Simu5G: RlcUmTxEntityD2D< Base > Class Template Reference
Simu5G
RlcUmTxEntityD2D< Base > Class Template Referenceabstract

#include <RlcUmEntityD2D.h>

Inheritance diagram for RlcUmTxEntityD2D< Base >:
[legend]

Public Member Functions

void startHoldingDownstreamInPackets () override
bool isHoldingDownstreamInPackets () override
bool isEmptyingBuffer () override
void resumeDownstreamInPackets () override
void rlcHandleD2DModeSwitch (bool oldConnection, bool clearBuffer) override

Protected Member Functions

void unregisterFromD2DModeController ()
virtual void resetTxNumbering ()=0

Detailed Description

template<class Base>
class simu5g::RlcUmTxEntityD2D< Base >

D2D mode-switch machinery for an RLC UM transmitting entity.

Mixin over either UM TX profile (Base = LteRlcUmTxEntity or NrRlcUmTxEntity). It owns every piece of state the mode switch needs, so the core entities carry none of it:

  • while the entity of the newly selected mode waits for the old mode's entity to drain, incoming SDUs are parked in a holding queue (interceptSdu()) instead of being buffered and announced to the MAC;
  • the old-mode entity raises notifyEmptyBuffer_ and, once its TX buffer runs dry (onTxBufferEmptied()), tells the ~D2DModeController to release the peer's holding queue.

The two profiles differ only in the buffer primitives, which are reached through seams the core already declares – storeSdu(), clearQueue(), isTxBufferEmpty() – plus resetTxNumbering(), left to the leaf.

Member Function Documentation

◆ unregisterFromD2DModeController()

template<class Base>
void unregisterFromD2DModeController ( )
inlineprotected

Withdraw from the controller's per-peer registry. That registry holds raw pointers to these entity modules, and BearerManagement::deleteLocalRlcQueues() deletes them on handover and on bearer teardown, so an entity that goes away without withdrawing leaves a dangling pointer behind – which the next registration for the same peer then calls isEmptyingBuffer() on. The ModuleRefByPar is null once the controller itself is gone, which is the case when the whole NIC is being torn down.

References simu5g::NODEID_NONE.

Referenced by resetTxNumbering().

◆ resetTxNumbering()

template<class Base>
virtual void resetTxNumbering ( )
protectedpure virtual

Reset the UM transmit sequence numbering of the new-mode entity, so that its numbering restarts in step with the peer's receiving side. FI keeps its own PDU SN counter, SO keeps TX_Next in the buffer.

Implemented in LteRlcUmTxEntityD2D, and NrRlcUmTxEntityD2D.

References unregisterFromD2DModeController().

Referenced by rlcHandleD2DModeSwitch().

◆ startHoldingDownstreamInPackets()

template<class Base>
void startHoldingDownstreamInPackets ( )
inlineoverridevirtual

Start parking incoming SDUs instead of buffering them. Used when a peer's old-mode entity is found to be still draining at registration time.

Implements ID2dRlcUmTxEntity.

Referenced by rlcHandleD2DModeSwitch().

◆ isHoldingDownstreamInPackets()

template<class Base>
bool isHoldingDownstreamInPackets ( )
inlineoverridevirtual

True while incoming SDUs are being parked in the holding buffer.

Implements ID2dRlcUmTxEntity.

◆ isEmptyingBuffer()

template<class Base>
bool isEmptyingBuffer ( )
inlineoverridevirtual

True while this entity is draining its TX buffer for a mode switch, i.e. the peer's new-mode entity must keep holding its incoming SDUs.

Implements ID2dRlcUmTxEntity.

◆ resumeDownstreamInPackets()

template<class Base>
void resumeDownstreamInPackets ( )
inlineoverridevirtual

Release the SDUs parked in the holding buffer into the TX buffer, and resume normal downstream buffering. Called on the entity of the newly selected mode once the old-mode entity has drained.

Implements ID2dRlcUmTxEntity.

◆ rlcHandleD2DModeSwitch()

template<class Base>
void rlcHandleD2DModeSwitch ( bool oldConnection,
bool clearBuffer )
inlineoverridevirtual

Adapt the TX buffers and the sequence numbering to a D2D mode switch. Called by ~RlcMuxD2D on the entities of the old and the new mode.

Implements ID2dRlcUmTxEntity.

References resetTxNumbering(), and startHoldingDownstreamInPackets().