Skip to content

Commit 62beff6

Browse files
committed
Pdcp: rename: getTxEntity() -> getOrCreateTxEntity(); same for getRxEntity()
1 parent 98607ef commit 62beff6

8 files changed

Lines changed: 19 additions & 19 deletions

File tree

src/simu5g/stack/pdcp/LtePdcp.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void LtePdcpBase::fromDataPort(cPacket *pktAux)
192192
EV << "LteRrc : Assigned Node ID: " << nodeId_ << "\n";
193193

194194
// get the PDCP entity for this LCID and process the packet
195-
LteTxPdcpEntity *entity = getTxEntity(cid);
195+
LteTxPdcpEntity *entity = getOrCreateTxEntity(cid);
196196
entity->handlePacketFromUpperLayer(pkt);
197197
}
198198

@@ -209,7 +209,7 @@ void LtePdcpBase::fromLowerLayer(cPacket *pktAux)
209209

210210
MacCid cid = MacCid(lteInfo->getSourceId(), lteInfo->getLcid()); // TODO: check if you have to get master node id
211211

212-
LteRxPdcpEntity *entity = getRxEntity(cid);
212+
LteRxPdcpEntity *entity = getOrCreateRxEntity(cid);
213213
entity->handlePacketFromLowerLayer(pkt);
214214
}
215215

@@ -350,7 +350,7 @@ void LtePdcpBase::handleMessage(cMessage *msg)
350350
}
351351
}
352352

353-
LteTxPdcpEntity *LtePdcpBase::getTxEntity(MacCid cid)
353+
LteTxPdcpEntity *LtePdcpBase::getOrCreateTxEntity(MacCid cid)
354354
{
355355
// Find entity for this LCID
356356
PdcpTxEntities::iterator it = txEntities_.find(cid);
@@ -376,7 +376,7 @@ LteTxPdcpEntity *LtePdcpBase::getTxEntity(MacCid cid)
376376
}
377377
}
378378

