PacketFlowObserverBase Class Reference

Simu5G: PacketFlowObserverBase Class Reference
Simu5G
PacketFlowObserverBase Class Referenceabstract

#include <PacketFlowObserverBase.h>

Inheritance diagram for PacketFlowObserverBase:
[legend]

Public Member Functions

virtual void insertPdcpSdu (inet::Packet *pdcpPkt)=0
virtual void receivedPdcpSdu (inet::Packet *pdcpPkt)=0
virtual void insertRlcPdu (DrbKey drbKey, const LteRlcUmDataPdu *rlcPdu, RlcBurstStatus status)=0
virtual void macPduArrived (MacNodeId peerId, const LteMacPdu *macPdu)=0
virtual void ulMacPduArrived (MacNodeId nodeId, unsigned int grantId)
virtual void discardMacPdu (MacNodeId peerId, const LteMacPdu *macPdu)=0
virtual void discardRlcPdu (DrbKey drbKey, unsigned int rlcSno, bool fromMac=false)=0
virtual void grantSent (MacNodeId nodeId, unsigned int grantId)

Detailed Description

This module is responsible for keeping tracking the flow of SDUs in the stack, and compute statistics from them. It is passive observer of the packet flow.

A PDCP SDU is encapsulated in the following packets while it is going down through the LTE NIC layers:

  • PDCP SDU
  • some operations
  • PDCP PDU
  • RLC SDU
  • RLC PDU or fragmented into more than one RLC PDUs
  • MAC SDU
  • inserted into one TB
  • MAC PDU (aka TB)

Each PDCP has its own sequence number, managed by the corresponding DRB ID

The main functions of this module are:

  • detect PDCP SDUs discarded (no part transmitted)
  • calculate the delay time of a packet, from PDCP SDU to last HARQ ACK of the corresponding seq number.

Member Function Documentation

◆ insertPdcpSdu()

virtual void insertPdcpSdu ( inet::Packet * pdcpPkt)
pure virtual

This method is called when a PDCP SDU enters the PDCP layer for downlink transmission. It records the PDCP sequence number and entry timestamp in the tracking data structures to enable delay measurement and packet flow monitoring. Used only by the eNodeB.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ receivedPdcpSdu()

virtual void receivedPdcpSdu ( inet::Packet * pdcpPkt)
pure virtual

This method is called when a PDCP SDU is received on the uplink. It tracks uplink data volume and packet loss rate statistics.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ insertRlcPdu()

virtual void insertRlcPdu ( DrbKey drbKey,
const LteRlcUmDataPdu * rlcPdu,
RlcBurstStatus status )
pure virtual

This method is called when an RLC PDU is created from PDCP SDUs for transmission. It records the mapping between the RLC PDU and its contained PDCP SDUs in the tracking data structures, along with burst status information for throughput measurement.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ macPduArrived()

virtual void macPduArrived ( MacNodeId peerId,
const LteMacPdu * macPdu )
pure virtual

This method is called when a downlink MAC PDU is successfully acknowledged by the UE. It processes the acknowledgment to determine if complete PDCP SDUs have been delivered, calculates packet delays, and updates statistics for downlink transmission.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ ulMacPduArrived()

virtual void ulMacPduArrived ( MacNodeId nodeId,
unsigned int grantId )
inlinevirtual

This method is called when an uplink MAC PDU is received from a UE at the eNodeB. It measures uplink packet delay by matching the received PDU with the corresponding grant that was previously sent to the UE (identified by grantId).

Reimplemented in PacketFlowObserverEnb.

◆ discardMacPdu()

virtual void discardMacPdu ( MacNodeId peerId,
const LteMacPdu * macPdu )
pure virtual

This method is called after maxHarqTransmission of a MAC PDU ID has been reached. The PDCP, RLC sequence numbers referred to the MAC PDU are cleared from the data structures.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ discardRlcPdu()

virtual void discardRlcPdu ( DrbKey drbKey,
unsigned int rlcSno,
bool fromMac = false )
pure virtual

This method is used to keep track of all discarded RLC PDUs. If all RLC PDUs that compose a PDCP SDU have been discarded, the discarded counters are updated. The fromMac parameter is used when this method is called by discardMacPdu.

Implemented in PacketFlowObserverEnb, and PacketFlowObserverUe.

◆ grantSent()

virtual void grantSent ( MacNodeId nodeId,
unsigned int grantId )
inlinevirtual

This method is called when an uplink grant is sent to a UE. It records the grant transmission timestamp to enable uplink delay measurement when the corresponding MAC PDU is received.

Reimplemented in PacketFlowObserverEnb.