Skip to content

Commit f4dff5c

Browse files
committed
Binder: added isGNodeB() utility function
1 parent 95d1ded commit f4dff5c

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/simu5g/common/binder/Binder.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,14 @@ RanNodeType Binder::getBaseStationTypeById(MacNodeId cellId)
12401240
}
12411241
}
12421242

1243+
bool Binder::isGNodeB(MacNodeId enbId)
1244+
{
1245+
ASSERT(getNodeTypeById(enbId) == ENODEB);
1246+
cModule *module = getModuleByMacNodeId(enbId);
1247+
std::string nodeTypeStr = module->par("nodeType").stdstringValue();
1248+
return nodeTypeStr == "GNODEB";
1249+
}
1250+
12431251
CellInfo *Binder::getCellInfoByNodeId(MacNodeId nodeId)
12441252
{
12451253
// Check if it is an eNodeB

src/simu5g/common/binder/Binder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,7 @@ class Binder : public cSimpleModule
608608
void moveUeCollector(MacNodeId ue, MacCellId oldCell, MacCellId newCell);
609609

610610
RanNodeType getBaseStationTypeById(MacNodeId);
611+
bool isGNodeB(MacNodeId enbId);
611612

612613
// Moved from LteCommon - getter functions that were taking Binder as first parameter
613614
CellInfo *getCellInfoByNodeId(MacNodeId nodeId);

0 commit comments

Comments
 (0)