@@ -322,6 +322,12 @@ void LtePdcpBase::initialize(int stage)
322322 streamingRlc_ = aToRlcType (par (" streamingRlc" ));
323323 backgroundRlc_ = aToRlcType (par (" backgroundRlc" ));
324324
325+ const char *rxEntityModuleTypeName = par (" rxEntityModuleType" ).stringValue ();
326+ rxEntityModuleType_ = cModuleType::get (rxEntityModuleTypeName);
327+
328+ const char *txEntityModuleTypeName = par (" txEntityModuleType" ).stringValue ();
329+ txEntityModuleType_ = cModuleType::get (txEntityModuleTypeName);
330+
325331 // TODO WATCH_MAP(gatemap_);
326332 WATCH (headerCompressedSize_);
327333 WATCH (nodeId_);
@@ -352,8 +358,7 @@ LteTxPdcpEntity *LtePdcpBase::getOrCreateTxEntity(MacCid cid)
352358 // Not found: create
353359 std::stringstream buf;
354360 buf << " tx-" << cid.getNodeId () << " -" << cid.getLcid ();
355- cModuleType *moduleType = cModuleType::get (" simu5g.stack.pdcp.LteTxPdcpEntity" );
356- LteTxPdcpEntity *txEnt = check_and_cast<LteTxPdcpEntity *>(moduleType->createScheduleInit (buf.str ().c_str (), this ));
361+ LteTxPdcpEntity *txEnt = check_and_cast<LteTxPdcpEntity *>(txEntityModuleType_->createScheduleInit (buf.str ().c_str (), this ));
357362 txEntities_[cid] = txEnt; // Add to entities map
358363
359364 EV << " LtePdcpBase::getTxEntity - Added new TxPdcpEntity for Cid: " << cid << " \n " ;
@@ -377,8 +382,7 @@ LteRxPdcpEntity *LtePdcpBase::getOrCreateRxEntity(MacCid cid)
377382
378383 std::stringstream buf;
379384 buf << " rx-" << cid.getNodeId () << " -" << cid.getLcid ();
380- cModuleType *moduleType = cModuleType::get (" simu5g.stack.pdcp.LteRxPdcpEntity" );
381- LteRxPdcpEntity *rxEnt = check_and_cast<LteRxPdcpEntity *>(moduleType->createScheduleInit (buf.str ().c_str (), this ));
385+ LteRxPdcpEntity *rxEnt = check_and_cast<LteRxPdcpEntity *>(rxEntityModuleType_->createScheduleInit (buf.str ().c_str (), this ));
382386 rxEntities_[cid] = rxEnt; // Add to entities map
383387
384388 EV << " LtePdcpBase::getRxEntity - Added new RxPdcpEntity for Cid: " << cid << " \n " ;
0 commit comments