N2 handover intra-AMF 2Gnb 1ue

This commit is contained in:
agtuser
2025-09-11 06:16:32 +00:00
parent 10ca9395e5
commit 388389428d
38 changed files with 4031 additions and 13 deletions

25
test_mapping.cpp Normal file
View 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;
}