Skip to content

Commit 2249a90

Browse files
committed
PacketFlowManager: rename to PacketFlowObserver, updated docu
1 parent 85dddc1 commit 2249a90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+292
-297
lines changed

src/simu5g/corenetwork/statsCollector/BaseStationStatsCollector.cc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
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

166166
void 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

183183
void 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

264264
void 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
}

src/simu5g/corenetwork/statsCollector/BaseStationStatsCollector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "simu5g/stack/mac/LteMacEnb.h"
2323
#include "simu5g/stack/pdcp/LtePdcp.h"
2424
#include "simu5g/stack/rlc/um/LteRlcUm.h"
25-
#include "simu5g/stack/packetFlowManager/PacketFlowManagerEnb.h"
25+
#include "simu5g/stack/packetFlowObserver/PacketFlowObserverEnb.h"
2626

2727
namespace simu5g {
2828
using namespace inet;
@@ -52,7 +52,7 @@ class BaseStationStatsCollector : public cSimpleModule
5252
inet::ModuleRefByPar<LtePdcpEnb> pdcp_;
5353
inet::ModuleRefByPar<LteMacEnb> mac_;
5454
inet::ModuleRefByPar<LteRlcUm> rlc_;
55-
inet::ModuleRefByPar<PacketFlowManagerEnb> packetFlowManager_;
55+
inet::ModuleRefByPar<PacketFlowObserverEnb> packetFlowObserver_;
5656

5757
inet::ModuleRefByPar<CellInfo> cellInfo_;
5858

src/simu5g/corenetwork/statsCollector/BaseStationStatsCollector.ned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module BaseStationStatsCollector like IStatsCollector
2525
string pdcpModule = default("^.cellularNic.pdcp");
2626
string cellInfoModule = default("^.cellinfo");
2727
string rlcUmModule = default("^.cellularNic.rlc.um");
28-
string packetFlowManagerModule = default("^.cellularNic.packetFlowManager");
28+
string packetFlowObserverModule = default("^.cellularNic.packetFlowObserver");
2929

3030
bool movingAverage = default(false);
3131

src/simu5g/corenetwork/statsCollector/NrUeStatsCollector.ned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ module NrUeStatsCollector extends UeStatsCollector
2020
{
2121
parameters:
2222
collectorType = default("NrUeStatsCollector");
23-
packetFlowManagerModule = default("^.cellularNic.nrPacketFlowManager");
23+
packetFlowObserverModule = default("^.cellularNic.nrPacketFlowObserver");
2424
}

src/simu5g/corenetwork/statsCollector/UeStatsCollector.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "simu5g/corenetwork/statsCollector/UeStatsCollector.h"
1616
#include "simu5g/stack/mac/LteMacBase.h"
17-
#include "simu5g/stack/packetFlowManager/PacketFlowManagerUe.h"
17+
#include "simu5g/stack/packetFlowObserver/PacketFlowObserverUe.h"
1818
#include "simu5g/stack/pdcp/LtePdcp.h"
1919

2020
namespace simu5g {
@@ -34,15 +34,15 @@ void UeStatsCollector::initialize(int stage)
3434
associateId_.type = "1"; // UE_IPV4_ADDRESS
3535

3636
/*
37-
* Get packetFlowManager if present.
37+
* Get packetFlowObserver if present.
3838
* When the UE has both Lte and NR NIC, two UeStatsCollector are created.
39-
* So each of them has to get the correct reference of the packetFlowManager,
39+
* So each of them has to get the correct reference of the packetFlowObserver,
4040
* since they are split, too.
4141
*/
4242

4343
bool isNr_ = (std::string(getContainingNicModule(mac_)->getComponentType()->getName()) == "NrNicUe");
4444

45-
packetFlowManager_.reference(this, "packetFlowManagerModule", isNr_);
45+
packetFlowObserver_.reference(this, "packetFlowObserverModule", isNr_);
4646

4747
handover_ = false;
4848

@@ -63,14 +63,14 @@ void UeStatsCollector::initialize(int stage)
6363

6464
void UeStatsCollector::resetDelayCounter()
6565
{
66-
if (packetFlowManager_ != nullptr)
67-
packetFlowManager_->resetDelayCounter();
66+
if (packetFlowObserver_ != nullptr)
67+
packetFlowObserver_->resetDelayCounter();
6868
}
6969

7070
void UeStatsCollector::add_ul_nongbr_delay_ue()
7171
{
72-
if (packetFlowManager_ != nullptr) {
73-
double delay = packetFlowManager_->getDelayStats();
72+
if (packetFlowObserver_ != nullptr) {
73+
double delay = packetFlowObserver_->getDelayStats();
7474
if (delay != 0)
7575
EV << "UeStatsCollector::add_ul_nongbr_delay_ue() - delay: " << delay << endl;
7676
ul_nongbr_delay_ue.addValue((int)delay);
@@ -85,7 +85,7 @@ void UeStatsCollector::add_dl_nongbr_delay_ue(double value)
8585

8686
void UeStatsCollector::add_ul_nongbr_pdr_ue()
8787
{
88-
DiscardedPkts pair = packetFlowManager_->getDiscardedPkt();
88+
DiscardedPkts pair = packetFlowObserver_->getDiscardedPkt();
8989
double rate = ((double)pair.discarded * 1000000) / pair.total;
9090
ul_nongbr_pdr_ue.addValue((int)rate);
9191
}
@@ -161,17 +161,17 @@ int UeStatsCollector::get_dl_nongbr_data_volume_ue()
161161
DiscardedPkts UeStatsCollector::getULDiscardedPkt()
162162
{
163163
DiscardedPkts pair = { 0, 0 };
164-
if (packetFlowManager_ != nullptr) {
164+
if (packetFlowObserver_ != nullptr) {
165165

166-
pair = packetFlowManager_->getDiscardedPkt();
166+
pair = packetFlowObserver_->getDiscardedPkt();
167167
//double rate = ((double)pair.discarded * 1000000) / pair.total;
168168
}
169169
return pair;
170170
}
171171

172172
void UeStatsCollector::resetStats()
173173
{
174-
packetFlowManager_->clearStats();
174+
packetFlowObserver_->clearStats();
175175
// packet delay
176176
ul_nongbr_delay_ue.reset();
177177
dl_nongbr_delay_ue.reset();

src/simu5g/corenetwork/statsCollector/UeStatsCollector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <string>
2121
#include "simu5g/corenetwork/statsCollector/UeStatsCollector.h"
2222
#include "simu5g/stack/mac/LteMacBase.h"
23-
#include "simu5g/stack/packetFlowManager/PacketFlowManagerUe.h"
23+
#include "simu5g/stack/packetFlowObserver/PacketFlowObserverUe.h"
2424
// #include "simu5g/stack/pdcp/LtePdcp.h"
2525

2626
namespace simu5g {
@@ -46,7 +46,7 @@ class UeStatsCollector : public cSimpleModule
4646

4747
// LTE Nic layers
4848
inet::ModuleRefByPar<LteMacBase> mac_;
49-
inet::ModuleRefByPar<PacketFlowManagerUe> packetFlowManager_;
49+
inet::ModuleRefByPar<PacketFlowObserverUe> packetFlowObserver_;
5050

5151
// packet delay
5252
L2MeasBase ul_nongbr_delay_ue;

src/simu5g/corenetwork/statsCollector/UeStatsCollector.ned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module UeStatsCollector like IStatsCollector
2525
string interfaceTableModule;
2626
string macModule = default("^.cellularNic.mac");
2727
// string pdcpModule = default("^.cellularNic.pdcp");
28-
string packetFlowManagerModule = default("^.cellularNic.packetFlowManager");
28+
string packetFlowObserverModule = default("^.cellularNic.packetFlowObserver");
2929
bool movingAverage = default(true);
3030

3131
// time periods for measurements

src/simu5g/stack/LteNicBase.ned

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ package simu5g.stack;
1515
import inet.networklayer.common.NetworkInterface;
1616
import simu5g.stack.ip2nic.INetworkLayer2CellularNic;
1717
import simu5g.stack.mac.ILteMac;
18-
import simu5g.stack.packetFlowManager.IPacketFlowManager;
18+
import simu5g.stack.packetFlowObserver.IPacketFlowObserver;
1919
import simu5g.stack.pdcp.ILtePdcp;
2020
import simu5g.stack.phy.channelmodel.ILteChannelModel;
2121
import simu5g.stack.phy.ILtePhy;
@@ -80,7 +80,7 @@ module LteNicBase extends NetworkInterface like ICellularNic
8080
@display("p=362,226");
8181
d2dCapable = parent.d2dCapable;
8282
*.macModule = "^.^.mac";
83-
*.packetFlowManagerModule = parent.hasRniSupport ? "^.^.packetFlowManager" : "";
83+
*.packetFlowObserverModule = parent.hasRniSupport ? "^.^.packetFlowObserver" : "";
8484
um.nodeType = parent.nodeType;
8585
}
8686
// MAC Layer
@@ -99,7 +99,7 @@ module LteNicBase extends NetworkInterface like ICellularNic
9999
//#
100100
//# Modules used to take trace of PDCP pkt flow
101101
//#
102-
packetFlowManager: <default("")> like IPacketFlowManager if hasRniSupport {
102+
packetFlowObserver: <default("")> like IPacketFlowObserver if hasRniSupport {
103103
@display("p=70,300");
104104
}
105105

src/simu5g/stack/LteNicEnb.ned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module LteNicEnb extends LteNicBase
3232
pdcp.typename = default("LtePdcpEnb");
3333
mac.typename = default("LteMacEnb");
3434
phy.typename = default("LtePhyEnb");
35-
packetFlowManager.typename = default("PacketFlowManagerEnb");
35+
packetFlowObserver.typename = default("PacketFlowObserverEnb");
3636
d2dCapable = default(false); // DO NOT CHANGE
3737
bool compEnabled = default(false);
3838
*.handoverManagerModule = "^.handoverManager";

src/simu5g/stack/LteNicEnbD2D.ned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module LteNicEnbD2D extends LteNicEnb
2727
pdcp.typename = default("LtePdcpEnbD2D");
2828
mac.typename = default("LteMacEnbD2D");
2929
phy.typename = default("LtePhyEnbD2D");
30-
packetFlowManager.typename = default("PacketFlowManagerEnb");
30+
packetFlowObserver.typename = default("PacketFlowObserverEnb");
3131
d2dCapable = default(true); // DO NOT CHANGE
3232

3333
submodules:

0 commit comments

Comments
 (0)