Skip to content

Commit e444559

Browse files
committed
PacketFlowManager: public->protected change for methods only used internally
This makes its public API smaller and more transparent.
1 parent 03120cf commit e444559

3 files changed

Lines changed: 11 additions & 14 deletions

File tree

src/simu5g/stack/packetFlowManager/PacketFlowManagerBase.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ class PacketFlowManagerBase : public cSimpleModule
7272

7373
int headerCompressedSize_;
7474

75+
protected:
7576
int numInitStages() const override { return 2; }
7677
void initialize(int stage) override;
77-
78-
public:
79-
78+
void finish() override;
8079

8180
// return true if a structure for this lcid is present
8281
virtual bool hasLcid(LogicalCid lcid) = 0;
@@ -96,6 +95,7 @@ class PacketFlowManagerBase : public cSimpleModule
9695
// reset structures for all connections
9796
virtual void clearAllLcid() = 0;
9897

98+
public:
9999
/*
100100
* This method inserts a new pdcp seqnum and the corresponding entry time
101101
* @param lcid
@@ -112,7 +112,6 @@ class PacketFlowManagerBase : public cSimpleModule
112112
* @param lcid
113113
* @param rlcPdu packet pointer
114114
*/
115-
116115
virtual void insertRlcPdu(LogicalCid lcid, const inet::Ptr<LteRlcUmDataPdu> rlcPdu, RlcBurstStatus status) = 0;
117116

118117
/*
@@ -152,8 +151,6 @@ class PacketFlowManagerBase : public cSimpleModule
152151
virtual void grantSent(MacNodeId nodeId, unsigned int grantId) {}
153152

154153
virtual void resetDiscardCounter();
155-
156-
void finish() override;
157154
};
158155

159156
} //namespace

src/simu5g/stack/packetFlowManager/PacketFlowManagerEnb.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ class PacketFlowManagerEnb : public PacketFlowManagerBase
119119
// used to evaluate the delay with respect to the one reported by Simu5G
120120
cOutVector timesUe_;
121121

122+
protected:
123+
void initialize(int stage) override;
124+
void finish() override;
125+
122126
/*
123127
* This method checks if a PDCP PDU of a LCID is part of a burst of data.
124128
* In a positive case, according to the ack boolean its size is counted in the
@@ -135,9 +139,6 @@ class PacketFlowManagerEnb : public PacketFlowManagerBase
135139
*/
136140
void initPdcpStatus(StatusDescriptor *desc, unsigned int pdcp, unsigned int sduHeaderSize, simtime_t& arrivalTime);
137141

138-
void initialize(int stage) override;
139-
140-
public:
141142
// return true if a structure for this LCID is present
142143
bool hasLcid(LogicalCid lcid) override;
143144
// initialize a new structure for this LCID
@@ -147,6 +148,7 @@ class PacketFlowManagerEnb : public PacketFlowManagerBase
147148
// reset structures for all connections
148149
void clearAllLcid() override;
149150

151+
public:
150152
void insertPdcpSdu(inet::Packet *pdcpPkt) override;
151153
void receivedPdcpSdu(inet::Packet *pdcpPkt) override;
152154

@@ -215,7 +217,6 @@ class PacketFlowManagerEnb : public PacketFlowManagerBase
215217

216218
virtual double getThroughputStatsPerUe(MacNodeId id);
217219
virtual void resetThroughputCounterPerUe(MacNodeId id);
218-
void finish() override;
219220
};
220221

221222
} //namespace

src/simu5g/stack/packetFlowManager/PacketFlowManagerUe.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ class PacketFlowManagerUe : public PacketFlowManagerBase
7171
protected:
7272

7373
void initialize(int stage) override;
74+
void finish() override;
75+
7476
void initPdcpStatus(StatusDescriptor *desc, unsigned int pdcp, unsigned int sduHeaderSize, simtime_t& arrivalTime);
7577

76-
public:
7778
// return true if a structure for this LCID is present
7879
bool hasLcid(LogicalCid lcid) override;
7980
// initialize a new structure for this LCID
@@ -82,8 +83,8 @@ class PacketFlowManagerUe : public PacketFlowManagerBase
8283
void clearLcid(LogicalCid lcid) override;
8384
// reset structures for all connections
8485
void clearAllLcid() override;
85-
virtual void clearStats();
8686

87+
public:
8788
void insertPdcpSdu(inet::Packet *pdcpPkt) override;
8889

8990
void receivedPdcpSdu(inet::Packet *pdcpPkt) override { /*TODO*/ }
@@ -136,8 +137,6 @@ class PacketFlowManagerUe : public PacketFlowManagerBase
136137
double getDelayStats();
137138
void resetDelayCounter();
138139

139-
void finish() override;
140-
141140
};
142141

143142
} //namespace

0 commit comments

Comments
 (0)