N2 handover intra-AMF 2Gnb 1ue
This commit is contained in:
25
test_mapping.cpp
Normal file
25
test_mapping.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <iostream>
|
||||
|
||||
void testMapping(int targetGnbId) {
|
||||
int targetCellId;
|
||||
|
||||
// 目标cell ID将从目标gNB ID推导
|
||||
// gNB-1 -> NCI=16, gNB-16 -> NCI=256
|
||||
if (targetGnbId == 1) {
|
||||
targetCellId = 16;
|
||||
} else if (targetGnbId == 16) {
|
||||
targetCellId = 256;
|
||||
} else {
|
||||
targetCellId = targetGnbId * 16; // 默认映射
|
||||
}
|
||||
|
||||
std::cout << "gNB ID " << targetGnbId << " maps to Cell ID " << targetCellId << std::endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "Testing gNB to Cell ID mapping:" << std::endl;
|
||||
testMapping(1);
|
||||
testMapping(16);
|
||||
testMapping(5);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user