@@ -26,24 +26,26 @@ class LteRlcUmDataPdu;
2626struct StatusDescriptor ;
2727
2828/* *
29- * This module is responsible for keeping track of all PDCP SDUs.
29+ * This module is responsible for keeping tracking the flow of SDUs in the stack,
30+ * and compute statistics from them. It is passive observer of the packet flow.
31+ *
3032 * A PDCP SDU is encapsulated in the following packets while it is going down
3133 * through the LTE NIC layers:
3234 *
33- * PDCP SDU
34- * some operations
35- * PDCP PDU
36- * RLC SDU
37- * RLC PDU or fragmented into more than one RLC PDUs
38- * MAC SDU
39- * inserted into one TB
40- * MAC PDU (aka TB)
35+ * - PDCP SDU
36+ * - some operations
37+ * - PDCP PDU
38+ * - RLC SDU
39+ * - RLC PDU or fragmented into more than one RLC PDUs
40+ * - MAC SDU
41+ * - inserted into one TB
42+ * - MAC PDU (aka TB)
4143 *
42- * Each PDCP has its own seq number, managed by the corresponding LCID
44+ * Each PDCP has its own sequence number, managed by the corresponding LCID
4345 *
4446 * The main functions of this module are:
4547 * - detect PDCP SDUs discarded (no part transmitted)
46- * - calculate the delay time of a pkt , from PDCP SDU to last Harq ACK of the
48+ * - calculate the delay time of a packet , from PDCP SDU to last HARQ ACK of the
4749 * corresponding seq number.
4850 */
4951class PacketFlowManagerBase : public cSimpleModule
@@ -66,7 +68,7 @@ class PacketFlowManagerBase : public cSimpleModule
6668 DiscardedPkts pktDiscardCounterTotal_; // total discarded packets counter of the node
6769
6870 RanNodeType nodeType_; // UE or ENODEB (used for set MACROS)
69- short int harqProcesses_; // number of harq processes
71+ short int harqProcesses_; // number of HARQ processes
7072
7173 std::string pfmType;
7274
@@ -77,77 +79,81 @@ class PacketFlowManagerBase : public cSimpleModule
7779 void initialize (int stage) override ;
7880 void finish () override ;
7981
80- // return true if a structure for this lcid is present
82+ // Return true if a data structure for this LCID is present
8183 virtual bool hasLcid (LogicalCid lcid) = 0;
82- /*
83- * initialize a new structure for this lcid
84- * abstract since in eNodeB case, it initializes
85- * different structure with respect to the UE
86- */
84+
85+ // Initialize a new data structure for this LCID. Abstract since in eNodeB case,
86+ // it initializes different structures with respect to the UE
8787 virtual void initLcid (LogicalCid lcid, MacNodeId nodeId) = 0;
8888
89- /* reset the structure for this lcid
90- * abstract since in eNodeB case, it clears
91- * different structure with respect to the UE
92- */
89+ // Reset the data structure for this LCID. Abstract since in eNodeB case,
90+ // it clears different structures with respect to the UE
9391 virtual void clearLcid (LogicalCid lcid) = 0;
9492
95- // reset structures for all connections
93+ // Reset data structures for all connections
9694 virtual void clearAllLcid () = 0;
9795
9896 public:
99- /*
100- * This method inserts a new pdcp seqnum and the corresponding entry time
101- * @param lcid
102- * @param pdcpSno sequence number of the pdcp pdu
103- * @param entryTime the time the packet enters the PDCP layer
104- *
105- * Used only by the eNodeB packetFlowManager
97+ /* *
98+ * This method is called when a PDCP SDU enters the PDCP layer for downlink transmission.
99+ * It records the PDCP sequence number and entry timestamp in the tracking data structures
100+ * to enable delay measurement and packet flow monitoring. Used only by the eNodeB.
106101 */
107102 virtual void insertPdcpSdu (inet::Packet *pdcpPkt) = 0;
103+
104+ /* *
105+ * This method is called when a PDCP SDU is received on the uplink.
106+ * It tracks uplink data volume and packet loss rate statistics.
107+ */
108108 virtual void receivedPdcpSdu (inet::Packet *pdcpPkt) = 0;
109109
110- /*
111- * This method inserts a new rlc seqnum and the corresponding pdcp pdus inside it
112- * @param lcid
113- * @param rlcPdu packet pointer
110+ /* *
111+ * This method is called when an RLC PDU is created from PDCP SDUs for transmission.
112+ * It records the mapping between the RLC PDU and its contained PDCP SDUs in the tracking
113+ * data structures, along with burst status information for throughput measurement.
114114 */
115115 virtual void insertRlcPdu (LogicalCid lcid, const inet::Ptr<LteRlcUmDataPdu> rlcPdu, RlcBurstStatus status) = 0;
116116
117- /*
118- * This method inserts a new macPduId Omnet id and the corresponding rlc pdus inside it
119- * @param lcid
120- * @param macPdu packet pointer
117+ /* *
118+ * This method is called when a MAC PDU is inserted into the HARQ buffer for transmission.
119+ * It records the mapping between the MAC PDU and its contained RLC PDUs in the tracking
120+ * data structures for downlink packet flow management.
121121 */
122122 virtual void insertMacPdu (const inet::Ptr<const LteMacPdu> macPdu) = 0;
123123
124- /*
125- * This method checks if the HARQ aSequenceNumberSet related to a macPduId acknowledges an ENTIRE
126- * pdcp sdu
127- * @param lcid
128- * @param macPduId Omnet id of the mac pdu
124+ /* *
125+ * This method is called when a downlink MAC PDU is successfully acknowledged by the UE.
126+ * It processes the acknowledgment to determine if complete PDCP SDUs have been delivered,
127+ * calculates packet delays, and updates statistics for downlink transmission.
129128 */
130129 virtual void macPduArrived (const inet::Ptr<const LteMacPdu> macPdu) = 0;
131130
131+ /* *
132+ * This method is called when an uplink MAC PDU is received from a UE at the eNodeB.
133+ * It measures uplink packet delay by matching the received PDU with the corresponding
134+ * grant that was previously sent to the UE (identified by grantId).
135+ */
132136 virtual void ulMacPduArrived (MacNodeId nodeId, unsigned int grantId) {};
133- /*
137+
138+ /* *
134139 * This method is called after maxHarqTransmission of a MAC PDU ID has been
135- * reached. The PDCP, RLC, seq numbers referred to the macPdu are cleared from the
136- * data structures
137- * @param lcid
138- * @param macPduId Omnet id of the mac pdu to be discarded
140+ * reached. The PDCP, RLC sequence numbers referred to the MAC PDU are cleared from the
141+ * data structures.
139142 */
140143 virtual void discardMacPdu (const inet::Ptr<const LteMacPdu> macPdu) = 0;
141144
142- /*
143- * This method is used to keep track of all discarded RLC pdus. If all rlc pdus
144- * that compose a PDCP SDU have been discarded the discarded counters are updated
145- * @param lcid
146- * @param rlcSno sequence number of the rlc pdu
147- * @param fromMac used when this method is called by discardMacPdu
145+ /* *
146+ * This method is used to keep track of all discarded RLC PDUs. If all RLC PDUs
147+ * that compose a PDCP SDU have been discarded, the discarded counters are updated.
148+ * The fromMac parameter is used when this method is called by discardMacPdu.
148149 */
149150 virtual void discardRlcPdu (LogicalCid lcid, unsigned int rlcSno, bool fromMac = false ) = 0;
150151
152+ /* *
153+ * This method is called when an uplink grant is sent to a UE.
154+ * It records the grant transmission timestamp to enable uplink delay
155+ * measurement when the corresponding MAC PDU is received.
156+ */
151157 virtual void grantSent (MacNodeId nodeId, unsigned int grantId) {}
152158
153159 virtual void resetDiscardCounter ();
@@ -156,4 +162,3 @@ class PacketFlowManagerBase : public cSimpleModule
156162} // namespace
157163
158164#endif
159-
0 commit comments