1111
1212#include " simu5g/corenetwork/statsCollector/BaseStationStatsCollector.h"
1313#include " simu5g/corenetwork/statsCollector/UeStatsCollector.h"
14- #include " simu5g/stack/packetFlowManager/PacketFlowManagerEnb .h"
14+ #include " simu5g/stack/packetFlowObserver/PacketFlowObserverEnb .h"
1515#include " simu5g/stack/mac/LteMacEnb.h"
1616#include < string>
1717
@@ -55,7 +55,7 @@ void BaseStationStatsCollector::initialize(int stage) {
5555 throw cRuntimeError (" %s::initialize - eNodeB statistic collector only works with RLC in UM mode" , collectorType_.c_str ());
5656 }
5757
58- packetFlowManager_ .reference (this , " packetFlowManagerModule " , true );
58+ packetFlowObserver_ .reference (this , " packetFlowObserverModule " , true );
5959 cellInfo_.reference (this , " cellInfoModule" , true );
6060
6161 ecgi_.cellId = cellInfo_->getMacCellId (); // at least stage 2
@@ -85,11 +85,11 @@ void BaseStationStatsCollector::initialize(int stage) {
8585 tPutPeriod_ = par (" tPutPeriod" );
8686
8787 // start scheduling the l2 measurement
88- // schedule only stats not using packetFlowManager
88+ // schedule only stats not using packetFlowObserver
8989
9090 scheduleAt (NOW + prbUsagePeriod_, prbUsage_);
9191 scheduleAt (NOW + activeUsersPeriod_, activeUsers_);
92- if (packetFlowManager_ != nullptr ) {
92+ if (packetFlowObserver_ != nullptr ) {
9393 scheduleAt (NOW + dataVolumePeriod_, pdcpBytes_);
9494 scheduleAt (NOW + discardRatePeriod_, discardRate_);
9595 scheduleAt (NOW + delayPacketPeriod_, packetDelay_);
@@ -127,7 +127,7 @@ void BaseStationStatsCollector::handleMessage(cMessage *msg)
127127 add_ul_nongbr_pdr_cell_perUser ();
128128
129129 // reset counters
130- packetFlowManager_ ->resetDiscardCounter ();
130+ packetFlowObserver_ ->resetDiscardCounter ();
131131 resetDiscardCounterPerUe ();
132132 scheduleAt (NOW + discardRatePeriod_, discardRate_);
133133 }
@@ -159,15 +159,15 @@ void BaseStationStatsCollector::resetDiscardCounterPerUe()
159159{
160160 EV << collectorType_ << " ::resetDiscardCounterPerUe " << endl;
161161 for (auto const & [ueId, ueCollector] : ueCollectors_) {
162- packetFlowManager_ ->resetDiscardCounterPerUe (ueId);
162+ packetFlowObserver_ ->resetDiscardCounterPerUe (ueId);
163163 }
164164}
165165
166166void BaseStationStatsCollector::resetDelayCounterPerUe ()
167167{
168168 EV << collectorType_ << " ::resetDelayCounterPerUe " << endl;
169169 for (auto const & [ueId, ueCollector] : ueCollectors_) {
170- packetFlowManager_ ->resetDelayCounterPerUe (ueId);
170+ packetFlowObserver_ ->resetDelayCounterPerUe (ueId);
171171 ueCollector->resetDelayCounter ();
172172 }
173173}
@@ -176,15 +176,15 @@ void BaseStationStatsCollector::resetThroughputCountersPerUe()
176176{
177177 EV << collectorType_ << " ::resetThroughputCountersPerUe " << endl;
178178 for (auto const & [ueId, ueCollector] : ueCollectors_) {
179- packetFlowManager_ ->resetThroughputCounterPerUe (ueId);
179+ packetFlowObserver_ ->resetThroughputCounterPerUe (ueId);
180180 }
181181}
182182
183183void BaseStationStatsCollector::resetBytesCountersPerUe ()
184184{
185185 EV << collectorType_ << " ::resetBytesCountersPerUe " << endl;
186186 for (auto const & [ueId, ueCollector] : ueCollectors_) {
187- packetFlowManager_ ->resetDataVolume (ueId);
187+ packetFlowObserver_ ->resetDataVolume (ueId);
188188 }
189189}
190190
@@ -205,7 +205,7 @@ void BaseStationStatsCollector::removeUeCollector(MacNodeId id)
205205 if (it != ueCollectors_.end ()) {
206206 ueCollectors_.erase (it);
207207 EV << " BaseStationStatsCollector::removeUeCollector - removing UE pfm stats for UE with id[" << id << " ]" << endl;
208- packetFlowManager_ ->deleteUe (id);
208+ packetFlowObserver_ ->deleteUe (id);
209209 }
210210 else {
211211 throw cRuntimeError (" %s::removeUeCollector - UeStatsCollector not present for UE node id [%hu]" , collectorType_.c_str (), num (id));
@@ -263,7 +263,7 @@ void BaseStationStatsCollector::add_number_of_active_ue_ul_nongbr_cell()
263263
264264void BaseStationStatsCollector::add_dl_nongbr_pdr_cell ()
265265{
266- double discard = packetFlowManager_ ->getDiscardedPkt ();
266+ double discard = packetFlowObserver_ ->getDiscardedPkt ();
267267 dl_nongbr_pdr_cell.addValue ((int )discard);
268268}
269269
@@ -295,7 +295,7 @@ void BaseStationStatsCollector::add_dl_nongbr_pdr_cell_perUser()
295295 EV << collectorType_ << " ::add_dl_nongbr_pdr_cell_perUser()" << endl;
296296 double discard;
297297 for (auto const & [ueId, ueCollector] : ueCollectors_) {
298- discard = packetFlowManager_ ->getDiscardedPktPerUe (ueId);
298+ discard = packetFlowObserver_ ->getDiscardedPktPerUe (ueId);
299299 ueCollector->add_dl_nongbr_pdr_ue ((int )discard);
300300 }
301301}
@@ -321,7 +321,7 @@ void BaseStationStatsCollector::add_dl_nongbr_delay_perUser()
321321 EV << collectorType_ << " ::add_dl_nongbr_delay_perUser()" << endl;
322322 double delay;
323323 for (auto const & [ueId, ueCollector] : ueCollectors_) {
324- delay = packetFlowManager_ ->getDelayStatsPerUe (ueId);
324+ delay = packetFlowObserver_ ->getDelayStatsPerUe (ueId);
325325 EV << collectorType_ << " ::add_dl_nongbr_delay_perUser - delay: " << delay << " for node id: " << ueId << endl;
326326 if (delay != 0 ) {
327327 ueCollector->add_dl_nongbr_delay_ue ((int )delay);
@@ -334,7 +334,7 @@ void BaseStationStatsCollector::add_ul_nongbr_data_volume_ue_perUser()
334334 EV << collectorType_ << " ::add_ul_nongbr_data_volume_ue_perUser" << endl;
335335 unsigned int bytes;
336336 for (auto const & [ueId, ueCollector] : ueCollectors_) {
337- bytes = packetFlowManager_ ->getDataVolume (ueId, UL);
337+ bytes = packetFlowObserver_ ->getDataVolume (ueId, UL);
338338 EV << collectorType_ << " ::add_ul_nongbr_data_volume_ue_perUser - received: " << bytes << " B in UL from node id: " << ueId << endl;
339339 ueCollector->add_ul_nongbr_data_volume_ue (bytes);
340340 }
@@ -345,7 +345,7 @@ void BaseStationStatsCollector::add_dl_nongbr_data_volume_ue_perUser()
345345 EV << collectorType_ << " ::add_dl_nongbr_data_volume_ue_perUser" << endl;
346346 unsigned int bytes;
347347 for (auto const & [ueId, ueCollector] : ueCollectors_) {
348- bytes = packetFlowManager_ ->getDataVolume (ueId, DL);
348+ bytes = packetFlowObserver_ ->getDataVolume (ueId, DL);
349349 EV << collectorType_ << " ::add_dl_nongbr_data_volume_ue_perUser - sent: " << bytes << " B in DL to node id: " << ueId << endl;
350350 ueCollector->add_dl_nongbr_data_volume_ue (bytes);
351351 }
@@ -356,9 +356,9 @@ void BaseStationStatsCollector::add_dl_nongbr_throughput_ue_perUser()
356356 EV << collectorType_ << " ::add_dl_nongbr_throughput_ue_perUser" << endl;
357357 double throughput;
358358 for (auto const & [ueId, ueCollector] : ueCollectors_) {
359- throughput = packetFlowManager_ ->getThroughputStatsPerUe (ueId);
359+ throughput = packetFlowObserver_ ->getThroughputStatsPerUe (ueId);
360360 EV << collectorType_ << " ::add_dl_nongbr_throughput_ue_perUser - throughput: " << throughput << " for node " << ueId << endl;
361- packetFlowManager_ ->resetThroughputCounterPerUe (ueId);
361+ packetFlowObserver_ ->resetThroughputCounterPerUe (ueId);
362362 if (throughput > 0.0 )
363363 ueCollector->add_dl_nongbr_throughput_ue ((int )throughput);
364364 }
0 commit comments