@@ -23,19 +23,14 @@ using namespace inet;
2323unsigned int UmRxEntity::totalCellPduRcvdBytes_ = 0 ;
2424unsigned int UmRxEntity::totalCellRcvdBytes_ = 0 ;
2525
26- simsignal_t UmRxEntity::rlcPacketLossTotalSignal_ = registerSignal(" rlcPacketLossTotal" );
27-
28- simsignal_t UmRxEntity::rlcCellPacketLossSignal_[2 ] = { cComponent::registerSignal (" rlcCellPacketLossDl" ), cComponent::registerSignal (" rlcCellPacketLossUl" ) };
29- simsignal_t UmRxEntity::rlcPacketLossSignal_[2 ] = { cComponent::registerSignal (" rlcPacketLossDl" ), cComponent::registerSignal (" rlcPacketLossUl" ) };
30- simsignal_t UmRxEntity::rlcPduPacketLossSignal_[2 ] = { cComponent::registerSignal (" rlcPduPacketLossDl" ), cComponent::registerSignal (" rlcPduPacketLossUl" ) };
26+ // RLC-UM signals - only valid statistics (throughput and delay, no packet loss)
3127simsignal_t UmRxEntity::rlcDelaySignal_[2 ] = { cComponent::registerSignal (" rlcDelayDl" ), cComponent::registerSignal (" rlcDelayUl" ) };
3228simsignal_t UmRxEntity::rlcThroughputSignal_[2 ] = { cComponent::registerSignal (" rlcThroughputDl" ), cComponent::registerSignal (" rlcThroughputUl" ) };
3329simsignal_t UmRxEntity::rlcPduDelaySignal_[2 ] = { cComponent::registerSignal (" rlcPduDelayDl" ), cComponent::registerSignal (" rlcPduDelayUl" ) };
3430simsignal_t UmRxEntity::rlcPduThroughputSignal_[2 ] = { cComponent::registerSignal (" rlcPduThroughputDl" ), cComponent::registerSignal (" rlcPduThroughputUl" ) };
3531simsignal_t UmRxEntity::rlcCellThroughputSignal_[2 ] = { cComponent::registerSignal (" rlcCellThroughputDl" ), cComponent::registerSignal (" rlcCellThroughputUl" ) };
3632
37- simsignal_t UmRxEntity::rlcPacketLossD2DSignal_ = registerSignal(" rlcPacketLossD2D" );
38- simsignal_t UmRxEntity::rlcPduPacketLossD2DSignal_ = registerSignal(" rlcPduPacketLossD2D" );
33+ // D2D signals - only valid statistics (throughput and delay, no packet loss)
3934simsignal_t UmRxEntity::rlcDelayD2DSignal_ = registerSignal(" rlcDelayD2D" );
4035simsignal_t UmRxEntity::rlcThroughputD2DSignal_ = registerSignal(" rlcThroughputD2D" );
4136simsignal_t UmRxEntity::rlcPduDelayD2DSignal_ = registerSignal(" rlcPduDelayD2D" );
@@ -256,65 +251,41 @@ void UmRxEntity::moveRxWindow(int pos)
256251// void UmRxEntity::toPdcp(LteRlcSdu* rlcSdu)
257252void UmRxEntity::toPdcp (Packet *pktAux)
258253{
259-
260254 auto rlcSdu = pktAux->popAtFront <LteRlcSdu>();
261255 LteRlcUm *lteRlc = this ->rlc_ ;
262256
263257 auto lteInfo = pktAux->getTag <FlowControlInfo>();
264- unsigned int sno = rlcSdu->getSnoMainPacket ();
265258 unsigned int length = pktAux->getByteLength ();
266259 simtime_t ts = pktAux->getCreationTime ();
267260
268261 // create a PDCP PDU and send it to the upper layer
269262 MacNodeId ueId;
270- if (lteInfo->getDirection () == DL || lteInfo->getDirection () == D2D || lteInfo->getDirection () == D2D_MULTI) // This module is at a UE
263+ if (lteInfo->getDirection () == DL || lteInfo->getDirection () == D2D || lteInfo->getDirection () == D2D_MULTI)
271264 ueId = ownerNodeId_;
272265 else // UL. This module is at the eNB: get the node id of the sender
273266 ueId = lteInfo->getSourceId ();
274267
275268 cModule *ue = binder_->getRlcByNodeId (ueId, UM);
276- // check whether some PDCP PDUs have not been delivered
277- while (sno > lastSnoDelivered_ + 1 ) {
278- lastSnoDelivered_++;
279-
280- if (nodeB_ != nullptr )
281- nodeB_->emit (rlcCellPacketLossSignal_[dir_], 1.0 );
282-
283- // emit statistic: packet loss
284- if (ue != nullptr ) {
285- if (lteInfo->getDirection () != D2D && lteInfo->getDirection () != D2D_MULTI)
286- ue->emit (rlcPacketLossSignal_[dir_], 1.0 );
287- else
288- ue->emit (rlcPacketLossD2DSignal_, 1.0 );
289- ue->emit (rlcPacketLossTotalSignal_, 1.0 );
290- }
291- }
292- // update the last sno delivered to the current sno
293- lastSnoDelivered_ = sno;
294269
295- // emit statistics
296270
271+ // emit statistics (throughput and delay only - no packet loss)
297272 totalCellRcvdBytes_ += length;
298273 totalRcvdBytes_ += length;
299274 double cellTputSample = (double )totalCellRcvdBytes_ / (NOW - getSimulation ()->getWarmupPeriod ());
300275 double tputSample = (double )totalRcvdBytes_ / (NOW - getSimulation ()->getWarmupPeriod ());
276+
301277 if (ue != nullptr ) {
302278 if (lteInfo->getDirection () != D2D && lteInfo->getDirection () != D2D_MULTI) { // UE in IM
303279 ue->emit (rlcThroughputSignal_[dir_], tputSample);
304- ue->emit (rlcPacketLossSignal_[dir_], 0.0 );
305- ue->emit (rlcPacketLossTotalSignal_, 0.0 );
306280 ue->emit (rlcDelaySignal_[dir_], (NOW - ts).dbl ());
307281 }
308282 else {
309283 ue->emit (rlcThroughputD2DSignal_, tputSample);
310- ue->emit (rlcPacketLossD2DSignal_, 0.0 );
311- ue->emit (rlcPacketLossTotalSignal_, 0.0 );
312284 ue->emit (rlcDelayD2DSignal_, (NOW - ts).dbl ());
313285 }
314286 }
315287 if (nodeB_ != nullptr ) {
316288 nodeB_->emit (rlcCellThroughputSignal_[dir_], cellTputSample);
317- nodeB_->emit (rlcCellPacketLossSignal_[dir_], 0.0 );
318289 }
319290
320291 EV << NOW << " UmRxEntity::toPdcp Created PDCP PDU with length " << pktAux->getByteLength () << " bytes" << endl;
@@ -368,7 +339,6 @@ void UmRxEntity::reassemble(unsigned int index)
368339 if (resetFlag_) {
369340 // by doing this, the first extracted SDU will be considered in order. For example, when D2D is enabled,
370341 // this helps to retrieve the synchronization between SNs at the tx and rx after a mode switch
371- lastSnoDelivered_ = sduSno - 1 ;
372342 resetFlag_ = false ;
373343 ignoreFragment = true ;
374344 }
@@ -628,38 +598,12 @@ void UmRxEntity::reassemble(unsigned int index)
628598 received_.at (index) = false ;
629599 EV << NOW << " UmRxEntity::reassemble Removed PDU from position " << index << endl;
630600
631- // emit statistics
632- MacNodeId ueId;
633- if (lteInfo->getDirection () == DL || lteInfo->getDirection () == D2D || lteInfo->getDirection () == D2D_MULTI) // This module is at a UE
634- ueId = ownerNodeId_;
635- else // UL. This module is at the eNB: get the node id of the sender
636- ueId = lteInfo->getSourceId ();
601+ // RLC-UM reassembly complete - no statistics emission needed here
602+ // RLC PDU processing is successful at this point
637603
638- cModule *ue = binder_->getRlcByNodeId (ueId, UM);
639- // check whether some PDCP PDUs have not been delivered
640- while (pduSno > lastPduReassembled_ + 1 ) {
641- // emit statistic: packet loss
642- if (lteInfo->getDirection () != D2D && lteInfo->getDirection () != D2D_MULTI) { // UE in IM
643- ue->emit (rlcPduPacketLossSignal_[dir_], 1.0 );
644- }
645- else {
646- ue->emit (rlcPduPacketLossD2DSignal_, 1.0 );
647- }
648-
649- lastPduReassembled_++;
650- }
651-
652- // update the last sno reassembled to the current sno
604+ // update the last PDU reassembled to the current PDU sequence number
653605 lastPduReassembled_ = pduSno;
654606
655- // emit statistic: packet loss
656- if (lteInfo->getDirection () != D2D && lteInfo->getDirection () != D2D_MULTI) { // UE in IM
657- ue->emit (rlcPduPacketLossSignal_[dir_], 0.0 );
658- }
659- else {
660- ue->emit (rlcPduPacketLossD2DSignal_, 0.0 );
661- }
662-
663607 pktPdu->insertAtFront (pdu);
664608
665609 delete pktPdu;
0 commit comments