379-
LteRxPdcpEntity *LtePdcpBase::getRxEntity(MacCid cid)
379+
LteRxPdcpEntity *LtePdcpBase::getOrCreateRxEntity(MacCid cid)
380380
{
381381
// Find entity for this CID
382382
PdcpRxEntities::iterator it = rxEntities_.find(cid);

src/simu5g/stack/pdcp/LtePdcp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ class LtePdcpBase : public cSimpleModule
148148
* @return pointer to the PDCP entity for the CID of the flow
149149
*
150150
*/
151-
virtual LteTxPdcpEntity *getTxEntity(MacCid cid);
151+
virtual LteTxPdcpEntity *getOrCreateTxEntity(MacCid cid);
152152

153-
virtual LteRxPdcpEntity *getRxEntity(MacCid cid);
153+
virtual LteRxPdcpEntity *getOrCreateRxEntity(MacCid cid);
154154

155155
/*
156156
* Dual Connectivity support

src/simu5g/stack/pdcp/LtePdcpEnbD2D.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void LtePdcpEnbD2D::fromDataPort(cPacket *pktAux)
8989
EV << "LtePdcpEnbD2D : dest ID: " << destId << "\n";
9090

9191
// get the PDCP entity for this LCID and process the packet
92-
LteTxPdcpEntity *entity = getTxEntity(cid);
92+
LteTxPdcpEntity *entity = getOrCreateTxEntity(cid);
9393
entity->handlePacketFromUpperLayer(pkt);
9494
}
9595

src/simu5g/stack/pdcp/LtePdcpUeD2D.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void LtePdcpUeD2D::fromDataPort(cPacket *pktAux)
120120
MacCid cid = MacCid(destId, lcid);
121121

122122
// get the PDCP entity for this CID and process the packet
123-
LteTxPdcpEntity *entity = getTxEntity(cid);
123+
LteTxPdcpEntity *entity = getOrCreateTxEntity(cid);
124124
entity->handlePacketFromUpperLayer(pkt);
125125
}
126126

src/simu5g/stack/pdcp/NrPdcpEnb.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void NrPdcpEnb::fromDataPort(cPacket *pktAux)
9090
EV << "NrPdcpEnb : dest ID: " << destId << "\n";
9191

9292
// get the PDCP entity for this LCID and process the packet
93-
LteTxPdcpEntity *entity = getTxEntity(cid);
93+
LteTxPdcpEntity *entity = getOrCreateTxEntity(cid);
9494
entity->handlePacketFromUpperLayer(pkt);
9595
}
9696

@@ -117,7 +117,7 @@ void NrPdcpEnb::fromLowerLayer(cPacket *pktAux)
117117

118118
MacCid cid = MacCid(lteInfo->getSourceId(), lteInfo->getLcid()); // TODO: check if you have to get master node id
119119

120-
LteRxPdcpEntity *entity = getRxEntity(cid);
120+
LteRxPdcpEntity *entity = getOrCreateRxEntity(cid);
121121
entity->handlePacketFromLowerLayer(pkt);
122122
}
123123

@@ -145,7 +145,7 @@ MacNodeId NrPdcpEnb::getDestId(inet::Ptr<FlowControlInfo> lteInfo)
145145
return destId;
146146
}
147147

148-
LteTxPdcpEntity *NrPdcpEnb::getTxEntity(MacCid cid)
148+
LteTxPdcpEntity *NrPdcpEnb::getOrCreateTxEntity(MacCid cid)
149149
{
150150
// Find entity for this CID
151151
PdcpTxEntities::iterator it = txEntities_.find(cid);
@@ -170,7 +170,7 @@ LteTxPdcpEntity *NrPdcpEnb::getTxEntity(MacCid cid)
170170
}
171171
}
172172

173-
LteRxPdcpEntity *NrPdcpEnb::getRxEntity(MacCid cid)
173+
LteRxPdcpEntity *NrPdcpEnb::getOrCreateRxEntity(MacCid cid)
174174
{
175175
// Find entity for this CID
176176
PdcpRxEntities::iterator it = rxEntities_.find(cid);

src/simu5g/stack/pdcp/NrPdcpEnb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class NrPdcpEnb : public LtePdcpEnbD2D
7171
* @return Pointer to the PDCP entity for the LCID of the flow
7272
*
7373
*/
74-
LteTxPdcpEntity *getTxEntity(MacCid lcid) override;
75-
LteRxPdcpEntity *getRxEntity(MacCid cid) override;
74+
LteTxPdcpEntity *getOrCreateTxEntity(MacCid lcid) override;
75+
LteRxPdcpEntity *getOrCreateRxEntity(MacCid cid) override;
7676

7777
/*
7878
* Dual Connectivity support

src/simu5g/stack/pdcp/NrPdcpUe.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ void NrPdcpUe::fromDataPort(cPacket *pktAux)
145145
MacCid cid = MacCid(destId, lcid);
146146

147147
// get the PDCP entity for this CID and process the packet
148-
LteTxPdcpEntity *entity = getTxEntity(cid);
148+
LteTxPdcpEntity *entity = getOrCreateTxEntity(cid);
149149
entity->handlePacketFromUpperLayer(pkt);
150150
}
151151

152-
LteTxPdcpEntity *NrPdcpUe::getTxEntity(MacCid cid)
152+
LteTxPdcpEntity *NrPdcpUe::getOrCreateTxEntity(MacCid cid)
153153
{
154154
// Find entity for this LCID
155155
PdcpTxEntities::iterator it = txEntities_.find(cid);
@@ -174,7 +174,7 @@ LteTxPdcpEntity *NrPdcpUe::getTxEntity(MacCid cid)
174174
}
175175
}
176176

177-
LteRxPdcpEntity *NrPdcpUe::getRxEntity(MacCid cid)
177+
LteRxPdcpEntity *NrPdcpUe::getOrCreateRxEntity(MacCid cid)
178178
{
179179
// Find entity for this CID
180180
PdcpRxEntities::iterator it = rxEntities_.find(cid);

src/simu5g/stack/pdcp/NrPdcpUe.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ class NrPdcpUe : public LtePdcpUeD2D
7373
* @return pointer to the PDCP entity for the LCID of the flow
7474
*
7575
*/
76-
LteTxPdcpEntity *getTxEntity(MacCid lcid) override;
77-
LteRxPdcpEntity *getRxEntity(MacCid lcid) override;
76+
LteTxPdcpEntity *getOrCreateTxEntity(MacCid lcid) override;
77+
LteRxPdcpEntity *getOrCreateRxEntity(MacCid lcid) override;
7878

7979
/*
8080
* sendToLowerLayer() forwards a PDCP PDU to the RLC layer

0 commit comments

Comments
 (0)