@@ -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_);
@@ -354,8 +360,7 @@ LteTxPdcpEntity *LtePdcpBase::getOrCreateTxEntity(MacCid cid)
354360 // FIXME HERE
355361
356362 buf << " LteTxPdcpEntity cid: " << cid.asPackedInt ();
357- cModuleType *moduleType = cModuleType::get (" simu5g.stack.pdcp.LteTxPdcpEntity" );
358- LteTxPdcpEntity *txEnt = check_and_cast<LteTxPdcpEntity *>(moduleType->createScheduleInit (buf.str ().c_str (), this ));
363+ LteTxPdcpEntity *txEnt = check_and_cast<LteTxPdcpEntity *>(txEntityModuleType_->createScheduleInit (buf.str ().c_str (), this ));
359364 txEntities_[cid] = txEnt; // Add to entities map
360365
361366 EV << " LtePdcpBase::getTxEntity - Added new TxPdcpEntity for Cid: " << cid << " \n " ;
@@ -378,9 +383,8 @@ LteRxPdcpEntity *LtePdcpBase::getOrCreateRxEntity(MacCid cid)
378383 // Not found: create
379384
380385 std::stringstream buf;
381- buf << " LteTxPdcpEntity Cid: " << cid.asPackedInt ();
382- cModuleType *moduleType = cModuleType::get (" simu5g.stack.pdcp.LteRxPdcpEntity" );
383- LteRxPdcpEntity *rxEnt = check_and_cast<LteRxPdcpEntity *>(moduleType->createScheduleInit (buf.str ().c_str (), this ));
386+ buf << " RxPdcpEntity Cid: " << cid.asPackedInt ();
387+ LteRxPdcpEntity *rxEnt = check_and_cast<LteRxPdcpEntity *>(rxEntityModuleType_->createScheduleInit (buf.str ().c_str (), this ));
384388 rxEntities_[cid] = rxEnt; // Add to entities map
385389
386390 EV << " LtePdcpBase::getRxEntity - Added new RxPdcpEntity for Cid: " << cid << " \n " ;
0 commit comments